/* ==========================================================================
   Testimonials page - redesign
   Loaded only from testimonials.aspx (head ContentPlaceHolder).
   Every class is prefixed "tm-" so nothing here can affect other pages.
   Base colour: the site's teal #44B4A5. Text on white uses the darker
   --tm-teal-deep so it stays readable (WCAG AA contrast).
   ========================================================================== */

.tm-page {
    --tm-teal: #44b4a5;          /* site base colour */
    --tm-teal-light: #7fd6ca;    /* accents on dark backgrounds */
    --tm-teal-hover: #5cc5b7;
    --tm-teal-dark: #2f9586;
    --tm-teal-deep: #23776c;     /* text / icons on white */
    --tm-teal-soft: rgba(68, 180, 165, .12);
    --tm-teal-night: #0b2f2b;    /* dark backgrounds */
    --tm-teal-night-2: #135048;
    --tm-ink: #0f172a;
    --tm-text: #475569;
    --tm-muted: #64748b;
    --tm-line: #e2e8f0;
    --tm-bg-soft: #f2f9f8;
    --tm-white: #ffffff;
    --tm-radius: 16px;
    --tm-radius-sm: 12px;
    --tm-shadow: 0 5px 20px rgba(0, 0, 0, .08);
    --tm-shadow-hover: 0 14px 34px rgba(19, 80, 72, .16);
    --tm-head-font: montserrat, Optima, Segoe, "Segoe UI", Candara, Calibri, Arial, sans-serif;
    --tm-body-font: hind, sans-serif;

    font-family: var(--tm-body-font);
    color: var(--tm-text);
    overflow-x: clip;
}

.tm-page *,
.tm-page *::before,
.tm-page *::after {
    box-sizing: border-box;
}

.tm-page h1,
.tm-page h2,
.tm-page h3 {
    font-family: var(--tm-head-font);
    font-weight: 700;
    line-height: 1.25;
    color: var(--tm-ink);
}

.tm-page a:focus-visible,
.tm-page button:focus-visible,
.tm-slider-track:focus-visible {
    outline: 3px solid var(--tm-teal);
    outline-offset: 3px;
}

.tm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tm-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.tm-section {
    padding: 80px 0;
}

.tm-section-head {
    max-width: 720px;
    margin: 0 auto 48px;
    text-align: center;
}

.tm-page .tm-section-head h2 {
    margin: 0 0 12px;
    font-size: clamp(26px, 3.4vw, 36px);
}

.tm-section-head p {
    margin: 0;
    font-size: 17px;
    color: var(--tm-muted);
}

/* ---------- Hero ---------- */
.tm-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 88% 15%, rgba(68, 180, 165, .55) 0, rgba(68, 180, 165, 0) 45%),
        radial-gradient(circle at 5% 120%, rgba(127, 214, 202, .25) 0, rgba(127, 214, 202, 0) 50%),
        linear-gradient(120deg, var(--tm-teal-night) 0%, var(--tm-teal-night-2) 60%, #1d6e63 100%);
}

.tm-hero::after {
    content: "\201C";
    position: absolute;
    right: 6%;
    bottom: -120px;
    font-family: Georgia, serif;
    font-size: 420px;
    line-height: 1;
    color: rgba(255, 255, 255, .07);
    pointer-events: none;
}

.tm-hero-content {
    position: relative;
    z-index: 1;
    padding-top: 72px;
    padding-bottom: 72px;
}

.tm-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, .78);
}

.tm-breadcrumb li + li::before {
    content: "\203A";
    margin-right: 8px;
    color: rgba(255, 255, 255, .5);
}

.tm-page .tm-breadcrumb a {
    color: var(--tm-white);
    text-decoration: none;
}

.tm-page .tm-breadcrumb a:hover,
.tm-page .tm-breadcrumb a:focus {
    color: var(--tm-teal-light);
}

.tm-hero-rule {
    display: block;
    width: 64px;
    height: 4px;
    margin-bottom: 18px;
    border-radius: 4px;
    background: var(--tm-teal);
}

.tm-page .tm-hero-title {
    margin: 0 0 14px;
    font-size: clamp(30px, 4.6vw, 48px);
    color: var(--tm-white);
    text-align: left;
}

.tm-hero-lead {
    max-width: 620px;
    margin: 0;
    font-size: clamp(16px, 1.8vw, 19px);
    line-height: 1.7;
    color: rgba(255, 255, 255, .9);
}

/* ---------- Written testimonials: slider ---------- */
.tm-reviews {
    background: var(--tm-bg-soft);
}

.tm-slider {
    position: relative;
}

