/* Performance Optimizations for BlissRoms Website */

/* GPU Acceleration and Hardware Acceleration */
.moving_position_animatin,
.moving_animation,
.banner_screen img,
.screen_frame_img img {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Smooth scrolling optimization */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-overflow-scrolling: touch;
}

/* Reduce animation complexity on mobile */
@media (max-width: 768px) {
    /* Disable heavy animations on mobile */
    .banner_section .banner_shape1,
    .banner_section .banner_shape2,
    .banner_section .banner_shape3 {
        animation: none !important;
        transform: none !important;
    }
    
    /* Simplify box shadows on mobile */
    .banner_screen,
    .screen_frame_img,
    .feature_box {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }
    
    /* Remove filters on mobile for better performance */
    .trusted_section .company_logos img {
        filter: none !important;
    }
    
    /* Optimize AOS animations for mobile */
    [data-aos] {
        transition-duration: 0.3s !important;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .banner_section .banner_shape1,
    .banner_section .banner_shape2,
    .banner_section .banner_shape3 {
        animation: none !important;
    }
    
    [data-aos] {
        animation: none !important;
        transition: none !important;
    }
}

/* Optimize carousel performance */
.owl-carousel .owl-item {
    will-change: transform;
    backface-visibility: hidden;
}

/* Contain layout for animated sections */
.banner_section,
.features_section,
.interface_section {
    contain: layout style;
}

/* Optimize preloader */
.preloader-container {
    will-change: opacity;
    backface-visibility: hidden;
}

/* Smooth transitions for interactive elements */
.nav-link,
.btn,
.go_top {
    transition: all 0.3s ease;
    will-change: transform;
}

/* Performance optimizations for images */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Reduce repaints during scrolling */
.purple_backdrop {
    will-change: opacity;
    transform: translateZ(0);
}

/* Optimize counter animations */
.counter-value {
    will-change: contents;
}

/* Additional Responsive Design Improvements */

/* Improve touch targets for mobile */
@media (max-width: 768px) {
    .nav-link,
    .btn,
    .go_top {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improve tap response */
    a, button, .btn {
        -webkit-tap-highlight-color: rgba(106, 73, 242, 0.2);
        touch-action: manipulation;
    }
    
    /* Optimize mobile scrolling */
    .banner_section,
    .features_section,
    .interface_section {
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }
    
    /* Improve mobile image loading */
    img {
        max-width: 100%;
        height: auto;
        loading: lazy;
    }
    
    /* Mobile-optimized typography */
    body {
        font-size: 16px;
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .banner_section .banner_text h1 {
        font-size: 42px;
    }
    
    .features_section .feature_detail .feature_box {
        width: 320px;
    }
}

/* Desktop optimizations */
@media (min-width: 1025px) {
    /* Re-enable animations on desktop */
    .banner_section .banner_shape1,
    .banner_section .banner_shape2,
    .banner_section .banner_shape3 {
        animation-play-state: running;
    }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Focus improvements for accessibility */
a:focus,
button:focus,
.btn:focus {
    outline: 2px solid #6A49F2;
    outline-offset: 2px;
}

/* Smooth state transitions */
.navbar-toggler,
.nav-link,
.btn {
    transition: all 0.2s ease-in-out;
}

/* Optimize carousel for all devices */
.owl-carousel {
    contain: layout style;
}

.owl-carousel .owl-item img {
    will-change: transform;
    backface-visibility: hidden;
}