/* Video Background Module - Optimized for Performance */

.video-bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  background-color: #000;
}

.video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.4;
  
  /* GPU acceleration for smooth playback */
  will-change: transform;
  transform: translate3d(-50%, -50%, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Fallback image for reduced motion or older browsers */
.video-bg-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.4;
  display: block;
  
  /* GPU acceleration for smooth rendering */
  will-change: transform;
  transform: translate3d(-50%, -50%, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Show fallback when prefers-reduced-motion is enabled */
@media (prefers-reduced-motion: reduce) {
  .video-bg {
    display: none !important;
  }
  .video-bg-fallback {
    display: block !important;
  }
}

/* Ensure body content is above the background */
body {
  position: relative;
  z-index: 10;
}

header, main, footer {
  position: relative;
  z-index: 20;
}

/* Optional: Add subtle overlay for better text readability */
.video-bg-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1;
}
