/* =========================================================
   TESTIMONIALS PAGE
   Classes are prefixed with tst- to avoid clashing with Bootstrap
   (.modal, .btn, .lead).
   ========================================================= */

.tst-page {
    --tst-brand: #003b8e;
    --tst-brand-600: #0a4aa8;
    --tst-ink: #0f1f3d;
    --tst-muted: #667085;
    --tst-bg: #f7f9fd;
    --tst-line: #e4eaf5;
    --tst-radius: 18px;
    --tst-shadow-lg: 0 22px 60px rgba(0, 40, 120, .16);
    color: var(--tst-ink);
    -webkit-font-smoothing: antialiased;
}

.tst-page :focus-visible {
    outline: 3px solid #9db8ea;
    outline-offset: 2px;
    border-radius: 8px;
}

.tst-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--tst-brand);
}

.tst-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    padding: 15px 30px;
    border-radius: 12px;
    background: var(--tst-brand);
    color: #fff;
    text-decoration: none;
    transition: .15s;
}

.tst-btn:hover {
    background: var(--tst-brand-600);
    color: #fff;
    transform: translateY(-1px);
}

.tst-link-arrow {
    font-weight: 600;
    color: var(--tst-brand);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.tst-link-arrow svg { transition: transform .15s; }
.tst-link-arrow:hover svg { transform: translateX(4px); }


/* =========================================================
   HERO
   ========================================================= */

.tst-hero {
    position: relative;
    padding: 150px 0 88px; /* clears the absolute navbar, same as other pages */
    overflow: hidden;
    background:
        radial-gradient(900px 420px at 88% -10%, #dbe7fb 0%, transparent 70%),
        radial-gradient(700px 380px at -8% 8%, #e6eefc 0%, transparent 70%);
}

.tst-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 56px;
    align-items: center;
}

.tst-hero h1 {
    font-size: clamp(40px, 5.4vw, 66px);
    line-height: 1.04;
    letter-spacing: -.03em;
    font-weight: 800;
    margin: 0 0 22px;
}

.tst-hero h1 em {
    font-style: normal;
    color: var(--tst-brand);
}

.tst-lead {
    font-size: 18px;
    color: var(--tst-muted);
    max-width: 520px;
    margin: 0;
}

.tst-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-top: 34px;
}

@media (max-width: 900px) {
    .tst-hero { padding: 120px 0 56px; }
    .tst-hero-grid { grid-template-columns: 1fr; gap: 40px; }
}


/* =========================================================
   VIDEO CARD
   ========================================================= */

.tst-card {
    display: block;
    width: 100%;
    padding: 0;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
    background: var(--tst-bg);
    border: 1px solid var(--tst-line);
    border-radius: var(--tst-radius);
    overflow: hidden;
    transition: transform .25s, box-shadow .25s, border-color .25s, background .25s;
}

.tst-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--tst-shadow-lg);
    border-color: #c5d5f2;
    background: #fff;
}

.tst-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #0a2a6e, #0a4aa8 60%, #2c6fd6);
}

.tst-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}

.tst-card:hover .tst-thumb img { transform: scale(1.06); }

.tst-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(2, 20, 60, .18) 0%, rgba(2, 20, 60, 0) 38%, rgba(2, 20, 60, .5) 100%);
}

.tst-thumb.tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, .16) 1.5px, transparent 2px) 0 0 / 22px 22px;
    -webkit-mask: radial-gradient(ellipse 80% 80% at 50% 50%, #000, transparent);
    mask: radial-gradient(ellipse 80% 80% at 50% 50%, #000, transparent);
}

.tst-thumb .tile-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    z-index: 2;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .75);
}

.tst-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 62px;
    height: 62px;
    margin: -31px 0 0 -31px;
    border-radius: 50%;
    background: #fff;
    color: var(--tst-brand);
    display: grid;
    place-items: center;
    box-shadow: 0 12px 32px rgba(0, 20, 70, .38);
    transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}

.tst-play::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .55);
    transition: transform .25s, opacity .25s;
}

.tst-play svg { width: 24px; height: 24px; margin-left: 3px; }
.tst-card:hover .tst-play { transform: scale(1.1); }
.tst-card:hover .tst-play::before { transform: scale(1.18); opacity: .6; }

.tst-card-info {
    display: block;
    padding: 20px 20px 22px;
    text-align: center;
}

.tst-card-info b {
    display: block;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
    color: var(--tst-ink);
}

.tst-card-info .loc {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--tst-muted);
}

.tst-card.big {
    background: #fff;
    border-radius: 26px;
    box-shadow: var(--tst-shadow-lg);
}

.tst-card.big .tst-play { width: 86px; height: 86px; margin: -43px 0 0 -43px; }
.tst-card.big .tst-play svg { width: 32px; height: 32px; margin-left: 4px; }
.tst-card.big .tst-card-info { padding: 22px 26px 24px; }
.tst-card.big .tst-card-info b { font-size: 21px; }
.tst-card.big .tst-card-info .loc { font-size: 15px; }


