/* styles.min.css - CSS con solución para video YouTube */
:root {
    --primary-blue: #65a3d4;
    --primary-blue-dark: #4a7aa8;
    --secondary-red: #dc3545;
    --accent-gold: #ffc107;
    --light-bg: #f8f9fa;
    --dark-text: #333;
    --white: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* IndivisaFont aplicada globalmente */
body {
    font-family: 'Indivisa', 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    padding-top: 76px;
}

/* Clase específica para IndivisaFont */
.indivisa-font {
    font-family: 'Indivisa', sans-serif !important;
}

/* Aplicar IndivisaFont a todos los elementos de texto */
h1, h2, h3, h4, h5, h6,
p, span, a, li,
button, input, textarea,
.navbar-nav .nav-link,
.dropdown-menu .dropdown-item,
.btn,
.footer-copyright p {
    font-family: 'Indivisa', sans-serif;
}

/* Espaciado entre secciones */
.section-spacing {
    padding: 5rem 0;
}

.section-row {
    margin-bottom: 3rem;
}

.section-row:last-child {
    margin-bottom: 0;
}

/* Títulos de sección más grandes */
.section-title {
    font-family: 'Indivisa', sans-serif;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 3rem;
    text-align: center;
    font-size: 2.5rem;
}

/* Navbar con nuevo azul */
.navbar {
    background: linear-gradient(135deg, var(--primary-blue), #4a8bc5);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.navbar-brand { margin-right: 1rem; }
.logos-nav { display: flex; align-items: center; }
.logo-nav { height: 50px; width: auto; transition: transform 0.3s ease; }
.logo-nav:hover { transform: scale(1.05); }

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    font-family: 'Indivisa', sans-serif;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent-gold) !important;
}

.dropdown-menu .dropdown-item {
    font-family: 'Indivisa', sans-serif;
    font-weight: 400;
}

/* Botón Systelar DORADO (mantenido) */
.btn-systelar {
    background: var(--accent-gold);
    color: var(--dark-text);
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-family: 'Indivisa', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-systelar:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Botón Calendario ROJO con tamaño ajustado al texto */
.btn-systelar-calendario {
    background: var(--secondary-red);
    color: var(--white);
    border: none;
    padding: 0.4rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-family: 'Indivisa', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    min-width: auto;
    width: auto;
}

.btn-systelar-calendario:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    color: var(--white);
    text-decoration: none;
}

/* ==========================================================
   ESTILOS HERO - CORREGIDOS
   ========================================================== */

.hero {
    position: relative;
    height: 100vh; /* Altura completa de la pantalla */
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Importante para que el video no se desborde */
    
    /* FALLBACK PARA MÓVIL (cuando el video está oculto) */
    background: linear-gradient(135deg, #65a3d4, #4a8bc5);
}

.hero-content {
    position: relative; /* Se asegura que esté sobre el video */
    z-index: 2;
    padding: 0; /* ELIMINADO padding original */
    /* ELIMINADO: background: rgba(0, 0, 0, 0.3); */
    /* ELIMINADO: border-radius: 10px; */
    /* ELIMINADO: backdrop-filter: blur(5px); */
    text-align: center;
}

.hero-logo {
    max-width: 450px; /* Ajusta según tu logo */
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    width: 100%;
    height: auto;
}

/* 2. ESTILOS DEL VIDEO DE FONDO (SOLUCIÓN RESPONSIVA) */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.video-foreground {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw; /* Ancho de la ventana */
    height: 56.25vw; /* Alto 16:9 (9 / 16 * 100) */
    min-width: 100%; /* Asegura que cubra todo */
    min-height: 100%; /* Asegura que cubra todo */
    transform: translate(-50%, -50%); /* Centrado perfecto */
}

.video-foreground iframe {
    width: 100%;
    height: 100%;
    pointer-events: none; /* Evita que se pueda hacer clic en el video */
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Botones del hero con mismo tamaño */
.btn-inscribete,
.btn-conocenos,
.btn-ver-video {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-family: 'Indivisa', sans-serif;
    font-weight: 600;
    border: none;
    min-width: 200px;
    text-align: center;
    text-decoration: none;
}

.btn-inscribete {
    background: var(--secondary-red);
    color: var(--white);
}

.btn-conocenos {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-ver-video {
    background: rgba(255,255,255,0.2);
    color: var(--white);
    backdrop-filter: blur(10px);
}

.btn-inscribete:hover { 
    background: #c82333; 
    transform: translateY(-2px); 
    color: var(--white);
}

.btn-conocenos:hover { 
    background: #4a8bc5; 
    transform: translateY(-2px); 
    color: var(--white);
}

.btn-ver-video:hover { 
    background: rgba(255,255,255,0.3); 
    transform: translateY(-2px); 
    color: var(--white);
}


/* ==========================================================
   SECCIÓN FEATURES - CORREGIDA
   ========================================================== */
.feature-card {
    /* background: var(--white); -- ELIMINADO para usar colores */
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.feature-icon {
    font-size: 3rem;
}

/* NUEVAS REGLAS PARA FONDOS DE TARJETA */
.feature-card.color-azul { 
    background-color: var(--primary-blue); 
    color: var(--white); 
}
.feature-card.color-rojo { 
    background-color: var(--secondary-red); 
    color: var(--white); 
}
.feature-card.color-dorado { 
    background-color: var(--accent-gold); 
    color: var(--dark-text); /* Texto oscuro para mejor lectura en dorado */
}
.feature-card.color-blanco { 
    background-color: var(--white); 
    color: var(--dark-text); 
    /* Mantiene la sombra que ya tenía */
}

/* Asegura que el texto y el ícono hereden el color */
.feature-card h5, .feature-card p { 
    color: inherit; 
}
.feature-card .feature-icon { 
    color: inherit; 
}


/* ==========================================================
   SECCIÓN SECCIONES
   ========================================================== */
.section-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    margin-bottom: 2rem;
}
.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}
.section-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.section-image-container {
    position: relative;
    overflow: hidden;
    height: 250px;
}
.section-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.section-card:hover .section-image {
    transform: scale(1.1);
}
.section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(101, 163, 212, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.section-card:hover .section-overlay {
    opacity: 1;
}
.btn-view-more {
    background: var(--white);
    color: var(--primary-blue);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-family: 'Indivisa', sans-serif;
}
.section-content {
    padding: 2rem;
}
.section-card-title {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-weight: 700;
    font-family: 'Indivisa', sans-serif;
    font-size: 1.5rem;
}
.section-card-text {
    font-family: 'Indivisa', sans-serif;
    font-weight: 400;
    color: var(--dark-text);
    line-height: 1.6;
}

/* ==========================================================
   VIDA ESCOLAR
   ========================================================== */
.vida-escolar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.grid-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.grid-item:hover img {
    transform: scale(1.1);
}
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--white);
    font-size: 2.5rem;
}
.grid-item:hover .grid-overlay {
    opacity: 1;
}

/* Popup Galería */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1056; /* Encima del modal */
}
.popup-overlay.active {
    display: flex;
}
.popup-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
}
.popup-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: var(--white);
    cursor: pointer;
    line-height: 1;
}
.popup-caption {
    position: absolute;
    bottom: 20px;
    color: var(--white);
    font-size: 1.2rem;
    font-family: 'Indivisa', sans-serif;
}

