* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navbar */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    position: relative; /* Asegura el correcto posicionamiento absoluto del menú móvil */
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center; 
    align-items: center;
}

/* Botón Hamburguesa: Oculto 100% en escritorios por defecto */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: #555;
    cursor: pointer;
    padding: 5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 20px;
}

.nav-menu li {
    position: relative; /* Base para posicionar el submenú flotante */
}

.nav-menu li a {
    text-decoration: none;
    color: #555;
    font-size: 13px;
    font-weight: 600;
}

.nav-menu li a:hover {
    color: #000;
}

.admin-icon i {
    font-size: 16px;
    color: #666;
}

/* Hero Section (Imagen de fondo del Portal) */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/fondo-ioh.jpg') no-repeat center center/cover;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 3rem;
    letter-spacing: 2px;
    font-weight: 800;
}

.linea-decorativa {
    width: 60px;
    height: 4px;
    background-color: #2ecc71;
    margin: 15px auto 0 auto;
}

/* --- CONTENEDORES BASE DE SUBMENÚS (DROPDOWN) --- */
.dropdown-menu {
    position: absolute;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    border-radius: 4px;
    list-style: none;
    padding: 5px 0;
    display: none; /* Ocultos por defecto, controlados por PC (:hover) o Celular (.open) */
    z-index: 1000;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    color: #444 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-align: left;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-menu li a:hover {
    background-color: #f8f9fa;
    color: #2ecc71 !important; /* Resalta con el verde institucional */
}

/* Ajuste fino para los iconos de flechas laterales */
.icono-flecha {
    font-size: 10px;
    color: #bbb;
}

/* CLASE INYECTADA POR JS: Controla de forma segura el despliegue del acordeón en móvil */
.dropdown.open > .dropdown-menu {
    display: block !important;
}


/* --- COMPORTAMIENTO EXCLUSIVO PARA COMPUTADORES (Mouse) --- */
@media screen and (min-width: 769px) {
    /* Primer nivel de submenú (Cae hacia abajo centrado) */
    .nav-menu > li > .dropdown-menu {
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Segundo nivel o superior (Se despliega hacia la derecha) */
    .dropdown-menu .dropdown-menu {
        top: 0;
        left: 100%;
        margin-left: 2px;
        transform: none;
    }

    /* EFECTO HOVER SEGURO: Solo funciona en pantallas grandes usando el selector directo '>' */
    .dropdown:hover > .dropdown-menu {
        display: block;
    }
}


/* --- ESTILOS DE LA MARQUESINA (SLIDER DINÁMICO) --- */
.marquesina-container {
    position: relative;
    width: 100%;
    height: 500px; /* Altura ideal para el banner principal */
    overflow: hidden;
    background-color: #2c3e50;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out; /* Efecto desvanecido suave */
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Hace que la foto llene el contenedor sin deformarse */
    opacity: 0.7;
}

/* Textos encima de la foto (Escritorio) */
.slide-caption {
    position: absolute;
    top: 50%;                     /* Centrado vertical */
    left: 50%;                    /* Centrado horizontal */
    transform: translate(-50%, -50%); /* Ajuste perfecto en ambos ejes */
    color: white;
    z-index: 3;
    width: 90%;                   
    max-width: 800px;
    text-align: center;           
    animation: fadeInUp 0.5s ease-in-out;
    background: none;             
    padding: 0;                   
    border: none;                 
}

.slide-caption h2 {
    font-size: 3.5rem;            /* Tamaño grande e imponente */
    letter-spacing: 3px;          /* Espaciado elegante entre letras */
    font-weight: 800;             /* Estilo grueso (Bold) */
    text-transform: uppercase;    /* Asegura que esté en mayúsculas */
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5); 
}

.slide-caption::after {
    content: "";
    display: block;
    width: 60px;                  /* Ancho de la línea */
    height: 4px;                  /* Grosor de la línea */
    background-color: #2ecc71;    /* Verde institucional */
    margin: 15px auto 0 auto;     /* Centrada automáticamente con el texto */
    border-radius: 2px;
}   

