/* Performance Optimizations - Reduce Jank and Improve Scroll Performance */

/* Use GPU acceleration for transforms */
.swiper-slide,
.group,
.hover\:-translate-y-1:hover {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize hover effects - use only transform and opacity */
.group:hover {
    transform: translateY(-4px);
}

/* Reduce transition complexity - only animate what matters */
.transition-shadow {
    transition: box-shadow 0.3s ease !important;
}

.transition-transform {
    transition: transform 0.3s ease !important;
}

.transition-all {
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

/* Disable expensive transitions on scroll */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Optimize image rendering */
img {
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Optimize Swiper performance */
.swiper {
    overflow: hidden;
}

.swiper-slide {
    backface-visibility: hidden;
}

/* Reduce shadow complexity */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

/* Optimize pagination bullets */
.swiper-pagination-bullet {
    will-change: transform, background-color;
}

/* Prevent layout shift on hover */
.group {
    contain: layout style paint;
}

/* Optimize text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reduce repaints on scroll */
.page-content {
    contain: layout style paint;
}

/* Optimize gradient backgrounds */
.bg-gradient-to-r,
.bg-gradient-to-br,
.bg-gradient-to-t {
    background-attachment: fixed;
}

/* Reduce composite layers */
.relative {
    will-change: auto;
}

/* Optimize button interactions */
button,
a {
    will-change: auto;
}

button:active,
a:active {
    will-change: transform;
}
