/* --- Reset y Variables de Colores --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2b7a7f; 
    --accent-color: #df9b37;  
    --text-color: #333333;    
    --footer-bg: #3a3a3a;     
    --light-bg: #eef3f3;      
    --page-bg: #fbfaf8;       
    --white: #ffffff;
    --pastel-mint: #ccdfdf;   
    --pastel-peach: #f7e8de;  
}

body {
    font-family: 'Nunito', sans-serif;
    font-size: 21px; 
    color: var(--text-color);
    background-color: var(--page-bg);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1600px;
    margin: auto;
}

/* --- Clases de Fondos y Espaciados --- */
.bg-crema { background-color: var(--page-bg); }
.bg-mint { background-color: var(--pastel-mint); }
.bg-peach { background-color: var(--pastel-peach); }

.section {
    padding: 100px 0; /* Padding unificado para todas las secciones */
}

/* --- Header y Navegación --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px; 
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px; 
    text-decoration: none;
}

.logo-text {
    font-family: 'Montserrat', sans-serif; 
    font-size: 1.8rem;
    font-weight: 400; 
    color: var(--text-color);
    letter-spacing: 1px; 
    text-transform: uppercase; 
}

.logo-img {
    height: 85px; 
    width: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.25rem; 
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* --- Grilla de Servicios --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.service-card {
    background: var(--white);
    padding: 35px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    text-align: center;
    border-bottom: 5px solid var(--accent-color);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card i {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card p {
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* --- Textos y Títulos (Optimizados) --- */
h2, .about-text h2, .about-text h3 {
    font-size: 3.6rem; 
    font-weight: 800;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
}

.align-left { text-align: left !important; }
.center-title { text-align: center; margin-bottom: 50px; }

.about-text p {
    font-size: 1.9rem; 
    line-height: 1.7;
    margin-bottom: 25px;
}

/* --- Estructura Zig-Zag --- */
.about-grid {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-grid.reverse {
    flex-direction: row-reverse;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.featured-img {
    width: 100%;
    max-width: 600px; 
    height: auto !important; 
    object-fit: contain; 
    display: block;
    margin: 0 auto; 
    mix-blend-mode: multiply; 
}

/* --- Cuadro de Materias --- */
.materias-box {
    text-align: center;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    max-width: 1350px;
}

.materias-title {
    margin-top: 0; 
    margin-bottom: 35px; 
    color: var(--text-color); 
    text-align: center; 
    font-size: 2.3rem;
}

.materias-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    justify-content: center;
}

.materia-chip {
    background-color: var(--light-bg);
    color: var(--text-color);
    padding: 16px 32px; 
    border-radius: 60px; 
    font-weight: 800; 
    font-size: 1.4rem; 
    display: flex;
    align-items: center;
    gap: 12px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid rgba(43, 122, 127, 0.2); 
    transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}

.materia-chip i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.materia-chip:hover {
    transform: translateY(-5px);
    background-color: var(--white);
    border-color: var(--accent-color);
}

/* --- Fondos sutiles con imágenes --- */
.bg-image-subtle {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(251, 250, 248, 0.94);
    z-index: 1;
}

.relative-content {
    position: relative;
    z-index: 2;
}

.infographic-img {
    width: 100%;
    max-width: 1300px;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* --- Footer --- */
.footer {
    background-color: var(--footer-bg);
    color: var(--white);
    text-align: center;
    padding: 35px 0;
}

.footer-bold { font-size: 1.1rem; margin-bottom: 5px; }
.footer-light { font-size: 1rem; margin-bottom: 0; }

/* --- Botón flotante de WhatsApp --- */
.whatsapp-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 38px;
    box-shadow: 2px 4px 15px rgba(0,0,0,0.2);
    z-index: 1005;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* --- Splash Screen Animación --- */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100vh;
    background-color: #e0cec2;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: background-color 1s ease-in-out;
}

#splash-logo {
    position: absolute; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    height: 600px; 
    width: auto;
    transition: all 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.bg-transparent {
    background-color: transparent !important;
    pointer-events: none;
}

.move-to-corner {
    top: 7.5px !important; 
    left: max(5%, calc(50% - 800px)) !important; 
    transform: translate(0, 0) !important; 
    height: 85px !important; 
}

#real-logo {
    opacity: 0;
    transition: opacity 0.2s;
}

/* =========================================
   REGLAS RESPONSIVE (CELULARES Y TABLETS)
   ========================================= */
@media (max-width: 900px) {
    
    /* Splash Screen: Achicamos el logo gigante inicial */
    #splash-logo {
        height: 250px; /* Le damos una altura inicial generosa */
        width: auto;   /* El ancho se calcula solo para no deformarse */
        max-width: 85vw; /* Evita que se pase de los bordes en pantallas muy finitas */
    }

    /* Animación: Centramos el logo en el navbar móvil */
    .move-to-corner {
        top: 15px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        height: 60px !important; /* Altura final en el menú */
        width: auto !important;  /* ¡LA CLAVE: Le obligamos a soltar el ancho anterior! */
    }

    /* Navbar: Ocultamos los links y achicamos la barra */
    .nav-links { display: none; }
    .nav-container { justify-content: center; height: 90px; }
    .logo-text { font-size: 1.3rem; }
    .logo-link { gap: 10px; }

    /* Espaciados Generales */
    .section { padding: 60px 0; }

    /* Tipografías: Reducimos para que no rompan la pantalla */
    h2, .about-text h2, .about-text h3 {
        font-size: 2.4rem !important;
        text-align: center !important;
        margin-bottom: 20px;
    }
    
    .about-text p {
        font-size: 1.25rem !important;
        text-align: center;
        margin-bottom: 20px;
    }

    /* Bloques Zig-Zag: Los apilamos en una sola columna */
    .about-grid, .about-grid.reverse {
        flex-direction: column;
        gap: 30px;
    }

    /* Materias: Etiquetas más chicas para que entren varias */
    .materias-title { font-size: 1.8rem; }
    .materias-grid { gap: 10px; }
    .materia-chip {
        font-size: 1rem;
        padding: 10px 20px;
    }
    .materia-chip i { font-size: 1.2rem; }

    /* Servicios: Grilla adaptada */
    .services-grid { gap: 15px; }

    /* Botón WhatsApp: Un poco más chico para no tapar texto */
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
        font-size: 32px;
    }
}