/*
  Sparkns Racks — "What Our Clients Say" testimonials carousel.
  Shows 3 cards on desktop / 2 on tablet / 1 on mobile, advancing one card
  at a time (JS sets card widths + step; see testimonials.js).
*/

.sr-tst {
  background: #ffffff;
  padding: clamp(64px, 9vw, 120px) 32px;
}

/* -------------------------------------------------- */
/* Header                                               */
/* -------------------------------------------------- */

.sr-tst__head {
  text-align: center;
  margin: 0 auto clamp(40px, 6vw, 60px);
  max-width: 640px;
}

.sr-tst__title {
  font-family: 'Archivo Black', 'Space Grotesk', sans-serif;
  font-weight: 400;
  font-size: clamp(26px, 4vw, 44px);
  letter-spacing: -0.5px;
  text-transform: uppercase;
  color: #111111;
  margin: 0 0 18px;
}

.sr-tst__accent {
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: var(--sr-green, #8fbf5c);
  margin: 0 auto 22px;
}

.sr-tst__subhead {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.6;
  color: #6b6b6b;
  margin: 0;
}

/* -------------------------------------------------- */
/* Carousel frame                                       */
/* -------------------------------------------------- */

.sr-tst__carousel {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 4px;
}

.sr-tst__viewport {
  overflow: hidden;
}

.sr-tst__track {
  display: flex;
  gap: 24px;
  transition: transform 550ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* -------------------------------------------------- */
/* Card                                                 */
/* -------------------------------------------------- */

.sr-tst__card {
  flex: 0 0 auto;
  margin: 0; /* reset the UA <figure> default (16px 40px) */
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.06);
  padding: clamp(24px, 3vw, 34px);
  display: flex;
  flex-direction: column;
}

.sr-tst__quote {
  color: var(--sr-green, #8fbf5c);
  opacity: 0.9;
  margin-bottom: 14px;
}

.sr-tst__stars {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
  color: var(--sr-green, #8fbf5c);
}

.sr-tst__text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(14.5px, 1.5vw, 16px);
  line-height: 1.7;
  color: #3a3a3a;
  margin: 0 0 22px;
  flex: 1 1 auto;
}

.sr-tst__divider {
  height: 1px;
  background: #ececec;
  border: 0;
  margin: 0 0 20px;
}

.sr-tst__client {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sr-tst__avatar {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--sr-green, #8fbf5c);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.sr-tst__name {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #111111;
  line-height: 1.3;
}

.sr-tst__role {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: #6b6b6b;
  line-height: 1.4;
  margin-top: 2px;
}

/* -------------------------------------------------- */
/* Arrows                                               */
/* -------------------------------------------------- */

.sr-tst__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #e2e2e2;
  background: #ffffff;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(17, 17, 17, 0.12);
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, opacity 200ms ease;
}

.sr-tst__nav:hover,
.sr-tst__nav:focus-visible {
  background: var(--sr-green, #8fbf5c);
  color: #111111;
  border-color: var(--sr-green, #8fbf5c);
}

.sr-tst__nav:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.sr-tst__nav--prev {
  left: -6px;
}

.sr-tst__nav--next {
  right: -6px;
}

/* -------------------------------------------------- */
/* Dots                                                 */
/* -------------------------------------------------- */

.sr-tst__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: clamp(28px, 4vw, 40px);
}

.sr-tst__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #d3d3d3;
  cursor: pointer;
  transition: background 250ms ease, width 250ms ease;
}

.sr-tst__dot:hover {
  background: #b0b0b0;
}

.sr-tst__dot.is-active {
  background: var(--sr-green, #8fbf5c);
  width: 24px;
  border-radius: 5px;
}

.sr-tst__dot:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.sr-tst__live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------- */
/* Responsive arrow placement                           */
/* -------------------------------------------------- */

/* On narrow screens, tuck arrows to the bottom corners so they don't cover cards. */
@media (max-width: 680px) {
  .sr-tst__nav {
    top: auto;
    bottom: -64px;
    transform: none;
    width: 40px;
    height: 40px;
  }
  .sr-tst__nav--prev {
    left: calc(50% - 52px);
  }
  .sr-tst__nav--next {
    right: calc(50% - 52px);
  }
  .sr-tst__dots {
    margin-top: 24px;
  }
  .sr-tst {
    padding-bottom: clamp(96px, 16vw, 140px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sr-tst__track,
  .sr-tst__nav,
  .sr-tst__dot {
    transition-duration: 0.01ms !important;
  }
}