/* ==========================================================
   CONTACTO
   ========================================================== */
.contact-form {
    background: var(--light-bg);
    padding: 2.5rem;
    border-radius: 10px;
}
.contact-form .form-control {
    border: 1px solid #ddd;
    padding: 0.75rem;
    font-family: 'Indivisa', sans-serif;
}
.contact-form .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(101, 163, 212, 0.25);
    border-color: var(--primary-blue);
}
.contact-info {
    background: var(--primary-blue);
    color: var(--white);
    padding: 2.5rem;
    border-radius: 10px;
}
.contact-info h4 {
    color: var(--white);
}
.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    text-align: left !important;
}
.contact-item .contact-icon {
    font-size: 2rem;
    margin-right: 1.5rem;
    color: var(--white);
}
.contact-item p, .contact-item h6 {
    color: var(--white);
    margin: 0;
}
.contact-item h6 {
    font-weight: 600;
}
.contact-item p {
    font-weight: 300;
    font-size: 0.95rem;
}

/* ==========================================================
   FOOTER
   ========================================================== */
footer {
    background: var(--primary-blue);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 3rem;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.footer-social a {
    color: var(--white);
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
}
.footer-social a:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}
.footer-calendario {
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}
.footer-copyright p {
    font-family: 'Indivisa', sans-serif;
    font-weight: 400;
    margin: 0;
}

/* ==========================================================
   ESTILOS DEL MODAL DE VIDEO
   ========================================================== */
#videoModal .modal-dialog {
    max-width: 900px; /* Ajusta el tamaño del modal */
}

#videoModal .btn-close-white {
    /* Hace el botón 'X' blanco y visible sobre fondo oscuro */
    filter: invert(1) grayscale(100%) brightness(200%);
    z-index: 10;
    position: absolute;
    top: -20px;
    right: 0;
}


/* ==========================================================
   ANIMACIONES Y RESPONSIVO
   ========================================================== */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================================================================
SOLUCIÓN PARA MOSTRAR VIDEO EN MÓVILES
==================================================================
*/
@media (max-width: 768px) {
    
    /* LA REGLA .video-background { display: none; } HA SIDO ELIMINADA 
    PARA PERMITIR QUE EL VIDEO SE MUESTRE EN MÓVILES.
    */
    
    .hero {
        /* El fallback 'background' se usará si el video falla */
        height: 90vh; /* Ajuste para móviles */
    }
    
    .hero-logo {
        max-width: 300px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-inscribete,
    .btn-conocenos,
    .btn-ver-video {
        min-width: 250px;
        margin-bottom: 10px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}