/**
 * Smooth Scroll Styles
 * Hides native scrollbar and prepares for Lenis virtual scrolling
 */

/* Hide scrollbar for Chrome, Safari, and Opera */
html::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge, and Firefox */
html {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Ensure smooth rendering and prevent layout shifts */
html.lenis {
    height: auto;
    overflow-x: hidden;
}

/* Prevent any content shift at the top */
html.lenis,
html.lenis body {
    overflow-anchor: none;
}

/* Fix WordPress admin bar compatibility */
#wpadminbar {
    position: fixed !important;
    z-index: 99999 !important;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* Critical: Prevent stutter on video sections by removing ALL transforms */
.elementor-section:has(video),
.elementor-section:has(.elementor-background-video-container),
section:has(video),
div:has(> video) {
    -webkit-transform: none !important;
    transform: none !important;
    will-change: auto !important;
}

video,
.elementor-background-video-container,
.elementor-background-video-hosted,
.elementor-background-video-embed {
    -webkit-transform: none !important;
    transform: none !important;
    will-change: auto !important;
}

/* Fix for Elementor video backgrounds */
.elementor-section .elementor-background-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Media slider - keep basic optimization */
.media-video-slider:not(:has(video)),
.swiper:not(:has(video)) {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Force GPU acceleration for smoother scrolling */
html.lenis,
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimize sections but NOT video containers */
.elementor-section:not(:has(video)):not(:has(.elementor-background-video-container)) {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}
