/* ==========================================================================
   COLEGIO ESPÍRITU SANTO - ESTILOS PRINCIPALES
   ========================================================================== */

:root {
    /* Paleta Oficial */
    --color-blue: #031F80;          /* Azul institucional */
    --color-blue-dark: #021760;     /* Azul oscuro para hovers */
    --color-red: #D92727;           /* Rojo institucional */
    --color-red-dark: #b51c1c;      /* Rojo oscuro para hovers */
    --color-yellow: #FFE500;        /* Amarillo institucional */
    --color-white: #FFFFFF;         /* Blanco */

    /* Variables semánticas */
    --color-primary: var(--color-blue);
    --color-primary-hover: var(--color-blue-dark);
    --color-accent: var(--color-red);
    --color-accent-hover: var(--color-red-dark);
    --color-highlight: var(--color-yellow);

    /* Fondo Footer: Azul noche institucional profundo (más elegante que gris plano) */
    --color-footer-bg: #02144d;     
    --color-footer-bottom: #010c2e;

    --color-bg-light: #f8fafc;      /* Fondo general suave */
    --color-text-main: #2d3748;     /* Texto principal legible */
    --color-text-muted: #64748b;    /* Texto secundario */
}

/* ==========================================================================
   TEMAS PERSONALIZADOS POR ACTIVIDAD
   ========================================================================== */

/* 1. Donación de Sangre: lo que está azul sea rojo, lo que está rojo sea azul */
body.theme-donacion-sangre {
    --color-primary: var(--color-red);
    --color-primary-hover: var(--color-red-dark);
    --color-accent: var(--color-blue);
    --color-accent-hover: var(--color-blue-dark);
    --color-footer-bg: #6e0c0c;
    --color-footer-bottom: #450505;
}
body.theme-donacion-sangre .btn-inscripciones {
    background-color: var(--color-accent) !important;
    box-shadow: 0 3px 10px rgba(3, 31, 128, 0.3) !important;
}
body.theme-donacion-sangre .btn-inscripciones:hover {
    background-color: var(--color-accent-hover) !important;
}

/* 2. Escuelas Verdes: lo que está azul sea verde (#56AE46), lo que está rojo sea amarillo */
body.theme-escuelas-verdes {
    --color-primary: #56AE46;
    --color-primary-hover: #438f36;
    --color-accent: var(--color-yellow);
    --color-accent-hover: #e6ce00;
    --color-footer-bg: #1c5213;
    --color-footer-bottom: #10330a;
}
body.theme-escuelas-verdes .btn-inscripciones {
    background-color: var(--color-accent) !important;
    color: #15380e !important;
    box-shadow: 0 3px 10px rgba(255, 229, 0, 0.35) !important;
}
body.theme-escuelas-verdes .btn-inscripciones:hover {
    background-color: var(--color-accent-hover) !important;
    color: #15380e !important;
}

/* 3. Pentecostés: lo que está azul sea amarillo, lo que está rojo sea verde (#56AE46) */
body.theme-pentecostes {
    --color-primary: #FFE500;
    --color-primary-hover: #e6ce00;
    --color-accent: #56AE46;
    --color-accent-hover: #438f36;
    --color-footer-bg: #3b3400;
    --color-footer-bottom: #211d00;
}
body.theme-pentecostes .top-bar {
    background-color: var(--color-primary);
    color: #1a1a1a;
}
body.theme-pentecostes .top-bar a,
body.theme-pentecostes .top-bar-item {
    color: #1a1a1a !important;
}
body.theme-pentecostes .top-bar-item i {
    color: #c5222b !important;
}
body.theme-pentecostes .top-bar-social-link {
    background-color: rgba(0, 0, 0, 0.08);
    color: #1a1a1a;
}
body.theme-pentecostes .top-bar-social-link:hover {
    background-color: rgba(0, 0, 0, 0.22);
    color: #000000;
}
body.theme-pentecostes .navbar-brand {
    color: #7a6a00;
}
body.theme-pentecostes .btn-inscripciones {
    background-color: var(--color-accent) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(86, 174, 70, 0.35) !important;
}
body.theme-pentecostes .btn-inscripciones:hover {
    background-color: var(--color-accent-hover) !important;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--color-bg-light);
    color: var(--color-text-main);
    min-height: 100vh;
}

/* ==========================================================================
   ESTABILIDAD DE CARGA Y TRANSICIÓN FLUIDA ENTRE PÁGINAS (SPA)
   ========================================================================== */

#site-header {
    min-height: 107px; /* Reserva la altura de la barra superior y navbar para eliminar saltos */
}

#app-content {
    opacity: 1;
    transition: opacity 0.18s ease-in-out;
}

