/* ========== MOBILE PERFORMANCE OPTIMIZATIONS ========== */

/* Disable expensive effects on mobile */
@media (max-width: 768px) {
    /* Disable all hover effects on touch devices */
    @media (hover: none) {
        *:hover {
            transform: none !important;
            filter: none !important;
            box-shadow: inherit !important;
        }
        
        .portfolio-card:hover,
        .service-item:hover,
        .pricing-card:hover,
        .cta-primary:hover,
        .cta-secondary:hover,
        .nav-link:hover,
        .header-logo:hover {
            transform: none !important;
            filter: none !important;
        }
    }
    
    /* Disable complex animations */
    .morph-particles,
    .organic-spheres,
    .organic-branches,
    .particles-layer {
        display: none !important;
    }
    
    /* Simplify transforms */
    .portfolio-carousel-inner {
        transform: translateX(var(--scroll-position, 0)) !important;
        transform-style: flat !important;
        perspective: none !important;
    }
    
    /* Disable parallax */
    .hero-bg,
    .mission-bg-gradient,
    .about-bg {
        transform: none !important;
        position: absolute !important;
    }
    
    /* Remove blur effects */
    .backdrop-blur,
    .portfolio-card-inner::before {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    /* Optimize images */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    /* Smooth scrolling */
    * {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* GPU acceleration for animations */
    .hero-content,
    .portfolio-card,
    .cta-primary,
    .cta-secondary,
    .mobile-menu-toggle,
    .portfolio-nav {
        transform: translate3d(0, 0, 0);
        will-change: transform;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        perspective: 1000px;
    }
    
    /* Reduce motion for users who prefer it */
    @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;
        }
    }
}

/* Landscape mode optimizations */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        height: auto;
    }
    
    .hero-content {
        padding-top: 8vh;
        padding-bottom: 2rem;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 1.6rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .hero-buttons a {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Higher quality rendering */
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

/* Dark mode optimization */
@media (prefers-color-scheme: dark) {
    /* Already dark, no changes needed */
}

/* Reduce data usage */
@media (prefers-reduced-data: reduce) {
    /* Disable background images */
    .hero-bg img,
    .portfolio-card img {
        display: none;
    }
}




