/* --- Variables CSS --- */
:root {
    --color-morado-oscuro: #67266c; /* Color de top-bar */
    --color-principal: #8227d8;    /* Color principal del Header y botones */
    --color-secundario: #4caf50;    /* Verde para acentos (Botones, íconos) */
    --color-acento: #fbbf24;        /* Amarillo/Dorado para hover/líneas */
    --color-texto-oscuro: #333;
    --color-texto-claro: #fff;
    --color-fondo-claro: #f4f4f9;   /* Fondo de secciones claras */
    --color-fondo-oscuro: #555;     /* Fondo de secciones oscuras */
    
    /* Cálculos para el padding del body debido a los elementos fijos */
    --altura-top-bar: 40px; 
    --altura-header: 110px; /* Ajustada para el contenido del logo */
    --altura-fija-total: calc(var(--altura-top-bar) + var(--altura-header));
}

/* --- Estilos Globales y Reseteo --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif; /* Sugerencia, usa la fuente de tu preferencia */
    color: var(--color-texto-oscuro);
    line-height: 1.6;
    background-color: var(--color-fondo-claro);
}

a {
    color: inherit; /* Hereda el color del padre por defecto */
    text-decoration: none;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-section {
    padding: 60px 0;
}

h2, h3 {
    color: var(--color-principal);
    margin-bottom: 20px;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
}

.top-bar {
    background: #67266c;
    padding: 0.5rem 5%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0;
}
        
.top-bar a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.3s;
}
        
.top-bar a:hover {
    opacity: 0.8;
}
        
.social-icons {
    display: flex;
    gap: 0.8rem;
}
        
.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background 0.3s;
}
        
.social-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
}
        
/* Header */
header {
    background: #510488;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 42px;
    z-index: 999;
    width: 100%;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}
        
.logo-container img {
    height: 80px;
    width: auto;
}
        
.logo-text {
    color: white;
}
        
.logo-text h1 {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
}
        
.logo-text .subtitle {
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 300;
}
        
.logo-text .tagline {
    font-size: 0.75rem;
    margin-top: 0.2rem;
    opacity: 0.9;
}

/* Botón hamburguesa - oculto por defecto */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}
        
/* Navigation */
nav {
    display: flex;
    gap: 2rem;
    position: relative;
}
        
nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    transition: opacity 0.3s;
    position: relative;
}

nav a:hover {
    opacity: 0.8;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #fbbf24;
    transition: width 0.3s;
}
        
nav a:hover::after {
    width: 100%;
}

.dropbtn {
    color: white;
    padding: 10px 15px;
    font-weight: 600;
    margin-left: 5px;
    transition: background-color 0.3s ease;
    text-decoration: none;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #8227d8;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 10;
    display: none; 
    border-radius: 0 0 5px 5px;
}

