/**
 * Mobile-First Optimizations
 * Thumb-friendly design and mobile enhancements
 */

/* Touch-friendly button sizes */
@media (max-width: 768px) {
    .btn-glass,
    .btn-whatsapp,
    a[href*="wa.me"],
    button,
    .cta-button {
        min-height: 48px !important;
        min-width: 48px !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
        margin: 8px 4px !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    /* Larger tap targets for navigation */
    .nav-links a {
        padding: 16px 20px !important;
        font-size: 18px !important;
        min-height: 56px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Better mobile form inputs */
    input[type="text"],
    input[type="email"], 
    input[type="tel"],
    textarea,
    select {
        min-height: 48px !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        margin-bottom: 16px !important;
    }

    /* Improved mobile typography */
    .hero-title {
        font-size: 2.2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 16px !important;
    }

    .hero-subtitle {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 24px !important;
    }

    .section-title-liquid {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
        margin-bottom: 16px !important;
    }

    .section-subtitle-liquid {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 20px !important;
    }

    /* Mobile-first grid layouts */
    .service-grid,
    .industry-grid,
    .package-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 16px !important;
    }

    /* Enhanced mobile card layouts */
    .service-card,
    .industry-card,
    .package-card {
        padding: 24px 20px !important;
        margin-bottom: 20px !important;
        border-radius: 16px !important;
    }

    /* Mobile-optimized hero section */
    .hero-section {
        padding: 60px 16px !important;
        min-height: 100vh !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Better mobile pricing tables */
    .pricing-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .package-card {
        min-width: 280px;
        margin: 0 8px;
    }

    /* Mobile sticky elements */
    .mobile-sticky-cta {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #25D366 0%, #20b358 100%);
        padding: 12px 16px;
        z-index: 9999;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }

    .mobile-sticky-cta.show {
        transform: translateY(0);
    }

    .mobile-sticky-cta a {
        display: block;
        color: white;
        text-decoration: none;
        text-align: center;
        font-weight: 600;
        font-size: 16px;
        padding: 8px;
    }

    /* Enhanced mobile scrolling */
    .container {
        padding: 0 16px !important;
    }

    section {
        padding: 40px 0 !important;
    }

    /* Mobile WhatsApp floating button optimization */
    #floating-whatsapp {
        width: 64px !important;
        height: 64px !important;
        bottom: 24px !important;
        right: 24px !important;
        font-size: 28px !important;
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4) !important;
    }

    /* Touch-friendly form elements */
    .contact-form {
        padding: 24px 20px !important;
        border-radius: 16px !important;
    }

    .form-group {
        margin-bottom: 20px !important;
    }

    .form-group label {
        font-size: 16px !important;
        margin-bottom: 8px !important;
        display: block !important;
    }

    /* Mobile-optimized testimonials */
    .testimonial-card {
        padding: 20px !important;
        margin-bottom: 20px !important;
        border-radius: 12px !important;
    }

    /* Better mobile spacing */
    .hero-buttons {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: center !important;
    }

    .hero-buttons .btn-glass {
        width: 100% !important;
        max-width: 300px !important;
    }

    /* Mobile-friendly animations */
    @media (prefers-reduced-motion: reduce) {
        .animate-on-scroll,
        .fade-in-up,
        .liquid-effect {
            animation: none !important;
            transform: none !important;
        }
    }

    /* Touch-optimized hover states */
    .service-card:active,
    .industry-card:active,
    .package-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    /* Mobile-optimized modal dialogs */
    .modal-content {
        width: 95% !important;
        max-height: 90vh !important;
        margin: 5vh auto !important;
        border-radius: 16px !important;
        overflow-y: auto !important;
    }

    /* Better mobile text readability */
    p, li {
        font-size: 16px !important;
        line-height: 1.5 !important;
        margin-bottom: 16px !important;
    }

    /* Mobile-specific utility classes */
    .mobile-center {
        text-align: center !important;
    }

    .mobile-full-width {
        width: 100% !important;
    }

    .mobile-hidden {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}

/* Non-mobile devices hide mobile-only elements */
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }

    .mobile-sticky-cta {
        display: none !important;
    }
}

/* Enhanced touch interactions */
@media (hover: none) and (pointer: coarse) {
    /* Touch device specific styles */
    .btn-glass:hover,
    .service-card:hover,
    .industry-card:hover {
        transform: none;
    }

    .btn-glass:active,
    .service-card:active,
    .industry-card:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Improved mobile navigation */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(26, 31, 54, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding-top: 80px;
        transition: left 0.3s ease;
        z-index: 9998;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-toggle {
        display: block;
        width: 30px;
        height: 30px;
        cursor: pointer;
        position: relative;
        z-index: 9999;
    }

    .nav-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background: white;
        margin: 6px 0;
        transition: 0.3s;
        border-radius: 2px;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
    /* Reduce expensive effects on mobile */
    .liquid-glass::before,
    .liquid-glass::after {
        display: none;
    }

    /* Simplified animations for mobile */
    .animate-on-scroll {
        animation-duration: 0.3s !important;
    }

    /* Optimize background images for mobile */
    .hero-section {
        background-attachment: scroll !important;
    }
}