/* ===== MOBILE EXPERIENCE ENHANCEMENTS ===== */

/* Touch-friendly tap targets - minimum 44x44px */
@media (max-width: 768px) {
    /* Buttons and interactive elements */
    .btn,
    button,
    a.btn {
        min-height: 48px;
        min-width: 48px;
        padding: 14px 24px;
        touch-action: manipulation;
    }

    /* Navigation links */
    .nav-menu a,
    .footer-links a {
        padding: 12px 8px;
        display: inline-block;
        min-height: 44px;
    }

    /* WhatsApp and phone buttons - unified 48px circles, no padding shift */
    .whatsapp-float,
    .call-float,
    #scrollTop {
        width: 48px;
        height: 48px;
        padding: 0;
        font-size: 22px;
    }

    /* Form inputs */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        min-height: 48px;
        padding: 14px 16px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        border-radius: 8px;
    }

    textarea {
        min-height: 120px;
    }

    /* Checkbox and radio larger touch targets */
    input[type="checkbox"],
    input[type="radio"] {
        min-width: 24px;
        min-height: 24px;
        margin: 8px;
    }

    /* Package cards clickable area */
    .package-card {
        padding: 24px;
        margin-bottom: 20px;
    }

    .package-card .btn {
        width: 100%;
        justify-content: center;
    }

    /* Blog cards */
    .blog-card {
        padding: 20px;
    }

    /* Icon buttons */
    .icon-btn,
    .social-link {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
    }

    /* Spacing for better readability */
    .container {
        padding: 0 20px;
    }

    h1 {
        font-size: 28px;
        line-height: 1.3;
        margin-bottom: 16px;
    }

    h2 {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 14px;
    }

    h3 {
        font-size: 20px;
        line-height: 1.4;
        margin-bottom: 12px;
    }

    p {
        font-size: 16px;
        line-height: 1.8;
        margin-bottom: 16px;
    }

    /* Improved list spacing */
    li {
        padding: 8px 0;
        line-height: 1.7;
    }

    /* Modal improvements */
    .modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Table scroll wrapper */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 20px -20px;
        padding: 0 20px;
    }

    /* Fixed bottom CTAs on mobile */
    .mobile-fixed-cta {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 12px 20px;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
        z-index: 900;
        display: flex;
        gap: 12px;
    }

    .mobile-fixed-cta .btn {
        flex: 1;
        margin: 0;
    }

    /* Prevent text selection on buttons */
    .btn,
    button {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }

    /* Smooth scroll behavior */
    html {
        scroll-padding-top: 80px;
    }

    /* Better focus states for accessibility */
    a:focus,
    button:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: 3px solid var(--primary);
        outline-offset: 2px;
    }

    /* Skip to content link for accessibility */
    .skip-to-content {
        position: absolute;
        top: -100px;
        left: 20px;
        background: var(--primary);
        color: white;
        padding: 12px 24px;
        border-radius: 8px;
        z-index: 9999;
        transition: top 0.3s;
    }

    .skip-to-content:focus {
        top: 20px;
    }
}

/* Extra small screens optimizations */
@media (max-width: 480px) {
    /* Larger touch targets for critical actions */
    .hero-buttons .btn,
    .package-card .btn,
    .contact-form button[type="submit"] {
        min-height: 52px;
        font-size: 16px;
        font-weight: 600;
    }

    /* Full width buttons */
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
    }

    /* Stacked layout for cards */
    .packages-grid,
    .services-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Improved hero section */
    .hero {
        min-height: calc(100vh - 80px);
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 15px;
    }

    /* Footer columns stack */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    /* Social icons larger */
    .social-links a {
        min-width: 48px;
        min-height: 48px;
        font-size: 20px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 60px 0;
    }

    .modal-content {
        max-height: calc(100vh - 20px);
    }
}

/* Improved loading states */
@media (max-width: 768px) {
    .loading-skeleton {
        animation: pulse 1.5s ease-in-out infinite;
    }

    @keyframes pulse {
        0%, 100% {
            opacity: 1;
        }
        50% {
            opacity: 0.5;
        }
    }
}

/* Safe area insets for modern mobile devices */
@supports (padding: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        body {
            padding-top: max(80px, env(safe-area-inset-top));
        }

        .mobile-fixed-cta {
            padding-bottom: max(12px, env(safe-area-inset-bottom));
        }

        .site-header {
            padding-top: env(safe-area-inset-top);
        }
    }
}