/* =========================================================
   VIDEO WALL
   ========================================================= */

.tst-wall {
    padding: 84px 0 96px;
    background: #fff;
}

.tst-section-head { margin-bottom: 36px; }

.tst-section-head h2 {
    font-size: clamp(30px, 3.6vw, 44px);
    line-height: 1.1;
    letter-spacing: -.025em;
    font-weight: 800;
    margin: 12px 0 0;
}

.tst-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

@media (max-width: 1000px) { .tst-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .tst-grid { grid-template-columns: 1fr; } }


/* =========================================================
   SHARE YOUR STORY
   ========================================================= */

.tst-share {
    position: relative;
    overflow: hidden;
    padding: 88px 0;
    text-align: center;
    background:
        radial-gradient(900px 420px at 88% -10%, #dbe7fb 0%, transparent 70%),
        radial-gradient(700px 380px at -8% 8%, #e6eefc 0%, transparent 70%),
        var(--tst-bg);
}

.tst-share h2 {
    font-size: clamp(30px, 3.8vw, 46px);
    letter-spacing: -.025em;
    line-height: 1.1;
    font-weight: 800;
    margin: 14px 0 16px;
}

.tst-share p {
    color: var(--tst-muted);
    font-size: 18px;
    max-width: 560px;
    margin: 0 auto 32px;
}


/* =========================================================
   VIDEO MODAL
   ========================================================= */

.tst-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.tst-modal[hidden] { display: none; }

.tst-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 14, 40, .78);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity .28s;
}

.tst-dialog {
    position: relative;
    width: min(960px, 100%, calc((100vh - 190px) * 1.7778));
    background: #0a1a4f;
    color: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .5);
    opacity: 0;
    transform: translateY(16px) scale(.97);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s;
}

.tst-modal.open .tst-backdrop { opacity: 1; }
.tst-modal.open .tst-dialog { opacity: 1; transform: none; }

.tst-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.tst-stage iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Portrait (Shorts) videos keep the dialog's default width: the player is
   centred at 9:16 and the stage shows as space on either side */
.tst-dialog.portrait .tst-stage iframe {
    left: 50%;
    right: auto;
    width: auto;
    aspect-ratio: 9 / 16;
    transform: translateX(-50%);
}

.tst-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 28px;
    background: linear-gradient(135deg, #0a2a6e, #0a4aa8 60%, #2c6fd6);
}

.tst-empty svg { width: 56px; height: 56px; margin: 0 auto 14px; opacity: .9; }
.tst-empty b { display: block; font-size: 20px; margin-bottom: 8px; }
.tst-empty p { color: #c9d8f5; font-size: 14px; max-width: 420px; margin: 0 auto; }

.tst-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px 20px;
}

.tst-info h3 {
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -.01em;
    margin: 0;
}

.tst-info p {
    color: #a9bde6;
    font-size: 14px;
    margin: 3px 0 0;
}

.tst-nav { display: flex; gap: 8px; flex: none; }

.tst-mbtn,
.tst-close {
    border: 0;
    padding: 0;
    color: #fff;
    display: grid;
    place-items: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background .15s;
}

.tst-mbtn {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, .1);
}

.tst-mbtn:hover { background: rgba(255, 255, 255, .22); }
.tst-mbtn[hidden] { display: none; }
.tst-mbtn svg { width: 20px; height: 20px; }

.tst-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 40px;
    height: 40px;
    background: rgba(5, 14, 40, .62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.tst-close:hover { background: rgba(5, 14, 40, .9); }
.tst-close svg { width: 20px; height: 20px; }


/* =========================================================
   REVEAL ON SCROLL (only when JS is running)
   ========================================================= */

.js .tst-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}

.js .tst-reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .tst-backdrop, .tst-dialog, .tst-thumb img, .tst-play, .tst-card { transition: none; }
    .js .tst-reveal { opacity: 1; transform: none; transition: none; }
}


/* =========================================================
   HOME PAGE CAROUSEL
   Reuses the tutorial carousel markup and script.
   ========================================================= */

.home-testimonials-section {
    padding: 0 0 70px; /* continues the white tutorials section above */
    background: #ffffff;
}

.home-testimonials-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 32px;
    margin-bottom: 30px;
}

.home-testimonials-head .section-heading {
    margin-bottom: 0;
}

.home-testimonials-head .tst-link-arrow {
    margin-bottom: 6px;
}

/* Room for the hover lift and shadow inside the clipped carousel */
.home-testimonials-section .tutorial-carousel {
    padding: 8px 0 30px;
}

.home-testimonials-section .tutorial-carousel-item {
    display: flex;
}

@media (max-width: 767px) {
    .home-testimonials-section { padding: 0 0 60px; }
}
