/* ============================================
   Sound Technologies - Home: Hero Carousel
   Crossfade between vehicle images
   Mobile-first
   ============================================ */

.st-hero-carousel {
  position: relative;
  width: 100%;
}

.st-hero-carousel-track {
  position: relative;
  width: 100%;
  /* Aspect ratio - matches typical vehicle photo proportions */
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.05);
}

.st-hero-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  pointer-events: none;
}

.st-hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.st-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Modifier: slides containing UI screenshots (rather than vehicle photos)
   need to be contained, not cropped, so the full screen is visible */
.st-hero-slide.is-screenshot img {
  object-fit: contain;
  background: #fafafa;
  padding: 12px;
}

/* Dots - sit below the carousel as their own strip */
.st-hero-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.st-hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.st-hero-dot:hover,
.st-hero-dot:focus-visible {
  border-color: var(--st-white);
  background: rgba(255, 255, 255, 0.4);
  outline: none;
}

.st-hero-dot.is-active {
  background: var(--st-green);
  border-color: var(--st-green);
  transform: scale(1.15);
}

/* Tablet */
@media (min-width: 600px) {
  .st-hero-carousel-track {
    border-radius: 10px;
  }

  .st-hero-carousel-dots {
    gap: 12px;
    margin-top: 28px;
  }

  .st-hero-dot {
    width: 14px;
    height: 14px;
  }
}

/* Desktop */
@media (min-width: 960px) {
  .st-hero-carousel-track {
    /* Slightly less tall on desktop where the hero sits side-by-side with text */
    aspect-ratio: 16 / 11;
  }
}

/* Reduced motion - kill the fade for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .st-hero-slide {
    transition: none;
  }
}
