/* Mobile Performance Optimization */

/* Disable heavy animations on mobile */
@media (max-width: 768px) {
    /* Disable parallax and background animations */
    .hero-section::before,
    .hero-section::after {
        animation: none !important;
        transform: none !important;
    }
    
    /* Disable text gradient animations */
    .navbar-brand,
    .hero-section h1 {
        animation: none !important;
    }
    
    /* Disable floating animations */
    .float,
    .emoji,
    .clover-icon,
    .logo-clover {
        animation: none !important;
    }
    
    /* Disable testimonial carousel animation on scroll */
    .testimonial-slider {
        animation-play-state: paused !important;
    }
    
    /* Enable testimonial animation only when in viewport */
    .testimonial-carousel:hover .testimonial-slider {
        animation-play-state: running !important;
    }
    
    /* Reduce transition times */
    * {
        transition-duration: 0.2s !important;
    }
    
    /* Disable hover effects on touch devices */
    .number-card:hover,
    .btn:hover,
    .nav-link:hover {
        transform: none !important;
    }
    
    /* Optimize card shadows */
    .number-card,
    .card {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
    
    /* Disable background fixed attachment */
    body {
        background-attachment: scroll !important;
    }
    
    /* Optimize images */
    img {
        will-change: auto !important;
    }
    
    /* Keep text colors on mobile but simplify effects */
    .hero-section h1 {
        filter: none !important;
        text-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
        /* Keep gradient text color */
        background: linear-gradient(45deg, 
            #FFFFFF 0%,
            #FFD700 25%, 
            #FFA500 50%, 
            #FF69B4 75%,
            #FFFFFF 100%) !important;
        background-size: 200% auto !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
    }
    
    .navbar-brand {
        /* Keep gradient animation on mobile */
        background: linear-gradient(90deg, 
            #FFD700 0%, 
            #FFA500 20%, 
            #FF69B4 40%, 
            #8A2BE2 60%, 
            #00CED1 80%, 
            #FFD700 100%) !important;
        background-size: 200% auto !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
        filter: none !important;
    }
}

/* Hardware acceleration for smooth scrolling */
.container,
.navbar,
.hero-section,
section {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
}

/* Optimize scrolling performance */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Reduce repaints on scroll */
.fixed-top {
    will-change: transform;
}

/* Optimize number cards */
@media (max-width: 768px) {
    .number-card {
        will-change: auto !important;
        transform: none !important;
    }
    
    /* Disable ripple effect on mobile */
    .ripple {
        display: none !important;
    }
}

/* Optimize animate-on-scroll */
@media (max-width: 768px) {
    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

/* Reduce GPU-intensive effects */
@media (max-width: 768px) {
    .bg-gradient,
    .gradient-primary,
    .gradient-gold,
    .gradient-premium,
    .gradient-vibrant {
        background-image: none !important;
        background-color: var(--primary-color) !important;
    }
}

/* Optimize testimonials for mobile */
@media (max-width: 768px) {
    .testimonial-carousel {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x mandatory !important;
    }
    
    .testimonial-slider {
        animation: none !important;
        display: flex !important;
        scroll-snap-align: start !important;
    }
    
    .testimonial-item {
        scroll-snap-align: start !important;
        flex: 0 0 85% !important;
    }
}

/* Disable pulse animation on mobile */
@media (max-width: 768px) {
    .pulse {
        animation: none !important;
    }
}

/* Performance mode for low-end devices */
@media (max-width: 768px) and (-webkit-max-device-pixel-ratio: 2),
       (max-width: 768px) and (max-resolution: 192dpi) {
    /* Further reduce effects for low-end devices */
    * {
        animation: none !important;
        transition: none !important;
    }
    
    .navbar {
        backdrop-filter: none !important;
        background-color: rgba(255, 255, 255, 0.98) !important;
    }
} 