/* escuela_nufio.css */

:root {
    --primary-color: #661D26;   /* El granate de tu logo */
    --accent-color: #C59B27;    /* Oro académico para botones */
    --bg-light: #FAF7F2;        /* Crema suave para fondos */
    --text-dark: #2A2223;       /* Gris oscuro para el texto */
    --border-color: #E6DFD5;    /* Gris para líneas y bordes */
    --white: #FFFFFF;
}
html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Fuerza al cuerpo a medir al menos el alto de la ventana del navegador */
}

/* La etiqueta <main> crecerá automáticamente para llenar el espacio vacío */
.site-main {
    flex: 1 0 auto; /* Crece para empujar el footer, pero no se encoge si hay mucho texto */
}

/* El footer se mantiene firme al fondo sin aplastarse */
.site-footer {
    flex-shrink: 0;
}
/* =======================================================
   HEADER INICIAL (Transparente sobre el Carrusel)
   ======================================================= */
.site-header {
    position: fixed; /* Hace que flote sobre el contenido */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100; /* Asegura que esté por encima del carrusel */
    transition: all 0.4s ease-in-out; /* Transición suave de transformación */
}

/* Barra superior translúcida al inicio */
.top-bar {
    background-color: rgba(11, 11, 11, 0.5); /* Negro translúcido */
    color: #eee;
    padding: 8px 0;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    max-height: 40px;
    opacity: 1;
    overflow: hidden;
}

/* Menú de navegación transparente */
.sticky-nav {
    background-color: transparent !important; /* Transparente al inicio */
    color: white;
    padding: 20px 0; /* Más espaciado inicial */
    border-bottom: 1px solid rgba(255, 255, 255, 0.15); /* Línea sutil blanca */
    box-shadow: none;
    transition: all 0.4s ease-in-out;
}

.sticky-nav a {
    color: white !important;
    text-decoration: none;
    transition: color 0.3s ease;
}


/* =======================================================
   ESTADO SCROLLED (Cuando el usuario baja en la página)
   ======================================================= */

/* Ocultamos y colapsamos la barra de teléfono/correo para ganar espacio */
.site-header.scrolled .top-bar {
    max-height: 0;
    padding: 0;
    opacity: 0;
}

/* El menú se vuelve sólido con el granate y borde dorado */
.site-header.scrolled .sticky-nav {
    background-color: #661D26 !important; /* Granate de tu logo */
    padding: 12px 0; /* Se encoge un poco para verse más estilizado */
    border-bottom: 3px solid #C59B27; /* Línea dorada institucional */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.site-header.scrolled .sticky-nav a:hover {
    color: #C59B27 !important; /* Enlaces se iluminan en dorado al pasar el cursor */
}

/* Aplicación de los colores globales */
body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    padding-top: 120px !important;
}

/* 1. Header y Sticky Menu */
.top-bar {
    background-color: #50151D; /* Un tono un poco más oscuro que el granate para la barra superior */
    color: #E6DFD5;
}

.sticky-nav {
    background-color: var(--primary-color) !important; /* El color de tu logo en el menú principal */
    border-bottom: 3px solid var(--accent-color); /* Una línea dorada delgada debajo del menú */
}

.nav-links a:hover {
    color: var(--accent-color) !important; /* Resalta los enlaces del menú en dorado al pasar el cursor */
}

/* 2. Botones de Llamado a la Acción (CTA) */
.btn-primary, .btn-slide, .btn-yellow {
    background-color: var(--accent-color) !important;
    color: var(--white) !important;
    transition: background-color 0.3s ease;
}

.btn-primary:hover, .btn-slide:hover, .btn-yellow:hover {
    background-color: #A37E1C !important; /* Un dorado un poco más oscuro para el efecto hover */
}

/* 3. Tarjetas y Secciones */
.level-card {
    background-color: var(--white);
    border-bottom: 4px solid var(--primary-color) !important; /* Tarjetas con base granate */
}

.col-right-events-box {
    background-color: var(--primary-color) !important; /* Caja de eventos en color granate institucional */
    color: var(--white) !important;
}

.col-right-events-box h3, .col-right-events-box h4 a {
    color: var(--accent-color) !important; /* Títulos de eventos en dorado sobre fondo granate */
}

