/* ==========================================================================
   Testimonials — /testimonials
   Card grid + filter bar + video modal.
   Brand navy #1e2a78; card tints are set per-testimonial in the admin.
   ========================================================================== */

.tst-hero {
    background: linear-gradient(135deg, #1e2a78 0%, #3a4ca3 100%);
    color: #fff;
    padding: 58px 0 50px;
}
.tst-hero .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.tst-crumbs { font-size: 13px; color: rgba(255,255,255,.72); margin-bottom: 14px; }
.tst-crumbs a { color: rgba(255,255,255,.72); text-decoration: none; }
.tst-crumbs a:hover { color: #fff; }
.tst-crumbs i { font-size: 9px; margin: 0 8px; }

.tst-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 44px;
    line-height: 1.15;
    margin: 0 0 12px;
}
.tst-hero__sub {
    font-size: 17px;
    color: rgba(255,255,255,.9);
    max-width: 660px;
    margin: 0 0 10px;
    line-height: 1.6;
}
.tst-hero__note {
    font-size: 13px;
    color: rgba(255,255,255,.65);
    max-width: 660px;
    margin: 0;
    line-height: 1.6;
}

/* ---------- section + filters ---------- */

.tst-section { padding: 40px 0 70px; background: #fff; }
.tst-section .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.tst-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    padding: 18px 20px;
    margin-bottom: 30px;
    background: #f7f8fc;
    border: 1px solid #e6e8f4;
    border-radius: 12px;
}
.tst-filter { display: flex; flex-direction: column; gap: 6px; }
.tst-filter label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6b7280;
}
.tst-filter select {
    min-width: 230px;
    padding: 9px 12px;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
    border: 1px solid #d4d7e8;
    border-radius: 8px;
    cursor: pointer;
}
.tst-filter select:focus { outline: 2px solid #1e2a78; outline-offset: 1px; }

.tst-filter__go {
    padding: 9px 16px;
    font-size: 14px;
    color: #fff;
    background: #1e2a78;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}
.tst-filter__clear {
    font-size: 13px;
    color: #1e2a78;
    text-decoration: underline;
    padding-bottom: 10px;
}
.tst-count {
    margin: 0 0 10px auto;
    font-size: 13px;
    color: #6b7280;
}

/* ---------- grid ---------- */

.tst-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px 26px;
}

.tst-card { display: flex; flex-direction: column; }

.tst-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background: #1e2a78;           /* shows through when there is no image */
}
.tst-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}
.tst-card:hover .tst-card__media img { transform: scale(1.045); }

/* Readability scrim behind the label. Tinted per theme below. */
.tst-card__scrim {
    position: absolute; inset: 0;
    background: linear-gradient(105deg, rgba(30,42,120,.92) 0%, rgba(30,42,120,.72) 42%, rgba(30,42,120,.12) 78%);
}

.tst-card__label {
    position: absolute;
    left: 20px; right: 34%; bottom: 18px; top: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    color: #fff;
    pointer-events: none;
}
.tst-card__eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1.25;
}
.tst-card__kind {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 19px;
    line-height: 1.2;
    margin-bottom: auto;
    color: rgba(255,255,255,.95);
}
.tst-card__title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    line-height: 1.3;
    margin: 10px 0 0;
    color: #fff;
}

.tst-card__badge {
    position: absolute;
    top: 14px; right: 14px;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.22);
    backdrop-filter: blur(2px);
    color: #fff;
    font-size: 12px;
}

.tst-card__body { padding: 14px 2px 0; }

.tst-card__quote {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.62;
    color: #374151;
}
.tst-card__who {
    margin: 8px 0 0;
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
}

