/* Learner video stories (Views/Components/_Testimonial.cshtml). Same design as the offer pages (scholarhat.com/offer/...):
   a snap-scrolling rail of tall poster cards, a thin progress bar that follows the scroll, round prev/next buttons.
   Self-contained under .tr (own tokens, light and dark via [data-bs-theme]). Cards per view: 5 / 4 / 3 / 2 and a peeking card on phones. */
.tr { --tr-ink: #0f1b2d; --tr-body: #46566b; --tr-line: rgba(20, 90, 140, .16); --tr-card: rgba(255, 255, 255, .86); --tr-a: #0891b2; --tr-b: #2563eb;
  --tr-btn: linear-gradient(135deg, #0891b2, #2563eb); --tr-per: 5; --tr-gap: 16px;
  position: relative; padding: clamp(36px, 5vw, 72px) 0; font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--tr-body); overflow-x: clip; }
[data-bs-theme="dark"] .tr { --tr-ink: #eef7ff; --tr-body: #b4c6d9; --tr-line: rgba(110, 190, 230, .18); --tr-card: rgba(7, 24, 44, .66); --tr-a: #2fb8d6; --tr-b: #3b82f6; }
.tr *, .tr *::before, .tr *::after { box-sizing: border-box; }
.tr-shell { width: min(1320px, 100% - 32px); margin-inline: auto; }
.tr-head { max-width: 760px; margin: 0 auto clamp(22px, 3vw, 36px); text-align: center; }
.tr-head h2 { margin: 0 0 10px; color: var(--tr-ink); font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.12; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.tr-head h2 em { font-style: normal; background: linear-gradient(100deg, var(--tr-a), var(--tr-b)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.tr-head p { margin: 0; font-size: 1rem; line-height: 1.6; }
.tr-wrap { display: grid; gap: 18px; }
.tr-row { display: flex; gap: var(--tr-gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 4px 2px 8px; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.tr-row::-webkit-scrollbar { display: none; }
.tr-row:focus-visible { outline: 2px solid var(--tr-a); outline-offset: 4px; border-radius: 12px; }
.tr-card { position: relative; flex: 0 0 calc((100% - (var(--tr-per) - 1) * var(--tr-gap)) / var(--tr-per)); aspect-ratio: 9 / 14.5; scroll-snap-align: start; padding: 0; border: 1px solid var(--tr-line); border-radius: 20px; overflow: hidden; background: #0b1b2b; color: #fff; text-align: left; cursor: pointer; font: inherit;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), border-color .3s, box-shadow .3s; }
.tr-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--tr-a) 55%, var(--tr-line)); box-shadow: 0 26px 40px -26px rgba(8, 145, 178, .65); }
.tr-card:active { transform: scale(.985); }
.tr-card:focus-visible { outline: 3px solid var(--tr-a); outline-offset: 2px; }
.tr-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .25s; }
.tr-card:hover img { transform: scale(1.05); opacity: 1; }
.tr-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; font-weight: 800; background: linear-gradient(160deg, #0e7490, #1d4ed8); }
.tr-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(4, 12, 24, .88), rgba(4, 12, 24, 0) 58%); }
.tr-play { position: absolute; z-index: 1; left: 50%; top: 42%; width: 56px; height: 56px; margin: -28px 0 0 -28px; display: grid; place-items: center; border-radius: 50%; background: var(--tr-btn); color: #fff; box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .7); transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.tr-play svg { width: 24px; height: 24px; margin-left: 2px; }
.tr-card:hover .tr-play { transform: scale(1.1); }
.tr-cap { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 14px; display: grid; gap: 3px; }
.tr-cap b { font-size: .95rem; font-weight: 700; line-height: 1.25; }
.tr-cap small { font-size: .76rem; opacity: .82; }
.tr-bar { display: flex; align-items: center; gap: 18px; }
.tr-prog { position: relative; flex: 1 1 0; height: 4px; border-radius: 4px; background: var(--tr-line); cursor: pointer; }
.tr-prog::before { content: ""; position: absolute; inset: -10px 0; }                       /* taller hit area, same thin line */
.tr-prog i { position: absolute; top: 0; left: 0; height: 100%; width: 20%; border-radius: 4px; background: var(--tr-btn); transition: transform .15s linear, width .2s; will-change: transform; }
.tr-nav { display: flex; gap: 8px; }
.tr-nav button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--tr-line); border-radius: 50%; background: var(--tr-card); color: var(--tr-ink); cursor: pointer; transition: background-color .2s, border-color .2s, transform .2s; }
.tr-nav button:hover:not(:disabled) { border-color: var(--tr-a); background: color-mix(in srgb, var(--tr-a) 10%, var(--tr-card)); }
.tr-nav button:active:not(:disabled) { transform: scale(.94); }
.tr-nav button:disabled { opacity: .35; cursor: default; }
.tr-nav svg { width: 18px; height: 18px; }
.tr-wrap.is-fit .tr-bar { display: none; }
.tr-cta { display: flex; justify-content: center; margin-top: 8px; }
.tr-cta a { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 24px; border-radius: 999px; background: var(--tr-btn); color: #fff; font-size: .9375rem; font-weight: 700; text-decoration: none; box-shadow: 0 16px 28px -16px rgba(8, 145, 178, .8); transition: transform .25s cubic-bezier(.32, .72, 0, 1); }
.tr-cta a:hover { color: #fff; transform: translateY(-2px); }
.tr-cta a:active { transform: scale(.98); }
.tr-cta svg { width: 16px; height: 16px; }
/* player */
.tr-dlg { position: fixed; inset: 0; width: min(360px, 92vw, 46vh); height: fit-content; max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: 18px; background: #000; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); }
.tr-dlg.is-l { width: min(900px, 94vw); }
.tr-dlg::backdrop { background: rgba(4, 12, 24, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.tr-dlg[open] { animation: tr-pop .28s cubic-bezier(.22, 1, .36, 1); }
@keyframes tr-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.tr-dlg__f { width: 100%; aspect-ratio: 9 / 16; }
.tr-dlg.is-l .tr-dlg__f { aspect-ratio: 16 / 9; }
.tr-dlg__f iframe { display: block; width: 100%; height: 100%; border: 0; }
.tr-dlg__x { position: absolute; z-index: 2; top: 10px; right: 10px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #0f1b2d; cursor: pointer; }
.tr-dlg__x svg { width: 16px; height: 16px; }
.tr-dlg__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: #0b1b2b; color: #fff; font-size: .85rem; }
.tr-dlg__bar span { flex: 1; text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-dlg__bar button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.tr-dlg__bar button svg { width: 16px; height: 16px; }
@media (max-width: 1199.98px) { .tr { --tr-per: 4; } }
@media (max-width: 991.98px) { .tr { --tr-per: 3; --tr-gap: 14px; } }
@media (max-width: 767.98px) { .tr { --tr-per: 2.3; --tr-gap: 12px; } .tr-row { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; } .tr-card { border-radius: 16px; } .tr-play { width: 48px; height: 48px; margin: -24px 0 0 -24px; } .tr-cap { left: 11px; right: 11px; bottom: 11px; } .tr-cap b { font-size: .86rem; } }
@media (max-width: 479.98px) { .tr { --tr-per: 1.6; } .tr-nav button { width: 38px; height: 38px; } }
@media (prefers-reduced-motion: reduce) { .tr-row { scroll-behavior: auto; } .tr-card, .tr-card img, .tr-play, .tr-prog i, .tr-dlg[open] { transition: none !important; animation: none !important; } }
