* {
  box-sizing: border-box;
}

/* Testimonials styles are scoped to this section */
.client-testimonials {
  position: relative;
  isolation: isolate;
  width: 100%;
  overflow: hidden;
  padding: clamp(72px, 10vw, 130px) 24px;
  color: #fff;
  background: #101113 url("../assets/testimonials/testimonial-background.png") center / cover no-repeat;
}

.client-testimonials__inner {
  width: min(100%, 1600px);
  margin: 0 auto;
}

.client-testimonials__heading {
  margin: 0 auto 56px;
  text-align: center;
}

.client-testimonials__heading h2 {
  margin: 0;
  color: #fff;
  font: 800 clamp(30px, 4vw, 46px)/1.2 "Manrope", sans-serif;
  letter-spacing: -.8px;
}

.client-testimonials__heading p {
  margin: 18px auto 0;
  color: rgba(255,255,255,.9);
  font: italic 400 clamp(15px, 1.7vw, 20px)/1.5 "DM Sans", sans-serif;
}

.testimonial-slider {
  width: min(100%, 780px);
  margin: 0 auto;
}

.testimonial-slider__viewport {
  overflow: hidden;
  padding: 34px 0 0;
}

.testimonial-slider__track {
  display: flex;
  transition: transform .55s cubic-bezier(.22,.75,.25,1);
  will-change: transform;
}

.testimonial-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  padding-top: 26px;
}

.testimonial-avatar {
  position: absolute;
  z-index: 2;
  top: -30px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  padding: 9px;
  border: 5px solid #ff8b35;
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
}

.testimonial-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* border: 2px solid #15106b; */
  border-radius: 50%;
}

.testimonial-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 68px 58px 30px;
  color: #050b13;
  text-align: center;
  background: #42c5ee;
}

.testimonial-card h3 {
  margin: 0 0 12px;
  font: 700 clamp(21px, 2.5vw, 30px)/1.3 "Manrope", sans-serif;
}

.testimonial-card blockquote {
  margin: 0;
  font: italic 500 clamp(15px, 1.65vw, 20px)/1.5 "DM Sans", sans-serif;
}

.testimonial-author {
  align-self: flex-end;
  margin: 12px 0 0;
  font: italic 700 clamp(15px, 1.55vw, 19px)/1.4 "DM Sans", sans-serif;
}

.testimonial-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 34px;
}

.testimonial-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 4px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}

.testimonial-arrow:hover {
  opacity: .7;
  transform: scale(1.12);
}

.testimonial-arrow:focus-visible,
.testimonial-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.testimonial-arrow img {
  display: block;
  width: 25px;
  height: 25px;
  object-fit: contain;
}

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

.testimonial-dot {
  width: 15px;
  height: 15px;
  padding: 0;
  border: 1.5px solid rgba(255,255,255,.85);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.testimonial-dot.is-active {
  background: #fff;
  transform: scale(1.05);
}

/* Tablet */
@media (max-width: 768px) {
  .client-testimonials {
    padding: 72px 22px;
  }

  .client-testimonials__heading {
    margin-bottom: 38px;
  }

  .testimonial-slider {
    width: min(100%, 680px);
  }

  .testimonial-card {
    min-height: 270px;
    padding: 66px 36px 28px;
  }
}

/* Mobile */
@media (max-width: 520px) {
  .client-testimonials {
    padding: 58px 16px 54px;
    background-position: center;
  }

  .client-testimonials__heading {
    margin-bottom: 24px;
  }

  .client-testimonials__heading h2 {
    font-size: clamp(25px, 7.5vw, 34px);
    letter-spacing: -.5px;
  }

  .client-testimonials__heading p {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.55;
  }

  .desktop-break {
    display: none;
  }

  .testimonial-slider__viewport {
    padding-top: 27px;
  }

  .testimonial-slide {
    padding-top: 22px;
  }

  .testimonial-avatar {
    width: 88px;
    height: 88px;
    padding: 7px;
    border-width: 4px;
  }

  .testimonial-card {
    min-height: 270px;
    padding: 58px 20px 24px;
  }

  .testimonial-card h3 {
    margin-bottom: 10px;
    font-size: 20px;
  }

  .testimonial-card blockquote {
    font-size: 14px;
    line-height: 1.6;
  }

  .testimonial-author {
    margin-top: 13px;
    font-size: 14px;
  }

  .testimonial-controls {
    gap: 22px;
    margin-top: 24px;
  }

  .testimonial-arrow {
    width: 30px;
    height: 30px;
  }

  .testimonial-arrow img {
    width: 22px;
    height: 22px;
  }

  .testimonial-dot {
    width: 12px;
    height: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-slider__track,
  .testimonial-arrow,
  .testimonial-dot {
    transition: none;
  }
}
