/* ============================================ */
/* VARIABLES Y RESET */
/* ============================================ */
:root {
    --azul-profundo: #0A2463;
    --azul-brillante: #1E88E5;
    --dorado: #FFD700;
    --verde: #2E7D32;
    --gris-claro: #F5F5F5;
    --blanco: #FFFFFF;
    --negro: #1a1a1a;
    --sombra: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--negro);
    overflow-x: hidden;
}

/* ===== LOADER ===== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--azul-profundo);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: var(--dorado);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { color: var(--blanco); font-size: 1.2rem; font-weight: 600; text-align: center; }

/* ===== HEADER ===== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--blanco);
    box-shadow: var(--sombra);
    z-index: 1000;
    transition: var(--transition);
}
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { display: flex; align-items: center; gap: 1rem; cursor: pointer; }
.logo-img { width: 60px; height: 60px; object-fit: contain; }
.logo-text h1 { font-size: 1.3rem; color: var(--azul-profundo); font-weight: 800; }
.logo-text p { font-size: 0.8rem; color: var(--azul-brillante); font-weight: 600; }

/* Navegación desktop */
nav ul { display: flex; list-style: none; gap: 0.5rem; }
nav a {
    text-decoration: none;
    color: var(--negro);
    font-weight: 600;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    transition: var(--transition);
}
nav a:hover, nav a.active {
    background-color: var(--azul-profundo);
    color: var(--blanco) !important;
}
.btn-login {
    background: var(--azul-profundo);
    color: var(--blanco) !important;
    padding: 0.7rem 1.5rem !important;
    border-radius: 25px !important;
}

/* ===== MENÚ HAMBURGUESA ===== */
.menu-toggle-mobile {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: #0A2463;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}
.menu-overlay-mobile {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

@media (max-width: 768px) {
    .menu-toggle-mobile { display: block; }
    
    nav ul {
        position: fixed !important;
        top: 0 !important;
        right: -280px !important;
        width: 280px !important;
        height: 100vh !important;
        background: white !important;
        flex-direction: column !important;
        padding: 80px 20px 30px !important;
        margin: 0 !important;
        transition: right 0.3s ease !important;
        z-index: 1000 !important;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1) !important;
        gap: 10px !important;
        display: flex !important;
    }
    nav ul.menu-open { right: 0 !important; }
    nav ul li { width: 100% !important; }
    nav ul li a {
        display: block !important;
        padding: 12px 15px !important;
        font-size: 16px !important;
        color: #333 !important;
        text-align: left !important;
        border-radius: 8px !important;
    }
    nav ul li a:hover,
    nav ul li a.active {
        background: #0A2463 !important;
        color: white !important;
    }
    .menu-overlay-mobile.active { display: block !important; }
}

/* ===== SECCIÓN DE LOGOS - TAMAÑO UNIFORME ===== */
.logos-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}
.logos-container { max-width: 1400px; margin: 0 auto; }
.logos-header { text-align: center; margin-bottom: 3rem; }
.logos-title { font-size: 2rem; color: #0A2463; margin-bottom: 1rem; font-weight: 700; }
.logos-title i { color: #FFD700; margin-right: 12px; }
.logos-divider { width: 80px; height: 3px; background: linear-gradient(90deg, #1E88E5, #FFD700); margin: 0 auto 1rem; border-radius: 3px; }
.logos-subtitle { text-align: center; color: #6c757d; font-size: 0.95rem; max-width: 600px; margin: 0 auto; }
.logos-carousel { position: relative; width: 100%; overflow: hidden; padding: 20px 0; }
.logos-track { display: flex; gap: 1.5rem; width: max-content; will-change: transform; }

/* TAMAÑO FIJO Y UNIFORME PARA TODOS LOS LOGOS */
.logo-item {
    flex-shrink: 0;
    width: 180px !important;
    height: 100px !important;
    background: white;
    border-radius: 12px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 15px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}
.logo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    border-color: #1E88E5;
}
.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.logos-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}
.logos-btn {
    background: #0A2463;
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.logos-btn:hover { background: #1E88E5; transform: scale(1.05); }
.pause-btn { background: #FFD700; color: #0A2463; }

@media (max-width: 768px) {
    .logos-section { padding: 3rem 1rem; }
    .logos-title { font-size: 1.5rem; }
    .logo-item { width: 140px !important; height: 80px !important; padding: 10px !important; }
    .logos-btn { width: 38px; height: 38px; font-size: 1rem; }
}
@media (max-width: 480px) {
    .logo-item { width: 120px !important; height: 70px !important; padding: 8px !important; }
}

/* ===== GALERÍA DE IMÁGENES - TAMAÑO UNIFORME ===== */
.gallery-section {
    padding: 5rem 2rem;
    background: var(--gris-claro);
}
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 3rem;
}
.filter-btn {
    background: transparent;
    border: 2px solid var(--azul-brillante);
    color: var(--azul-brillante);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--azul-brillante);
    color: var(--blanco);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: var(--blanco);
    box-shadow: var(--sombra);
    transition: transform 0.3s ease;
}
.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.15);
}
.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.gallery-item:hover img {
    transform: scale(1.08);
}
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10,36,99,0.9), transparent);
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}
.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}
.gallery-overlay h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    .gallery-item img {
        height: 200px;
    }
}

