/* ============================================================
   V25 — Testimonial marquee (prosp.ai pattern, dark theme)
   Two counter-scrolling tracks; cards repeat 3x from ACF.
   ============================================================ */

#testimonials .ts-marquee-wrap {
  position: relative;
  width: 100%;
  margin-top: 2.5rem;
  overflow: hidden;
  padding: 1rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

#testimonials .ts-marquee {
  display: flex;
  overflow: hidden;
  width: 100%;
}

#testimonials .ts-marquee+.ts-marquee {
  margin-top: 1.25rem;
}

#testimonials .ts-marquee-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  will-change: transform;
  padding-right: 1.25rem;
}

#testimonials .ts-marquee-l .ts-marquee-track {
  animation: ts-marq-l 38s linear infinite;
}

#testimonials .ts-marquee-r .ts-marquee-track {
  animation: ts-marq-r 32s linear infinite;
}

#testimonials .ts-marquee:hover .ts-marquee-track {
  animation-play-state: paused;
}

@keyframes ts-marq-l {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes ts-marq-r {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0);
  }
}

/* ---- cards (prosp.ai geometry, GrowReach palette) ---- */
#testimonials .ts-mcard {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: none;
  width: 312px;
  min-height: 300px;
  padding: 1.5rem;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s cubic-bezier(.22, 1, .36, 1);
}

#testimonials .ts-mcard:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 44px rgba(20, 15, 60, .18);
  z-index: 2;
}

#testimonials .ts-mcard-av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: .75rem;
  border: 2px solid rgba(255, 255, 255, .35);
}

#testimonials .ts-mcard-q {
  color: rgba(255, 255, 255, .9);
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 1;
  height: 30px;
}

#testimonials .ts-mcard-txt {
  color: #fff;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  margin: .5rem 0 1rem;
  flex: 1;
}

#testimonials .ts-mcard-foot {
  border-top: 1px solid rgba(255, 255, 255, .18);
  padding-top: .75rem;
}

#testimonials .ts-mcard-author {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

#testimonials .ts-mcard-role {
  color: rgba(255, 255, 255, .7);
  font-size: 12.5px;
  margin-top: 2px;
}

/* ---- variants (prosp.ai palette, tuned for dark bg) ---- */
#testimonials .ts-mcard.t-grad-a {
  background: linear-gradient(135deg, #6243d5, #8968ec);
}

#testimonials .ts-mcard.t-grad-b {
  background: linear-gradient(135deg, #8b69ed, #6243d5);
}

#testimonials .ts-mcard.t-green {
  background: #c4ee87;
}

#testimonials .ts-mcard.t-green .ts-mcard-q,
#testimonials .ts-mcard.t-green .ts-mcard-txt,
#testimonials .ts-mcard.t-green .ts-mcard-author {
  color: #0b081b;
}

#testimonials .ts-mcard.t-green .ts-mcard-role {
  color: rgba(11, 8, 27, .65);
}

#testimonials .ts-mcard.t-green .ts-mcard-foot {
  border-top-color: rgba(11, 8, 27, .15);
}

#testimonials .ts-mcard.t-blue {
  background: #54b0f8;
}

#testimonials .ts-mcard.t-white {
  background: #fff;
}

#testimonials .ts-mcard.t-white .ts-mcard-q,
#testimonials .ts-mcard.t-white .ts-mcard-txt,
#testimonials .ts-mcard.t-white .ts-mcard-author {
  color: #100d20;
}

#testimonials .ts-mcard.t-white .ts-mcard-role {
  color: rgba(16, 13, 32, .6);
}

#testimonials .ts-mcard.t-white .ts-mcard-foot {
  border-top-color: rgba(16, 13, 32, .12);
}

/* ---- desktop vs mobile track toggling ---- */
#testimonials .ts-desktop-marquee {
  display: block;
}

#testimonials .ts-mobile-carousel {
  display: none;
}

/* ============================================================
   Mobile Carousel — single row, 10% | 100% | 10% peek
   Breakout from section-inner padding so peeks show at edges
   ============================================================ */
