/* === TESTIMONIALS CAROUSEL (Minimal + Professional) === */

/* Make testimonials peek up into the hero so they’re visible above the fold */
.testimonials {
  --peek: clamp(56px, 12vh, 140px);
  --cards-per-view: 3;   /* default desktop, overridden in media queries */
  --gap: 1rem;

  background: var(--bg-section);
  position: relative;
  overflow: hidden;

  margin-top: calc(var(--peek) * -1);
  padding-top: calc(var(--peek) + 2.25rem);
  padding-bottom: 4.25rem;
}

.testimonials::before {
  /* soft fade where it overlaps the hero, purely grayscale */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--peek);
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.06),
    rgba(0,0,0,0.00) 70%);
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black, transparent);
}

/* Heading */
.t-title {
  text-align: center;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-dark);
  margin-bottom: .25rem;
}

.t-kicker {
  text-align: center;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

/* Carousel shell */
.t-carousel {
  position: relative;
}

/* Viewport with native scroll-snap */
.t-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: var(--gap);
  -webkit-overflow-scrolling: touch;
  outline: none;
}
.t-viewport::-webkit-scrollbar { height: 0; }
.t-viewport { scrollbar-width: none; }

/* Track & slides */
.t-track {
  display: flex;
  gap: var(--gap);
  padding: 0 var(--gap);
}
.t-slide {
  flex: 0 0 calc((100% - (var(--gap) * (var(--cards-per-view) - 1))) / var(--cards-per-view));
  scroll-snap-align: start;
  display: flex;
}

/* Card — minimal, professional */
.t-card {
  position: relative;
  background: var(--bg-light);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.05);
  padding: 1.25rem 1.25rem 1.15rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: .9rem;
  width: 100%;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

/* Micro brand accent — hairline at top (very subtle) */
.t-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  opacity: .22;
  pointer-events: none;
}

/* Slight lift on hover (desktop) */
@media (hover: hover) and (pointer: fine) {
  .t-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 44px rgba(0,0,0,0.10);
    border-color: rgba(0,0,0,0.10);
  }
}

/* Header: avatar + meta (compact, clean) */
.t-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .85rem 1rem;
  align-items: center;
}
.t-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow:
    0 0 0 3px rgba(0,0,0,0.02), /* subtle ring */
    0 6px 14px rgba(0,0,0,0.06);
}
.t-avatar img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}
.t-meta { display: flex; flex-direction: column; gap: .12rem; }
.t-name {
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0;
}
.t-role {
  font-size: .95rem;
  color: var(--text-muted);
}

/* Body: quote */
.t-quote {
  color: var(--text-dark);
  font-size: clamp(0.98rem, 0.9rem + 0.2vw, 1.06rem);
  line-height: 1.65;
}
.t-quote::before {
  content: "“";
  font-size: 2rem;
  line-height: 1;
  color: rgba(0,0,0,0.08);
  margin-right: .2rem;
  vertical-align: top;
}

/* Controls — minimalist pills */
.t-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  background: var(--bg-light);
  color: var(--text-dark);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.t-btn:hover {
  transform: translateY(-50%) translateY(-2px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.12);
}
.t-btn--prev { left: .25rem; }
.t-btn--next { right: .25rem; }

/* Dots — simple, brand-aware */
.t-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1rem;
}
.t-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(0,0,0,0.18);
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}
.t-dot.is-active {
  transform: scale(1.2);
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
}

/* Responsive layout: 1 / 2 / 3 per view */
@media (max-width: 760px) {
  .testimonials {
    --peek: clamp(48px, 9vh, 120px);
    padding-bottom: 3.5rem;
  }
  .t-carousel { --cards-per-view: 1; }
  .t-btn { display: none; } /* swipe on mobile */
}
@media (min-width: 761px) and (max-width: 1100px) {
  .t-carousel { --cards-per-view: 2; }
}
@media (min-width: 1101px) {
  .t-carousel { --cards-per-view: 3; }
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  .t-card, .t-btn, .t-dot {
    transition: none !important;
  }
}
