/* ==========================================
   LIMONAIA SOLUTIONS - MOBILE BACKUP FIXES
   Reglas de CSS con máxima especificidad
   ========================================== */

/* ===== HAMBURGUESA VERDE - MÁXIMA PRIORIDAD ===== */
@media (max-width: 968px) {
    /* Hamburguesa debe ser VERDE y VISIBLE */
    body .navbar .nav-toggle span,
    body #navbar .nav-toggle span,
    body .nav-wrapper #navToggle span,
    #navToggle span,
    .nav-toggle span {
        background: #A4D233 !important;
        background-color: #A4D233 !important;
        width: 28px !important;
        height: 3px !important;
        opacity: 1 !important;
        display: block !important;
        border-radius: 4px !important;
    }
    
    /* Asegurar que el toggle sea visible */
    .nav-toggle {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        cursor: pointer !important;
        z-index: 1001 !important;
    }
}

/* ===== MENÚ MÓVIL - TEXTO BLANCO EN FONDO OSCURO ===== */
@media (max-width: 968px) {
    /* Menú principal - Fondo oscuro y OCULTO por defecto */
    body .navbar .nav-menu,
    body #navbar #navMenu,
    #navMenu,
    .nav-menu {
        position: fixed !important;
        top: 70px !important;
        left: -100% !important; /* OCULTO por defecto */
        width: 100% !important;
        height: calc(100vh - 70px) !important;
        background: rgba(10, 10, 10, 0.98) !important;
        background-color: rgb(10, 10, 10) !important;
        backdrop-filter: blur(20px) !important;
        flex-direction: column !important;
        padding: 40px 20px !important;
        gap: 0 !important;
        transition: left 0.3s ease !important;
        overflow-y: auto !important;
        z-index: 1000 !important;
    }
    
    /* Menú ABIERTO - Solo cuando tiene clase active */
    body .navbar .nav-menu.active,
    body #navbar #navMenu.active,
    #navMenu.active,
    .nav-menu.active {
        left: 0 !important; /* VISIBLE cuando está activo */
    }
    
    /* Links del menú - Texto BLANCO */
    body .navbar .nav-menu a,
    body #navbar #navMenu a,
    #navMenu a,
    .nav-menu a,
    .nav-menu li a {
        color: #FFFFFF !important;
        color: rgba(255, 255, 255, 0.9) !important;
        background: transparent !important;
    }
    
    /* Hover de links - Verde */
    body .navbar .nav-menu a:hover,
    body #navbar #navMenu a:hover,
    #navMenu a:hover,
    .nav-menu a:hover,
    .nav-menu a.active {
        color: #A4D233 !important;
        background: rgba(164, 210, 51, 0.1) !important;
    }
}

/* ===== DROPDOWN MÓVIL - TEXTO BLANCO ===== */
@media (max-width: 968px) {
    /* Dropdown - Fondo verde sutil */
    body .navbar .dropdown-menu,
    body #navbar .dropdown-menu,
    .nav-menu .dropdown-menu {
        background: rgba(164, 210, 51, 0.05) !important;
        background-color: rgba(164, 210, 51, 0.05) !important;
    }
    
    /* Links del dropdown - Texto BLANCO */
    body .navbar .dropdown-menu a,
    body #navbar .dropdown-menu a,
    .nav-menu .dropdown-menu a,
    .dropdown-menu li a {
        color: #FFFFFF !important;
        color: rgba(255, 255, 255, 0.85) !important;
        background: transparent !important;
        opacity: 1 !important;
    }
    
    /* Hover de links del dropdown - Verde brillante */
    body .navbar .dropdown-menu a:hover,
    body #navbar .dropdown-menu a:hover,
    .nav-menu .dropdown-menu a:hover,
    .dropdown-menu a.active {
        color: #A4D233 !important;
        background: rgba(164, 210, 51, 0.2) !important;
    }
}

/* ===== LANGUAGE SWITCHER - VISIBLE EN MÓVIL ===== */
@media (max-width: 968px) {
    .language-switcher {
        display: flex !important;
        gap: 10px !important;
        padding: 15px !important;
        justify-content: center !important;
        border-top: 1px solid rgba(164, 210, 51, 0.2) !important;
        margin-top: 20px !important;
    }
    
    .language-switcher button {
        background: transparent !important;
        color: rgba(255, 255, 255, 0.8) !important;
        border: 1px solid rgba(164, 210, 51, 0.3) !important;
        padding: 8px 16px !important;
        border-radius: 6px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .language-switcher button.active,
    .language-switcher button:hover {
        background: #A4D233 !important;
        color: #0A0A0A !important;
        border-color: #A4D233 !important;
    }
}

/* ===== WHATSAPP BUTTON - VISIBLE Y POSICIONADO ===== */
@media (max-width: 968px) {
    .whatsapp-float {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
        z-index: 9999 !important;
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
        border-radius: 50% !important;
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4) !important;
    }
    
    .whatsapp-float i {
        color: #FFFFFF !important;
        font-size: 28px !important;
    }
}

