/* ============================================================================
   Traveller testimonials — a center-focus carousel.

   The active card sits full-strength in the middle; its neighbours are
   visible but dimmed and scaled down at the edges, so the eye is pulled to one
   review at a time instead of being asked to read three at once. Built on
   scroll-snap (works with a trackpad, a touch swipe and the keyboard) with a
   small script layered on top only to track which card is currently centred
   and keep the dots in sync — see testimonials.js.
   ========================================================================== */

.pt-testimonials { position: relative; overflow: hidden; }

/* Oversized serif quote mark bled into the corner — a typographic device
   rather than another icon. */
.pt-testimonials::before {
    content: "\201C";
    position: absolute;
    top: -3rem;
    right: 4%;
    font-family: var(--pt-font-accent);
    font-size: 22rem;
    line-height: 1;
    color: rgba(20, 122, 115, .05);
    pointer-events: none;
    user-select: none;
}

/* -- trust row: aggregate rating + "as seen on" platform badges ---------- */

/* .pt-heading already carries its own --pt-gap-xl bottom margin; the trust
   row below adds a second one, doubling up the exact "double section gap"
   this site was corrected of elsewhere. Trimmed here rather than there,
   since only this section stacks a second block directly under its heading. */
.pt-testimonials .pt-heading { margin-bottom: var(--pt-gap-lg); }

.pt-testimonials__trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--pt-gap-lg);
    margin-bottom: var(--pt-gap-xl);
}

.pt-rating-panel {
    display: flex;
    align-items: center;
    gap: var(--pt-gap);
    padding: var(--pt-gap) var(--pt-gap-lg);
    background: var(--pt-paper);
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-radius-lg);
    box-shadow: var(--pt-shadow-sm);
}

.pt-rating-panel__score {
    font-family: var(--pt-font-display);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--pt-heading);
    letter-spacing: -0.03em;
}

.pt-rating-panel__meta { font-size: var(--pt-text-sm); color: var(--pt-text-faint); }
.pt-rating-panel__meta .pt-stars { margin-bottom: .15rem; }

.pt-testimonial-platforms { display: flex; align-items: center; gap: .6rem; }

.pt-platform-badge {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--pt-paper);
    border: 1px solid var(--pt-line);
    box-shadow: var(--pt-shadow-sm);
    color: var(--pt-slate-600);
    transition: transform .25s var(--pt-ease), box-shadow .25s var(--pt-ease);
}

.pt-platform-badge svg { width: 19px; height: 19px; }
.pt-platform-badge:hover { transform: translateY(-3px); box-shadow: var(--pt-shadow); }

/* Google's icon already carries its own brand colours (see _Icon.cshtml), so
   the badge needs no tint of its own. Facebook and Instagram do. */
.pt-platform-badge--facebook { color: #1877F2; }

.pt-platform-badge--instagram {
    background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: #fff;
    border-color: transparent;
}

/* -- stage: the rail plus the quote badge that straddles its bottom edge - */

.pt-testimonial-stage { position: relative; }

.pt-testimonial-rail {
    /* Drives both the card width and the rail's own end-padding below, so a
       change to one can never drift out of step with the other. */
    --pt-test-card-w: clamp(280px, 84%, 560px);

    display: flex;
    gap: var(--pt-gap-lg);
    /* Padding the ends by half the leftover width is what lets the very first
       and very last card scroll all the way to dead centre, not just the
       middle ones — without it, scroll-snap-align:center on card 1 would still
       be blocked by the rail's own left edge. */
    padding-inline: max(0px, calc((100% - var(--pt-test-card-w)) / 2));
    padding-block: .75rem 2.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.pt-testimonial-rail::-webkit-scrollbar { display: none; }

@media (min-width: 860px) {
    .pt-testimonial-rail { --pt-test-card-w: clamp(460px, 58%, 620px); }
}

/* -- card ------------------------------------------------------------------
   Every card is the same size (see above) — the "active" treatment is purely
   opacity/scale/colour, never a width change, so nothing reflows or fights
   the scroll-snap geometry while a card becomes active mid-scroll. */

.pt-testimonial {
    position: relative;
    flex: 0 0 var(--pt-test-card-w);
    width: var(--pt-test-card-w);
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--pt-gap);
    padding: var(--pt-gap-xl);
    background: var(--pt-paper);
    border: 1px solid var(--pt-line-soft);
    border-radius: var(--pt-radius-xl);
    box-shadow: var(--pt-shadow-sm);
    opacity: .5;
    transform: scale(.92);
    transition: opacity .4s var(--pt-ease), transform .4s var(--pt-ease-out),
                box-shadow .4s var(--pt-ease-out), border-color .4s var(--pt-ease), background .4s var(--pt-ease);
}

.pt-testimonial.is-active {
    opacity: 1;
    transform: scale(1);
    background: linear-gradient(160deg, var(--pt-blue-050), var(--pt-paper) 55%);
    border-color: var(--pt-blue-200);
    box-shadow: var(--pt-shadow-xl);
    z-index: 2;
}

.pt-testimonial__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--pt-gap);
}