#app-content.page-transitioning {
    opacity: 0;
}

/* ==========================================================================
   BARRA SUPERIOR (TOP BAR)
   ========================================================================== */

.top-bar {
    background-color: var(--color-primary);
    color: #ffffff;
    font-size: 0.84rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.top-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a.top-bar-item:hover {
    color: #ffffff;
}

.top-bar-item i {
    color: var(--color-yellow);
    font-size: 0.88rem;
}

/* Redes Sociales en la Barra Superior */
.top-bar-social {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-left: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    margin-left: 4px;
}

.top-bar-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.85);
    background-color: rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.top-bar-social-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

/* ==========================================================================
   BARRA DE NAVEGACIÓN (NAVBAR)
   ========================================================================== */

.navbar-custom {
    background-color: #ffffff;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
    padding: 0.85rem 0;
    transition: all 0.3s ease;
}

/* Logo y Nombre */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-primary);
    text-decoration: none;
}

.navbar-brand:hover {
    color: var(--color-primary-hover);
}

.navbar-logo {
    height: 54px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(3, 31, 128, 0.15));
    transition: transform 0.2s ease;
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.04);
}

.brand-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Enlaces del menú */
.navbar-nav .nav-link {
    color: #4a5568;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.85rem !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--color-primary);
    background-color: rgba(13, 43, 92, 0.05);
}

.navbar-nav .nav-link.active {
    color: var(--color-primary);
    font-weight: 600;
}

/* Menús desplegables (Dropdowns) */
.dropdown-menu {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background-color: rgba(13, 43, 92, 0.06);
    color: var(--color-primary);
}

/* Botón Destacado: Inscripciones 2027 */
.btn-inscripciones,
.navbar-nav .btn-inscripciones,
.navbar-nav .btn-inscripciones.active {
    background-color: var(--color-accent, #D92727) !important;
    color: var(--color-white) !important;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.55rem 1.25rem !important;
    border-radius: 8px;
    border: 1px solid transparent !important;
    box-shadow: 0 3px 10px rgba(217, 39, 39, 0.25);
    transition: all 0.2s ease;
    margin-left: 0.5rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-inscripciones:hover,
.btn-inscripciones:focus,
.navbar-nav .btn-inscripciones:hover,
.navbar-nav .btn-inscripciones:focus {
    background-color: var(--color-accent-hover, #b51c1c) !important;
    color: var(--color-white) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(217, 39, 39, 0.38);
}

.btn-inscripciones:active,
.navbar-nav .btn-inscripciones:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(217, 39, 39, 0.3);
}

/* ==========================================================================
   SECCIONES GENERALES / DEMO HERO
   ========================================================================== */

.demo-hero {
    padding: 4rem 1rem;
    text-align: center;
}

/* ==========================================================================
   BANNER HERO DE NIVELES EDUCATIVOS (BORDE A BORDE)
   ========================================================================== */

.level-hero {
    position: relative;
    width: 100%;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    text-align: center;
    padding: 4rem 1rem;
    overflow: hidden;
}

/* Overlay para garantizar contraste y lectura perfecta */
.level-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 31, 128, 0.52) 0%, rgba(2, 20, 77, 0.78) 100%);
    z-index: 1;
}

.level-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

/* Título centrado con subrayado */
.level-hero-title {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    display: inline-block;
    position: relative;
    padding-bottom: 1.1rem;
}

/* Línea de subrayado institucional en el centro */
.level-hero-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background-color: var(--color-highlight);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(255, 229, 0, 0.4);
}

.level-hero-subtitle {
    margin-top: 1.25rem;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Imágenes personalizadas por cada nivel */
.level-hero-inicial {
    background-color: #031F80;
    background-image: url('../assets/img/portada-inicial.webp');
}

.level-hero-primario {
    background-color: #031F80;
    background-image: url('../assets/img/portada-primaria.webp');
}

.level-hero-secundario {
    background-color: #031F80;
    background-image: url('../assets/img/portada-secundaria.webp');
}

/* Imágenes de portada para Actividades */
.level-hero-donacion {
    background-color: #D92727;
    background-image: url('../assets/img/portada-donacion-sangre.webp'), linear-gradient(135deg, rgba(217, 39, 39, 0.82), rgba(110, 12, 12, 0.95));
}

.level-hero-escuelas-verdes {
    background-color: #56AE46;
    background-image: url('../assets/img/portada-escuelas-verdes.webp'), linear-gradient(135deg, rgba(86, 174, 70, 0.85), rgba(28, 82, 19, 0.95));
}

.level-hero-fiesta-misionera {
    background-color: #031F80;
    background-image: url('../assets/img/portada-fiesta-misionera.webp'), linear-gradient(135deg, rgba(3, 31, 128, 0.85), rgba(2, 20, 77, 0.95));
}

.level-hero-pentecostes {
    background-color: #d97706;
    background-image: url('../assets/img/portada-pentecostes.webp'), linear-gradient(135deg, rgba(217, 119, 6, 0.85), rgba(180, 83, 9, 0.95));
}

.level-hero-ruaj {
    background-color: #0284c7;
    background-image: url('../assets/img/portada-ruaj.webp'), linear-gradient(135deg, rgba(2, 132, 199, 0.85), rgba(3, 31, 128, 0.95));
}

.level-hero-inscripciones {
    background-color: #031F80;
    background-image: linear-gradient(135deg, rgba(3, 31, 128, 0.9), rgba(217, 39, 39, 0.85)), url('../assets/img/portada-contacto.webp');
}

/* Contenedor del contenido pedagógico */
.level-content-section {
    padding: 4.5rem 0;
}

.level-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.level-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(3, 31, 128, 0.08);
}

