/* ═══════════════════════════════════════════════════════════════
   Patient testimonials slider – [metro_testimonials] (includes/testimonials.php)
   Same card as the Breakdance slider it replaces: navy card, 48px corners,
   white quote, dots bottom-left (83px from the bottom on laptop).
   Laptop: photo fills the card height, pinned right, so the therapist sits in
   the open area right of the quote (MP-293/294/295). Below 1024px the photo
   covers the card and the text sits on a bottom gradient.
   ═══════════════════════════════════════════════════════════════ */
.metro-tst {
    position: relative;
    width: 100%;
    border-radius: 48px;
    overflow: hidden;
    background: #1e293b;
    color: #fff;
    isolation: isolate;
}
.metro-tst-track {
    display: grid; /* all slides share one cell: the card is as tall as the longest quote */
}
.metro-tst-slide {
    grid-area: 1 / 1;
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 480px;
    margin: 0;
    padding: 83px 48px 131px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.metro-tst-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease;
}
.metro-tst-slide picture { display: contents; }
.metro-tst-photo {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: auto;
    max-width: none;
    z-index: -2;
    /* the photo's left edge melts into the navy card */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 35%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 35%);
}
.metro-tst-pos-center .metro-tst-photo { right: 50%; transform: translateX(50%); }
.metro-tst-pos-left .metro-tst-photo { right: auto; left: 0; }
.metro-tst-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, #1e293b 0%, #1e293b 40%, rgba(30, 41, 59, 0.6) 54%, rgba(30, 41, 59, 0) 66%);
}
.metro-tst-content {
    position: relative;
    max-width: 54%; /* wider paragraph (MP-392/393/394; was 46%) */
}
.metro-tst-quote {
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}
.metro-tst-quote p {
    margin: 0;
    font-family: "Nunito Sans", sans-serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}
.metro-tst-author {
    margin: 0;
    font-family: "Nunito Sans", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #fff;
}
.metro-tst-dots {
    position: absolute;
    left: 48px;
    bottom: 83px;
    display: flex;
    gap: 8px;
    line-height: 0;
}
.metro-tst-dot {
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.2s;
}
.metro-tst-dot:hover { background: rgba(255, 255, 255, 0.7); }
.metro-tst-dot.is-active { background: #fff; }
.metro-tst-dot:focus-visible { outline: 2px solid #cdd9a3; outline-offset: 2px; }

/* Laptop: per testimonial the photo can be pushed right past the card edge
   (--tst-shift, % of card width) and enlarged (--tst-zoom × card height,
   growing mostly downward so heads stay in view) – MP-392/393/394. */
@media (min-width: 1024px) {
    .metro-tst-photo {
        height: calc(100% * var(--tst-zoom, 1));
        top: calc((1 - var(--tst-zoom, 1)) * 20%);
        right: calc(var(--tst-shift, 0) * -1%);
    }
}

/* Tablet / phone: the whole photo across the top of the card, quote below it. */
@media (max-width: 1023px) {
    .metro-tst-slide {
        min-height: 0;
        padding: 0 16px 72px;
        flex-direction: column;
        align-items: stretch;
    }
    .metro-tst-photo,
    .metro-tst-pos-center .metro-tst-photo,
    .metro-tst-pos-left .metro-tst-photo {
        position: relative;
        top: auto; right: auto; left: auto;
        transform: none;
        width: calc(100% + 32px);
        height: auto;
        aspect-ratio: 16 / 10;
        margin: 0 -16px 24px;
        object-fit: cover;
        object-position: center;
        -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 30%);
        mask-image: linear-gradient(0deg, transparent 0%, #000 30%);
    }
    .metro-tst-slide::before { display: none; }
    .metro-tst-content { max-width: none; margin-top: -48px; }
    .metro-tst-dots { left: 16px; bottom: 32px; }
}
@media (max-width: 767px) {
    .metro-tst { border-radius: 24px; }
    .metro-tst-quote { margin-bottom: 16px; }
    .metro-tst-quote p { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .metro-tst-slide, .metro-tst-slide.is-active { transition: none; }
}
