/* =========================================================
   testimonials.css — client reviews shown on index.html
   (#testimonials). Extends css/style.css.
   ========================================================= */

#testimonials[hidden]{display:none}

/* ---------- Header ---------- */
.tst-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:20px}
.tst-head-left{max-width:60ch;flex:1 1 340px}
.tst-head-right{display:flex;flex-wrap:wrap;align-items:center;gap:14px;flex:none}

.tst-aggregate{
  display:flex;align-items:center;gap:14px;
  background:linear-gradient(155deg,rgba(255,255,255,.075),rgba(255,255,255,.025));
  border:1px solid rgba(255,255,255,.14);
  border-radius:16px;padding:16px 20px;
  box-shadow:0 12px 30px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.07);
}
.tst-agg-score{
  font-family:'Poppins',sans-serif;font-weight:800;
  font-size:34px;line-height:1;color:#fff;
}
.tst-agg-stars{display:flex;gap:3px;font-size:15px;color:#FBBC04;line-height:1}
.tst-agg-count{font-size:12.5px;color:#9aa0a8;font-weight:600;margin-top:6px}

/* ---------- Ticker (js/testimonials.js scrolls it) ---------- */
.tst-ticker{
  margin-top:34px;
  overflow-x:auto;overflow-y:hidden;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;
  /* fade the cards out at both edges */
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);
          mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);
}
.tst-ticker::-webkit-scrollbar{display:none}
.tst-track{display:flex;gap:18px;width:max-content;padding:8px 0 14px}
.tst-ticker.tst-fits{-webkit-mask-image:none;mask-image:none}
.tst-ticker.tst-fits .tst-track{width:auto;justify-content:center;flex-wrap:wrap}
.tst-track .tst-card{width:320px;flex:none;cursor:pointer}

/* ---------- Cards ---------- */
/* figure/blockquote carry a default 40px side margin in every browser —
   the site reset only clears p/h1/h2, so clear it here. */
.tst-card,.tst-quote,.tst-foot{margin:0}

.tst-card{
  display:flex;flex-direction:column;
  background:linear-gradient(155deg,rgba(255,255,255,.075),rgba(255,255,255,.025));
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;padding:26px;
  box-shadow:0 12px 30px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.07);
  transition:transform .28s cubic-bezier(.2,.7,.3,1),box-shadow .28s ease,border-color .28s ease;
}
.tst-card:hover{
  transform:translateY(-5px);
  border-color:rgba(224,58,48,.45);
  box-shadow:0 22px 46px rgba(0,0,0,.42),0 8px 22px rgba(224,58,48,.16),inset 0 1px 0 rgba(255,255,255,.1);
}

.tst-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.tst-stars{display:flex;gap:2px;font-size:16px;line-height:1;color:#FBBC04}
.tst-stars .off{color:#4a535d}

.tst-quote{
  font-size:15px;line-height:1.62;color:#d6dae0;
  margin:16px 0 0;flex:1;
}

.tst-foot{
  display:flex;align-items:center;gap:12px;
  margin:20px 0 0;padding-top:16px;
  border-top:1px solid rgba(255,255,255,.1);
}
.tst-avatar{
  width:40px;height:40px;border-radius:50%;flex:none;
  display:flex;align-items:center;justify-content:center;
  font-family:'Poppins',sans-serif;font-weight:700;font-size:16px;color:#fff;
  background:linear-gradient(158deg,#ff5a4f,#c22c23);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3);
}
.tst-name{display:block;font-family:'Poppins',sans-serif;font-weight:700;font-size:14.5px;color:#fff;line-height:1.2}
.tst-meta{display:block;font-size:12px;color:#8b929b;margin-top:3px}

/* Ticker cards show the first few lines; the dialog shows the rest. */
.tst-track .tst-quote{
  display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;
  overflow:hidden;flex:none;
}
.tst-open{
  margin-top:10px;
  font-family:'Inter',sans-serif;font-weight:700;font-size:13px;color:#ff9d96;
}
.tst-card:hover .tst-open,.tst-card:focus-visible .tst-open{color:#fff}
.tst-track .tst-foot{margin-top:auto}
.tst-track .tst-open{margin-bottom:16px}
.tst-card:focus-visible{outline:2px solid #ff9d96;outline-offset:3px}

/* ---------- Full-review dialog ---------- */
.tst-dialog{
  width:min(560px,calc(100vw - 32px));max-height:calc(100vh - 48px);
  padding:0;border:1px solid rgba(255,255,255,.16);border-radius:18px;
  background:#1d2228;color:#d6dae0;
  box-shadow:0 30px 80px rgba(0,0,0,.6);
}
.tst-dialog::backdrop{background:rgba(8,10,13,.72);backdrop-filter:blur(3px)}
.tst-dialog-body{padding:30px 28px 26px;overflow-y:auto}
.tst-dialog .tst-quote{font-size:16px;line-height:1.7;margin-top:16px}
.tst-dialog-foot{margin:0}
.tst-dialog-close{
  position:absolute;top:10px;right:12px;
  width:38px;height:38px;border-radius:50%;
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.16);
  color:#fff;font-size:22px;line-height:1;cursor:pointer;
}
.tst-dialog-close:hover{background:rgba(255,255,255,.14)}

/* ---------- Footer CTA ---------- */
.tst-cta{
  display:flex;flex-wrap:wrap;align-items:center;gap:14px;
  margin-top:30px;
}
.tst-cta-link{
  display:inline-flex;align-items:center;gap:9px;
  font-family:'Poppins',sans-serif;font-weight:700;font-size:15px;color:#fff;
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.22);
  padding:13px 22px;border-radius:11px;text-decoration:none;
  transition:transform .2s ease,background .2s ease,border-color .2s ease;
}
.tst-cta-link:hover{transform:translateY(-2px);background:rgba(255,255,255,.13);border-color:rgba(255,255,255,.4)}
.tst-cta-note{font-size:12.5px;color:#7d8794;line-height:1.55}

/* ---------- Preview-only banner ---------- */
.tst-preview-flag{
  margin-top:22px;
  background:linear-gradient(160deg,#3a2f10,#2a230c);
  border:1px solid rgba(240,180,40,.45);border-radius:12px;
  color:#f3d58a;font-size:13px;line-height:1.6;padding:13px 16px;
}
.tst-preview-flag strong{color:#ffd97a}

/* ---------- Responsive ---------- */
@media(max-width:640px){
  .tst-track .tst-card{width:270px;padding:22px}
  .tst-dialog-body{padding:26px 20px 22px}
  .tst-head{flex-direction:column;align-items:flex-start}
  .tst-head-right{width:100%}
  .tst-aggregate{width:100%}
  .tst-head-right .tst-cta-link{width:100%;justify-content:center}
}
@media(prefers-reduced-motion:reduce){
  .tst-card{transition:none}
  .tst-card:hover{transform:none}
}
.tst-cta-note a{color:#c2c8d0}