.tm-slider-track {
    display: flex;
    gap: 28px;
    list-style: none;
    /* bleed into the container gutter so card shadows and the hover lift aren't clipped */
    margin: 0 -16px;
    padding: 14px 16px 30px;
    scroll-padding: 0 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    position: relative;
}

.tm-slider-track::-webkit-scrollbar {
    display: none;
}

/* without JavaScript keep a visible scrollbar so visitors can still scroll */
.tm-page:not(.tm-js) .tm-slider-track {
    scrollbar-width: thin;
}

.tm-slide {
    display: flex;
    flex: 0 0 calc((100% - 56px) / 3);
    min-width: 0;
    scroll-snap-align: start;
}

.tm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 36px 32px 30px;
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-radius);
    background: var(--tm-white);
    box-shadow: var(--tm-shadow);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.tm-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 32px;
    right: 32px;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: var(--tm-teal);
    opacity: 0;
    transition: opacity .3s ease;
}

.tm-card:hover {
    transform: translateY(-6px);
    border-color: rgba(68, 180, 165, .45);
    box-shadow: var(--tm-shadow-hover);
}

.tm-card:hover::before {
    opacity: 1;
}

.tm-card-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    border-radius: var(--tm-radius-sm);
    background: var(--tm-teal-soft);
    color: var(--tm-teal-deep);
    font-size: 22px;
}

/* reset Bootstrap's blockquote styling */
.tm-page .tm-card-text {
    flex: 1 1 auto;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    font-size: inherit;
}

.tm-card-text p {
    margin: 0;
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--tm-text);
}

.tm-card-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px dashed var(--tm-line);
}

.tm-card-author img {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    max-width: none;
    border-radius: 50%;
    border: 3px solid var(--tm-white);
    box-shadow: 0 0 0 2px var(--tm-teal);
    object-fit: cover;
    object-position: center 20%;
}

.tm-card-author cite {
    font-family: var(--tm-head-font);
    font-size: 15px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--tm-ink);
}

/* arrows + dots (only once the script is running) */
.tm-slider-controls {
    display: none;
}

.tm-slider.is-ready .tm-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 6px;
}

.tm-slider.is-static .tm-slider-controls {
    display: none;
}

.tm-slider-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 2px solid var(--tm-teal);
    border-radius: 50%;
    background: var(--tm-white);
    color: var(--tm-teal-deep);
    font-size: 16px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.tm-slider-btn:hover,
.tm-slider-btn:focus-visible {
    background: var(--tm-teal);
    color: var(--tm-ink);
}

.tm-slider-btn:active {
    transform: scale(.94);
}

.tm-slider-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 24px tap target, small visible dot */
.tm-slider-dot {
    position: relative;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    transition: width .3s ease;
}

.tm-slider-dot::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 999px;
    background: #b8c7c5;
    transition: background .3s ease, width .3s ease, margin .3s ease;
}

.tm-slider-dot.is-active {
    width: 36px;
}

.tm-slider-dot.is-active::before {
    width: 28px;
    margin-left: -14px;
    background: var(--tm-teal-dark);
}

/* ---------- Video testimonials: player + playlist ---------- */
.tm-videos {
    background:
        radial-gradient(circle at 10% 0%, rgba(68, 180, 165, .22) 0, rgba(68, 180, 165, 0) 45%),
        linear-gradient(135deg, var(--tm-teal-night) 0%, #0f3d38 60%, var(--tm-teal-night-2) 100%);
}

.tm-page .tm-videos .tm-section-head h2 {
    color: var(--tm-white);
}

.tm-videos .tm-section-head p {
    color: rgba(255, 255, 255, .82);
}

.tm-page:not(.tm-js) .tm-player {
    display: none;
}

.tm-player {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.tm-stage {
    overflow: hidden;
    border-radius: var(--tm-radius);
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}

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

/* fallback for browsers without aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
    .tm-video {
        height: 0;
        padding-top: 56.25%;
    }
}

.tm-video iframe,
.tm-video-play {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.tm-page .tm-video iframe {
    border: 0;
    border-radius: 0;
}

.tm-video-play {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

.tm-video-play img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    opacity: .85;
    transition: transform .5s ease, opacity .3s ease;
}

.tm-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
    border-radius: 50%;
    background: var(--tm-teal);
    color: var(--tm-ink);
    font-size: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    transition: transform .3s ease, background .3s ease;
}

.tm-play-icon::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 3px solid rgba(68, 180, 165, .55);
    animation: tm-pulse 2.2s ease-out infinite;
}

@keyframes tm-pulse {
    0%   { transform: scale(.9); opacity: 1; }
    100% { transform: scale(1.35); opacity: 0; }
}

.tm-play-icon i {
    margin-left: 5px; /* optically centre the triangle */
}

.tm-video-play:hover img,
.tm-video-play:focus-visible img {
    transform: scale(1.04);
    opacity: 1;
}

.tm-video-play:hover .tm-play-icon,
.tm-video-play:focus-visible .tm-play-icon {
    transform: scale(1.08);
    background: var(--tm-teal-hover);
}

.tm-stage-info {
    padding: 18px 24px 22px;
}

.tm-video-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--tm-teal-light);
}