.tst-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #1e2a78;
    background: none;
    border: 0;
    border-bottom: 1px solid currentColor;
    cursor: pointer;
}
.tst-card__cta i { font-size: 11px; transition: transform .2s ease; }
.tst-card__cta:hover i { transform: translateX(3px); }
.tst-card__cta:focus-visible { outline: 2px solid #1e2a78; outline-offset: 3px; }

/* ---------- card themes (scrim tints) ---------- */

.tst-card--navy  .tst-card__media { background: #1e2a78; }
.tst-card--green .tst-card__media { background: #3f6b52; }
.tst-card--sand  .tst-card__media { background: #8a6244; }
.tst-card--teal  .tst-card__media { background: #245b67; }
.tst-card--plum  .tst-card__media { background: #5d3a63; }

.tst-card--green .tst-card__scrim {
    background: linear-gradient(105deg, rgba(63,107,82,.93) 0%, rgba(63,107,82,.74) 42%, rgba(63,107,82,.12) 78%);
}
.tst-card--sand .tst-card__scrim {
    background: linear-gradient(105deg, rgba(138,98,68,.93) 0%, rgba(138,98,68,.74) 42%, rgba(138,98,68,.12) 78%);
}
.tst-card--teal .tst-card__scrim {
    background: linear-gradient(105deg, rgba(36,91,103,.93) 0%, rgba(36,91,103,.74) 42%, rgba(36,91,103,.12) 78%);
}
.tst-card--plum .tst-card__scrim {
    background: linear-gradient(105deg, rgba(93,58,99,.93) 0%, rgba(93,58,99,.74) 42%, rgba(93,58,99,.12) 78%);
}

/* ---------- empty state ---------- */

.tst-empty {
    text-align: center;
    padding: 64px 24px;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 12px;
}
.tst-empty i { font-size: 34px; color: #c7cbe6; }
.tst-empty p { margin: 14px 0 18px; font-size: 15px; }
.tst-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #1e2a78;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
}

/* ---------- pager ---------- */

.tst-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 44px;
}
.tst-pager a,
.tst-pager span {
    min-width: 38px;
    padding: 8px 11px;
    text-align: center;
    font-size: 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #1e2a78;
    border: 1px solid #e6e8f4;
}
.tst-pager a:hover { background: #eef0ff; }
.tst-pager .is-current {
    background: #1e2a78;
    border-color: #1e2a78;
    color: #fff;
    font-weight: 600;
}

/* ---------- modal ---------- */

.tst-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.tst-modal[hidden] { display: none; }

.tst-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 40, .82);
}
.tst-modal__panel {
    position: relative;
    width: min(860px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    padding: 30px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0,0,0,.45);
}
.tst-modal__close {
    position: absolute;
    top: 12px; right: 14px;
    width: 38px; height: 38px;
    font-size: 26px;
    line-height: 1;
    color: #6b7280;
    background: #f3f4f6;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.tst-modal__close:hover { background: #e5e7eb; color: #111827; }

.tst-modal__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    color: #1e2a78;
    margin: 0 44px 18px 0;
    line-height: 1.25;
}
.tst-modal__video {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
}
.tst-modal__video iframe { width: 100%; height: 100%; border: 0; display: block; }

.tst-modal__quote {
    margin: 0 0 16px;
    padding-left: 16px;
    border-left: 3px solid #1e2a78;
    font-size: 17px;
    line-height: 1.6;
    color: #1f2937;
}
.tst-modal__body {
    font-size: 15px;
    line-height: 1.75;
    color: #374151;
    white-space: pre-line;   /* keeps admin line breaks without allowing HTML */
}
.tst-modal__who {
    margin: 16px 0 0;
    font-size: 14px;
    font-style: italic;
    color: #6b7280;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
    .tst-hero h1 { font-size: 34px; }
    .tst-count { margin-left: 0; }
}

@media (max-width: 640px) {
    .tst-hero { padding: 40px 0 36px; }
    .tst-hero h1 { font-size: 28px; }
    .tst-hero__sub { font-size: 15px; }
    .tst-section { padding: 28px 0 50px; }
    .tst-grid { grid-template-columns: 1fr; gap: 26px; }
    .tst-filters { padding: 14px; gap: 12px; }
    .tst-filter, .tst-filter select { width: 100%; min-width: 0; }
    .tst-card__label { right: 26%; }
    .tst-card__kind { font-size: 17px; }
    .tst-modal { padding: 12px; }
    .tst-modal__panel { padding: 22px 18px; max-height: 92vh; }
    .tst-modal__title { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
    .tst-card__media img,
    .tst-card__cta i { transition: none; }
    .tst-card:hover .tst-card__media img { transform: none; }
}
