/* ============================================================
   CRITICAL FIX: FORCE HIDE PRELOADER IMMEDIATELY
   Purpose: Override all preloader CSS to hide it permanently
   The preloader has z-index 1001 and covers the header (z-index 1000)
   This CSS forcefully hides it with !important
   ============================================================ */

#loader-wrapper {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#loader-wrapper .loader-section,
#loader-wrapper .loader-section.section-left,
#loader-wrapper .loader-section.section-right {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

#loader {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Force show header and top header immediately */
.header-section,
.header__top {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ============================================================
   CRITICAL FIX: SCROLL JITTER ELIMINATION
   Purpose: Override scroll-behavior: smooth during page load
   The smooth scroll setting in theme-colors.css conflicts with
   JS scroll-to-top calls, causing the page to feel "stuck".
   This forces instant scroll behavior initially.
   ============================================================ */

/* Override smooth scroll to prevent jitter on page load */
html {
  scroll-behavior: auto !important;
}

/* Disable any problematic transitions during initial load */
body.loading-scroll * {
  scroll-behavior: auto !important;
}

/* Ensure smooth scrolling is re-enabled for user-initiated actions only */
html.scroll-ready {
  scroll-behavior: smooth;
}

/* Optimize scroll performance by using containment */
main,
.main-content,
#main-content,
.content-wrapper {
  contain: layout style;
}
