/* ===== Testimonials (new-only styles) ===== */

/* cards per page; desktop=3, tablet=2, mobile=1 */
:root { --cards-per-view: 3; }

/* optional section bg (uses your brand bg) */
.testimonial-bg { background: var(--brand-bg); }

/* viewport/track/card sizing */
.testimonial-viewport,
.testimonial-track,
.testimonial-card { box-sizing: border-box; }

.testimonial-viewport{
  /* keep horizontal clipping for the carousel, but don't clip vertical shadows */
  overflow-x: hidden;
  overflow-y: visible;
  background: var(--brand-bg);        /* also makes gaps between cards white */
  border-radius: var(--radius);
  /* optional: tiny vertical padding so shadows don't touch the edge */
  padding-block: 8px;
}


.testimonial-track {
  --gap: 1.25rem;
  display: flex;
  gap: var(--gap);
  will-change: transform;
  transition: transform 420ms cubic-bezier(.22,.61,.36,1);
  padding: 0;
}

.testimonial-card {
  flex: 0 0 calc(
    (100% - (var(--cards-per-view) - 1) * var(--gap))
    / var(--cards-per-view)
  );
  background: #fff;
  border: 1px solid rgba(2,6,23,0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 220px;
  padding: 1.4rem 1.2rem;
  gap: .75rem;
  justify-content: flex-start;
  text-align: center;
}

/* quote glyph */
.testimonial-quote {
  font-size: 2.8rem;
  color: var(--accent);
  font-family: var(--font-title);
  font-weight: 800;
  position: absolute;
  left: 18px;
  top: 10px;
  opacity: 0.18;
  user-select: none;
}

/* copy + user row */
.testimonial-card p {
  color: #393939;
  font-size: 1.05rem;
  font-style: italic;
  margin: 1.2rem 0 0.6rem;
}

.testimonial-user { display: flex; align-items: center; justify-content: center; gap: 0.9rem; }
.testimonial-user img {
  width: 56px; height: 56px;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(31,41,55,0.07);
  object-fit: cover;
}
.testimonial-user strong { color: var(--brand-dark); }
.testimonial-role { font-size: 0.95rem; color: #4a5ea8; }

/* controls */
.testimonial-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.testimonial-arrow {
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(93deg, var(--blue) 65%, var(--accent) 100%);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37,99,235,0.22);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.testimonial-arrow:hover,
.testimonial-arrow:focus { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(37,99,235,0.28); outline: none; }
.testimonial-arrow:disabled { opacity: .6; cursor: not-allowed; filter: grayscale(.2); }

/* dots */
.testimonial-dots { display: flex; justify-content: center; gap: 0.5rem; }
.testimonial-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; cursor: pointer;
  background: #c7d2fe;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.testimonial-dots button.active {
  background: var(--blue);
  transform: scale(1.2);
  box-shadow: 0 0 0 3px rgba(147,197,253,0.25);
}
.testimonial-dots button:focus { outline: none; box-shadow: 0 0 0 3px rgba(147,197,253,0.35); }

/* responsive cards-per-view */
@media (max-width: 900px) { :root { --cards-per-view: 2; } }
@media (max-width: 600px) {
  :root { --cards-per-view: 1; }
  .testimonial-card { border-radius: calc(var(--radius) - 0.4rem); padding: 1.6rem 1rem; }
  .testimonial-quote { font-size: 2.2rem; left: 12px; top: 8px; }
}

/* motion preference */
@media (prefers-reduced-motion: reduce) { .testimonial-track { transition: none; } }
