/* ==========================================
   LIMONAIA SOLUTIONS - MOBILE RESPONSIVE FIXES
   Optimización 100% para dispositivos móviles
   ========================================== */

/* === FIX: Hamburger Menu - Visible en Mobile === */
@media (max-width: 968px) {
    .navbar .nav-toggle span,
    .nav-wrapper .nav-toggle span,
    #navToggle span {
        background: var(--color-primary) !important; /* Verde visible */
        background-color: #A4D233 !important; /* Verde fallback */
        width: 28px !important;
        height: 3px !important;
    }
    
    /* Animation when menu is open */
    .nav-menu.active ~ .nav-wrapper .nav-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .nav-menu.active ~ .nav-wrapper .nav-toggle span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-menu.active ~ .nav-wrapper .nav-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* === FIX: Navigation Menu Mobile - Background y Colores === */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 10, 10, 0.98) !important; /* Fondo oscuro */
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 40px 20px;
        gap: 0;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(164, 210, 51, 0.1);
    }
    
    .navbar .nav-menu a,
    #navMenu a {
        display: block !important;
        padding: 18px 15px !important;
        color: rgba(255, 255, 255, 0.9) !important; /* Texto blanco */
        color: #FFFFFF !important; /* Blanco fallback */
        font-size: 16px !important;
        font-weight: 500 !important;
        transition: all 0.3s ease;
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        color: var(--color-primary) !important; /* Verde al hover */
        background: rgba(164, 210, 51, 0.1);
        padding-left: 25px !important;
    }
    
    /* Dropdown toggle arrow */
    .dropdown-toggle {
        justify-content: space-between;
        width: 100%;
    }
    
    .dropdown-toggle i {
        color: var(--color-primary);
        transition: transform 0.3s ease;
    }
    
    .dropdown.active .dropdown-toggle i {
        transform: rotate(180deg);
    }
}

/* === FIX: Dropdown Menu Mobile - Fondo y Colores === */
@media (max-width: 968px) {
    .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        background: rgba(164, 210, 51, 0.05) !important; /* Fondo verde sutil */
        margin-top: 10px;
        padding: 10px 0;
        border-radius: 8px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.3s ease;
        border-left: 3px solid var(--color-primary);
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 500px;
        padding: 10px 0;
    }
    
    .dropdown-menu li {
        border-bottom: none !important;
    }
    
    .navbar .dropdown-menu a,
    #navMenu .dropdown-menu a,
    .nav-menu .dropdown-menu a {
        padding: 14px 20px 14px 30px !important;
        font-size: 15px !important;
        color: rgba(255, 255, 255, 0.85) !important; /* Texto blanco más suave */
        color: #FFFFFF !important; /* Blanco fallback */
        background: transparent !important; /* Sin fondo por defecto */
        border-radius: 6px !important;
        margin: 4px 10px !important;
        display: block !important;
    }
    
    .dropdown-menu a:hover,
    .dropdown-menu a.active {
        background: rgba(164, 210, 51, 0.2) !important; /* Verde al hover */
        color: var(--color-primary) !important; /* Texto verde brillante */
        padding-left: 35px !important;
    }
    
    .dropdown-menu a.active {
        border-left: 3px solid var(--color-primary);
    }
}

/* === FIX: WhatsApp Button - Mejor posición en mobile === */
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 56px;
        height: 56px;
        z-index: 9999; /* Asegurar que siempre esté visible */
    }
    
    .whatsapp-float i {
        font-size: 28px;
    }
}

/* === FIX: Language Switcher en Navigation Mobile === */
@media (max-width: 968px) {
    .language-switcher {
        display: flex !important;
        gap: 10px;
        padding: 25px 15px;
        justify-content: center;
        border-top: 1px solid rgba(164, 210, 51, 0.2);
        border-bottom: 1px solid rgba(164, 210, 51, 0.2);
        margin: 20px 0;
        background: rgba(164, 210, 51, 0.05);
    }
    
    .lang-btn {
        padding: 12px 24px;
        border-radius: 25px;
        font-weight: 600;
        font-size: 14px;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.8);
        border: 2px solid rgba(255, 255, 255, 0.2);
        min-width: 60px;
    }
    
    .lang-btn:hover {
        background: rgba(164, 210, 51, 0.2);
        color: var(--color-primary);
        border-color: var(--color-primary);
        transform: scale(1.05);
    }
    
    .lang-btn.active {
        background: var(--color-primary) !important;
        color: var(--color-dark) !important;
        border-color: var(--color-primary);
        box-shadow: 0 4px 15px rgba(164, 210, 51, 0.4);
    }
}

