/* ---- Hero carousel: one clickable slide per collection ----
   Each .slide is a real link covering the whole photo, with its own title.
   The .overlay (search bar) sits above the slides, so it lets clicks fall
   through everywhere except on the search form itself.
   Loaded after home.css from index.html only. */
body.home .carousel-hero .slides .slide {
  position: relative;
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  overflow: hidden;
}
body.home .carousel-hero .slides .slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
  transition: opacity var(--hover-slow) var(--hover-ease);
}
body.home .carousel-hero .slide-img {
  transition: transform var(--hover-slow) var(--hover-ease);
  will-change: transform;
}
/* Keyed to the whole hero, not the slide, so moving onto the search bar,
   dots or hero ads (which sit above the slides) doesn't undo the effect. */
body.home .carousel-hero:hover .slides .slide::before,
body.home .carousel-hero .slides .slide:focus-visible::before {
  opacity: 0.75;
}
body.home .carousel-hero:hover .slide-img,
body.home .carousel-hero .slide:focus-visible .slide-img {
  transform: scale(1.04);
}
body.home .carousel-hero .slide-caption {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0 1.25rem 6.5rem;
  text-align: center;
  max-width: 900px;
}
body.home .carousel-hero .slide-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 3.25rem);
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
body.home .carousel-hero .slide-sub {
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: #f3f4f6;
}
body.home .carousel-hero .slide-cta {
  margin-top: 0.35rem;
  font-weight: 700;
  border-bottom: 2px solid var(--rust-400);
  padding-bottom: 2px;
}
body.home .carousel-hero .slide-cta i {
  margin-left: 0.25rem;
  transition: transform var(--hover-fast) var(--hover-ease);
}
body.home .carousel-hero .slide:hover .slide-cta i,
body.home .carousel-hero .slide:focus-visible .slide-cta i {
  transform: translateX(5px);
}
body.home .carousel-hero .slide:hover .slide-title,
body.home .carousel-hero .slide:focus-visible .slide-title {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}
body.home .carousel-hero .slide:focus-visible {
  outline: 3px solid var(--rust-400);
  outline-offset: -3px;
}
body.home .carousel-hero .overlay {
  background: none;
  pointer-events: none;
  place-items: end center;
  padding-bottom: 2.75rem;
}
body.home .carousel-hero .overlay > div {
  width: 100%;
}
body.home .carousel-hero .overlay form,
body.home .carousel-hero .overlay .hero-ads {
  pointer-events: auto;
}
.hero-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Hero height ----
   Taller than the 50vh / 520px set in home.css so more of each photo shows,
   but capped so the next section still peeks in below the hero. */
body.home .carousel-hero {
  height: 75vh;
  min-height: 420px;
  max-height: 820px;
}
@media (max-width: 639px) {
  body.home .carousel-hero {
    height: 62vh;
    min-height: 380px;
  }
}

/* ---- Hero dots ----
   home.css rings a dot on :focus, so a clicked dot kept its ring after the
   carousel moved on. Only the current slide's dot (.active) is highlighted
   now; the ring shows for keyboard focus only. */
body.home .carousel-hero .carousel-dots .dot:focus {
  outline: none;
}
body.home .carousel-hero .carousel-dots .dot:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  body.home .carousel-hero .slides .slide::before,
  body.home .carousel-hero .slide-img,
  body.home .carousel-hero .slide-cta i {
    transition: none;
  }
  body.home .carousel-hero:hover .slide-img,
  body.home .carousel-hero .slide:focus-visible .slide-img {
    transform: none;
  }
}
