/* Variables de color */
:root {
    --abeja-yellow: #FFC800;
    --abeja-yellow-dark: #E5B400;
    --abeja-white: #FFFFFF;
    --abeja-dark: #3C3C3C;
    --abeja-gray: #F7F7F7;
    --abeja-shadow: rgba(0, 0, 0, 0.1);
}

/* =========================================
   MAGIA: OCULTAR SCROLLBAR (ESTILO APP NATIVA)
   ========================================= */
::-webkit-scrollbar {
    display: none; /* Chrome, Safari y Opera */
}
html {
    -ms-overflow-style: none;  /* IE y Edge */
    scrollbar-width: none;  /* Firefox */
}

/* MAGIA: Scroll Snapping Global */
html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--abeja-white);
    color: var(--abeja-dark);
    overflow-x: hidden;
    margin: 0;
}

/* CLASE MAESTRA: Convierte cualquier sección en una "diapositiva" de pantalla completa */
.snap-section {
    scroll-snap-align: center;
    min-height: 100vh;
    /* dvh: Dynamic Viewport Height (Calcula el espacio real sin la barra de Chrome) */
    min-height: 100dvh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: 60px;
    width: 100%;
}

/* Navbar Dinámico */
.navbar {
    padding: 1rem 2rem;
    background-color: var(--abeja-white);
    border-bottom: 2px solid var(--abeja-gray);
    transition: all 0.3s ease-in-out;
}

.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 10px 30px var(--abeja-shadow);
    border-bottom: 2px solid var(--abeja-yellow);
    backdrop-filter: blur(5px);
    padding: 0.5rem 2rem;
}

.navbar-brand {
    font-weight: 900;
    color: var(--abeja-yellow-dark) !important;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

/* Botones estilo Duolingo */
.btn-duo {
    background-color: var(--abeja-yellow);
    color: var(--abeja-dark);
    font-weight: 800;
    font-size: 1.2rem;
    padding: 14px 40px;
    border-radius: 16px;
    border: none;
    border-bottom: 5px solid var(--abeja-yellow-dark);
    transition: all 0.1s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-duo:hover {
    background-color: #FFD226;
    color: var(--abeja-dark);
    transform: translateY(2px);
    border-bottom: 3px solid var(--abeja-yellow-dark);
}

.btn-duo:active {
    transform: translateY(5px);
    border-bottom: 0px solid var(--abeja-yellow-dark);
    margin-bottom: 5px;
}

.btn-duo-outline {
    background-color: var(--abeja-white);
    color: var(--abeja-dark);
    border: 2px solid var(--abeja-gray);
    border-bottom: 5px solid #E5E5E5;
}

.btn-duo-outline:hover {
    background-color: var(--abeja-gray);
    border-bottom: 3px solid #E5E5E5;
}

/* NUEVO: Mini Botón de Entrada (Exclusivo para celular) */
.btn-mobile-nav {
    padding: 8px 20px;
    font-size: 1rem;
    border-radius: 14px;
    border-bottom: 4px solid #E5E5E5;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.1s ease-in-out;
}

.btn-mobile-nav:hover {
    background-color: var(--abeja-gray);
    border-bottom: 2px solid #E5E5E5;
    transform: translateY(2px);
}

.btn-mobile-nav:active {
    transform: translateY(4px);
    border-bottom: 0px solid #E5E5E5;
    margin-bottom: 0px;
}

/* Tipografías Globales */
.hero-title {
    font-weight: 900;
    font-size: 3.5rem;
    line-height: 1.2;
    color: var(--abeja-dark);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #777;
    margin-bottom: 40px;
    font-weight: 700;
}

/* Mascota Hero */
.hero-mascot {
    width: 100%;
    max-width: 400px;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.1));
    animation: float 4s ease-in-out infinite;
}

