/* ==================================================
   MAESTRO CSS TOTAL - SEMINARIO SAN LUIS GONZAGA
   Control Unificado: PC y Móvil (Punto de quiebre 1080px)
   ================================================== */

:root {
    --azul: #193053;
    --azul-oscuro: #0f1c30;
    --oro: #f8b133;
    --rojo: #a41a25;
    --blanco: #ffffff;
    --gris-fondo: #f4f6f9;
}

/* 1. CONFIGURACIÓN BASE INSTITUCIONAL */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800&display=swap');
* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: 'Montserrat', sans-serif; 
    overflow-x: hidden; 
    background: var(--gris-fondo); 
    line-height: 1.6;
}

/* 2. NAVBAR GLOBAL */
.navbar {
    background: var(--azul) !important;
    height: 90px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0; 
    z-index: 2000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: auto;
    padding: 0 20px;
}

.nav-logo img {
    height: 60px;
    width: auto;
    display: block;
}

/* --- DISEÑO ESCRITORIO (Pantallas > 1080px) --- */
@media (min-width: 1081px) {
    .mobile-toggle, #menu-trigger { display: none !important; }

    .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 35px;
        margin-left: auto; 
    }

    .nav-links { 
        display: flex !important; 
        gap: 25px; 
        list-style: none;
    }

    .nav-links a {
        color: white !important;
        text-decoration: none !important;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 13px;
        transition: 0.3s;
    }

    .nav-links a:hover { color: var(--oro) !important; }

    .nav-buttons { 
        display: flex !important; 
        gap: 15px; 
        align-items: center !important; 
    }

    /* Carrusel PC */
    .hero-section { height: 600px !important; }
    .slide-content h2 { font-size: 4rem !important; } /* Tamaño aumentado para impacto */
    .slide-overlay { padding: 0 8%; justify-content: flex-start; text-align: left; }
}

/* --- DISEÑO MÓVIL (Pantallas <= 1080px) --- */
@media (max-width: 1080px) {
    .mobile-toggle {
        display: block !important;
        background: none; border: none;
        color: white; font-size: 2rem; cursor: pointer;
    }

    .nav-menu {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 90px; left: 0; width: 100%;
        background: var(--azul-oscuro);
        padding: 40px 0;
        text-align: center;
        box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    }

    .nav-menu.open { display: flex !important; }
    .nav-links { flex-direction: column; gap: 20px; margin-bottom: 25px; }
    .nav-links a { font-size: 1.2rem; color: white; text-decoration: none; font-weight: 700; }
    .nav-buttons { flex-direction: column; gap: 15px; padding: 0 20px; }

    /* Carrusel Móvil */
    .hero-section { height: 450px !important; }
    .slide-content h2 { font-size: 2.2rem !important; }
    .slide-overlay { 
        padding: 0 20px; 
        justify-content: center; 
        text-align: center; 
        background: rgba(15, 28, 48, 0.8) !important; 
    }
}

/* 3. CARRUSEL (Ajuste de centrado y legibilidad) */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
}

.swiper-slide img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* Gradiente optimizado para resaltar el texto */
    background: linear-gradient(to right, rgba(15, 28, 48, 0.9) 0%, rgba(15, 28, 48, 0.5) 50%, transparent 100%);
    display: flex;
    align-items: center; /* CENTRADO VERTICAL DEL TEXTO */
    z-index: 10;
}

.slide-content {
    max-width: 750px;
    color: white;
    animation: fadeInUp 0.8s ease;
    margin-top: -20px; /* Ajuste fino de posición */
}

.slide-content h2 {
    color: var(--oro);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
    text-transform: uppercase;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
}

/* 4. SECCIÓN DE NOTICIAS */
.news-grid, .comunicados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.news-card, .comunicado-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.news-card:hover { transform: translateY(-8px); }

.card-image img, .news-img-box img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-body, .news-body { padding: 25px; }
.card-meta, .news-date { color: var(--rojo); font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.card-body h3, .news-body h4 { color: var(--azul); font-weight: 800; margin-bottom: 12px; font-size: 1.3rem; }

/* 5. ESTRUCTURA DE FOOTER */
.main-footer {
    background: var(--azul-oscuro);
    color: white;
    padding: 60px 5% 0;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: auto;
}

.footer-column h3, .footer-column h4 {
    color: var(--oro);
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 800;
}

.footer-list { list-style: none; }
.footer-list li { margin-bottom: 15px; font-size: 14px; opacity: 0.9; }

.footer-bottom {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 40px;
    font-size: 13px;
    opacity: 0.7;
}

/* 6. BOTONES GLOBALES */
.btn-siaweb {
    background: var(--oro) !important;
    color: var(--azul) !important;
    padding: 12px 25px !important;
    border-radius: 8px !important;
    font-weight: 800;
    font-size: 12px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-admin {
    background: rgba(255,255,255,0.1) !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-size: 12px;
    text-decoration: none !important;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}