/* === FIX: Services Grid Six - Asegurar 1 columna en mobile === */
@media (max-width: 640px) {
    .services-grid-six {
        grid-template-columns: 1fr !important;
        gap: 25px;
    }
    
    .services-grid-six .service-card {
        padding: 35px 25px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .service-icon i {
        font-size: 28px;
    }
    
    .service-title {
        font-size: 20px !important;
        margin-bottom: 15px;
    }
    
    .service-description {
        font-size: 15px !important;
        line-height: 1.6;
    }
    
    .service-link {
        font-size: 14px !important;
        margin-top: 15px;
    }
}

/* === FIX: Page Header - Hero Sections en Mobile === */
@media (max-width: 640px) {
    .page-header {
        min-height: 400px;
        padding: 100px 0 60px;
    }
    
    .page-header-content {
        padding: 0 20px;
    }
    
    .page-title {
        font-size: 32px !important;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .page-subtitle {
        font-size: 16px !important;
        line-height: 1.5;
    }
    
    .service-badge-large {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .service-badge-large i {
        font-size: 28px;
    }
    
    .breadcrumb {
        font-size: 13px;
        flex-wrap: wrap;
    }
}

/* === FIX: Navbar Logo en Mobile === */
@media (max-width: 640px) {
    .navbar .logo img {
        max-height: 35px;
        width: auto;
    }
}

/* === FIX: Footer Responsive === */
@media (max-width: 640px) {
    .footer {
        padding: 60px 0 30px;
    }
    
    .footer-logo img {
        max-height: 50px;
        margin-bottom: 20px;
    }
    
    .footer-description {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 25px;
    }
    
    .footer-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .footer-links li,
    .footer-contact li {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .footer-bottom {
        font-size: 13px;
        padding-top: 30px;
    }
}

/* === FIX: Testimonials Carousel en Mobile === */
@media (max-width: 640px) {
    .testimonial-slider {
        height: auto !important;
        min-height: 400px;
    }
    
    .testimonial-content {
        padding: 30px 20px;
    }
    
    .testimonial-text-new {
        font-size: 16px !important;
        line-height: 1.6;
    }
    
    .testimonial-author-name {
        font-size: 16px;
    }
    
    .testimonial-author-role {
        font-size: 13px;
    }
    
    .testimonial-arrow {
        width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
    }
    
    .testimonial-prev {
        left: 5px !important;
    }
    
    .testimonial-next {
        right: 5px !important;
    }
}

/* === FIX: Process Carousel en Mobile === */
@media (max-width: 640px) {
    .process-carousel-container {
        padding: 0 15px;
    }
    
    .process-card {
        min-width: 280px !important;
        padding: 30px 20px;
    }
    
    .process-number {
        font-size: 48px;
        margin-bottom: 15px;
    }
    
    .process-card h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .process-card p {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* === FIX: Contact Form en Mobile === */
@media (max-width: 640px) {
    .contact-form {
        padding: 30px 20px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 15px;
        padding: 12px 15px;
    }
    
    .contact-method {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }
    
    .contact-icon i {
        font-size: 22px;
    }
    
    .contact-details h3 {
        font-size: 16px;
    }
    
    .contact-details p {
        font-size: 15px;
    }
}

/* === FIX: Hero Section - Home === */
@media (max-width: 640px) {
    .hero-content-new {
        padding: 80px 15px 50px;
    }
    
    .hero-title-large {
        font-size: 36px !important;
        line-height: 1.1;
        margin-bottom: 25px;
    }
    
    .hero-tagline {
        font-size: 16px !important;
        margin-bottom: 35px;
    }
    
    .btn-large {
        padding: 18px 35px;
        font-size: 15px;
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .scroll-indicator-new {
        display: none; /* Ocultar en mobile muy pequeño */
    }
}

/* === FIX: Stats Section === */
@media (max-width: 640px) {
    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .stat-box {
        padding: 25px 15px;
    }
    
    .stat-number {
        font-size: 32px !important;
    }
    
    .stat-label {
        font-size: 13px;
    }
}

/* === FIX: Service Offerings Grid === */
@media (max-width: 640px) {
    .offerings-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .offering-card {
        padding: 25px 20px;
    }
    
    .offering-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .offering-icon i {
        font-size: 24px;
    }
    
    .offering-card h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .offering-card p {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* === FIX: Benefits Grid === */
@media (max-width: 640px) {
    .benefits-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .benefit-item {
        padding: 25px 20px;
    }
    
    .benefit-item i {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .benefit-item h4 {
        font-size: 17px;
        margin-bottom: 10px;
    }
    
    .benefit-item p {
        font-size: 14px;
    }
}

/* === FIX: Team Grid === */
@media (max-width: 640px) {
    .team-grid {
        grid-template-columns: 1fr !important;
        gap: 25px;
    }
    
    .team-member {
        padding: 25px 20px;
    }
}

/* === FIX: Sections Padding en Mobile === */
@media (max-width: 640px) {
    section {
        padding: 50px 0 !important;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .section-tag {
        font-size: 12px;
        padding: 6px 16px;
        margin-bottom: 12px;
    }
    
    .section-title {
        font-size: 28px !important;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .section-description {
        font-size: 15px;
        line-height: 1.6;
    }
}

/* === FIX: CTA Section en Mobile === */
@media (max-width: 640px) {
    .cta-section {
        padding: 60px 0 !important;
    }
    
    .cta-title {
        font-size: 28px !important;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .cta-subtitle {
        font-size: 15px;
        margin-bottom: 30px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* === FIX: Video Container en Mobile === */
@media (max-width: 640px) {
    .hero-video-container {
        height: 100vh;
        min-height: 600px;
    }
    
    .hero-video {
        opacity: 0.2 !important;
        filter: brightness(0.4) saturate(0.5) !important;
    }
}

/* === FIX: Prevent Horizontal Scroll === */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 15px;
        overflow: hidden;
    }
    
    * {
        max-width: 100%;
    }
}

/* === FIX: Touch Targets - Mejor UX en Mobile === */
@media (max-width: 768px) {
    a, button, .btn, .service-link, .nav-menu a {
        min-height: 44px; /* Tamaño mínimo recomendado para touch */
        display: inline-flex;
        align-items: center;
    }
    
    .service-link {
        padding: 12px 0;
    }
}

/* === FIX: Surprise Button en Mobile === */
@media (max-width: 640px) {
    .surprise-badge {
        bottom: 90px !important; /* Arriba del WhatsApp */
        left: 20px !important;
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .surprise-modal {
        width: 95% !important;
        max-width: 100% !important;
        margin: 10px;
        padding: 30px 20px;
    }
    
    .surprise-modal h2 {
        font-size: 32px !important;
    }
    
    .surprise-modal h3 {
        font-size: 20px !important;
    }
    
    .surprise-modal p {
        font-size: 15px;
    }
}

/* === FIX: Logo Responsive === */
@media (max-width: 480px) {
    .logo img {
        max-height: 32px !important;
    }
    
    .footer-logo img {
        max-height: 45px !important;
    }
}

/* === FIX: Text Overflow Prevention === */
@media (max-width: 640px) {
    h1, h2, h3, h4, h5, h6,
    .hero-title, .section-title, .page-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}

/* === FIX: Image Loading en Mobile === */
@media (max-width: 768px) {
    img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    
    .service-intro-stats img,
    .about-image img {
        max-width: 100%;
        border-radius: var(--radius-md);
    }
}

/* === FINAL: Asegurar que nada se salga === */
@media (max-width: 768px) {
    .row, .grid, .flex {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
}