/* =========================================
          SISTEMA DE HEXÁGONOS ANIMADOS
          ========================================= */

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* 1. Hexágonos Globales (Hero y otras secciones) */
.hexagon {
    width: 100px;
    height: 115px;
    background-color: var(--abeja-yellow);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    position: absolute;
    opacity: 0.2;
    z-index: 0;
    animation: float 6s ease-in-out infinite;
}

.hex-1 {
    top: 15%;
    left: 5%;
    width: 80px;
    height: 92px;
    animation-delay: 0s;
}

.hex-2 {
    top: 60%;
    left: 15%;
    width: 120px;
    height: 138px;
    animation-delay: 2s;
}

.hex-3 {
    top: 25%;
    right: 10%;
    width: 90px;
    height: 104px;
    animation-delay: 1s;
}

.hex-4 {
    top: 70%;
    right: 5%;
    width: 60px;
    height: 69px;
    animation-delay: 3s;
}

/* 2. Hexágonos Asesorías (PC y Móvil) */
.hex-asesoria {
    position: absolute;
    background-color: var(--abeja-yellow);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0.15;
    z-index: 0;
    animation: float 5s ease-in-out infinite alternate;
}

.ha-1 {
    top: 15%;
    left: 5%;
    width: 100px;
    height: 115px;
    animation-delay: 0.5s;
}

.ha-2 {
    bottom: 15%;
    right: 5%;
    width: 150px;
    height: 173px;
    animation-delay: 2s;
}

/* 3. Hexágonos fondo móvil para las tarjetas */
.hex-card-bg {
    position: absolute;
    background-color: var(--abeja-yellow);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0.08;
    z-index: 0;
    animation: float 5s ease-in-out infinite alternate;
}

.hc-1 {
    top: 5%;
    left: -15%;
    width: 180px;
    height: 207px;
    animation-delay: 0s;
}

.hc-2 {
    bottom: 5%;
    right: -15%;
    width: 150px;
    height: 173px;
    animation-delay: 1.5s;
}

/* 4. Hexágonos título móvil (Estilo artístico/diagonal) */
@keyframes float-tilt {
    0% {
        transform: translateY(0px) rotate(25deg);
    }

    50% {
        transform: translateY(-15px) rotate(35deg);
    }

    100% {
        transform: translateY(0px) rotate(25deg);
    }
}

.hex-feature {
    background-color: var(--abeja-yellow);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    position: absolute;
    opacity: 0.15;
    z-index: 0;
    animation: float-tilt 6s ease-in-out infinite;
}

.hf-1 {
    top: 10%;
    left: -5%;
    width: 110px;
    height: 126px;
}

.hf-2 {
    bottom: 10%;
    right: -5%;
    width: 130px;
    height: 150px;
    animation-delay: 2s;
}

.hf-3 {
    top: 50%;
    left: 80%;
    width: 60px;
    height: 69px;
    animation-delay: 1s;
}

/* Animación Icono Scroll Down Móvil (SOLUCIÓN CENTRADO PERFECTO) */
@keyframes bounce-down {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(10px);
    }

    60% {
        transform: translateX(-50%) translateY(5px);
    }
}

.scroll-down-icon {
    font-size: 2.2rem;
    color: var(--abeja-yellow);
    animation: bounce-down 2s infinite;
    position: absolute; /* Al hacerlo absoluto, ya no empuja la tarjeta hacia arriba */
    bottom: 35px;       /* Se pega al fondo de la diapositiva */
    left: 50%;          /* Centrado horizontal exacto */
    margin: 0;
    z-index: 10;
}

/* Asegurar que el contenido esté por encima de los hexágonos */
.container {
    position: relative;
    z-index: 2;
}

.feature-card {
    position: relative;
    z-index: 2;
}

