/*!
Theme Name: CIED
Theme URI: http://underscores.me/
Author: Underscores.me
Author URI: http://underscores.me/
Description: Tema modular para el Congreso Internacional de Ciencias del Ejercicio y Deporte.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: cied
*/

/*--------------------------------------------------------------
# 1. NORMALIZE & BASE RESET
--------------------------------------------------------------*/
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	line-height: 1.15;
	-webkit-text-size-adjust: 100%;
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	background: #ffffff;
	color: #1a1a1a;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 1rem;
	line-height: 1.6;
}

main {
	display: block;
}

h1, h2, h3, h4, h5, h6 {
	margin-top: 0;
	clear: both;
}

p {
	margin: 0 0 1.5em;
}

a {
	background-color: transparent;
	text-decoration: none;
}

img {
	border-style: none;
	height: auto;
	max-width: 100%;
}

/*--------------------------------------------------------------
# 2. VARIABLES & CONTENEDOR PRINCIPAL
--------------------------------------------------------------*/
:root {
	--cied-primary: #002855;    /* Azul institucional UGR */
	--cied-secondary: #00a896;  /* Verde Turquesa acento */
	--cied-dark: #1a1a1a;
	--cied-light: #f8f9fa;
	--cied-white: #ffffff;
}

.cied-landing-wrapper {
	color: var(--cied-dark);
}

.cied-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.cied-section {
	padding: 80px 0;
}

.cied-seccion-titulo {
	text-align: center;
	font-size: 2.2rem;
	font-weight: 700;
	color: var(--cied-primary);
	margin-bottom: 45px;
	position: relative;
}

.cied-seccion-titulo::after {
	content: '';
	display: block;
	width: 60px;
	height: 4px;
	background: var(--cied-secondary);
	margin: 15px auto 0 auto;
	border-radius: 2px;
}

/* Compensación de espacio para header fijo */
body.home, body {
	padding-top: 75px !important;
}

/*--------------------------------------------------------------
# 3. HEADER INSTITUCIONAL (RÉPLICA CONGRESO UGR)
--------------------------------------------------------------*/
.cied-header-nav {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 9999;
	background: var(--cied-primary);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
	padding: 12px 0;
	transition: all 0.3s ease;
}

.cied-header-container {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 25px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.cied-brand {
	display: flex;
	align-items: center;
}

.cied-brand img,
.cied-brand .custom-logo {
	max-height: 52px;
	width: auto;
	display: block;
	filter: brightness(0) invert(1);
}

.cied-logo-text {
	color: var(--cied-white);
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: 1px;
}

.cied-main-nav {
	display: flex;
	align-items: center;
	gap: 30px;
}

.cied-menu-list {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 24px;
}

.cied-menu-list li a {
	color: var(--cied-white);
	font-size: 0.9rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	padding: 8px 4px;
	transition: color 0.25s ease;
	position: relative;
}

.cied-menu-list li a:hover,
.cied-menu-list li.current-menu-item > a {
	color: var(--cied-secondary);
}

.cied-menu-list li a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--cied-secondary);
	transition: width 0.25s ease;
}

.cied-menu-list li a:hover::after {
	width: 100%;
}

.cied-header-btn {
	background: var(--cied-secondary);
	color: var(--cied-white) !important;
	padding: 10px 22px;
	border-radius: 50px;
	font-weight: 700;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	transition: background 0.3s ease, transform 0.2s ease;
	box-shadow: 0 4px 12px rgba(0, 168, 150, 0.3);
}

.cied-header-btn:hover {
	background: #008f7f;
	transform: translateY(-2px);
}

/*--------------------------------------------------------------
# 4. HERO BANNER & COUNTDOWN
--------------------------------------------------------------*/
.section-hero {
	position: relative;
	min-height: 85vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: var(--cied-white);
	background-size: cover !important;
	background-position: center center !important;
	background-repeat: no-repeat !important;
	padding: 100px 0 60px 0;
}

.section-hero::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0, 20, 40, 0.75);
	z-index: 1;
}

.section-hero .cied-container {
	position: relative;
	z-index: 2;
}

.hero-subtitulo {
	font-size: 1.1rem;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: var(--cied-secondary);
	font-weight: 700;
	margin-bottom: 10px;
}

.hero-titulo {
	font-size: 2.8rem;
	font-weight: 800;
	line-height: 1.2;
	margin-bottom: 20px;
	text-transform: uppercase;
}

.hero-bajada {
	font-size: 1.2rem;
	max-width: 800px;
	margin: 0 auto 30px auto;
	opacity: 0.9;
}