/* Flechas de navegación izquierda/derecha */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 10;
    transition: background 0.2s;
}

.slider-btn:hover {
    background: #2ecc71;
}

.prev { left: 20px; }
.next { right: 20px; }


/* Animación sutil de entrada para el texto */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translate(-50%, calc(-50% + 20px)); 
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%); 
    }
}

/* --- AJUSTES RESPONSIVOS UNIFICADOS (PANTALLAS CELULARES) --- */
@media screen and (max-width: 768px) {
    .nav-container {
        justify-content: space-between;
    }

    .menu-toggle {
        display: block; /* Muestra la hamburguesa en pantallas táctiles */
    }

    .nav-menu-wrapper {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
        display: none; 
        z-index: 9999;
    }

    .nav-menu-wrapper.active {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 10px 0;
        align-items: stretch;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        padding: 12px 20px;
        width: 100%;
        display: flex;
        justify-content: space-between;
        border-bottom: 1px solid #f9f9f9;
    }

    /* Adaptación multinivel vertical nativa para móviles */
    .nav-menu > li > .dropdown-menu {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: #fcfcfc;
        padding-left: 15px;
    }

    .dropdown-menu .dropdown-menu {
        position: static;
        margin-left: 0;
        background-color: #f5f5f5;
        padding-left: 15px;
    }

    /* Ajustes del Slider en Móvil */
    .marquesina-container {
        height: 250px;
    }

    /* Mantiene el centrado absoluto perfecto también en celulares */
    .slide-caption {
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 85% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    .slide-caption h2 {
        font-size: 1.8rem !important;
        letter-spacing: 1px !important;
        margin-bottom: 0 !important;
    }

    .slide-caption::after {
        width: 40px !important;
        height: 3px !important;
        margin-top: 10px !important;
    }

    .slider-btn {
        padding: 8px 12px !important;
        font-size: 14px !important;
    }
    .prev { left: 5px !important; }
    .next { right: 5px !important; }
}

/* #################################### Estilos del Footer */
.site-footer {
    background-color: #ffffff; 
    color: #ffffff;
    padding: 40px 0 20px 0;
    font-family: Arial, sans-serif;
    margin-top: 40px; 
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 20px;
}

.footer-item {
    flex: 1;
    display: flex;
    align-items: center;
}
.footer-logo-left {
    justify-content: flex-start;
}

/* 2. Alineación Centro (Derechos Reservados) */
.footer-credits {
    justify-content: center;
    color: #a0aab2; 
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* 3. Alineación Extremo Derecho (Logo Secundario Maristas) */
.footer-logo-right {
    justify-content: flex-end;
}

/* Control del tamaño y proporción de las imágenes de logos */
.footer-item img {
    max-height: 65px; 
    width: auto;
    object-fit: contain;
}
.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-section h3 {
    border-bottom: 2px solid #34495e;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 18px;
}

/* Sección de logos alineados */
.logos-section {
    display: flex;
    align-items: center;
    gap: 20px; 
}

.footer-logo {
    max-height: 60px; 
    width: auto;
    object-fit: contain;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #ffffff;
}

.footer-section p {
    color: #bdc3c7;
    font-size: 14px;
    line-height: 1.6;
}

/* Barra inferior */
.footer-bottom {
    text-align: center;
    border-top: 1px solid #34495e;
    margin-top: 30px;
    padding-top: 20px;
    font-size: 14px;
    color: #7f8c8d;
}

/* Responsive para el footer en pantallas pequeñas */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column !important;
        text-align: center !important;
        gap: 20px !important;
    }
    
    .footer-item {
        justify-content: center !important; 
    }

    .footer-item img {
        max-height: 50px !important; 
        width: auto !important;
    }

    .logos-section {
        justify-content: center !important;
        margin-bottom: 30px !important;
    }
}