.dropdown-content a {
    color: #ffffff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* --- HERO/CABECERA DE PÁGINA --- */
.hero-primaria {
    background: var(--color-principal); /* Puedes usar una imagen de fondo aquí */
    color: var(--color-texto-claro);
    margin-top: 128px;
    padding: 90px 20px; /* Reducido un poco para compensar el header fijo */
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-primaria h1 {
    color: var(--color-texto-claro);
    font-size: 3.0rem;
    border-bottom: 3px solid var(--color-acento);
    display: inline-block;
    padding-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    margin-top: 15px;
    color: var(--color-texto-claro); /* Asegura color blanco */
}

/* --- Sección Introducción y Vacantes --- */
.vacantes-box {
    background-color: var(--color-texto-claro);
    border-left: 5px solid var(--color-secundario);
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.vacantes-box h3 {
    color: var(--color-secundario);
    margin-bottom: 15px;
}

.grados-disponibles {
    font-size: 1.5rem;
    color: var(--color-principal);
    margin: 15px 0;
}

.grados-disponibles i {
    margin-right: 10px;
}

.llamada-accion {
    font-style: italic;
}

/* --- Programa Educativo (Feature Grid) --- */
.secondary-bg {
    background-color: var(--color-fondo-claro);
}

.section-description {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.feature-grid {
    display: grid;
    /* Para 6 elementos, es común 3 columnas */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background-color: var(--color-texto-claro);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    border-top: 3px solid var(--color-principal);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.feature-card i {
    color: var(--color-secundario);
    font-size: 1.5rem;
    margin-right: 15px;
}

/* --- Docentes e Instalaciones (Two Column Layout) --- */
.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: flex-start;
}

.info-card {
    background-color: var(--color-texto-claro);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    border-bottom: 2px solid var(--color-fondo-claro);
    padding-bottom: 10px;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card ul li {
    padding-left: 1.5em;
    text-indent: -1.5em;
    margin-bottom: 10px;
}

.info-card ul li::before {
    content: "•"; 
    color: var(--color-secundario);
    font-weight: bold;
    display: inline-block;
    width: 1.5em;
}

/* --- Programas Especiales y Apoyo (Dark Background) --- */
.dark-bg {
    background-color: var(--color-fondo-oscuro);
    color: var(--color-texto-claro);
}

.dark-bg h2 {
    color: var(--color-texto-claro);
}

.light-card {
    background-color: var(--color-texto-claro);
    color: var(--color-texto-oscuro);
}

.light-card h3 {
    color: var(--color-principal);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tag-list span {
    background-color: var(--color-secundario);
    color: var(--color-texto-claro);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* --- Admisión y Contacto --- */
.admision-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.admision-steps ul {
    list-style: none;
    padding: 0;
}

.admision-steps ul li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--color-texto-oscuro);
}

.admision-steps ul li i {
    color: var(--color-secundario);
    margin-right: 10px;
    width: 20px;
}

.admision-contact p i {
    color: var(--color-principal);
    margin-right: 8px;
}

.btn-principal {
    display: inline-block;
    background-color: var(--color-principal);
    color: var(--color-texto-claro);
    padding: 12px 25px;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background-color 0.3s ease;
}

.btn-principal:hover {
    background-color: var(--color-secundario);
}


/* --- Media Queries (Responsividad) --- */
@media (max-width: 992px) {
    /* Tablet: 2 columnas para secciones de contenido */
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Tablet Pequeña / Móvil: Cambia layouts a columna única */
    .two-col-layout, .admision-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-primaria h1 {
        font-size: 2.2rem;
    }
    
    .top-bar {
        padding: 0.4rem 3%;
        font-size: 0.75rem;
        gap: 0.8rem;
        top: 0;
    }
    
    .top-bar a {
        font-size: 0.75rem;
    }
    
    /* Header móvil */
    header {
        padding: 0.8rem 3%;
        flex-wrap: wrap;
        top: 38px;
    }
    
    /* Logo más pequeño en móvil */
    .logo-container {
        flex: 1;
        gap: 0.5rem;
    }
    
    .logo-container img {
        height: 50px;
    }
    
    .logo-text h1 {
        font-size: 1rem;
    }
    
    .logo-text .tagline {
        font-size: 0.65rem;
    }
    
    /* Mostrar botón hamburguesa en móvil */
    .menu-toggle {
        display: block;
        order: 3;
    }
    
    /* Menú de navegación en móvil */
    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: #510488;
        order: 4;
        padding: 1rem 0;
        margin-top: 0.5rem;
    }
    
    nav.active {
        display: flex;
    }
    
    nav a {
        padding: 0.8rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    /* Dropdowns en móvil */
    .dropdown {
        width: 100%;
    }
    
    .dropbtn {
        width: 100%;
        text-align: left;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        background-color: #6a1b9a;
        border-radius: 0;
    }
    
    .dropdown-content a {
        padding-left: 2rem;
    }
}

@media (max-width: 600px) {
    .feature-grid {
        /* Móvil: 1 columna para el grid de características */
        grid-template-columns: 1fr;
    }
}