.hero-badge {
	display: inline-block;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(5px);
	padding: 8px 20px;
	border-radius: 50px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	font-size: 1rem;
	margin-bottom: 30px;
}

/* Countdown */
.cied-countdown {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin: 30px 0;
}

.cied-countdown .cd-box,
.cied-countdown .cied-countdown-item {
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.2);
	padding: 12px 20px;
	border-radius: 8px;
	min-width: 80px;
	text-align: center;
}

.cied-countdown .num,
.cied-countdown .number {
	display: block;
	font-size: 2rem;
	font-weight: 800;
	color: var(--cied-white);
}

.cied-countdown .lbl,
.cied-countdown .label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--cied-secondary);
}

/* Botones */
.cied-btn {
	display: inline-block;
	padding: 14px 32px;
	border-radius: 4px;
	font-weight: 700;
	text-transform: uppercase;
	transition: all 0.3s ease;
}

.cied-btn.btn-primary {
	background: var(--cied-secondary);
	color: var(--cied-white);
}

.cied-btn.btn-primary:hover {
	background: #008677;
	transform: translateY(-2px);
}

/*--------------------------------------------------------------
# 5. DISERTANTES - SLIDER FOTO COMPLETA MAXIMIZADO
--------------------------------------------------------------*/
.section-disertantes {
	padding: 60px 0;
}

.section-disertantes .cied-container {
	max-width: 1200px;
	margin: 0 auto;
}

.swiper-disertantes {
	padding: 15px 20px 60px 20px !important;
}

.card-disertante-full {
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	min-height: 480px;
}

.card-disertante-full:hover {
	transform: translateY(-8px);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.disertante-foto-wrapper {
	position: relative;
	width: 100%;
	height: 360px;
	overflow: hidden;
	background: #e9ecef;
}

.disertante-foto-wrapper img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	object-position: top center !important;
	transition: transform 0.5s ease;
}

.card-disertante-full:hover .disertante-foto-wrapper img {
	transform: scale(1.04);
}

.disertante-info {
	padding: 20px;
	background: #ffffff;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.disertante-info h3 {
	font-size: 1.25rem !important;
	font-weight: 700;
	color: var(--cied-primary);
	margin: 0 0 6px 0;
	line-height: 1.3;
}

.disertante-info .cargo {
	font-size: 0.95rem !important;
	color: #555555;
	margin: 0;
	line-height: 1.4;
}

.swiper-disertantes .swiper-button-next, 
.swiper-disertantes .swiper-button-prev {
	color: var(--cied-primary) !important;
	background: rgba(255, 255, 255, 0.9);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.swiper-disertantes .swiper-button-next::after, 
.swiper-disertantes .swiper-button-prev::after {
	font-size: 18px;
	font-weight: bold;
}

.swiper-pagination-bullet-active {
	background: var(--cied-secondary) !important;
}

/*--------------------------------------------------------------
# 6. RESPONSIVE / MEDIA QUERIES
--------------------------------------------------------------*/
@media (max-width: 991px) {
	.cied-header-container {
		flex-direction: column;
		gap: 12px;
	}
	.cied-main-nav {
		flex-direction: column;
		gap: 12px;
	}
	.cied-menu-list {
		gap: 15px;
		flex-wrap: wrap;
		justify-content: center;
	}
}

@media (max-width: 768px) {
	.hero-titulo { font-size: 2rem; }
	.hero-bajada { font-size: 1rem; }
	.cied-countdown { gap: 8px; }
	.cied-countdown .cd-box,
	.cied-countdown .cied-countdown-item { padding: 8px 12px; min-width: 60px; }
	.cied-countdown .num,
	.cied-countdown .number { font-size: 1.4rem; }
}

/* ==========================================================================
   CORRECCIÓN HEADER FIJO + BARRA DE ADMINISTRACIÓN WORDPRESS
   ========================================================================== */

/* 1. Eliminar cualquier margen superior del body y HTML para evitar la franja blanca */
html, body {
    margin-top: 0 !important;
}

/* Compensación dinámica de padding-top para que el Hero empiece justo debajo del header */
body.home, body {
    padding-top: 75px !important;
}

/* 2. Ajuste cuando la barra de administración de WP está activa (Sesión iniciada) */
body.admin-bar .cied-header-nav {
    top: 32px;
}

/* Ajustes Responsive para la barra de administración */
@media screen and (max-width: 782px) {
    body.admin-bar .cied-header-nav {
        top: 46px;
    }
}

@media screen and (max-width: 600px) {
    body.admin-bar .cied-header-nav {
        top: 0; /* En pantallas muy pequeñas WP desasocia la barra fija */
    }
}