.testimonial.has-slider {
  overflow: hidden;
  place-content: center;
}

.testimonial.has-slider > blockquote.reveal {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.testimonial-stage {
  display: grid;
  z-index: 1;
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
  position: relative;
}

.testimonial-stage .testimonial-slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(28px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.7s;
}

.testimonial-stage .testimonial-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

.testimonial-stage .testimonial-slide.is-exit-left {
  opacity: 0;
  transform: translateX(-28px);
}

.testimonial-stage .testimonial-slide.is-exit-right {
  opacity: 0;
  transform: translateX(28px);
}

.testimonial-stage .testimonial-slide.is-enter-left {
  transform: translateX(-28px);
}

.testimonial-nav {
  z-index: 2;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 56px;
  display: flex;
  position: relative;
}

.testimonial-nav button {
  color: var(--cream);
  cursor: pointer;
  background: 0 0;
  border: 0;
  padding: 0;
}

.testimonial-arrow {
  opacity: 0.55;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 700;
  transition: opacity 0.25s, transform 0.25s;
}

.testimonial-arrow:hover,
.testimonial-arrow:focus-visible {
  opacity: 1;
}

.testimonial-arrow:focus-visible {
  outline: 1px solid var(--oak-light);
  outline-offset: 6px;
}

.testimonial-arrow.prev:hover {
  transform: translateX(-3px);
}

.testimonial-arrow.next:hover {
  transform: translateX(3px);
}

.testimonial-dots {
  align-items: center;
  gap: 10px;
  display: flex;
}

.testimonial-dots button {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #f3eee355;
  transition: width 0.35s, background 0.35s;
}

.testimonial-dots button[aria-current="true"] {
  width: 22px;
  background: var(--oak-light);
}

.testimonial-dots button:hover,
.testimonial-dots button:focus-visible {
  background: var(--cream);
}

.testimonial-dots button:focus-visible {
  outline: 1px solid var(--oak-light);
  outline-offset: 4px;
}

.testimonial-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: #ffffff14;
  overflow: hidden;
}

.testimonial-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--oak-light);
  transform: scaleX(0);
  transform-origin: left center;
}

.testimonial-progress span.is-running {
  animation: testimonialProgress 8s linear forwards;
}

@keyframes testimonialProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (max-width: 760px) {
  .testimonial-nav {
    margin-top: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-stage .testimonial-slide,
  .testimonial-stage .testimonial-slide.is-active,
  .testimonial-arrow,
  .testimonial-dots button {
    transition: none;
  }

  .testimonial-progress span,
  .testimonial-progress span.is-running {
    animation: none;
    transform: none;
  }
}
