/* Testimonial slider: styles.css */
/* Font: add this to your <head> if not already loaded:
   <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700&display=swap" rel="stylesheet"> */

.testimonials,
.testimonials * {
  box-sizing: border-box;
}

.testimonials {
  width: 100%;
  background: #ffffff;
  color: #111111;
  font-family: 'Montserrat', system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  padding: clamp(56px, 9vw, 104px) clamp(12px, 3vw, 40px) clamp(40px, 6vw, 72px);
}

.testimonials h2,
.testimonials p,
.testimonials figure,
.testimonials blockquote {
  margin: 0;
}

/* Heading */
.ts-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-bottom: clamp(32px, 6vw, 64px);
}

.ts-title {
  font-weight: 700;
  font-size: 200%;
  line-height: 1.1;
  text-align: center;
  letter-spacing: -0.01em;
}

.ts-rule {
  width: 160px;
  height: 1px;
  background: #111111;
}

/* Layout: desktop = arrow | slide | arrow, dots underneath */
.ts-stage {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  grid-template-areas:
    "prev slide next"
    ".    dots  .";
  align-items: center;
  column-gap: clamp(8px, 2vw, 32px);
  row-gap: 28px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.ts-prev { grid-area: prev; justify-self: start; }
.ts-next { grid-area: next; justify-self: end; }

/* All slides share one grid cell so the height never jumps */
.ts-slides {
  grid-area: slide;
  display: grid;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  overflow: hidden;
}

.ts-slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.9s ease-in-out, opacity 0.9s ease-in-out;
}

.ts-slide.is-before { transform: translateX(-100%); }
.ts-slide.is-after  { transform: translateX(100%); }

/* Higher specificity so the active slide always wins and is always visible */
.ts-slide.is-active,
.ts-slide.is-active.is-before,
.ts-slide.is-active.is-after {
  opacity: 1;
  transform: translateX(0);
}

/* Used by the script to park a slide off-screen without animating */
.ts-slide.no-anim { transition: none; }

.ts-quote {
  font-weight: 300;
  font-size: clamp(20px, 2.1vw, 20px);
  line-height: 2;
  letter-spacing: 0.01em;
  color: #1a1a1a;
  max-width: 46em;
}

.ts-person {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ts-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.ts-role {
  font-weight: 400;
  font-size: 14px;
  color: #4a4a4a;
}

/* Arrows */
.ts-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000000;
  cursor: pointer;
}

.ts-arrow:hover { color: #4E4E4E;; 
  background: transparent !important; 
}
.ts-arrow:focus-visible,
.ts-dot:focus-visible {
  outline: 2px solid #3b2fa0;
  outline-offset: 2px;
}

/* Dots */
.ts-dots {
  grid-area: dots;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ts-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ts-dot span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9c97cf;
}

.ts-dot.is-active span {
  background: #000000;
}

/* Mobile: slide on top, arrows either side of the dots underneath */
@media (max-width: 700px) {
  .ts-stage {
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    grid-template-areas:
      "slide slide slide"
      "prev  dots  next";
    row-gap: 12px;
  }

  .ts-prev,
  .ts-next { justify-self: center; }

  .ts-arrow { height: 56px; }
  .ts-arrow svg { height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .ts-slide { transition: opacity 0.4s ease; transform: none !important; }
  .ts-slide:not(.is-active) { pointer-events: none; }
}
