/* ═══════════════════════════════════════════════════════════════════════════
   Student Testimonials — homepage strip + /testimonials/ pages
   Premium, calm, aligned with Why Diako / design-system tokens.
   ═══════════════════════════════════════════════════════════════════════════ */

.st-section {
  --st-ink: #0f172a;
  --st-muted: #64748b;
  --st-line: rgba(15, 23, 42, 0.08);
  --st-soft: #ffffff;
  --st-blue: #1266e3;
  --st-blue-dark: #0b4db5;
  --st-card-w: 148px;
  background: linear-gradient(180deg, #f7f8fa 0%, #ffffff 42%, #f8fafc 100%);
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--st-line);
}

.why-diako + .st-section {
  padding-top: 56px;
}

.st-section__inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.st-section__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 36px;
}

.st-section h2.st-section__title,
.st-section__title {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem) !important;
  font-weight: 750;
  line-height: 1.45;
  color: var(--st-ink) !important;
  letter-spacing: -0.01em;
}

.st-section p.st-section__lead,
.st-section__lead {
  margin: 0;
  font-size: 0.98rem !important;
  line-height: 1.8;
  color: var(--st-muted) !important;
  font-family: inherit !important;
}

/* ── Desktop row ─────────────────────────────────────────────────────────── */

.st-track {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap;
  overflow: visible;
  padding: 4px 2px 8px;
}

.st-card {
  flex: 0 0 var(--st-card-w);
  width: var(--st-card-w);
  max-width: var(--st-card-w);
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: right;
  cursor: pointer;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.st-card__hit {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.st-card:focus-visible,
.st-card__hit:focus-visible {
  outline: 2px solid var(--st-blue);
  outline-offset: 4px;
  border-radius: 18px;
}

.st-card__title-link {
  color: inherit;
  text-decoration: none;
}

.st-card__title-link:hover {
  color: var(--st-blue);
}

.st-card__media {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 10px 28px -18px rgba(15, 23, 42, 0.35);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.st-card:hover .st-card__media,
.st-card:focus-visible .st-card__media,
.st-card__hit:hover .st-card__media,
.st-card__hit:focus-visible .st-card__media {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -16px rgba(15, 23, 42, 0.4);
}

.st-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.st-card__thumb-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1e293b, #0f172a 55%, #1266e3);
}

.st-card__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--st-blue);
  color: #fff;
  box-shadow: 0 8px 22px rgba(18, 102, 227, 0.45);
  pointer-events: none;
  transition: transform 0.25s ease, background 0.25s ease;
}

.st-card:hover .st-card__play,
.st-card:focus-visible .st-card__play,
.st-card__hit:hover .st-card__play,
.st-card__hit:focus-visible .st-card__play {
  transform: scale(1.08);
  background: var(--st-blue-dark);
}

.st-card__play svg {
  width: 20px;
  height: 20px;
  margin-inline-start: 2px;
  fill: currentColor;
}

.st-card__body {
  margin-top: 12px;
  padding: 0 2px;
}

.st-card h3.st-card__title,
.st-card__title {
  margin: 0 0 6px;
  font-size: 0.88rem !important;
  font-weight: 700;
  line-height: 1.55;
  color: var(--st-ink) !important;
}

.st-card p.st-card__desc,
.st-card__desc {
  margin: 0;
  font-size: 0.78rem !important;
  line-height: 1.7;
  color: var(--st-muted) !important;
  font-family: inherit !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st-card__meta {
  margin-top: 6px;
  font-size: 0.72rem;
  color: #94a3b8;
}

.st-section__empty {
  margin: 8px auto 0;
  max-width: 520px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--st-muted);
}

.st-section__cta {
  margin-top: 36px;
  text-align: center;
}

.st-section__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--st-blue);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(18, 102, 227, 0.65);
  transition: background 0.2s ease, transform 0.2s ease;
}

.st-section__cta-btn:hover {
  background: var(--st-blue-dark);
  transform: translateY(-1px);
  color: #fff !important;
}

/* ── Modal / Lightbox ────────────────────────────────────────────────────── */

.st-modal[hidden] {
  display: none !important;
}

.st-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.st-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(2px);
}

.st-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: #0b1220;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.st-modal__close {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.st-modal__video-wrap {
  aspect-ratio: 9 / 16;
  background: #000;
}

.st-modal__video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.st-modal__caption {
  padding: 14px 16px 16px;
  color: #e2e8f0;
}

.st-modal__caption-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
}

.st-modal__caption-desc {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #94a3b8;
}

/* ── Listing page ────────────────────────────────────────────────────────── */

.st-page {
  --st-blue: #1266e3;
  --st-blue-dark: #0b4db5;
  --st-ink: #0f172a;
  --st-muted: #64748b;
  padding: 48px 0 72px;
  background: #f8fafc;
}

.st-page__inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.st-page__header {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}

.st-page h1.st-page__title,
.st-page__title {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 3vw, 2rem) !important;
  color: var(--st-ink) !important;
  font-weight: 750;
  line-height: 1.4;
}

.st-page p.st-page__intro,
.st-page__intro {
  margin: 0;
  font-size: 1rem !important;
  line-height: 1.9;
  color: var(--st-muted) !important;
  font-family: inherit !important;
}

.st-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 18px;
}

.st-grid .st-card {
  width: 100%;
  max-width: none;
  flex: none;
}

.st-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.st-pagination a,
.st-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.st-pagination a:hover {
  border-color: #1266e3;
  color: #1266e3;
}

.st-pagination .is-current {
  background: #1266e3;
  border-color: #1266e3;
  color: #fff;
}

.st-pagination .is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.st-detail {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 28px;
  align-items: start;
}

.st-detail__player {
  border-radius: 18px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 16px 40px -20px rgba(15, 23, 42, 0.45);
}

.st-detail__player video {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  background: #000;
  object-fit: contain;
}

.st-detail__content h1 {
  margin: 0 0 12px;
}

.st-detail__content p {
  margin: 0 0 14px;
  line-height: 1.9;
  color: #475569;
}

.st-detail__back {
  display: inline-flex;
  margin-top: 18px;
  color: #1266e3;
  font-weight: 700;
  text-decoration: none;
}

/* ── Responsive: swipe carousel ──────────────────────────────────────────── */

@media (max-width: 1100px) {
  .st-section {
    --st-card-w: 136px;
  }
  .st-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .st-track {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    gap: 12px;
    scrollbar-width: none;
  }
  .st-track::-webkit-scrollbar {
    display: none;
  }
  .st-card {
    scroll-snap-align: start;
    --st-card-w: 150px;
    flex-basis: var(--st-card-w);
  }
  /* Peek next card */
  .st-track::after {
    content: "";
    flex: 0 0 28px;
  }
  .st-card__play {
    width: 56px;
    height: 56px;
  }
  .st-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .st-detail {
    grid-template-columns: 1fr;
  }
  .st-detail__player {
    max-width: 320px;
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  .st-section {
    padding: 44px 0 52px;
  }
  .st-card {
    --st-card-w: 158px;
  }
  .st-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }
  .st-card__title {
    font-size: 0.84rem !important;
  }
}