/* ===== VIDEO HERO - REPRODUCCIÓN EN MOBILE ===== */
@media (max-width: 968px) {
    /* Hero section completo */
    .hero {
        position: relative !important;
        min-height: 100vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Contenedor del video - DEBE SER ABSOLUTE */
    .hero-background {
        position: absolute !important; /* ✅ ABSOLUTE, NO RELATIVE */
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
        z-index: 0 !important;
    }
    
    /* Video - Asegurar que cubra todo */
    .hero-video,
    video.hero-video {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        min-width: 100% !important;
        min-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: cover !important;
        /* Crítico para iOS */
        -webkit-playsinline: true !important;
        /* Asegurar autoplay en móviles */
        pointer-events: none !important;
        z-index: 1 !important;
    }
    
    /* Overlay más oscuro en móvil para legibilidad */
    .hero-overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: linear-gradient(
            135deg,
            rgba(10, 10, 10, 0.75) 0%,
            rgba(10, 10, 10, 0.6) 100%
        ) !important;
        z-index: 2 !important;
    }
    
    /* Contenido del hero - Por encima del video */
    .hero .container,
    .hero-content-new {
        position: relative !important;
        z-index: 10 !important;
    }
    
    /* Ajustar tamaños de texto en móvil */
    .hero-title-large {
        font-size: clamp(36px, 8vw, 60px) !important;
        line-height: 1.1 !important;
        margin-bottom: 25px !important;
    }
    
    .hero-tagline {
        font-size: clamp(18px, 4vw, 24px) !important;
        margin-bottom: 40px !important;
    }
    
    .hero-content-new {
        padding: 100px 20px 80px !important;
    }
    
    /* Botón CTA */
    .btn-large {
        padding: 18px 35px !important;
        font-size: 16px !important;
    }
    
    /* Scroll indicator */
    .scroll-indicator-new {
        bottom: 30px !important;
        z-index: 10 !important;
    }
}

/* ===== MOBILE PEQUEÑO (< 640px) ===== */
@media (max-width: 640px) {
    .hero-title-large {
        font-size: 32px !important;
        margin-bottom: 20px !important;
    }
    
    .hero-tagline {
        font-size: 16px !important;
        margin-bottom: 30px !important;
    }
    
    .hero-content-new {
        padding: 80px 15px 60px !important;
    }
    
    .btn-large {
        padding: 15px 30px !important;
        font-size: 14px !important;
    }
    
    .scroll-indicator-new {
        bottom: 20px !important;
    }
}

/* ===== SURPRISE MODAL - TAMAÑO REDUCIDO EN MOBILE ===== */
@media (max-width: 968px) {
    /* Modal más pequeño en móvil */
    .surprise-modal {
        padding: 20px !important;
    }
    
    .surprise-content {
        padding: 30px 25px !important;
        max-width: 90vw !important;
        border-radius: 20px !important;
        box-shadow: 0 10px 40px rgba(164, 210, 51, 0.4) !important;
    }
    
    /* Emoji más pequeño */
    .surprise-content > div:first-child {
        font-size: 50px !important;
        margin-bottom: 15px !important;
    }
    
    /* Título más pequeño */
    .surprise-content h2 {
        font-size: 28px !important;
        margin-bottom: 15px !important;
        line-height: 1.2 !important;
    }
    
    /* Subtítulo más pequeño */
    .surprise-content > p:first-of-type {
        font-size: 16px !important;
        margin-bottom: 20px !important;
        line-height: 1.4 !important;
    }
    
    /* Caja de oferta más compacta */
    .surprise-content > div:nth-of-type(2) {
        padding: 20px 15px !important;
        border-radius: 15px !important;
        margin-bottom: 20px !important;
    }
    
    .surprise-content > div:nth-of-type(2) > p:nth-child(1) {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }
    
    .surprise-content > div:nth-of-type(2) > p:nth-child(2) {
        font-size: 22px !important;
        margin: 12px 0 !important;
    }
    
    .surprise-content > div:nth-of-type(2) > p:nth-child(3) {
        font-size: 14px !important;
    }
    
    /* Botón CTA más pequeño */
    .surprise-cta {
        padding: 15px 35px !important;
        font-size: 15px !important;
        border-radius: 40px !important;
        margin-top: 5px !important;
    }
    
    /* Botón cerrar más pequeño */
    .close-surprise {
        top: 15px !important;
        right: 15px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 24px !important;
    }
}

/* ===== TAMAÑO EXTRA PEQUEÑO (< 640px) ===== */
@media (max-width: 640px) {
    .surprise-content {
        padding: 25px 20px !important;
        max-width: 95vw !important;
    }
    
    .surprise-content h2 {
        font-size: 24px !important;
    }
    
    .surprise-content > p:first-of-type {
        font-size: 15px !important;
    }
    
    .surprise-content > div:nth-of-type(2) > p:nth-child(2) {
        font-size: 20px !important;
    }
}
