/* ==========================================================================
   HERO SLIDER COMPONENT STYLES
   Handles the layout, transitions, and keyframe animations for the main hero slider.
   ========================================================================== */

/* Main hero section container */
#hero {
  position: relative;
  height: 90vh;
  height: 90svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
}

/* Slider wrapper */
.hero-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Base style for individual slides */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.8s var(--ease-smooth);
}

/* Active slide state */
.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 10;
  pointer-events: auto;
}

/* Hardcoded styling for the first slide to ensure fast initial page load (LCP optimization) */
.hero-slide[data-index="0"] {
  opacity: 1;
  transform: scale(1);
  z-index: 10;
  pointer-events: auto;
  transition: none;
}

/* Transitions enabled only after JS is fully loaded and ready */
#hero-slider-container.js-ready .hero-slide {
  transition:
    opacity 0.8s var(--ease-smooth),
    transform 0.8s var(--ease-smooth);
}

/* Scale effect for inactive slides when JS is ready */
#hero-slider-container.js-ready .hero-slide:not(.active) {
  opacity: 0;
  transform: scale(1.04);
  z-index: 1;
  pointer-events: none;
}

#hero-slider-container.js-ready .hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 10;
  pointer-events: auto;
}

/* Hero background media (image/video/gradient) */
.hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* Grainy noise texture overlay for aesthetic depth */
.hero-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.15;
  pointer-events: none;
}

/* Static state for hero content before JS is ready */
.hero-content {
  animation: none;
}

/* Slide content entry animation when active */
#hero-slider-container.js-ready .hero-slide.active .hero-content {
  animation: heroContentIn 0.8s var(--ease-smooth) forwards;
}

/* Content slide-up and fade-in keyframes */
@keyframes heroContentIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating ambient light blob effect on the top-right */
#hero::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.07) 0%,
    transparent 70%
  );
  top: -200px;
  right: -100px;
  pointer-events: none;
  z-index: 5;
  will-change: transform;
  animation: float 8s ease-in-out infinite;
}

/* Ambient light floating animation keyframes */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Navigation dots */
.dot {
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;
}

/* Active navigation dot */
.dot.active {
  width: 24px;
  background: #bd2126;
  opacity: 1;
}

/* Mobile responsive layout */
@media (max-width: 640px) {
  #hero {
    height: 60vh;
    height: 60svh;
    min-height: 400px;
  }
}