/* Tarjetas de características */
.feature-card {
    background: var(--abeja-white);
    border-radius: 24px;
    padding: 30px 20px;
    text-align: center;
    border: 2px solid transparent;
    box-shadow: 0 10px 30px var(--abeja-shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    border: 2px solid var(--abeja-yellow);
}

.feature-icon-wrapper {
    width: 80px;
    height: 92px;
    background-color: var(--abeja-yellow);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon-wrapper i {
    font-size: 2rem;
    color: var(--abeja-dark);
}

.features-wrapper {
    background-color: var(--abeja-white);
    border-top: 2px solid #EBEBEB;
}

@media (min-width: 769px) {
    .features-wrapper {
        scroll-snap-align: center;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .features-wrapper {
        scroll-snap-align: none;
        display: block;
    }

    .feature-mobile-snap {
        scroll-snap-align: center;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 20px;
        border-bottom: 2px solid #EBEBEB;
        position: relative;
        overflow: hidden;
    }
}

/* Info Extra (Asesorías y Material) */
.info-text-box h2 {
    font-weight: 900;
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.info-text-box p {
    font-size: 1.35rem;
    color: #666;
    font-weight: 700;
    line-height: 1.6;
}

.info-image {
    width: 100%;
    max-width: 400px;
    border-radius: 24px;
    box-shadow: 0 15px 35px var(--abeja-shadow);
    border: 4px solid var(--abeja-yellow);
    transform: rotate(-2deg);
    transition: transform 0.3s;
}

.info-image:hover {
    transform: rotate(0deg) scale(1.02);
}

.img-right {
    transform: rotate(2deg);
}

/* Logros */
.achievements-section {
    background-color: var(--abeja-gray);
}

.achievement-card {
    background: var(--abeja-white);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    border-bottom: 6px solid #EBEBEB;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.achievement-card:hover {
    transform: translateY(-8px);
    border-bottom: 6px solid var(--abeja-yellow);
    box-shadow: 0 15px 30px rgba(255, 200, 0, 0.2);
}

.badge-circle {
    background-color: var(--abeja-yellow);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 3rem;
    color: var(--abeja-white);
    border: 4px solid var(--abeja-white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.achievement-card h4 {
    font-weight: 900;
    color: var(--abeja-dark);
    margin-bottom: 0;
}

/* Call to Action Final */
.cta-section {
    background: linear-gradient(135deg, var(--abeja-yellow) 0%, #FFD740 100%);
    text-align: center;
    color: var(--abeja-dark);
    border-top: 4px solid var(--abeja-white);
    padding-bottom: 80px;
}

.cta-section h2 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #555;
}

.cta-section .btn-duo {
    font-size: 1.5rem;
    border-radius: 20px;
    background-color: var(--abeja-white);
    color: var(--abeja-dark);
    border-bottom: 6px solid #E5E5E5;
    position: relative;
    z-index: 5;
}

.cta-section .btn-duo:hover {
    background-color: var(--abeja-gray);
    border-bottom: 4px solid #CCCCCC;
}

.cta-section .btn-duo:active {
    border-bottom: 0px solid #CCCCCC;
}

.wave-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 1;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.wave-divider .shape-fill {
    fill: var(--abeja-dark);
}

/* Footer */
.abeja-footer {
    background-color: var(--abeja-dark);
    color: var(--abeja-white);
}

.abeja-footer h5 {
    font-weight: 800;
    color: var(--abeja-yellow);
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.abeja-footer ul {
    list-style: none;
    padding: 0;
}

.abeja-footer ul li {
    margin-bottom: 15px;
}

.abeja-footer ul li a {
    color: #AAA;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s, padding-left 0.2s;
    font-size: 1.1rem;
}

.abeja-footer ul li a:hover {
    color: var(--abeja-yellow);
    padding-left: 8px;
}

.social-icons a {
    color: var(--abeja-white);
    font-size: 2rem;
    margin-right: 20px;
    transition: all 0.3s;
    display: inline-block;
}

.social-icons a:hover {
    color: var(--abeja-yellow);
    transform: translateY(-8px);
}

/* =========================================
          ADAPTACIÓN PARA DISPOSITIVOS MÓVILES (VERTICAL)
          ========================================= */
@media (max-width: 768px) {

    /* AJUSTE NAVBAR MÓVIL: Quita el padding gigante para pegar el logo y botón a las esquinas */
    .navbar {
        padding: 1rem 5px !important;
    }
    
    .navbar-scrolled {
        padding: 0.5rem 5px !important;
    }

    .navbar .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* AJUSTE PARA QUE NADA SE SALGA EN MÓVIL */
    .snap-section {
        padding-top: 85px; /* Damos más margen arriba para despegar el contenido de la barra */
    }

    /* Mantenemos el padding normal para el resto del sitio */
    .container {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    /* Ajuste de Hero para que quepa la abeja y el texto */
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .hero-mascot {
        max-width: 140px; /* Reducido un poquito para encajar a la perfección */
        margin: 0 auto;
    }

    .hexagon {
        opacity: 0.08 !important;
        transform: scale(0.8);
    }

    .hex-asesoria {
        opacity: 0.08 !important;
        transform: scale(0.8);
    }

    .feature-mobile-title {
        font-size: 2.2rem !important;
    }

    .feature-card {
        height: auto !important;
        padding: 25px 20px;
        max-width: 400px;
        margin: 0 auto;
    }

    /* Ajuste Sección de Logros (Para que no se corte abajo) */
    .achievements-section .mb-5 {
        margin-bottom: 1.5rem !important; /* Reemplaza el margen gigante de Bootstrap */
    }

    .achievements-section h2 {
        font-size: 2rem !important;
        margin-bottom: 10px !important;
    }

    .achievements-section p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .badge-circle {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
        margin-bottom: 15px;
    }

    .achievement-card {
        padding: 15px 10px; /* Tarjetas más compactas */
    }

    .achievement-card h4 {
        font-size: 1rem;
    }

    .info-text-box h2 {
        font-size: 2.2rem;
    }

    .info-text-box p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 25px;
    }

    .hide-on-mobile {
        display: none;
    }

    /* Ajuste Sección CTA (Para centrar el botón y no desbordar) */
    .cta-section {
        padding-bottom: 20px; /* Quitamos el padding gigante de 80px de PC */
    }

    .cta-section h2 {
        font-size: 2.2rem;
        padding: 0 15px;
    }

    .cta-section p {
        font-size: 1.1rem;
        padding: 0 15px;
        margin-bottom: 30px;
    }

    .cta-section .btn-duo {
        width: 90%;
        margin: 0 auto; /* SIN el margin-bottom extra, así se centra perfecto */
        display: block;
        font-size: 1.1rem;
    }

    .info-image {
        width: 80%;
        max-width: 200px;
        margin: 0 auto 20px auto;
        display: block;
    }
}

/* =========================================
   NUEVO: LÍMITE DE ALTURA INTELIGENTE (MATA EL IMÁN SOLO CUANDO ES NECESARIO)
   ========================================= */
/* Reglas que se activan SOLAMENTE para:
   1. Laptops/PC con resoluciones extrañas o ventanas muy bajitas (menores a 850px)
   2. Celulares Acostados (Landscape)
   3. Celulares en vertical ridículamente pequeños (menores a 600px de altura real)
*/
@media (min-width: 769px) and (max-height: 850px),
       (max-width: 900px) and (orientation: landscape),
       (max-width: 768px) and (max-height: 600px) {
    
    html {
        scroll-snap-type: none !important; 
    }

    .snap-section, .feature-mobile-snap, .features-wrapper {
        scroll-snap-align: none !important;
        min-height: auto !important;
        height: auto !important;
        padding-top: 120px !important; 
        padding-bottom: 60px !important;
    }

    .hero-mascot {
        max-width: 250px; 
        margin-bottom: 20px;
    }
    
    .info-image {
        max-width: 250px; 
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .cta-section .btn-duo {
        margin-bottom: 50px !important; /* El margen inferior se aplica SÓLO cuando el imán se rompe y deja de ser diapositiva */
    }
}