/*
 * PlayerX Theme - Performance Optimizations CSS
 * This file contains CSS optimizations to improve site performance
 * while maintaining visual integrity
 */

/* Critical CSS Optimizations */

/* Remove unused animations and transitions for better performance */
.edgtf-disable-animations * {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
}

/* Optimize image loading and rendering */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    -ms-interpolation-mode: bicubic;
}

/* Improve font rendering performance */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

/* Optimize CSS containment for better layout performance */
.edgtf-container {
    contain: layout style;
}

.edgtf-row {
    contain: layout;
}

/* Reduce repaints and reflows */
.edgtf-parallax-section {
    will-change: transform;
    transform: translateZ(0);
}

/* Optimize video and iframe performance */
video,
iframe {
    contain: strict;
}

/* Critical above-the-fold optimizations */
.edgtf-page-header {
    contain: layout style;
}

.edgtf-main-menu {
    contain: layout;
}

/* Optimize slider performance */
.edgtf-slider {
    will-change: transform;
    contain: layout;
}

/* Remove unnecessary box-shadows for better performance */
.edgtf-performance-mode .edgtf-btn:hover,
.edgtf-performance-mode .edgtf-card:hover {
    box-shadow: none;
}

/* Optimize grid layouts */
.edgtf-portfolio-list,
.edgtf-blog-list {
    contain: layout;
}

/* Reduce complexity of gradients */
.edgtf-simple-gradient {
    background: linear-gradient(45deg, #000 0%, #333 100%);
}

/* Optimize mobile performance */
@media (max-width: 768px) {
    /* Disable complex animations on mobile */
    .edgtf-mobile-performance * {
        animation: none !important;
        transition: none !important;
    }
    
    /* Simplify backgrounds on mobile */
    .edgtf-parallax-section {
        background-attachment: scroll !important;
    }
    
    /* Reduce image quality on mobile for faster loading */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Optimize WooCommerce elements */
.woocommerce .products {
    contain: layout;
}

.woocommerce .product {
    contain: layout style;
}

/* Optimize Revolution Slider */
.tp-revslider-mainul {
    will-change: transform;
}

/* Critical resource hints for fonts */
@font-face {
    font-display: swap;
}

/* Optimize Elementor widgets */
.elementor-widget {
    contain: layout;
}

.elementor-section {
    contain: layout style;
}

/* Performance-focused utility classes */
.edgtf-gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

.edgtf-no-transitions {
    transition: none !important;
}

.edgtf-optimize-paint {
    contain: paint;
}

/* Reduce layout thrashing */
.edgtf-fixed-height {
    height: auto;
    min-height: 0;
}

/* Optimize sticky elements */
.edgtf-sticky {
    contain: layout;
    will-change: transform;
}

/* Critical CSS for above-the-fold content */
.edgtf-critical-section {
    contain: layout style paint;
}

/* Optimize search and filter elements */
.edgtf-search-form,
.edgtf-filter {
    contain: layout;
}

/* Performance mode toggle */
body.edgtf-performance-mode {
    /* Disable non-essential animations */
}

body.edgtf-performance-mode * {
    animation-duration: 0.1s !important;
    transition-duration: 0.1s !important;
}

/* Optimize loading states */
.edgtf-loading {
    contain: strict;
    content-visibility: hidden;
}

.edgtf-loaded {
    content-visibility: visible;
}

/* Reduce complexity for better performance */
.edgtf-simple-mode .edgtf-complex-element {
    display: none;
}

/* Optimize print styles */
@media print {
    .edgtf-no-print {
        display: none !important;
    }
    
    * {
        backgroun