/* ============================================================
   TESTIMONIALS CAROUSEL — reusable premium component. Two rows
   of quote cards drift past in opposite directions, forever.
   Structural CSS below travels unmodified between templates;
   only the variables in the --tcard-* block should be re-skinned
   per site (colours, fonts, speed, sizing).
   ============================================================ */

.tcarousel {
  --tcard-bg: transparent;
  --tcard-card-bg: var(--navy-3);
  --tcard-card-border: var(--border-med);
  --tcard-text: var(--text);
  --tcard-muted: var(--muted);
  --tcard-accent: var(--teal, #22d3ee);
  --tcard-star-color: var(--border-med);
  --tcard-font-display: var(--font-display);
  --tcard-font-body: var(--font-body);
  --tcard-card-w: 340px;
  --tcard-photo-size: 52px;
  --tcard-gap: 22px;
  --tcard-row-gap: 22px;
  --tcard-speed-a: 46s;
  --tcard-speed-b: 54s;

  position: relative;
  padding: 3.5rem 0;
  background: var(--tcard-bg);
  color: var(--tcard-text);
  font-family: var(--tcard-font-body);
  overflow: hidden;
}

.tcarousel__heading {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.tcarousel__heading h2 {
  font-family: var(--tcard-font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin: 0 0 0.6rem;
  line-height: 1.15;
}

.tcarousel__heading p {
  color: var(--tcard-muted);
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.tcarousel__rows {
  display: flex;
  flex-direction: column;
  gap: var(--tcard-row-gap);
}

.tcarousel__row {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.tcarousel__track {
  display: flex;
  width: max-content;
  gap: var(--tcard-gap);
  padding: 6px 0;
  /* row 1 default: cards drift left-to-right */
  animation: tcarousel-scroll-r var(--tcard-speed-a) linear infinite;
}

.tcarousel__row--b .tcarousel__track {
  /* row 2: cards drift right-to-left, the opposite way */
  animation-name: tcarousel-scroll-l;
  animation-duration: var(--tcard-speed-b);
}

.tcarousel__row:hover .tcarousel__track {
  animation-play-state: paused;
}

.tcarousel[data-offscreen="true"] .tcarousel__track {
  animation-play-state: paused;
}

@keyframes tcarousel-scroll-l {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes tcarousel-scroll-r {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.tcard {
  flex: none;
  width: var(--tcard-card-w);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 22px 22px 20px;
  background: var(--tcard-card-bg);
  border: 1px solid var(--tcard-card-border);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}

.tcard:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: rgba(63, 171, 152, 0.4);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(63, 171, 152, 0.15);
  z-index: 2;
}

.tcard__photo {
  flex: none;
  width: var(--tcard-photo-size);
  height: var(--tcard-photo-size);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.tcard__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tcard__body {
  min-width: 0;
  flex: 1;
}

.tcard__stars {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 10px;
}

.tcard-star {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
}

.tcard-star svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tcard-star__outline {
  fill: none;
  stroke: var(--tcard-star-color);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.tcard-star__fill {
  fill: var(--tcard-accent);
  clip-path: inset(0 calc(100% - var(--tcard-star-fill, 0%)) 0 0);
}

.tcard__quote {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--tcard-text);
}

.tcard__quote::before {
  content: '\201C';
  font-family: var(--tcard-font-display);
  color: var(--tcard-accent);
  margin-right: 2px;
}

.tcard__attribution {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tcard__name {
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--tcard-text);
}

.tcard__meta {
  font-size: 0.78rem;
  color: var(--tcard-muted);
}

@media (prefers-reduced-motion: reduce) {
  .tcarousel__track {
    animation: none !important;
  }
}

@media (max-width: 720px) {
  .tcarousel {
    --tcard-card-w: 268px;
    --tcard-photo-size: 44px;
    --tcard-gap: 16px;
    --tcard-row-gap: 16px;
  }
  .tcard { padding: 18px 18px 16px; }
  .tcard__quote { font-size: 0.86rem; }
}
