/* ============================================================
   Avenux Techspire — Testimonials pages
   Shared by templates/page-testimonials-partner.php and
   templates/page-testimonials-student.php. Enqueued for those two
   templates only (see inc/enqueue.php → avx-testimonials).

   Uses the global design tokens (tokens.css) and primitives
   (.container, .section, .eyebrow, .btn). Everything page-specific is
   namespaced under .tst- so it can't leak into other templates.
   ============================================================ */

/* ---- shared section head (mirrors the home/about templates) ---- */
.tst-head { text-align: center; max-width: 680px; margin: 0 auto var(--space-12); }
.tst-head p { color: var(--fg-3); }

/* ============================================================
   Page hero / banner
   ============================================================ */
.tst-hero { position: relative; overflow: hidden; padding: var(--space-6) 0 var(--space-12); }
.tst-hero::before { content: ''; position: absolute; inset: 0; background: var(--wash-sky); pointer-events: none; z-index: 0; }
.tst-hero--student::before { background: var(--wash-amber); }
.tst-hero > .container { position: relative; z-index: 1; }
.tst-hero__inner { text-align: center; max-width: 760px; margin: 0 auto; }
.tst-hero__inner .eyebrow { display: block; margin-bottom: var(--space-3); }
.tst-hero h1 { font-size: clamp(34px, 4.6vw, 54px); margin-bottom: var(--space-4); }
.tst-hero p { color: var(--fg-3); font-size: var(--text-lg); max-width: 60ch; margin: 0 auto var(--space-8); }

/* ---- segmented page switcher (Partner | Student) ----
   Both tabs share one identical resting/hover style; the ONLY visual
   difference is the active tab, which uses the brand sky pill on either
   side so selection is obvious while the two tabs stay uniform. */
.tst-switch { display: inline-flex; gap: 4px; padding: 5px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-pill); box-shadow: var(--shadow-xs); }
.tst-switch__tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: var(--radius-pill); font-family: var(--font-display); font-weight: 600; font-size: var(--text-sm); color: var(--fg-3); border-bottom: 0; white-space: nowrap; transition: background var(--dur-2), color var(--dur-2), box-shadow var(--dur-2); }
.tst-switch__tab svg { width: 18px; height: 18px; }
.tst-switch__tab:hover { color: var(--ink); }
.tst-switch__tab.is-active { background: var(--sky); color: var(--on-brand); box-shadow: var(--shadow-sm); }
.tst-switch__tab.is-active:hover { color: var(--on-brand); }

/* ============================================================
   Testimonial listing
   ============================================================ */
.tst-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
@media (max-width: 960px) { .tst-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tst-grid { grid-template-columns: 1fr; } }

/* One unified card scheme for BOTH Partner and Student cards — same
   background, border, shadow, hover, avatar and rating colours. No
   per-type colour overrides. */
.tst-card { display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-8); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-xl); transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3), border-color var(--dur-2); }
.tst-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sky-100); }

/* star rating */
.tst-card__rating { display: inline-flex; gap: 3px; color: var(--amber); }
.tst-card__rating svg { width: 18px; height: 18px; }
.tst-card__rating .is-empty { color: var(--amber-100); }

/* quote body */
.tst-card__quote { font-size: var(--text-md); line-height: 1.6; color: var(--fg-2); margin: 0; }

/* author row */
.tst-card__who { display: flex; align-items: center; gap: var(--space-3); margin-top: auto; }
.tst-avatar { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--sky-50); color: var(--sky-700); font-family: var(--font-display); font-weight: 700; font-size: var(--text-md); letter-spacing: .01em; }
.tst-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tst-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tst-name { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: var(--text-base); line-height: 1.2; }
.tst-role { font-size: var(--text-sm); color: var(--fg-3); }

/* ============================================================
   Closing CTA
   ============================================================ */
.tst-cta { text-align: center; max-width: 640px; margin: 0 auto; }
.tst-cta h2 { font-size: clamp(28px, 3.4vw, 42px); }
.tst-cta p { color: var(--fg-3); }
.tst-cta__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; justify-content: center; margin-top: var(--space-6); }

@media (max-width: 600px) {
  .tst-hero { padding-bottom: var(--space-10); }
  .tst-card { padding: var(--space-6); }
}
@media (prefers-reduced-motion: reduce) {
  .tst-card { transition: none; }
  .tst-card:hover { transform: none; }
}