.level-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background-color: rgba(3, 31, 128, 0.08);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.level-hero-calendario {
    background-color: #031F80;
    background-image: url('../assets/img/portada-calendario.webp');
}

/* ==========================================================================
   CALENDARIO ESCOLAR
   ========================================================================== */

.calendar-section {
    padding: 3.5rem 0 5rem;
}

.calendar-legend {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.calendar-month-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calendar-month-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(3, 31, 128, 0.08);
}

.calendar-month-header {
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 0.85rem 1.25rem;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--color-highlight);
}

.calendar-month-body {
    padding: 1.15rem 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 0.82rem;
}

.calendar-table th {
    color: var(--color-text-muted);
    font-weight: 600;
    padding-bottom: 0.5rem;
    font-size: 0.74rem;
}

.calendar-table td {
    padding: 0.35rem 0.15rem;
    color: var(--color-text-main);
    font-weight: 500;
    position: relative;
    border-radius: 6px;
    height: 32px;
}

.calendar-table td.empty {
    color: transparent;
}

.calendar-table td.weekend {
    color: #94a3b8;
}

.calendar-table td.holiday {
    background-color: var(--color-accent);
    color: #ffffff !important;
    font-weight: 700;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(217, 39, 39, 0.3);
}

.calendar-holidays-list {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    font-size: 0.78rem;
}

.holiday-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 0.35rem;
    color: var(--color-text-main);
    line-height: 1.35;
}

.holiday-item:last-child {
    margin-bottom: 0;
}

.holiday-day-badge {
    background-color: var(--color-accent);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    flex-shrink: 0;
}

/* ==========================================================================
   PÁGINA DE CONTACTO (CANALES DE CONTACTO)
   ========================================================================== */

.level-hero-contacto {
    background-color: #031F80;
    background-image: url('../assets/img/portada-contacto.webp');
}

.contact-section {
    padding: 4rem 0 5.5rem;
}

.contact-map-wrapper {
    height: 100%;
    min-height: 460px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.contact-map-wrapper iframe {
    width: 100%;
    height: 100%;
    min-height: 460px;
    border: 0;
    display: block;
}

.contact-info-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 1.75rem;
}

.contact-detail-row:last-child {
    margin-bottom: 0;
}

.contact-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background-color: rgba(3, 31, 128, 0.08);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-detail-content h6 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contact-detail-content p,
.contact-detail-content a {
    color: var(--color-text-main);
    font-size: 0.98rem;
    margin: 0;
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1.5;
}

.contact-detail-content a:hover {
    color: var(--color-accent);
}

/* ==========================================================================
   PÁGINA DE FUNDADORES
   ========================================================================== */

.level-hero-fundadores {
    background-color: #031F80;
    background-image: url('../assets/img/portada-fundadores.webp');
}

.founders-section {
    padding: 4rem 0 5.5rem;
}

.founders-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.founder-block {
    padding: 2.5rem 0;
}

.founder-block:first-child {
    padding-top: 0;
}

.founder-block:last-child {
    padding-bottom: 0;
}

.founder-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(3, 31, 128, 0.2), transparent);
    margin: 2.75rem 0;
}

.founder-img-wrapper {
    text-align: center;
}

.founder-img {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: top center;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(3, 31, 128, 0.16);
    border: 3px solid #ffffff;
    outline: 2px solid rgba(3, 31, 128, 0.12);
    display: inline-block;
}

.founder-name {
    margin-top: 0.85rem;
    font-weight: 700;
    font-size: 1.12rem;
    color: var(--color-primary);
    text-align: center;
    line-height: 1.3;
}

.founder-bio {
    color: var(--color-text-main);
    font-size: 0.98rem;
    line-height: 1.78;
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
    word-break: normal;
}

