/* ===================================
   MOBILE RESPONSIVE ENHANCEMENTS
   Comprehensive mobile optimization
   ================================== */

/* Performance-based classes */
body.is-mobile .cursor-dot,
body.is-mobile .cursor-outline {
    display: none !important;
}

/* Tally Form Fixes */
.contact-form-container {
    position: relative;
    z-index: 100 !important;
}

.contact-form-container iframe {
    position: relative;
    z-index: 101 !important;
}

body.perf-low .gradient-canvas {
    display: none !important;
}

body.perf-low .tilt-card {
    transform: none !important;
}

/* ===================================
   MOBILE BREAKPOINTS
   ================================== */

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .hero {
        min-height: 80vh;
        padding: 20px;
    }

    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-subtitle {
        font-size: 1.1rem !important;
    }

    .services-grid,
    .why-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }

    .process-timeline {
        padding: 0 1rem;
    }

    /* Disable heavy animations on tablets */
    .service-card:hover,
    .why-card:hover,
    .tilt-card:hover {
        transform: translateY(-5px) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    /* Hero Section */
    .hero {
        min-height: 70vh;
        padding: 1.5rem 1rem;
        margin-top: 70px;
    }

    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-word {
        font-size: 2rem !important;
        display: block !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-features {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        margin-top: 2rem;
    }

    .feature-item {
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }

    /* Service Cards */
    .services-grid,
    .why-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .service-card,
    .why-card {
        padding: 1.5rem !important;
    }

    .service-icon,
    .why-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
    }

    .service-card h3,
    .why-card h3 {
        font-size: 1.25rem !important;
    }

    /* Process Timeline */
    .process-timeline {
        gap: 1rem;
    }

    .process-step {
        padding: 1.25rem !important;
        flex-direction: column !important;
        text-align: center;
    }

    .step-number {
        margin: 0 0 1rem 0 !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
    }

    /* About Stats */
    .about-stats {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem !important;
    }

    .stat-number {
        font-size: 2.5rem !important;
    }

    /* Contact Section */
    .contact-wrapper {
        flex-direction: column !important;
        gap: 2rem;
    }

    .contact-form-container,
    .contact-info {
        width: 100% !important;
    }

    /* Section padding */
    section {
        padding: 3rem 1rem !important;
    }

    .container {
        padding: 0 1rem !important;
    }

    .section-header h2 {
        font-size: 1.75rem !important;
    }

    .section-header p {
        font-size: 1rem !important;
    }

    /* Disable ALL heavy animations on mobile */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }

    /* No parallax on mobile */
    .hero-features .feature-item {
        animation: none !important;
    }

    /* Simplified hover effects */
    .service-card:active,
    .why-card:active,
    .btn:active {
        transform: scale(0.98) !important;
    }

    /* Hide cursor elements */
    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    /* Reduce scroll indicator */
    .scroll-indicator {
        height: 2px !important;
    }

    /* Mobile navbar */
    .navbar {
        padding: 0.75rem 1rem !important;
    }

    .nav-logo img {
        max-height: 35px !important;
    }

    /* Hamburger improvements */
    .hamburger {
        width: 30px !important;
        height: 25px !important;
    }

    /* Mobile menu */
    .nav-menu.active {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgb(17, 24, 39);
        backdrop-filter: blur(10px);
        padding: 2rem 1rem;
        gap: 1.5rem;
        z-index: 9999;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.active .nav-link,
    .nav-menu.active .nav-cta-btn {
        font-size: 1.1rem !important;
        padding: 0.75rem 1rem !important;
        width: 100%;
        text-align: center;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem !important;
    }

    .hero-word {
        font-size: 1.75rem !important;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
    }

    .btn {
        font-size: 0.95rem !important;
        padding: 0.8rem 1.5rem !important;
    }

    .service-card,
    .why-card,
    .process-step,
    .stat-card {
        padding: 1.25rem !important;
    }

    .service-card h3,
    .why-card h3 {
        font-size: 1.1rem !important;
    }

    .service-card p,
    .why-card p {
        font-size: 0.9rem !important;
    }

    .section-header h2 {
        font-size: 1.5rem !important;
    }

    .stat-number {
        font-size: 2rem !important;
    }

    /* Ultra-minimal animations */
    * {
        animation: none !important;
        transition: opacity 0.2s, transform 0.2s !important;
    }
}

/* ===================================
   LANDSCAPE MODE (Mobile)
   ================================== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 100vh !important;
        padding: 1rem !important;
    }

    .hero-title {
        font-size: 1.5rem !important;
    }

    .hero-word {
        display: inline !important;
        font-size: 1.5rem !important;
    }

    .hero-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }

    .hero-cta {
        flex-direction: row !important;
        gap: 0.5rem;
    }

    .hero-features {
        display: none !important;
    }

    section {
        padding: 2rem 1rem !important;
    }
}

/* ===================================
   TOUCH DEVICE OPTIMIZATIONS
   ================================== */
@media (hover: none) and (pointer: coarse) {
    /* Disable all hover effects */
    *:hover {
        transform: none !important;
    }

    /* Use active states instead */
    .btn:active,
    .service-card:active,
    .why-card:active {
        transform: scale(0.95) !important;
        opacity: 0.9;
    }

    /* Larger touch targets */
    a, button, .btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Disable tilt library */
    .tilt-card {
        transform: none !important;
    }
}

/* ===================================
   HIGH DPI DISPLAYS (Retina)
   ================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Crisper text rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ===================================
   DARK MODE SUPPORT
   ================================== */
@media (prefers-color-scheme: dark) {
    /* Already dark, but can add overrides if needed */
}

/* ===================================
   REDUCED MOTION SUPPORT
   ================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .cursor-dot,
    .cursor-outline,
    .gradient-canvas {
        display: none !important;
    }
}

/* ===================================
   LOW DATA MODE (Save Data)
   ================================== */
@media (prefers-reduced-data: reduce) {
    .gradient-canvas {
        display: none !important;
    }

    /* Load minimal animations */
    * {
        animation: none !important;
    }
}

/* ===================================
   PRINT STYLES
   ================================== */
@media print {
    .cursor-dot,
    .cursor-outline,
    .gradient-canvas,
    .scroll-indicator,
    .navbar,
    .cookies-banner {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}