.col-right-events-box hr {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Muestra el submenú al pasar el cursor sobre la pestaña padre */
.dropdown:hover .dropdown-menu {
    display: block !important;
}
.dropdown-menu li a:hover {
    color: #ffcc00 !important; /* Resalta con amarillo institucional */
}

/* Estructura del Carrusel */
.modern-hero-slider {
    position: relative;
    width: 100%;
    height: 100vh; 
    height: 100dvh;
    overflow: hidden;
}

.slider-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide-item {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

.slide-item.active {
    opacity: 1;
    z-index: 2;
}

/* Capa oscura translúcida para legibilidad de textos */
.slide-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(42, 34, 35, 0.45); /* Base de nuestro gris oscuro institucional */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-title {
    font-family: 'Georgia', serif; /* Tipografía elegante como la de la imagen */
    font-size: 3.5rem;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-description {
    color: #faf7f2; /* Crema suave */
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto 35px auto;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

/* Estilos de los Botones Redondeados (Pills) */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-hero {
    padding: 12px 30px;
    font-size: 0.95rem;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 50px; /* Bordes redondeados idénticos a la imagen */
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Botón 1: Oscuro Translúcido */
.btn-dark-translucent {
    background-color: rgba(42, 34, 35, 0.7);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-dark-translucent:hover {
    background-color: rgba(42, 34, 35, 0.9);
}

/* Botón 2: Dorado Institucional ENB */
.btn-gold {
    background-color: #C59B27; /* Oro académico de tu escudo */
    color: #ffffff;
}

.btn-gold:hover {
    background-color: #A37E1C; /* Dorado más oscuro */
}

/* Puntos indicadores inferiores */
.slider-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: #C59B27; /* Punto activo dorado */
}

/* =======================================================
   COMPORTAMIENTO EXCLUSIVO DE LA HOME PAGE
   ======================================================= */

/* Quitamos el espacio de arriba para que el Slider empiece en el tope absoluto */
body.home-page {
    padding-top: 0 !important;
}

/* 1. Forzamos que el contenedor padre de todo el menú sea transparente al inicio */
body.home-page .site-header {
    background-color: transparent !important;
}

/* 2. Forzamos transparencia en la barra superior */
body.home-page .top-bar {
    background-color: rgba(11, 11, 11, 0.5) !important; /* Negro translúcido al inicio */
}

/* 3. Forzamos transparencia en el menú de navegación */
body.home-page .sticky-nav {
    background-color: transparent !important; /* Transparente al inicio */
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important; /* Línea sutil blanca */
    box-shadow: none !important;
    padding: 20px 0; /* Más espaciado inicial */
}

/* ESTADO SCROLLED (Solo se activa en la Home Page al bajar con el JS) */
body.home-page .site-header.scrolled .top-bar {
    max-height: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
}

body.home-page .site-header.scrolled .sticky-nav {
    background-color: #661D26 !important; /* Vuelve al granate sólido */
    padding: 12px 0 !important; 
    border-bottom: 3px solid #C59B27 !important; /* Línea dorada institucional */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
}

/* =======================================================
   ESTILOS DE LA SECCIÓN DE MAPA (LIMPIOS Y CLASES CSS)
   ======================================================= */
.map-section {
    padding: 70px 0;
    background-color: var(--bg-light);
}

.map-grid {
    display: flex;
    gap: 40px;
    align-items: stretch; /* Hace que ambas columnas tengan la misma altura */
}

.map-iframe-container {
    flex: 1.5; /* Toma un 60% del espacio aproximado */
    min-height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.map-iframe-container iframe {
    min-height: 400px;
    display: block;
}

.map-info-card {
    flex: 1; /* Toma un 40% del espacio aproximado */
    background-color: #ffffff;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 5px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.map-tag {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.map-title {
    font-family: 'Georgia', serif;
    font-size: 2rem;
    margin: 10px 0 15px 0;
    color: var(--primary-color);
}

.map-subtitle {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.map-details {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 25px;
    text-align: left; /* Alinea los textos de dirección a la izquierda */
}

.btn-gps {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-gps:hover {
    background-color: #50151D;
}

/* =======================================================
   COMPORTAMIENTO RESPONSIVO EN CELULARES (MÓVIL)
   ======================================================= */
@media (max-width: 768px) {
    .map-grid {
        flex-direction: column !important; /* Apila el mapa arriba y la tarjeta abajo */
        gap: 25px !important;
    }

    .map-iframe-container {
        width: 100% !important;
        flex: none !important;
        height: 300px !important; /* Altura ideal del mapa en pantallas de celular */
        min-height: 300px !important;
    }

    .map-iframe-container iframe {
        height: 300px !important;
        min-height: 300px !important;
    }

    .map-info-card {
        width: 100% !important;
        flex: none !important;
        padding: 25px !important;
    }

    .map-title {
        font-size: 1.6rem !important; /* Letra un poco más pequeña en celular */
    }
}

/* =======================================================
   ESTILOS DEL BOTÓN DE HAMBURGUESA (Móvil y Escritorio)
   ======================================================= */
.nav-toggle {
    display: none; /* Oculto por defecto en computadoras */
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
    z-index: 1200;
}

.nav-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Animación del botón de hamburguesa al abrirse (forma una X) */
.nav-toggle.open .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.nav-toggle.open .bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


/* =======================================================
   MEDIA QUERY PARA TABLET Y MÓVIL (991px o menos)
   ======================================================= */
@media (max-width: 991px) {
    
    /* 1. Mostramos el botón de hamburguesa */
    .nav-toggle {
        display: flex;
    }

    /* 2. Convertimos el menú horizontal en un panel lateral deslizante */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Oculto fuera de la pantalla hacia la derecha */
        width: 280px; /* Ancho del menú lateral */
        height: 100vh; /* Altura de pantalla completa */
        background-color: var(--primary-color) !important; /* Fondo granate */
        flex-direction: column !important; /* Apila los enlaces de arriba a abajo */
        align-items: flex-start;
        padding: 100px 30px 40px 30px !important;
        gap: 20px !important;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        z-index: 1150;
    }

    /* Estado activo: se desliza hacia la pantalla */
    .nav-links.active {
        right: 0;
    }

    /* 3. Ajustes para los submenús (Dropdowns) en móvil */
    /* En pantallas táctiles, el hover no es ideal; el menú se expandirá verticalmente */
    .dropdown {
        width: 100%;
    }
    
    .dropdown:hover .dropdown-menu {
        display: none !important; /* Desactivamos el hover en móvil */
    }

    /* Clase para mostrar el submenú con un toque en móvil */
    .dropdown.open .dropdown-menu {
        display: block !important;
        position: static !important; /* Se integra en el flujo vertical */
        background-color: rgba(0, 0, 0, 0.2) !important;
        box-shadow: none !important;
        width: 100%;
        padding-left: 15px !important;
        margin-top: 10px;
    }
}

/* =======================================================
   SECCIÓN DE TARJETAS DE SERVICIOS DESTACADOS
   ======================================================= */
.featured-services-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.services-main-title {
    text-align: center;
    margin-bottom: 40px;
    font-family: 'Georgia', serif;
    font-size: 2.2rem;
    color: var(--primary-color);
}

/* Grilla Responsiva usando CSS Grid (Se adapta sola) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

/* Tarjeta Individual */
.service-card {
    display: block;
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 18px; /* Bordes muy redondeados como en tu imagen */
    overflow: hidden;
    position: relative;
    text-decoration: none;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Efecto hover interactivo al pasar el cursor */
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

/* Capa de color oscura sobre la imagen (Puedes usar azul/gris o tu granate) */
.card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.65); /* Tono azulado-grisáceo oscuro de tu imagen */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Contenido de la tarjeta */
.card-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

/* El marco con borde blanco (Para la tarjeta central de tu imagen) */
.card-content.with-frame {
    border: 1.5px solid rgba(255, 255, 255, 0.6); /* Borde blanco sutil */
    border-radius: 8px; /* Redondeado interno del marco */
    padding: 10px;
}

.card-title {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* =======================================================
   RESPONSIVIDAD AUTOMÁTICA EN MÓVILES (BAJO 768PX)
   ======================================================= */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr; /* Una sola columna en celulares */
        gap: 20px;
    }

    .service-card {
        height: 220px; /* Reducimos ligeramente la altura para pantallas pequeñas */
    }

    .card-title {
        font-size: 1.35rem;
    }
}
/* =======================================================
   ESTILOS DEL COMUNICADO EMERGENTE (POP-UP)
   ======================================================= */
.popup-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000; /* Siempre sobre todo lo demás */
}

.popup-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(42, 34, 35, 0.75); /* Filtro oscuro en nuestro color de texto */
}

.popup-modal {
    position: relative;
    width: 90%;
    max-width: 850px;
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 10;
    animation: popupScaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Efecto suave de apertura */
@keyframes popupScaleUp {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Botón de Cerrar (Equis) */
.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.2rem;
    color: #999;
    cursor: pointer;
    z-index: 20;
    transition: color 0.3s;
}

.popup-close:hover {
    color: var(--primary-color);
}

/* Grilla de Contenido */
.popup-grid {
    display: flex;
    min-height: 450px;
}

.popup-image-side {
    flex: 1.1;
    background-size: cover;
    background-position: center;
}

.popup-text-side {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.popup-tag {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.popup-title {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 10px 0 15px 0;
}

.popup-message {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.btn-popup {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    display: inline-block;
    align-self: flex-start;
    transition: background-color 0.3s;
}

.btn-popup:hover {
    background-color: #50151D;
}

/* Responsividad para móviles */
@media (max-width: 768px) {
    .popup-grid {
        flex-direction: column;
        min-height: auto;
    }
    .popup-image-side {
        height: 200px;
        flex: none;
    }
    .popup-text-side {
        padding: 25px;
    }
    .popup-title {
        font-size: 1.5rem;
    }
    .popup-close {
        color: white; /* Resalta en móvil si queda sobre la imagen superior */
        text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    }
}

/* =======================================================
   ESTILOS DE PÁGINAS COMUNES (FLEX PAGES)
   ======================================================= */
.inner-page-banner {
    padding: 70px 0;
    /* Color arena/crema suave para contrastar con el menú granate */
    background-color: #F3EDE6 !important; 
    border-bottom: 2px solid var(--border-color);
    color: var(--text-dark);
}

.banner-title {
    font-family: 'Georgia', serif;
    font-size: 2.2rem;
    margin: 0;
    font-weight: bold;
    color: #661D26 !important; /* El título destaca en el Granate de tu logo */
}

.breadcrumbs {
    color: #777 !important;
    font-size: 0.9rem;
    font-weight: bold;
}
.breadcrumbs a {
    color: #661D26 !important; /* Los enlaces de navegación secundaria en Granate */
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: var(--accent-color) !important; /* Hover dorado */
}

/* Estilos para textos enriquecidos dentro de páginas comunes */
.flex-page-content .rich_text p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 25px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.flex-page-content .rich_text h2 {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 15px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* =======================================================
   RESPONSIVIDAD MÓVIL
   ======================================================= */
@media (max-width: 768px) {
    .inner-page-banner {
        text-align: center;
        padding: 70px 15px;
    }
    
    .banner-title {
        font-size: 2rem;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .breadcrumbs {
        width: 100%;
        text-align: center;
    }

    .staff-grid {
        flex-direction: column !important; /* Apilar directores de forma vertical en móviles */
        align-items: center;
    }
}

/* =======================================================
   GALERÍA / SLIDESHOW DE FOTOS INTERACTIVO
   ======================================================= */
.gallery-slideshow-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.gallery-main-title {
    font-family: 'Georgia', serif;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 35px;
}

/* El visualizador principal */
.gallery-showcase {
    position: relative;
    max-width: 850px;
    height: 520px;
    margin: 0 auto 20px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    background-color: #1a1a1a;
}

.gallery-images-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide.active {
    opacity: 1;
    z-index: 2;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Botones flotantes izquierdo / derecho */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(102, 29, 38, 0.7); /* Granate institucional translúcido */
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s, transform 0.2s;
}

.gallery-nav-btn:hover {
    background-color: var(--accent-color); /* Cambia a dorado al pasar el cursor */
    transform: translateY(-50%) scale(1.05);
}

.prev-gallery-btn { left: 15px; }
.next-gallery-btn { right: 15px; }

/* Fila de Miniaturas */
.gallery-thumbnails {
    display: flex;
    justify-content: center;
    gap: 12px;
    max-width: 850px;
    margin: 0 auto;
    overflow-x: auto;
    padding: 10px 0;
}

.thumb-item {
    width: 110px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.55;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-item:hover, .thumb-item.active {
    opacity: 1;
    border-color: var(--accent-color); /* Borde dorado para el elemento activo */
}

/* =======================================================
   RESPONSIVIDAD MÓVIL
   ======================================================= */
@media (max-width: 768px) {
    .gallery-showcase {
        height: 320px; /* Tamaño adaptado a teléfonos móviles */
    }
    
    .gallery-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    .thumb-item {
        width: 80px;
        height: 55px;
    }
}

/* =======================================================
   SECCIÓN DIVIDIDA (REQUISITOS + TARJETA DE IMAGEN)
   ======================================================= */
.split-card-section {
    padding: 70px 0;
    background-color: var(--bg-light);
}

.split-card-grid {
    display: flex;
    gap: 50px;
    align-items: stretch; /* Ambas columnas miden lo mismo de alto */
}

/* Columna de Texto (Izquierda) */
.split-left-content {
    flex: 1.2; /* Toma un poco más de espacio para la lista */
    text-align: left;
}

.split-left-content h2 {
    font-family: 'Georgia', serif;
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    line-height: 1.3;
}

/* Columna de la Tarjeta (Derecha) */
.split-right-card {
    flex: 1;
    min-height: 500px;
    display: flex;
}

.image-card-container {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 16px; /* Esquinas redondeadas como la imagen */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12); /* Sombra suave */
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* El degradado blanco superior para que el texto sea perfectamente legible */
.image-card-overlay-text {
    width: 100%;
    padding: 35px 35px 60px 35px;
    background: linear-gradient(
        to bottom, 
        rgba(255, 255, 255, 0.92) 0%, 
        rgba(255, 255, 255, 0.8) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    text-align: center;
    font-family: 'Georgia', serif;
    font-size: 1.5rem;
    line-height: 1.5;
}

/* TRUCO DE COLOR: Negrita en Granate, Cursiva en Dorado */
.image-card-overlay-text strong {
    color: var(--primary-color) !important; /* Granate ENB #661D26 */
    font-weight: bold;
}

.image-card-overlay-text em {
    color: var(--accent-color) !important; /* Dorado ENB #C59B27 */
    font-style: normal !important; /* Le quitamos la inclinación para usarlo como marcador */
    font-weight: bold;
}


/* =======================================================
   RESPONSIVIDAD MÓVIL AUTOMÁTICA
   ======================================================= */
@media (max-width: 768px) {
    .split-card-grid {
        flex-direction: column !important; /* Se apila texto primero, imagen abajo */
        gap: 35px !important;
    }

    .split-left-content {
        width: 100% !important;
        flex: none !important;
    }

    .split-left-content h2 {
        font-size: 1.8rem !important; /* Letra de título un poco más pequeña */
    }

    .split-right-card {
        width: 100% !important;
        flex: none !important;
        height: 400px !important; /* Altura ideal de la tarjeta en celulares */
        min-height: 400px !important;
    }

    .image-card-overlay-text {
        padding: 20px 20px 40px 20px !important;
        font-size: 1.25rem !important;
    }
}
h1, h2, h3, h4, h5, h6, p, li, span, a {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word; /* Rompe la palabra a la fuerza si supera el ancho de la pantalla */
}

/* =======================================================
   DISEÑO DE PÁGINA DE EVENTO INDIVIDUAL
   ======================================================= */
.event-details-grid {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.event-main-content {
    flex: 1.8;
    text-align: left;
}

.event-poster-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.event-poster-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Tarjeta lateral flotante */
.event-sidebar {
    flex: 1;
    position: -webkit-sticky;
    position: sticky;
    top: 90px; /* Se queda flotando a nivel del sticky nav al bajar */
}

.sticky-event-card {
    background-color: #ffffff;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    border-top: 5px solid var(--primary-color);
    text-align: left;
}

.event-card-tag {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sticky-event-card h3 {
    font-family: 'Georgia', serif;
    font-size: 1.6rem;
    color: var(--primary-color);
    margin: 10px 0 15px 0;
}

.card-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.card-info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.card-info-item .icon {
    font-size: 1.4rem;
}

.card-info-item strong {
    color: var(--text-dark);
}

.card-info-item p {
    margin: 3px 0 0 0;
    color: #555;
}

.btn-event-action {
    display: block;
    background-color: var(--primary-color);
    color: white !important;
    text-align: center;
    padding: 12px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-radius: 4px;
    margin-top: 25px;
    transition: background-color 0.3s;
}

.btn-event-action:hover {
    background-color: #50151D;
}

/* Responsividad para móviles */
@media (max-width: 768px) {
    .event-details-grid {
        flex-direction: column !important;
        gap: 30px;
    }
    .event-main-content, .event-sidebar {
        width: 100% !important;
        flex: none !important;
    }
    .sticky-event-card {
        padding: 20px !important;
    }
}
/* =======================================================
   SECCIÓN DE BLOG (LISTADO E INDIVIDUAL)
   ======================================================= */

/* 1. Grilla del Listado de Artículos */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
}

/* Tarjeta de Artículo Individual */
.blog-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 29, 38, 0.12); /* Sombra granate sutil */
}

.blog-card-image {
    width: 100%;
    height: 210px;
    background-size: cover;
    background-position: center;
}

.blog-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}

.blog-card-date {
    font-size: 0.85rem;
    color: #777;
    font-weight: bold;
    margin-bottom: 10px;
}

.blog-card-title {
    font-family: 'Georgia', serif;
    font-size: 1.4rem;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.blog-card-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card-title a:hover {
    color: var(--accent-color);
}

.blog-card-intro {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.blog-card-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    align-self: flex-start;
    transition: color 0.3s;
}

.blog-card-link:hover {
    color: var(--primary-color);
}


/* 2. Estructura del Post de Blog Individual */
.blog-post-article {
    max-width: 800px; /* Ancho áureo de legibilidad de lectura */
    margin: 0 auto;
    text-align: left;
}

.post-meta-info {
    font-size: 0.95rem;
    color: #666;
    font-weight: bold;
    margin-bottom: 20px;
}

.post-cover-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.post-cover-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Copete destacado */
.post-summary-intro {
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--primary-color);
    border-left: 4px solid var(--accent-color); /* Borde dorado de tu logo */
    padding-left: 20px;
    margin: 30px 0;
}

/* Formateo de lectura del cuerpo del post */
.post-full-body p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.post-full-body h2 {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 15px;
}

.btn-back-blog {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.btn-back-blog:hover {
    color: var(--accent-color);
}


/* =======================================================
   RESPONSIVIDAD MÓVIL DEL BLOG
   ======================================================= */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr; /* Columna única en móviles */
        gap: 20px;
    }

    .blog-card {
        max-width: 100%;
    }

    .blog-post-article {
        padding: 0 10px;
    }

    .post-summary-intro {
        font-size: 1.1rem;
        padding-left: 15px;
    }

    .post-full-body p {
        font-size: 1rem;
        line-height: 1.7;
    }
}
/* =======================================================
   DISEÑO DE LISTADO DE EVENTOS (FORMATO TICKET)
   ======================================================= */
.events-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* Tarjeta Tipo Ticket */
.event-ticket-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-ticket-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 29, 38, 0.1);
}

/* El Cubo de Fecha Dorado Académico */
.event-date-badge {
    background-color: var(--accent-color); /* Oro institucional de tu escudo */
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(197, 155, 39, 0.25);
}

.badge-day {
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
}

.badge-month {
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin-top: 3px;
}

/* Información del Ticket */
.event-ticket-info {
    flex-grow: 1;
    text-align: left;
}

.event-ticket-info h3 {
    font-family: 'Georgia', serif;
    font-size: 1.45rem;
    margin: 0 0 8px 0;
}

.event-ticket-info h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.event-ticket-info h3 a:hover {
    color: var(--accent-color);
}

.ticket-meta {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

/* Botón de Acción */
.btn-ticket-more {
    display: inline-block;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 22px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-ticket-more:hover {
    background-color: var(--primary-color);
    color: white !important;
}

/* Responsividad para móviles */
@media (max-width: 768px) {
    .event-ticket-card {
        flex-direction: column !important;
        text-align: center;
        gap: 15px;
        padding: 25px 15px;
    }
    .event-ticket-info {
        text-align: center;
    }
    .btn-ticket-more {
        width: 100%;
    }
}