.pt-testimonial__quote {
    margin: 0;
    color: var(--pt-slate-700);
    font-size: var(--pt-text-md);
    line-height: 1.75;
    /* Six lines keeps every card the same height at rest; "Read more" lifts
       the clamp on whichever card is active. The full text stays in the DOM
       either way, for search engines and screen readers. */
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pt-testimonial.is-expanded .pt-testimonial__quote {
    -webkit-line-clamp: unset;
    overflow: visible;
}

/* Only the active card's "Read more" is reachable — kept in the layout at
   opacity:0 on the rest rather than display:none, so a card does not jump in
   height the instant it becomes active. */
.pt-testimonial__more {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    align-self: flex-start;
    margin-top: -.35rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--pt-blue-600);
    font-family: var(--pt-font-display);
    font-size: var(--pt-text-sm);
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--pt-ease);
}

.pt-testimonial.is-active .pt-testimonial__more { opacity: 1; pointer-events: auto; }
.pt-testimonial__more svg { width: 14px; height: 14px; transition: transform .25s var(--pt-ease); }
.pt-testimonial.is-expanded .pt-testimonial__more svg { transform: rotate(180deg); }

.pt-testimonial__less-label { display: none; }
.pt-testimonial.is-expanded .pt-testimonial__more-label { display: none; }
.pt-testimonial.is-expanded .pt-testimonial__less-label { display: inline; }

.pt-testimonial__foot {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: auto;
    padding-top: var(--pt-gap);
    border-top: 1px solid var(--pt-line-soft);
}

.pt-testimonial__avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--pt-blue-600), var(--pt-blue-800));
    color: #fff;
    font-family: var(--pt-font-display);
    font-size: var(--pt-text-base);
    font-weight: 700;
    letter-spacing: .02em;
}

.pt-testimonial__avatar img { width: 100%; height: 100%; object-fit: cover; }

.pt-testimonial__who { min-width: 0; }
.pt-testimonial__who strong { display: block; font-family: var(--pt-font-display); color: var(--pt-heading); font-size: var(--pt-text-base); }
.pt-testimonial__who small { display: block; color: var(--pt-text-faint); font-size: var(--pt-text-xs); }

/* Platform badge on the card itself — Google gets its real colours, which is
   the point of it. */
.pt-testimonial__source {
    margin-left: auto;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 50%;
    background: var(--pt-sand);
    border: 1px solid var(--pt-line-soft);
}

.pt-testimonial__source svg { width: 15px; height: 15px; }

/* -- the quote badge straddling the seam ----------------------------------- */

.pt-testimonial-quotemark {
    position: absolute;
    left: 50%;
    bottom: -26px;
    transform: translateX(-50%);
    z-index: 5;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pt-ink-800), var(--pt-blue-800));
    color: var(--pt-lime-500);
    box-shadow: var(--pt-shadow-lg);
    /* A ring the colour of whatever sits behind the badge, so it reads as
       "cut into" the page rather than pasted on top of it. */
    border: 4px solid var(--pt-bg);
}

.pt-testimonial-quotemark svg { width: 24px; height: 24px; }

/* -- controls --------------------------------------------------------------
   Prev arrow, dots, next arrow, all centred as one row beneath the stage. */

.pt-testimonials__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--pt-gap-lg);
    margin-top: var(--pt-gap);
}

.pt-rail-controls {
    display: flex;
    align-items: center;
    gap: var(--pt-gap);
}

.pt-rail-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: none;
    border: 1px solid var(--pt-line);
    border-radius: 50%;
    background: var(--pt-paper);
    color: var(--pt-slate-700);
    cursor: pointer;
    transition: background .2s var(--pt-ease), color .2s var(--pt-ease), border-color .2s var(--pt-ease), opacity .2s var(--pt-ease);
}

.pt-rail-btn:hover:not(:disabled) { background: var(--pt-blue-600); border-color: var(--pt-blue-600); color: #fff; }
.pt-rail-btn:disabled { opacity: .35; cursor: not-allowed; }
.pt-rail-btn svg { width: 18px; height: 18px; }

.pt-testimonial-dots { display: flex; align-items: center; gap: .5rem; }

.pt-testimonial-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--pt-line);
    cursor: pointer;
    transition: background .25s var(--pt-ease), width .25s var(--pt-ease);
}

.pt-testimonial-dot:hover { background: var(--pt-blue-200); }

.pt-testimonial-dot.is-active {
    width: 26px;
    border-radius: var(--pt-radius-pill);
    background: linear-gradient(90deg, var(--pt-blue-600), var(--pt-lime-500));
}

/* "Read our reviews on Google" — real Google colours on a white pill, which is
   what makes it read as genuine rather than as a styled link. */
.pt-google-link {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1.35rem;
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-radius-pill);
    background: var(--pt-paper);
    color: var(--pt-slate-700);
    font-family: var(--pt-font-display);
    font-weight: 600;
    font-size: var(--pt-text-base);
    box-shadow: var(--pt-shadow-sm);
    transition: transform .2s var(--pt-ease), box-shadow .2s var(--pt-ease);
}

.pt-google-link:hover { transform: translateY(-2px); box-shadow: var(--pt-shadow); color: var(--pt-slate-700); }
.pt-google-link svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
    .pt-testimonial-rail { scroll-behavior: auto; }
    .pt-testimonial { transition: none; }
}