/* ===== ESTADÍSTICAS ===== */
.stats {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #0A1C3A 0%, #102A4E 100%);
}
.stats-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.8rem;
}
.stat-card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 1.8rem 1.2rem;
    text-align: center;
    transition: transform 0.3s ease;
}
.stat-card:hover { transform: translateY(-6px); box-shadow: 0 20px 30px rgba(0,0,0,0.15); }
.stat-icon { font-size: 2.8rem; color: #1E5AA8; margin-bottom: 1rem; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: #0A2B5E; margin-bottom: 0.5rem; }
.stat-card p { font-size: 0.9rem; font-weight: 500; color: #4A6F8F; text-transform: uppercase; letter-spacing: 1px; }
.stats-title { font-size: 2.5rem; font-weight: 600; color: #FFFFFF; text-align: center; margin-bottom: 1rem; }
.title-decoration { width: 80px; height: 3px; background: linear-gradient(90deg, #1E5AA8, #FFC107); margin: 0 auto; border-radius: 3px; }

/* ===== SECCIONES GENERALES ===== */
section { padding: 5rem 2rem; }
.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--azul-profundo);
    margin-bottom: 1rem;
    font-weight: 800;
}
.section-subtitle { text-align: center; color: #666; max-width: 700px; margin: 0 auto 3rem; }
.section-divider { width: 80px; height: 4px; background: linear-gradient(90deg, var(--azul-brillante), var(--dorado)); margin: 1rem auto 2rem; border-radius: 2px; }

/* ===== NOTICIAS ===== */
.news-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}
.news-card {
    background: var(--blanco);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: var(--transition);
}
.news-card:hover { transform: translateY(-5px); }
.news-image { height: 250px; overflow: hidden; }
.news-image img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.news-content { padding: 1.5rem; }
.news-date { color: var(--azul-brillante); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }
.news-title { font-size: 1.3rem; margin-bottom: 0.5rem; color: var(--azul-profundo); }

/* ===== MISIÓN Y VISIÓN ===== */
.mision-vision-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #0A2463 0%, #1E88E5 100%);
}
.mision-vision-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.mv-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 35px;
    text-align: center;
}
.mv-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: #FFD700;
}
.mv-content h3 { font-size: 1.8rem; color: #FFD700; margin-bottom: 15px; }
.mv-content p { color: white; line-height: 1.8; }
.valores-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}
.valor-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 12px 25px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.valor-item i { color: #FFD700; }
.valor-item span { color: white; font-weight: 600; }

/* ===== SEDES ===== */
.sedes-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 1rem;
}
.sede-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}
.sede-card:hover { transform: translateY(-10px); }
.sede-header { padding: 2rem 1.5rem 1.5rem; text-align: center; color: white; }
.sede-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
}
.sede-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.sede-body { padding: 1.5rem; }
.sede-description { color: #666; line-height: 1.6; margin-bottom: 1.5rem; }
.sede-info { background: #f8f9fa; border-radius: 12px; padding: 1rem; margin-top: 1rem; }
.info-item { display: flex; gap: 1rem; margin-bottom: 1rem; }
.info-item i { font-size: 1.2rem; }
.info-item strong { color: #0A2463; }
.btn-sede {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #0A2463, #1E88E5);
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
}

/* ===== DOCUMENTOS ===== */
.documentos-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}
.documentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.documento-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    gap: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}
.documento-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}
.documento-icon.pdf { background: linear-gradient(135deg, #dc3545, #c82333); }
.documento-icon.word { background: linear-gradient(135deg, #007bff, #0056b3); }
.documento-icon i { color: white; }
.documento-info h3 { font-size: 1.2rem; color: #0A2463; margin-bottom: 10px; }
.documento-boton {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0A2463, #1E88E5);
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== HERO CARRUSEL ===== */
.hero {
    margin-top: 80px;
    position: relative;
    height: 90vh;
    min-height: 500px;
    overflow: hidden;
}
.swiper { width: 100%; height: 100%; }
.slide-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    width: 90%;
    max-width: 800px;
    padding: 0 20px;
}
.slide-content h2 { font-size: 3rem; margin-bottom: 1rem; font-weight: 800; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
.slide-content p { font-size: 1.2rem; margin-bottom: 2rem; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #FFD700;
    color: #0A2463;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
}
.btn:hover { transform: translateY(-3px); gap: 0.8rem; }
.swiper-button-next, .swiper-button-prev {
    color: white !important;
    background: rgba(0,0,0,0.3);
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
}
.swiper-pagination-bullet { background: white !important; opacity: 0.7; }
.swiper-pagination-bullet-active { background: #FFD700 !important; }
@media (max-width: 768px) {
    .hero { height: 70vh; }
    .slide-content h2 { font-size: 1.8rem; }
}

/* ===== CONTACTO Y MAPA ===== */
.map-container {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}
.map-container iframe { width: 100%; height: 450px; border: 0; }

/* ===== VIDEO SECTION ===== */
.videos-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
}
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.video-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
}
.video-card:hover { transform: translateY(-10px); }
.video-thumbnail { position: relative; overflow: hidden; aspect-ratio: 16/9; }
.video-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}
.video-info { padding: 1.5rem; }
.video-info h3 { font-size: 1.3rem; color: #0A2463; margin-bottom: 0.5rem; }

/* ===== FOOTER ===== */
footer {
    background: var(--azul-profundo);
    color: var(--blanco);
    padding: 4rem 2rem 2rem;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.footer-section h3 { color: var(--dorado); margin-bottom: 1rem; }
.social-links { display: flex; gap: 1rem; margin-top: 1rem; }
.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanco);
    transition: var(--transition);
}
.social-links a:hover { background: var(--dorado); color: var(--azul-profundo); transform: translateY(-3px); }
.footer-bottom { text-align: center; padding-top: 2rem; margin-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); }

/* ===== SOCIAL SIDEBAR ===== */
.social-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 1rem 0.8rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}
.social-sidebar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #0A2463;
    font-size: 0.65rem;
    font-weight: 600;
    transition: all 0.3s;
}
.social-sidebar a i { font-size: 1.3rem; }
@media (max-width: 768px) {
    .social-sidebar { display: none; }
}

/* ===== RESPONSIVE GENERAL ===== */
@media (max-width: 1024px) {
    .sedes-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .header-container { flex-direction: column; gap: 1rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .sedes-grid { grid-template-columns: 1fr; }
    .mision-vision-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 1.8rem; }
}
/* ===== CORRECCIÓN DE VIDEOS ===== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-button i {
    font-size: 1.8rem;
    color: white;
    margin-left: 5px;
}

.video-card:hover .play-button {
    background: #e53935;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 1rem;
}

.video-info h3 {
    font-size: 1rem;
    color: #0A2463;
    margin-bottom: 0.5rem;
}

.video-info p {
    font-size: 0.85rem;
    color: #666;
}

/* Modal de video */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: black;
    border-radius: 12px;
    overflow: hidden;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 10001;
}

.video-modal-close:hover {
    color: #e53935;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}