/**
 * CUTIS Theme — Service "What our patients say" testimonials carousel
 * Classes kept identical to _design-reference/style.css for the card itself
 * (testimonial-card, testimonial-stars, quote, testimonial-person,
 * testimonial-avatar, avatar-placeholder) since none of them collide with
 * anything in header.css/layout.css. The carousel shell (testimonials-
 * carousel/-row/-track/-arrow) and testimonial-slide are new — the
 * reference renders this section as a static 3-across grid, but the design
 * brief explicitly asks for a scroll-snap carousel here regardless of item
 * count, and for a real 80x80px client photo instead of the reference's
 * 48px initials-only avatar (initials remain only as the no-photo fallback).
 * Navigation is prev/next arrows only — dot indicators were tried and then
 * removed per a later revision of the brief.
 *
 * .container-cutis, .eyebrow, .section-head.center are already defined in
 * single-service-types.css, enqueued alongside this file on every service
 * singular page (both conditioned on is_singular('service') in
 * functions.php) — not redeclared here.
 *
 * Cream section wash scoped to .service-testimonials the same way
 * single-service-comparison.css / single-service-results.css scope theirs,
 * reusing the same --cutis-color-cream token.
 *
 * Colors/fonts/spacing are pulled from the CSS custom properties defined in
 * assets/css/header.css :root and from the Theme Settings design tokens
 * (inc/theme-settings.php -> cutis_output_theme_css_vars()). Values with no
 * matching token (card radius/shadow, avatar-placeholder gradient) are
 * hardcoded or derived via color-mix()/gradient, same technique used
 * throughout single-service-introduction.css / single-service-results.css.
 * The reference's italic --font-display quote styling falls back to the
 * theme's body font (no separate display-font token exists here).
 */

/* ------------------------------------------------------------------ */
/* Section shell — cream wash */
/* ------------------------------------------------------------------ */
.service-testimonials {
  background: var(--cutis-color-cream);
}

/* ------------------------------------------------------------------ */
/* Carousel shell */
/* ------------------------------------------------------------------ */
.testimonials-carousel {
  margin-top: 48px;
}

.testimonials-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testimonials-track {
  /* Makes .testimonial-slide's offsetLeft relative to the track itself
     rather than whatever positioned ancestor it would otherwise fall back
     to — single-service-testimonials.js relies on that to compute each
     slide's absolute scroll target independent of the track's own
     scroll-behavior:smooth animation state (see that file for why). */
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 4px 12px;
  margin: -4px -4px -12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.testimonials-track::-webkit-scrollbar {
  display: none;
}

.testimonial-slide {
  flex: 0 0 auto;
  width: 100%;
  scroll-snap-align: start;
}
@media (min-width: 576px) {
  .testimonial-slide {
    width: calc(50% - 12px);
  }
}
@media (min-width: 992px) {
  .testimonial-slide {
    width: calc(33.3333% - 16px);
  }
}

/* ------------------------------------------------------------------ */
/* Prev/next arrow buttons */
/* ------------------------------------------------------------------ */
.testimonials-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cutis-color-surface);
  border: 1px solid var(--cutis-color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}
.testimonials-arrow:hover {
  background: var(--cutis-color-primary);
  border-color: var(--cutis-color-primary);
}
.testimonials-arrow:hover svg {
  stroke: var(--cutis-color-surface);
}
.testimonials-arrow:active {
  transform: scale(0.94);
}
.testimonials-arrow svg {
  width: 18px;
  height: 18px;
  stroke: var(--cutis-color-heading);
  transition: stroke 0.2s ease;
}
.testimonials-arrow:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Testimonial card */
/* ------------------------------------------------------------------ */
.testimonial-card {
  background: var(--cutis-color-surface);
  border-radius: 28px;
  border: 1px solid var(--cutis-color-border);
  padding: 36px;
  height: 100%;
  box-shadow:
    0 4px 24px rgba(15, 43, 61, 0.06),
    0 1px 3px rgba(15, 43, 61, 0.05);
}
.testimonial-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 18px;
}
.testimonial-stars svg.star {
  width: 16px;
  height: 16px;
}
.testimonial-stars svg.star--filled {
  fill: var(--cutis-color-cream);
  stroke: var(--cutis-color-primary);
}
.testimonial-stars svg.star--empty {
  fill: none;
  stroke: var(--cutis-color-border);
}
.testimonial-card p.quote {
  font-size: 18px;
  color: var(--cutis-color-heading);
  line-height: 1.5;
  font-style: italic;
  margin: 0;
}
.testimonial-person {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

/* ------------------------------------------------------------------ */
/* Avatar — fixed 80x80px circle (deviation from the reference's 48px),
   with an initials-based fallback for testimonials with no uploaded photo. */
/* ------------------------------------------------------------------ */
.testimonial-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--cutis-color-primary) 0%, color-mix(in srgb, var(--cutis-color-primary) 70%, black) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cutis-color-surface);
  font-weight: 600;
  font-size: 20px;
}
.testimonial-person h5 {
  font-size: 14.5px;
  color: var(--cutis-color-heading);
  margin: 0;
  font-weight: 700;
}
.testimonial-person span {
  font-size: 12.5px;
  color: color-mix(in srgb, var(--cutis-color-text) 65%, white);
}
