/* ==================================== */
/* 0. Base, Tipografía y Variables      */
/* ==================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

:root {
    /* Paleta Institucional Recomendada por Expertos */
    --primary-color: #1a365d;     /* Azul Marino Profundo - Autoridad y Academia */
    --secondary-color: #2b6cb0;   /* Azul Corporativo - Confianza y Tecnología */
    --accent-color: #2f855a;      /* Verde Esmeralda - Éxito, Calificaciones y Futuro */
    --text-color: #2d3748;        /* Gris Oscuro - Alta legibilidad, menos fatiga */
    --light-text-color: #718096;  /* Gris Medio - Para subtítulos y descripciones */
    --bg-light: #f7fafc;          /* Blanco Roto - Fondo limpio y elegante */
    --bg-dark: #1a202c;           /* Antracita - Para un footer de alta gama */
    --border-color: #e2e8f0;
    
    /* Tipografía */
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
    
    /* Efectos Modernos */
    --box-shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--body-font);
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--heading-font);
    font-weight: 700;
    color: var(--primary-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* ==================================== */
/* 1. Botón Flotante de WhatsApp        */
/* ==================================== */
.whatsapp-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    transition: var(--transition-smooth);
    filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.3));
}

.whatsapp-floating-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

/* ==================================== */
/* 2. Header y Navegación Premium       */
/* ==================================== */
.main-header {
    background-color: #ffffff;
    box-shadow: var(--box-shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-text h1 {
    font-size: 1.4rem;
    line-height: 1.2;
}

.brand-text .slogan {
    font-size: 0.85rem;
    color: var(--light-text-color);
    font-weight: 600;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 20px; /* Reducido levemente para dar espacio a los dos botones */
}

.nav-list a {
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    padding: 8px 12px;
    border-bottom: 2px solid transparent;
}

.nav-list a:hover, .nav-list a.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

/* ------------------------------------ */
/* BOTONES ESTRATÉGICOS DEL MENÚ        */
/* ------------------------------------ */

/* Botón 1: Consulta de Notas (Verde Esmeralda Institucional) */
.nav-list a.nav-notas-btn {
    background-color: var(--accent-color); 
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 30px;
    border-bottom: none;
    box-shadow: var(--box-shadow-light);
    transition: var(--transition-smooth);
}

.nav-list a.nav-notas-btn:hover {
    background-color: #246645; /* Tono más oscuro al pasar el cursor */
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-medium);
}

/* Botón 2: Campus Virtual (Azul Marino General) */
.nav-list a.nav-campus-btn {
    background-color: var(--primary-color);
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 30px;
    border-bottom: none;
    box-shadow: var(--box-shadow-light);
    transition: var(--transition-smooth);
}

.nav-list a.nav-campus-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-medium);
}

/* Menú Hamburguesa Móvil */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition-smooth);
}

/* ==================================== */
/* 3. Arquitectura SPA (Secciones)       */
/* ==================================== */
.content-section {
    display: none; /* Oculto por defecto para control por JS */
    animation: fadeIn 0.5s ease-in-out;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================================== */
/* 4. Sección Inicio / Hero / Carrusel  */
/* ==================================== */
.hero-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 110px);
    background-color: #000;
    overflow: hidden;
}

.carousel, .carousel-inner, .carousel-item {
    width: 100%;
    height: 100%;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.65; /* Capa oscura psicológica para priorizar lectura de textos */
}

.carousel-caption {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: #ffffff;
    max-width: 600px;
    z-index: 10;
}

.carousel-caption h2 {
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.carousel-caption p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

/* ==================================== */
/* 5. Estilos de Botones Internos       */
/* ==================================== */
.btn-cta-main {
    background-color: var(--accent-color);
    color: white;
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(47, 133, 90, 0.4);
    transition: var(--transition-smooth);
}

.btn-cta-main:hover {
    background-color: #246645;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(47, 133, 90, 0.6);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background-color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* ==================================== */
/* 6. Sección Nosotros (Misión/Visión)  */
/* ==================================== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.about-card {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    border-top: 5px solid var(--primary-color);
}

.about-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* ==================================== */
/* 7. Propuesta Educativa               */
/* ==================================== */
#propuesta h2, #nosotros h2, #testimonios h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-intro {
    text-align: center;
    color: var(--light-text-color);
    max-width: 700px;
    margin: 0 auto 50px auto;
    font-size: 1.1rem;
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.program-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    text-align: center;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-medium);
    border-color: var(--secondary-color);
}

.program-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.program-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.program-card p {
    color: var(--light-text-color);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* ==================================== */
/* 8. Sección Testimonios (Psicología)  */
/* ==================================== */
.content-section-testimonials {
    background-color: #edf2f7;
    padding: 60px 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    position: relative;
    font-style: italic;
}

.testimonial-card .quote {
    color: var(--text-color);
    margin-bottom: 15px;
}

.testimonial-card .author {
    font-family: var(--heading-font);
    font-style: normal;
    color: var(--primary-color);
    font-weight: 700;
}

/* ==================================== */
/* 9. Footer y Pop-up de Formulario    */
/* ==================================== */
.main-footer {
    background-color: var(--bg-dark);
    color: #e2e8f0;
    padding: 60px 40px 20px 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    border-bottom: 1px solid #4a5568;
    padding-bottom: 40px;
}

.footer-col h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col p {
    margin-bottom: 10px;
    color: #cbd5e0;
}

.footer-col a {
    color: var(--secondary-color);
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.85rem;
    color: #a0aec0;
}

/* Estilos profesionales del Formulario Emergente */
.contact-form-container {
    display: none; /* Controlado dinámicamente por JS */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: var(--text-color);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    width: 90%;
    max-width: 500px;
}

.contact-form-container h2 {
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.contact-form-container label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-form-container input, 
.contact-form-container select, 
.contact-form-container textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--body-font);
}

.contact-form-container textarea {
    height: 100px;
    resize: vertical;
}

.contact-form-container .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #edf2f7;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.contact-form-container .close-btn:hover {
    background: #e2e8f0;
    color: #e53e3e;
}

/* ==================================== */
/* 10. Adaptabilidad Móvil (Responsive) */
/* ==================================== */
@media (max-width: 992px) {
    .nav-list {
        gap: 10px; /* Ajuste para pantallas medianas */
    }
    .nav-list a {
        padding: 6px 8px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 15px 20px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-list {
        display: none; /* El archivo JS activará la visualización si se solicita */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: var(--box-shadow-medium);
        gap: 15px;
    }
    
    .nav-list a.nav-notas-btn, .nav-list a.nav-campus-btn {
        width: 100%;
        text-align: center;
        border-radius: 8px;
    }
    
    .carousel-caption h2 {
        font-size: 2rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
}