/* =============================================
   TESTIMONIAL SHOWCASE — stacked slide units
   ============================================= */

.testimonial-showcase {
  position: relative;
  background: var(--white);
}

.testimonial-showcase.is-passive {
  height: auto;
}

.testimonial-pin {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  padding: clamp(28px, 4vh, 48px) 0 clamp(32px, 5vh, 56px);
  box-sizing: border-box;
}

.testimonial-head-wrap {
  flex-shrink: 0;
  width: 100%;
}

/* Header */
.testimonial-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: start;
  flex-shrink: 0;
  margin-bottom: clamp(24px, 4vh, 40px);
}

.testimonial-main-title {
  font-size: clamp(1.75rem, 3.2vw, 2.65rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--black);
  margin: 0 0 12px;
}

.testimonial-grad-partner {
  background: linear-gradient(90deg, #7c3aed 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.testimonial-grad-results {
  background: linear-gradient(90deg, #e63b3b 0%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.testimonial-subtitle {
  font-size: 15px;
  font-weight: 400;
  color: var(--black);
  margin: 0;
}

.testimonial-head-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.testimonial-clutch {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

a.testimonial-clutch:hover {
  opacity: 0.75;
}

.testimonial-clutch-score {
  font-size: clamp(2.25rem, 3.8vw, 3rem);
  font-weight: 800;
  line-height: 1;
  color: var(--red);
  letter-spacing: -0.03em;
}

.testimonial-clutch-label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--black);
}

.testimonial-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--black);
  flex-shrink: 0;
  transition: width 0.3s ease, border-radius 0.3s ease, background 0.3s ease;
}

.testimonial-dot.is-active {
  width: 32px;
  border-radius: 999px;
  background: var(--red);
}

/* Slider viewport */
.testimonial-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: clamp(240px, 32vh, 300px);
  width: 100%;
  overflow: hidden;
}

.testimonial-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  height: auto;
  will-change: transform;
}

.testimonial-slide {
  flex: 0 0 100vw;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 7.5vw;
  box-sizing: border-box;
}

/* Stack — narrower + taller like screenshot */
.testimonial-stack {
  position: relative;
  width: 76vw;
  max-width: 1080px;
  height: clamp(320px, 30vw, 400px);
}

.testimonial-stack__layer {
  position: absolute;
  inset: 0;
  border-radius: 34px;
  pointer-events: none;
}

/* Same size as front card — only rotated corners peek out.
   Two layers per stack rotate opposite ways for the fanned look. */
.testimonial-stack__layer:nth-of-type(1) {
  transform: rotate(4deg);
  transform-origin: center center;
  z-index: 1;
}

.testimonial-stack__layer:nth-of-type(2) {
  transform: rotate(-4deg);
  transform-origin: center center;
  z-index: 2;
}

.testimonial-stack__layer--red {
  background: var(--red);
}

.testimonial-stack__layer--black {
  background: var(--black);
}

.testimonial-stack__card {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 34px;
  padding: clamp(28px, 3.5vw, 40px) clamp(36px, 4.5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.08);
  transform: rotate(0deg);
}

.testimonial-stack__card--white {
  background: var(--white);
  color: var(--black);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.testimonial-stack__card--black {
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--black);
}

.testimonial-stack__card--red {
  background: var(--red);
  color: var(--black);
  border: 1px solid var(--red);
}

.testimonial-quote-open,
.testimonial-quote-close {
  position: absolute;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: 0.8;
  pointer-events: none;
  user-select: none;
}

.testimonial-stack__card--white .testimonial-quote-open,
.testimonial-stack__card--white .testimonial-quote-close {
  color: rgba(0, 0, 0, 0.07);
}

.testimonial-stack__card--black .testimonial-quote-open,
.testimonial-stack__card--black .testimonial-quote-close {
  color: rgba(255, 255, 255, 0.1);
}

.testimonial-stack__card--red .testimonial-quote-open,
.testimonial-stack__card--red .testimonial-quote-close {
  color: rgba(0, 0, 0, 0.1);
}

/* Landing — white front cards only; red/black layers stay behind */
.testimonial-showcase--all-white .testimonial-stack__card--red,
.testimonial-showcase--all-white .testimonial-stack__card--black,
.testimonial-showcase--all-white .testimonial-stack__card--white {
  background: var(--white);
  color: var(--black);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.testimonial-showcase--all-white .testimonial-stack__card .testimonial-quote-open,
.testimonial-showcase--all-white .testimonial-stack__card .testimonial-quote-close {
  color: rgba(0, 0, 0, 0.07);
}

.testimonial-showcase--all-white .testimonial-stack__card .testimonial-location {
  color: var(--red);
  font-weight: 800;
}

.testimonial-quote-open {
  top: clamp(16px, 2.5vw, 28px);
  left: clamp(28px, 4vw, 48px);
}

.testimonial-quote-close {
  bottom: clamp(10px, 2vw, 22px);
  right: clamp(28px, 4vw, 48px);
}

.testimonial-text {
  position: relative;
  z-index: 1;
  font-size: clamp(0.92rem, 1.25vw, 1.1rem);
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
  margin: 0 auto;
  max-width: 90%;
}

.testimonial-author {
  position: absolute;
  z-index: 1;
  bottom: clamp(22px, 2.8vw, 32px);
  left: clamp(36px, 4.5vw, 64px);
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  font-weight: 800;
  margin: 0;
}

.testimonial-stack__card--white .testimonial-location {
  color: var(--red);
  font-weight: 800;
}

.testimonial-stack__card--black .testimonial-location {
  color: var(--red);
  font-weight: 800;
}

/* Mobile — scroll snap through stacks */
.testimonial-showcase.is-passive {
  height: auto;
}

.testimonial-showcase.is-passive .testimonial-pin {
  height: auto;
  padding: 48px 0 64px;
}

.testimonial-showcase.is-passive .testimonial-slider-wrap {
  overflow: hidden;
  touch-action: pan-y;
}

.testimonial-showcase.is-passive .testimonial-track {
  will-change: transform;
}

@media (max-width: 900px) {
  .testimonial-head {
    grid-template-columns: 1fr;
  }

  .testimonial-head-right {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
  }

  /* Last slide — longer quote on tablet / passive mobile */
  .testimonial-slide:last-child .testimonial-stack {
    height: clamp(300px, 52vw, 400px);
  }

  .testimonial-slide:last-child .testimonial-text {
    padding-bottom: 24px;
  }
}

@media (max-width: 640px) {
  .testimonial-stack {
    width: 90vw;
    height: clamp(220px, 55vw, 280px);
  }

  .testimonial-text {
    text-align: left;
    font-size: 0.95rem;
  }

  .testimonial-slide {
    padding: 0 5vw;
  }

  /* Last slide — longer quote; give author room at the bottom */
  .testimonial-slide:last-child .testimonial-stack {
    height: clamp(300px, 78vw, 360px);
  }

  .testimonial-slide:last-child .testimonial-text {
    padding-bottom: 28px;
  }
}
