/* ============================================
   1. VARIABLES Y RESET
   ============================================ */
:root {
    --primary: #a81225;
    --secondary: #002855;
    --secondary-light: #003d82;
    --accent: #f59e0b;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--white); 
    color: var(--text-main); 
    line-height: 1.6; 
    overflow-x: hidden;
    padding-top: 100px; /* Evita que el contenido se oculte tras el header fijo */
}

/* ============================================
   2. HEADER & NAVEGACIÓN
   ============================================ */
.header-institucional { 
    background: var(--white); 
    border-bottom: 2px solid var(--secondary); 
    position: fixed; 
    top: 0; 
    width: 100%;
    z-index: 1000; 
    transition: var(--transition);
}

.header-institucional.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.container-header { 
    max-width: 1400px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 5%; 
}

.logo img { height: 100px; width: auto; display: block; }

.nav ul { 
    display: flex; 
    list-style: none; 
    gap: 5px; 
    align-items: center; 
}

.nav ul li a { 
    text-decoration: none; 
    color: var(--secondary); 
    font-weight: 700; 
    font-size: 0.85rem; 
    padding: 10px 15px; 
    text-transform: uppercase;
    transition: 0.3s;
}

.nav ul li a:hover { color: var(--primary); }

/* MENÚ MÓVIL */
.menu-toggle { 
    display: none; 
    flex-direction: column; 
    gap: 5px; 
    cursor: pointer; 
    z-index: 1100; 
}

.menu-toggle span { 
    display: block; 
    width: 30px; 
    height: 3px; 
    background-color: var(--secondary); 
    border-radius: 3px; 
    transition: 0.3s; 
}

.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1024px) {
    .menu-toggle { display: flex; }
    .nav { 
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: #fff; 
        box-shadow: var(--shadow); 
    }
    .nav.active { display: block !important; }
    .nav ul { flex-direction: column; padding: 10px 0; }
    .nav ul li { width: 100%; border-bottom: 1px solid #eee; }
    .nav ul li a { padding: 20px; display: block; text-align: center; }
}

/* ============================================
   3. HERO SECTION & STATS
   ============================================ */
.hero-section { 
    position: relative; 
    height: 85vh; 
    background: #000; 
    display: flex; 
    align-items: center; 
    color: white; 
}

.media-carousel { position: absolute; inset: 0; width: 100%; height: 100%; }

.slide { 
    position: absolute; 
    inset: 0; 
    opacity: 0; 
    transition: 1.2s ease-in-out; 
}

.slide.active { opacity: 0.6; }

.slide img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.stats-bar { 
    background: var(--secondary); 
    color: white; 
    padding: 40px 5%; 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 30px; 
    text-align: center; 
}

.stat-item h2 { font-size: 2.5rem; color: var(--accent); }

/* ============================================
   4. IDENTIDAD INSTITUCIONAL (SEO)
   ============================================ */
.institucional-seo { padding: 80px 8%; background: #ffffff; border-top: 1px solid #edf2f7; }
.institucional-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

.inst-badge { 
    display: inline-block; 
    padding: 6px 15px; 
    background: rgba(168, 18, 37, 0.1); 
    color: var(--primary); 
    font-weight: 700; 
    font-size: 0.75rem; 
    border-radius: 4px; 
    margin-bottom: 20px; 
    text-transform: uppercase; 
}

.inst-text h2 { 
    font-family: 'Montserrat', sans-serif; 
    color: var(--secondary); 
    font-size: 2.2rem; 
    line-height: 1.2; 
    margin-bottom: 25px; 
}

.inst-features { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.inst-feature-item { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--secondary); font-size: 0.9rem; }
.inst-feature-item i { color: var(--primary); }

.legal-banner { 
    background: var(--bg-light); 
    border-left: 5px solid var(--primary); 
    padding: 30px; 
    border-radius: 0 12px 12px 0; 
    box-shadow: var(--shadow); 
}

/* ============================================
   5. TARJETAS ACADÉMICAS (CURSOS)
   ============================================ */
.section-header { text-align: center; margin-bottom: 60px; padding: 0 8%; }
.underline { width: 60px; height: 4px; background: var(--primary); margin: 15px auto; }

.academic-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 30px; 
    padding: 0 8% 80px;
}

.academic-card { 
    background: #ffffff; 
    border: 1px solid #e5e7eb; 
    border-radius: 8px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    transition: var(--transition); 
}

.academic-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 12px 25px rgba(0, 40, 85, 0.12); 
    border-color: var(--secondary-light); 
}

.academic-header { 
    background: var(--secondary); 
    color: #ffffff; 
    padding: 15px 25px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 0.8rem; 
    font-weight: 600; 
}

.academic-content { padding: 30px; flex-grow: 1; }
.academic-content h3 { font-family: 'Montserrat'; color: var(--secondary); margin-bottom: 12px; }

.academic-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag { 
    background: #f8fafc; 
    color: var(--secondary); 
    border: 1px solid #cbd5e1; 
    padding: 3px 10px; 
    border-radius: 4px; 
    font-size: 0.7rem; 
    font-weight: 700; 
}

.seo-highlight { font-weight: 600; color: var(--secondary); }

.academic-footer { padding: 20px 30px; background: #f9fafb; border-top: 1px solid #f1f5f9; }
.btn-institucional { 
    color: var(--primary); 
    text-decoration: none; 
    font-weight: 700; 
    display: inline-flex; 
    align-items: center; 
    gap: 10px; 
    text-transform: uppercase; 
}

/* ============================================
   6. FORMULARIO DE CONTACTO
   ============================================ */
.contacto-container { 
    padding: 80px 8%; 
    display: grid; 
    grid-template-columns: 1fr 1.2fr; 
    gap: 60px; 
    max-width: 1300px; 
    margin: 0 auto; 
}

.form-card { 
    background: var(--white); 
    padding: 40px; 
    border-radius: 16px; 
    box-shadow: var(--shadow); 
    border: 1px solid #eef2f6; 
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 8px; color: var(--secondary); }

.input-wrapper { position: relative; }
.input-wrapper i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.form-group input, .form-group select, .form-group textarea { 
    width: 100%; 
    padding: 12px 15px 12px 40px; 
    border: 1.5px solid #e2e8f0; 
    border-radius: 8px; 
    transition: var(--transition);
}

.form-group input:focus { border-color: var(--primary); outline: none; }

.btn-enviar { 
    width: 100%; 
    background: var(--secondary); 
    color: white; 
    padding: 16px; 
    border: none; 
    border-radius: 8px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: var(--transition); 
}

.btn-enviar:hover { background: var(--secondary-light); transform: translateY(-2px); }

/* ============================================
   7. FOOTER
   ============================================ */
.footer-institucional { background: var(--secondary); color: #ffffff; padding-top: 60px; position: relative; }
.footer-top-border { height: 5px; width: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); position: absolute; top: 0; }

.footer-grid { 
    max-width: 1300px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 40px; 
    padding: 0 5% 40px; 
}

.footer-col h3 { color: var(--accent); margin-bottom: 20px; font-family: 'Montserrat'; }
.footer-links { list-style: none; }
.footer-links a { color: #cbd5e1; text-decoration: none; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; transition: 0.3s; }
.footer-links a:hover { color: white; transform: translateX(5px); }

.footer-bottom { background: rgba(0,0,0,0.2); padding: 25px; text-align: center; font-size: 0.8rem; color: #94a3b8; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .contacto-container, .institucional-grid { grid-template-columns: 1fr; }
    body { padding-top: 80px; }
    .logo img { height: 70px; }
}


