/* Feature Slider */

.feature-slider {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  background: var(--dark-blue);
}

/* All slides share one grid cell so the section is as tall as the tallest slide. */
.feature-slider__slides {
  display: grid;
  min-height: 720px;
}

.feature-slider--full-height .feature-slider__slides {
  min-height: 100vh;
  min-height: 100svh;
}

.feature-slider__slide {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 64px 0 96px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 600ms ease,
    visibility 0s linear 600ms;
}

.feature-slider__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 600ms ease,
    visibility 0s;
}

.feature-slider__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}

.feature-slider__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.feature-slider__content {
  position: relative;
  z-index: 1;
  width: 100%;
}

/*
 * Type follows the theme's existing scale: the heading reuses .larger-heading
 * (35px) and grows to the 50px the theme uses for slider headings; copy is
 * body size; the link uses the 16px/18px small-label sizes.
 */
.feature-slider__heading {
  max-width: 14em;
  margin: 0 0 32px;
  line-height: 1.1;
}

.feature-slider__copy {
  max-width: 38rem;
}

.feature-slider__copy p {
  margin: 0 0 1em;
  @media (max-width: 50em) {
    /* max-width: 60%; */
  }
}

.feature-slider__copy > :last-child {
  margin-bottom: 0;
}

.feature-slider__link {
  display: inline-block;
  margin-top: 24px;
  padding-bottom: 4px;
  border-bottom: 2px solid currentColor;
  font-family: 'Jura', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Text tones. Dark is the default for bright photos. */
.feature-slider__slide--dark {
  color: var(--black);
}

.feature-slider__slide--dark .feature-slider__heading,
.feature-slider__slide--dark .feature-slider__link {
  color: var(--blue);
}

.feature-slider__slide--light {
  color: var(--white);
}

.feature-slider__slide--light .feature-slider__heading,
.feature-slider__slide--light .feature-slider__link {
  color: var(--white);
}

/* Pagination dots, matching the theme's existing slider bullets. */
.feature-slider__dots {
  position: absolute;
  right: 0;
  bottom: 28px;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.feature-slider__dot {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  opacity: 0.7;
  cursor: pointer;
  transition:
    background-color 300ms ease,
    opacity 300ms ease;
}

.feature-slider__dot:hover,
.feature-slider__dot.is-active {
  background: var(--blue);
  opacity: 1;
}

.feature-slider__dot:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Medium and up */
@media print, screen and (min-width: 50em) {
  .feature-slider__slide {
    padding: 80px 0 120px;
  }

  .feature-slider__heading {
    margin-bottom: 40px;
  }

  .feature-slider__link {
    font-size: 18px;
  }

  .feature-slider__dots {
    bottom: 40px;
    gap: 25px;
  }

  .feature-slider__dot {
    width: 20px;
    height: 20px;
  }
}

/* Large and up */
@media print, screen and (min-width: 64em) {
  .feature-slider__slides {
    min-height: 85vh;
  }

  .feature-slider__slide {
    padding: 100px 0 120px;
  }

  .feature-slider__heading {
    font-size: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature-slider__slide,
  .feature-slider__slide.is-active,
  .feature-slider__dot {
    transition: none;
  }
}
