/* Layout for the [primo_testimonials] slider and [primo_faculty] grid (inc/shortcodes.php).
   Cards themselves use the unchanged .testimonial / .faculty-card rules in primo.css;
   everything here is scoped to new class names. */

/* ---------- Testimonial slider ---------- */
.primo-tslider { --tslider-gap: 30px; --tslider-per-view: 3; }
.primo-tslider__viewport {
  margin-top: 32px;
  /* room for the cards' hover lift/shadow inside the clipped area */
  padding: 6px 0 28px;
  /* without JS: a swipe/scroll row */
  overflow-x: auto; scroll-snap-type: x mandatory;
}
.primo-tslider__viewport:focus-visible { outline-offset: 6px; }
.primo-tslider__track {
  display: flex; gap: var(--tslider-gap);
  margin: 0; padding: 0; list-style: none;
}
.primo-tslider__track > .testimonial {
  flex: 0 0 calc((100% - (var(--tslider-per-view) - 1) * var(--tslider-gap)) / var(--tslider-per-view));
  min-width: 0;
  scroll-snap-align: start;
}
.primo-tslider .alumni__arrow { cursor: pointer; transition: opacity 0.2s ease; }
.primo-tslider .alumni__arrow:disabled { opacity: 0.4; cursor: default; }

/* with JS: arrows move the row */
.primo-tslider.is-ready .primo-tslider__viewport { overflow: hidden; }
.primo-tslider.is-ready .primo-tslider__track { transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.primo-tslider:not(.is-ready) .primo-tslider__controls,
.primo-tslider.is-static .primo-tslider__controls { display: none; }

@media (max-width: 1100px) { .primo-tslider { --tslider-per-view: 2; } }
@media (max-width: 700px)  { .primo-tslider { --tslider-gap: 16px; --tslider-per-view: 1; } }
@media (prefers-reduced-motion: reduce) {
  .primo-tslider.is-ready .primo-tslider__track { transition: none; }
}

/* ---------- Faculty: a last row with a single person, centred ---------- */
.faculty__grid--one { grid-template-columns: minmax(0, 395px); justify-content: center; margin-top: 90px; }
@media (max-width: 900px) {
  /* matches the existing mobile rule for .faculty__grid / .faculty__grid--two */
  .faculty__grid--one { grid-template-columns: 1fr; margin-top: 32px; }
}

/* ---------- Form consent checkbox ([primo_datp_form], [primo_contact_form] in inc/forms.php) ----------
   Reuses the .radios row; these lines only keep long consent text aligned. */
.field--consent .radios { margin-top: 0; }
.field--consent .radios label { align-items: flex-start; gap: 12px; font-size: var(--font-small); color: var(--text-secondary); }
.field--consent .radios input { flex: 0 0 18px; margin-top: 2px; }
.field--consent a { color: var(--brand-primary); text-decoration: underline; }
.field.field--consent.is-invalid label { color: var(--state-error); }
.primo-form-error { text-align: center; }

/* Form shortcodes placed inside an existing .form-slot without wrap="no" produce a
   second .form-slot. Make it fill the outer one, so the form, loading and success
   cards keep the same width at every screen size. */
.form-slot > .form-slot { flex: 1 1 100%; width: 100%; min-width: 0; }
