/* ============================================================
   SINGHANIA AVIATION — PERFORMANCE CSS OPTIMIZATIONS (SAFE MODE)
   ============================================================ */

/* Removed scroll-behavior: smooth as it conflicts with JS scrolling/GSAP */

/* ---- 4. Optimize Background Blur Blobs ---- */
/* Reduce massive blur radius from 120px to 60px — visually identical, 4x faster */
.page-body::before,
.page-body::after,
.page-body .bg-blob-3 {
  filter: blur(60px) !important;
  animation-duration: 40s !important;
  opacity: 0.12 !important;
}

/* ---- 5. Reduce Backdrop-Filter During Scroll (Applied via JS) ---- */
.is-scrolling .glass-dark {
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.is-scrolling .glass-card {
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* ---- 6. Pause Animations When Element is Offscreen ---- */
.perf-offscreen {
  animation-play-state: paused !important;
}

.perf-offscreen * {
  animation-play-state: paused !important;
}

/* ---- 9. Lazy-Load Image Fade-In ---- */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded,
img.loaded {
  opacity: 1;
}

img[loading="lazy"][src]:not(.perf-lazy) {
  opacity: 1;
}

/* ---- 12. Mobile Performance Boost ---- */
@media (max-width: 768px) {
  .glass-dark {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }
  
  .glass-card {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }
  
  [class*="blur-[120px]"],
  [class*="blur-[100px]"] {
    filter: blur(40px) !important;
  }
  
  [class*="blur-[60px]"] {
    filter: blur(25px) !important;
  }
}
