.sectionTextMediaSlideshow {
  position: relative;
}

/* The margin-top: auto on description is designed for single hero sections —
   inside a slideshow it creates an undesirable gap between heading and body copy */
.sectionTextMediaSlideshow .sectionTextMedia__description {
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .sectionTextMediaSlideshow .splide__list {
    transition: none !important;
  }
}

@media screen and (max-width: 939px) {
  .sectionTextMediaSlideshow .splide__track {
    transition: height 0.3s ease;
  }
}

@media screen and (max-width: 939px) and (prefers-reduced-motion: reduce) {
  .sectionTextMediaSlideshow .splide__track {
    transition: none;
  }
}

@media screen and (min-width: 940px) {
  /* height: 100% makes each slide's content-grid fill the full Splide track.
     min-height provides the concrete anchor (breaks the circular dependency so
     the track has something to measure) and prevents the component collapsing.
     is-first-section is normalised to the same floor so one slide never makes
     the track taller than the rest, leaving empty space on shorter slides. */
  .sectionTextMediaSlideshow .sectionTextMedia .content-grid,
  .sectionTextMediaSlideshow .sectionTextMedia .content-grid.is-first-section {
    height: 100%;
    min-height: min(100vh, 57.4rem);
  }
}

/* ── Arrows ──────────────────────────────────────────────────────────────── */

.sectionTextMediaSlideshow__arrows {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  z-index: 2;
  right: 2rem;
}

.sectionTextMediaSlideshow__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: none;
  background: rgba(15, 45, 70, 1);
  color: #fff;
  width: 3.6rem;
  height: 3.6rem;
  cursor: pointer;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.sectionTextMediaSlideshow__btn svg {
  width: 14px;
  height: 26px;
}

.sectionTextMediaSlideshow__btn:hover {
  color: rgba(255, 255, 255, 0.75);
}

.sectionTextMediaSlideshow__btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

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

/* Mobile: position arrows within the image area (aspect-ratio 3/2 → height = 100vw * 2/3) */
@media screen and (max-width: 939px) {
  .sectionTextMediaSlideshow__arrows {
    bottom: auto;
    top: calc(100vw * 2/3 - 2rem);
    transform: translateY(-100%);
  }
}

@media screen and (min-width: 940px) {
  .sectionTextMediaSlideshow__arrows {
    bottom: 2.4rem;
    right: calc(40% + 2.4rem);
  }
}

/* ── Indicators ──────────────────────────────────────────────────────────── */

.sectionTextMediaSlideshow__indicators {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 2;
  left: 2rem;
  bottom: auto;
  top: calc(100vw * 2 / 3 - 2rem);
  transform: translateY(-100%);
}

@media screen and (min-width: 940px) {
  .sectionTextMediaSlideshow__indicators {
    top: auto;
    bottom: 2.4rem;
    left: 2.4rem;
    transform: none;
  }
}

.sectionTextMediaSlideshow__indicator {
  display: block;
  height: 3px;
  width: 1.6rem;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  transition: width 0.3s ease, background-color 0.3s ease;
  flex-shrink: 0;
}

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

.sectionTextMediaSlideshow__indicator.is-active {
  width: 3.2rem;
  background: rgba(255, 255, 255, 1);
}
