/* =========================================
   1. VARIABLES & RESET (BASE)
   ========================================= */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap");

:root {
    --hue-color: 220;
    --first-color: hsl(var(--hue-color), 70%, 35%);
    --first-color-alt: hsl(var(--hue-color), 70%, 25%);
    --second-color: hsl(45, 95%, 55%);

    --title-color: hsl(var(--hue-color), 15%, 15%);
    --text-color: hsl(var(--hue-color), 8%, 45%);
    --text-color-light: hsl(var(--hue-color), 8%, 65%);
    --body-color: #f8fafc;

    --header-height: 4rem;
    --font-head: "Outfit", sans-serif;
    --font-body: "Plus Jakarta Sans", sans-serif;
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html,
body {
    overflow-x: hidden;
    /* VITAL: Evita scroll horizontal en mvil */
    width: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--body-color);
    color: var(--text-color);
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Contenedor Principal Limitado */
.container {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Formas decorativas (Solo PC) */
.bg-shape1,
.bg-shape2 {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    display: none;
}

/* =========================================
   2. HEADER & NAVEGACIN (FLOTANTE)
   ========================================= */
.navbar {
    position: fixed;
    /* FLOTANTE: Despegado del techo y los lados */
    top: 1rem;
    left: 0;
    right: 0;
    margin: 0 auto;
    /* Centrado */
    width: 92%;
    /* Ancho cpsula mvil */
    max-width: 1024px;
    /* Tope en PC */

    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-radius: 20px;
    /* Bordes Redondos */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);

    z-index: 1000;
    /* Capa base del men */
    display: flex;
    align-items: center;
    transition: 0.4s;
    padding: 0 0.5rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 0.8rem;
}

/* LOGO */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--first-color);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-weight: 700;
    color: var(--title-color);
    font-family: var(--font-head);
    font-size: 0.9rem;
    line-height: 1.2;
}

/* BOTONES DERECHA */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-educa {
    background: var(--first-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 10px rgba(26, 86, 219, 0.2);
}

/* Icono Hamburguesa */
.nav-toggle {
    font-size: 1.5rem;
    color: var(--title-color);
    cursor: pointer;
    display: block;
}

/* =========================================
   3. MEN MVIL (OFF-CANVAS)
   ========================================= */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    background-color: #fff;
    width: 100%;
    height: 100vh;
    /* Pantalla completa */

    /* Z-INDEX MUY ALTO: Para tapar el nav flotante */
    z-index: 2000;

    padding: 6rem 2rem;
    /* Espacio superior para el contenido */
    transition: 0.4s;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
}

.show-menu {
    right: 0;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.nav-link {
    font-size: 1.3rem;
    color: var(--title-color);
    font-weight: 600;
}

/* BOTN CERRAR (LA X) */
.nav-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;

    /* Diseo de botn visible */
    width: 45px;
    height: 45px;
    background-color: #f1f5f9;
    /* Fondo gris claro */
    border-radius: 50%;
    color: var(--title-color);
    font-size: 1.5rem;

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.nav-close:hover {
    background-color: #e2e8f0;
    color: var(--first-color);
}

/* =========================================
   4. HERO & CARRUSEL (NUEVO ESTILO)
   ========================================= */
.hero {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: calc(var(--header-height) + 1.5rem);
    padding-bottom: 2rem;
}

.hero__container {
    width: 95%;
    max-width: 1600px;
    margin: 0 auto;
}

.hero__visual {
    width: 100%;
    position: relative;
    height: 60vh;
    /* Altura mvil */
    min-height: 500px;
    margin: 0 auto;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* --- Estilos del Carrusel Nativo --- */
.carousel {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    /* Animacin Suave (Cubic Bezier) */
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    /* AÑADIDO: Color de fondo para 'contain' */
    background-color: #f1f5f9;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    /* CAMBIO CLAVE: Usa 'contain' para mostrar la imagen completa */
    object-fit: contain;
    object-position: center;
    display: block;
}

.overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            transparent 20%,
            transparent 80%,
            rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

/* Botones Flechas */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.8rem;
    /* Reset de botones */
    -webkit-appearance: none;
    appearance: none;
    padding: 0;
}

.carousel-btn:hover {
    background: white;
    color: var(--first-color);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* Puntos de Paginacin */
.carousel-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 10px;
}

/* =========================================
   5. SECCIONES GENERALES & FOOTER
   ========================================= */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section__title {
    font-size: 1.75rem;
    color: var(--title-color);
}

.section__line {
    width: 50px;
    height: 4px;
    background: var(--second-color);
    margin: 0.5rem auto;
}

.history {
    padding: 3rem 0;
}

.history__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.info-card {
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    text-align: center;
    background: white;
    border: 1px solid #eee;
}

.info-card.featured {
    background: var(--first-color);
    color: white;
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(26, 86, 219, 0.1);
    color: var(--first-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.info-card.featured .icon-box {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.info-card.featured h3,
.info-card.featured p {
    color: white;
}

/* FOOTER */
.footer {
    background: var(--title-color);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
}

.footer__logo {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.footer__socials {
    justify-content: center;
    display: flex;
    gap: 1rem;
}

.footer__socials a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
}

.footer__bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* =========================================
   6. MEDIA QUERIES (PC / ESCRITORIO)
   ========================================= */
@media screen and (min-width: 968px) {

    /* Mostrar Decoracin */
    .bg-shape1,
    .bg-shape2 {
        display: block;
    }

    /* Navbar Desktop */
    .navbar {
        top: 1.5rem;
        width: 85%;
        padding: 0 1rem;
    }

    .nav-toggle,
    .nav-close {
        display: none;
    }

    /* Reset Menu a Horizontal */
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
        flex-direction: row;
        z-index: auto;
    }

    .nav-list {
        flex-direction: row;
        gap: 2.5rem;
    }

    .nav-link {
        font-size: 1rem;
        font-weight: 500;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    /* HERO DESKTOP (GIGANTE) */
    .hero {
        padding-top: calc(var(--header-height) + 2.5rem);
    }

    .hero__visual {
        /* ALTURA PC: 85% de la pantalla */
        height: 85vh;
        min-height: 700px;
    }

    /* Flechas ms grandes en PC */
    .carousel-btn {
        width: 70px;
        height: 70px;
        font-size: 2.2rem;
    }

    /* Grid Desktop */
    .history__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer__container {
        grid-template-columns: 2fr 1fr 1fr;
        text-align: left;
    }

    .footer__socials {
        justify-content: flex-start;
    }
}