/**
 * Hero Carousel — fade slideshow for the homepage hero background.
 *
 * Applied to .hero-media via the id="hero-carousel" element. Slides sit at
 * z-index 1 (hero-media layer). Arrow and indicator controls are also inside
 * this layer; they remain interactive because .hero::before (the gradient
 * overlay) has pointer-events: none.
 *
 * Depends on css/components/hero.css for .hero-media positioning context.
 */

/* ── Track — contains stacked slides ── */
.hero-carousel__track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ── Slides — absolutely stacked, fade between them ── */
.hero-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero-carousel__slide.is-active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel__slide {
    transition: none;
  }
}

.hero-carousel__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  user-select: none;
}

/* ── Navigation arrows ── */
.hero-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease;
  z-index: 5;
}

.hero-carousel__arrow:hover {
  background: rgba(0, 0, 0, 0.65);
}

.hero-carousel__arrow:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.hero-carousel__arrow--prev {
  left: 1rem;
}

.hero-carousel__arrow--next {
  right: 1rem;
}

@media (min-width: 768px) {
  .hero-carousel__arrow {
    width: 48px;
    height: 48px;
  }

  .hero-carousel__arrow--prev { left: 1.75rem; }
  .hero-carousel__arrow--next { right: 1.75rem; }
}

/* ── Indicator dots ── */
.hero-carousel__indicators {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  z-index: 5;
}

.hero-carousel__indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.hero-carousel__indicator.is-active {
  background: #ffffff;
  transform: scale(1.3);
}

.hero-carousel__indicator:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel__indicator {
    transition: none;
  }
}