.tm-stage-count {
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .85);
    letter-spacing: .04em;
}

.tm-page .tm-stage-title {
    margin: 8px 0 0;
    font-size: clamp(18px, 2vw, 22px);
    color: var(--tm-white);
}

/* playlist */
.tm-playlist {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tm-playlist-item {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--tm-radius-sm);
    background: rgba(255, 255, 255, .04);
    color: var(--tm-white);
    text-align: left;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.tm-playlist-item:hover {
    background: rgba(255, 255, 255, .09);
    transform: translateX(4px);
}

.tm-playlist-item.is-active {
    border-color: var(--tm-teal);
    background: rgba(68, 180, 165, .16);
}

.tm-playlist-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    background: #000;
}

.tm-playlist-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

.tm-playlist-play {
    position: absolute;
    right: 6px;
    bottom: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(15, 23, 42, .75);
    color: var(--tm-white);
    font-size: 10px;
}

.tm-playlist-item.is-active .tm-playlist-play {
    background: var(--tm-teal);
    color: var(--tm-ink);
}

.tm-playlist-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tm-playlist-num {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--tm-teal-light);
}

.tm-playlist-title {
    font-family: var(--tm-head-font);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--tm-white);
}

/* no-JS fallback */
.tm-noscript-videos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.tm-noscript-videos iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: var(--tm-radius-sm);
}

/* YouTube channel button */
.tm-videos-cta {
    margin-top: 44px;
    text-align: center;
}

.tm-page .tm-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 999px;
    background: var(--tm-teal);
    color: var(--tm-ink);
    font-family: var(--tm-head-font);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(68, 180, 165, .3);
    transition: background .2s ease, transform .2s ease;
}

.tm-page .tm-btn:hover,
.tm-page .tm-btn:focus {
    background: var(--tm-teal-hover);
    color: var(--tm-ink);
    transform: translateY(-2px);
}

.tm-btn .fa-youtube {
    font-size: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .tm-section {
        padding: 64px 0;
    }

    .tm-slide {
        flex-basis: calc((100% - 28px) / 2);
    }

    .tm-player {
        grid-template-columns: minmax(0, 1fr);
    }

    /* playlist becomes a horizontal, swipeable strip under the player */
    .tm-playlist {
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
        scrollbar-width: thin;
    }

    .tm-playlist li {
        flex: 0 0 230px;
        scroll-snap-align: start;
    }

    .tm-playlist-item {
        grid-template-columns: minmax(0, 1fr);
        height: 100%;
        align-items: start;
    }

    .tm-playlist-item:hover {
        transform: none;
    }
}

@media (max-width: 767px) {
    .tm-container {
        padding: 0 16px;
    }

    .tm-section {
        padding: 52px 0;
    }

    .tm-hero-content {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .tm-hero::after {
        font-size: 260px;
        bottom: -80px;
    }

    .tm-section-head {
        margin-bottom: 32px;
    }

    .tm-slider-track {
        gap: 16px;
        margin: 0 -8px;
        padding: 10px 8px 24px;
        scroll-padding: 0 8px;
    }

    .tm-slide {
        flex-basis: 100%;
    }

    .tm-card {
        padding: 28px 22px 24px;
    }

    .tm-player {
        gap: 18px;
    }

    .tm-stage-info {
        padding: 14px 18px 18px;
    }

    .tm-play-icon {
        width: 64px;
        height: 64px;
        margin: -32px 0 0 -32px;
        font-size: 22px;
    }

    .tm-playlist li {
        flex-basis: 190px;
    }

    .tm-noscript-videos {
        grid-template-columns: minmax(0, 1fr);
    }

    .tm-page .tm-btn {
        padding: 13px 22px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tm-card,
    .tm-card::before,
    .tm-video-play img,
    .tm-play-icon,
    .tm-playlist-item,
    .tm-slider-dot,
    .tm-slider-dot::before,
    .tm-page .tm-btn {
        transition: none;
    }

    .tm-play-icon::before {
        animation: none;
    }

    .tm-card:hover,
    .tm-video-play:hover img,
    .tm-video-play:focus-visible img,
    .tm-video-play:hover .tm-play-icon,
    .tm-video-play:focus-visible .tm-play-icon,
    .tm-playlist-item:hover,
    .tm-page .tm-btn:hover,
    .tm-page .tm-btn:focus {
        transform: none;
    }
}