@media (max-width: 768px) {
  #testimonials .ts-desktop-marquee {
    display: none !important;
  }

  /* Override body overflow-x:hidden on testimonials section only */
  #testimonials {
    overflow: visible !important;
  }

  /* Force section-inner to not clip the carousel */
  #testimonials .section-inner {
    overflow: visible !important;
  }

  #testimonials .ts-mobile-carousel {
    display: block;
    /* Break out of section-inner max-width to be full viewport width */
    width: 100vw;
    margin-left: calc(-1 * (100vw - 100%) / 2);
    margin-top: 2rem;
    position: relative;
    /* overflow visible so peeking slides show */
    overflow: visible;
  }

  #testimonials .ts-mc-track {
    display: flex;
    align-items: stretch;
    /* gap between cards */
    gap: 12px;
    /* padding = 10vw so 10vw peeks on left + right at all times */
    padding: 0.5rem 10vw 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    /* allow cards outside the track to be visible */
    overflow-y: visible;
  }

  #testimonials .ts-mc-track::-webkit-scrollbar {
    display: none;
  }

  #testimonials .ts-mc-track:active {
    cursor: grabbing;
  }

  #testimonials .ts-mc-slide {
    /* 80vw card + 12px gaps + 10vw padding each side ≈ perfect peek */
    flex: 0 0 80vw;
    width: 80vw;
    min-height: 300px;
    padding: 1.25rem;
    border-radius: 20px;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    /* side cards shrunk */
    transform: scale(0.88);
    opacity: 0.65;
    transition: transform 0.35s cubic-bezier(.22, 1, .36, 1),
      opacity 0.35s cubic-bezier(.22, 1, .36, 1);
    will-change: transform, opacity;
  }

  /* center/active card is full size */
  #testimonials .ts-mc-slide.is-active {
    transform: scale(1);
    opacity: 1;
  }

  /* card inner elements */
  #testimonials .ts-mc-slide .ts-mcard-av {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: .75rem;
    border: 2px solid rgba(255, 255, 255, .35);
  }

  #testimonials .ts-mc-slide .ts-mcard-q {
    color: rgba(255, 255, 255, .9);
    font-family: Georgia, serif;
    font-size: 34px;
    line-height: 1;
    height: 30px;
  }

  #testimonials .ts-mc-slide .ts-mcard-txt {
    color: #fff;
    font-size: 15px;
    line-height: 1.5;
    margin: .5rem 0 1rem;
    flex: 1;
  }

  #testimonials .ts-mc-slide .ts-mcard-foot {
    border-top: 1px solid rgba(255, 255, 255, .18);
    padding-top: .75rem;
  }

  #testimonials .ts-mc-slide .ts-mcard-author {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
  }

  #testimonials .ts-mc-slide .ts-mcard-role {
    color: rgba(255, 255, 255, .7);
    font-size: 12.5px;
    margin-top: 2px;
  }

  /* color variants on slides */
  #testimonials .ts-mc-slide.t-grad-a {
    background: linear-gradient(135deg, #6243d5, #8968ec);
  }

  #testimonials .ts-mc-slide.t-grad-b {
    background: linear-gradient(135deg, #8b69ed, #6243d5);
  }

  #testimonials .ts-mc-slide.t-green {
    background: #c4ee87;
  }

  #testimonials .ts-mc-slide.t-blue {
    background: #54b0f8;
  }

  #testimonials .ts-mc-slide.t-white {
    background: #fff;
  }

  #testimonials .ts-mc-slide.t-green .ts-mcard-q,
  #testimonials .ts-mc-slide.t-green .ts-mcard-txt,
  #testimonials .ts-mc-slide.t-green .ts-mcard-author {
    color: #0b081b;
  }

  #testimonials .ts-mc-slide.t-green .ts-mcard-role {
    color: rgba(11, 8, 27, .65);
  }

  #testimonials .ts-mc-slide.t-green .ts-mcard-foot {
    border-top-color: rgba(11, 8, 27, .15);
  }

  #testimonials .ts-mc-slide.t-white .ts-mcard-q,
  #testimonials .ts-mc-slide.t-white .ts-mcard-txt,
  #testimonials .ts-mc-slide.t-white .ts-mcard-author {
    color: #100d20;
  }

  #testimonials .ts-mc-slide.t-white .ts-mcard-role {
    color: rgba(16, 13, 32, .6);
  }

  #testimonials .ts-mc-slide.t-white .ts-mcard-foot {
    border-top-color: rgba(16, 13, 32, .12);
  }
}