.founder-bio p {
    margin-bottom: 1.15rem;
    text-align: justify;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
    word-break: normal;
}

.founder-bio p:last-child {
    margin-bottom: 0;
}

.founder-bio h4 {
    color: var(--color-primary);
    font-weight: 700;
    margin: 1.5rem 0 0.85rem;
    font-size: 1.25rem;
    position: relative;
    padding-bottom: 0.35rem;
    text-align: left;
}

.founder-bio h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--color-highlight);
    border-radius: 2px;
}

.founder-quote {
    background-color: rgba(3, 31, 128, 0.04);
    border-left: 4px solid var(--color-highlight);
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--color-primary);
    margin: 1.25rem 0;
}

/* ==========================================================================
   PÁGINA DE NUESTROS ORÍGENES Y GALERÍA HISTÓRICA
   ========================================================================== */

.level-hero-origenes {
    background-color: #031F80;
    background-image: url('../assets/img/portada-historia.webp'), url('../assets/galeria/1.webp');
}

.history-section {
    padding: 4rem 0 5.5rem;
}

.history-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 3.5rem 3rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.history-text {
    font-size: 1.02rem;
    line-height: 1.85;
    color: var(--color-text-main);
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
    word-break: normal;
}

.history-text p {
    margin-bottom: 1.35rem;
    text-align: justify;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
    word-break: normal;
}

.history-text h4 {
    color: var(--color-primary);
    font-weight: 800;
    font-size: 1.35rem;
    margin: 2.5rem 0 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
    text-align: left;
}

.history-text h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background-color: var(--color-highlight);
    border-radius: 2px;
}

/* ==========================================================================
   GRILLA DE GALERÍA (4 POR FILA)
   ========================================================================== */

.gallery-wrapper {
    margin-top: 3.5rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.gallery-heading {
    color: var(--color-primary);
    font-weight: 800;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.gallery-subheading {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f1f5f9;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 24px rgba(3, 31, 128, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
    opacity: 0.9;
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(3, 31, 128, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #ffffff;
    font-size: 1.8rem;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

/* ==========================================================================
   VISOR LIGHTBOX HISTÓRICO FLUIDO
   ========================================================================== */

.custom-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.94);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-sizing: border-box;
}

.custom-lightbox.active {
    display: flex;
}

.lightbox-content-box {
    position: relative;
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000000;
}

.lightbox-img {
    max-height: 82vh;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7);
    object-fit: contain;
    user-select: none;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.92rem;
    margin-top: 0.75rem;
    font-weight: 500;
}

.lightbox-close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 1.4rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1000005;
}

.lightbox-close-btn:hover {
    background: var(--color-accent);
    color: #ffffff;
    transform: scale(1.1);
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(3, 31, 128, 0.75);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1000005;
}

.lightbox-nav-btn:hover {
    background: var(--color-accent);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-btn-prev { left: 20px; }
.lightbox-btn-next { right: 20px; }

@media (max-width: 768px) {
    .lightbox-close-btn { top: 15px; right: 15px; width: 40px; height: 40px; font-size: 1.2rem; }
    .lightbox-nav-btn { width: 42px; height: 42px; font-size: 1.25rem; }
    .lightbox-btn-prev { left: 10px; }
    .lightbox-btn-next { right: 10px; }
    .lightbox-img { max-height: 75vh; }
}

/* ==========================================================================
   PIE DE PÁGINA (FOOTER)
   ========================================================================== */

.site-footer {
    background-color: var(--color-footer-bg);
    color: #e2e8f0;
    border-top: 4px solid var(--color-accent);
    margin-top: auto;
}

.footer-main {
    padding: 4rem 0 2.5rem;
}

.footer-logo {
    height: 64px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.footer-brand-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.footer-desc {
    color: #94a3b8;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-top: 1rem;
}

.footer-heading {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background-color: var(--color-highlight);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links a i {
    font-size: 0.75rem;
    color: var(--color-highlight);
    transition: transform 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.footer-links a:hover i {
    transform: translateX(2px);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #cbd5e1;
    font-size: 0.92rem;
    margin-bottom: 0.9rem;
    line-height: 1.5;
}

.footer-contact-item i {
    color: var(--color-highlight);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-contact-item a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact-item a:hover {
    color: #ffffff;
}

/* Redes Sociales en el Footer */
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
}

.footer-social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.footer-social-link:hover {
    background-color: var(--color-accent);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 39, 39, 0.35);
}

/* Barra inferior (Copyright) */
.footer-bottom {
    background-color: var(--color-footer-bottom);
    padding: 1.25rem 0;
    font-size: 0.85rem;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: #ffffff;
}
