/* =========================================
   WHAT OUR TRAVELLERS SAY
   MOBILE FIRST
========================================= */

.guest-reviews {
    --reviews-gap: 18px;
    --reviews-card-width: 86%;
    --reviews-border: #E2E6E1;
    --reviews-soft-green: #E8EFE5;

    padding-block: 52px 64px;

    background: var(--off-white);

    caret-color: transparent;
}

/* =========================================
   SECTION INTRODUCTION
========================================= */

.reviews-intro {
    max-width: 900px;

    margin: 0 auto 32px;

    text-align: center;
}

.reviews-intro h2 {
    margin: 0;

    color: var(--black);

    font-size: clamp(25px, 5.8vw, 38px);
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.035em;
}

.reviews-intro h2::after {
    content: '';

    display: block;

    width: 64px;
    height: 2px;

    margin: 22px auto 25px;

    background: var(--orange);
}

.reviews-intro p {
    margin: 0;

    color: var(--charcoal);

    font-size: 16px;
    font-weight: 500;
    line-height: 1.75;
}

/* =========================================
   REUSABLE SVG ICONS
========================================= */

.reviews-icon {
    display: block;

    width: 21px;
    height: 21px;

    flex-shrink: 0;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =========================================
   TRIPADVISOR AND GOOGLE SUMMARY CARDS
========================================= */

.reviews-platforms {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

    max-width: 850px;

    margin: 0 auto 30px;
}

.reviews-platform {
    display: flex;
    flex-direction: column;
    align-items: center;

    min-width: 0;

    padding: 20px 12px;

    background: var(--white);

    border: 1px solid var(--reviews-border);
    border-radius: 14px;

    text-align: center;

    box-shadow: 0 3px 12px rgb(0 0 0 / 3%);

    transition:
        border-color 250ms ease,
        box-shadow 250ms ease,
        transform 350ms ease;
}

.reviews-platform-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    width: 100%;
}

.reviews-platform-icon {
    display: block;

    width: 32px;
    height: 32px;

    flex-shrink: 0;
}

.reviews-platform-name h3 {
    margin: 0;

    color: var(--black);

    font-size: clamp(14px, 3.6vw, 19px);
    font-weight: 750;
    line-height: 1.4;

    overflow-wrap: anywhere;
}

/* Overall rating */

.reviews-platform-rating {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 8px;

    margin-top: 16px;
}

.reviews-score {
    color: var(--black);

    font-size: clamp(27px, 6vw, 38px);
    font-weight: 800;
    line-height: 1.1;

    font-variant-numeric: tabular-nums;
}

.reviews-platform-count {
    margin-top: 10px;

    color: var(--charcoal);

    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.reviews-platform-description {
    margin: 12px 0;

    color: var(--charcoal);

    font-size: 13px;
    line-height: 1.6;
}

.reviews-platform-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    min-height: 44px;

    margin-top: auto;

    color: var(--green);

    font-size: 13px;
    font-weight: 750;
    line-height: 1.4;

    text-decoration: none;

    cursor: pointer;

    transition: color 220ms ease;
}

.reviews-platform-link .reviews-icon {
    width: 14px;
    height: 14px;
}

/* =========================================
   RATING INDICATORS
========================================= */

.reviews-rating-symbols {
    display: inline-flex;
    align-items: center;

    gap: 4px;

    color: #A9B0AB;
}

/* Google and direct testimonial stars */

.reviews-rating-symbol {
    position: relative;

    display: inline-block;

    width: 19px;
    height: 22px;

    font-size: 20px;
    line-height: 22px;

    text-align: center;

    flex-shrink: 0;
}

.reviews-rating-symbol::before,
.reviews-rating-symbol::after {
    content: '★';

    position: absolute;
    inset: 0;
}

.reviews-rating-symbol::after {
    width: var(--rating-fill, 0%);

    overflow: hidden;

    color: #E5A000;
}

/* Tripadvisor circular rating indicators */

.reviews-rating-symbols.is-tripadvisor {
    gap: 5px;
}

.is-tripadvisor .reviews-rating-symbol {
    width: 16px;
    height: 16px;

    overflow: hidden;

    border: 1.5px solid #008C59;
    border-radius: 50%;
}

.is-tripadvisor .reviews-rating-symbol::before {
    content: none;
}

.is-tripadvisor .reviews-rating-symbol::after {
    content: '';

    height: 100%;

    background: #008C59;
}

/* =========================================
   REVIEW FILTERS
========================================= */

.reviews-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 28px;
}

.reviews-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 10px 15px;

    background: #EDEEEA;
    color: var(--charcoal);

    border: 1px solid transparent;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;

    cursor: pointer;

    transition:
        background-color 250ms ease,
        border-color 250ms ease,
        color 250ms ease;
}

.reviews-filter[aria-pressed="true"] {
    background: var(--green);
    color: var(--white);

    border-color: var(--green);
}

/* =========================================
   CAROUSEL STRUCTURE
========================================= */

.reviews-carousel {
    position: relative;

    min-width: 0;
}

.reviews-track {
    position: relative;

    display: flex;
    align-items: stretch;

    gap: var(--reviews-gap);

    min-width: 0;

    margin-inline-end: calc(-1 * var(--gutter));

    padding: 8px var(--gutter) 14px 2px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    scroll-padding-inline-start: 2px;

    overscroll-behavior-x: contain;

    scrollbar-width: none;
}

.reviews-track::-webkit-scrollbar {
    display: none;
}

/* Centre the review when only one is available */

.reviews-track.is-single {
    justify-content: center;

    margin-inline-end: 0;

    padding-inline: 2px;
}

/* Smooth desktop dragging */

.reviews-track.is-dragging {
    scroll-snap-type: none;
}

.reviews-track.is-dragging,
.reviews-track.is-dragging * {
    cursor: grabbing;

    user-select: none;
    -webkit-user-select: none;
}

/* =========================================
   INDIVIDUAL REVIEW CARD
========================================= */

.review-card {
    position: relative;

    display: flex;
    flex-direction: column;

    flex: 0 0 var(--reviews-card-width);

    min-width: 0;
    min-height: 300px;

    padding: 24px 20px;

    background: var(--white);

    border: 1px solid var(--reviews-border);
    border-radius: 14px;

    box-shadow: 0 3px 12px rgb(0 0 0 / 5%);

    scroll-snap-align: start;

    overflow-wrap: anywhere;

    transition:
        border-color 300ms ease,
        box-shadow 300ms ease,
        transform 350ms ease;
}

.reviews-track.is-single .review-card {
    flex-basis: min(100%, 450px);
}

/* =========================================
   REVIEWER INFORMATION
========================================= */

.review-card-header {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 18px;
}

/* Automatically generated profile initials */

.review-avatar {
    display: grid;
    place-items: center;

    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    background: var(--reviews-soft-green);
    color: var(--green);

    border-radius: 50%;

    font-size: 16px;
    font-weight: 800;

    text-transform: uppercase;
}

.review-identity {
    display: flex;
    flex-direction: column;

    gap: 4px;

    min-width: 0;
}

.review-name {
    color: var(--black);

    font-size: 16px;
    font-weight: 750;
    line-height: 1.4;
}

.review-meta {
    color: #626B65;

    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

/* Individual guest rating */

.review-card > .reviews-rating-symbols {
    align-self: flex-start;

    margin-bottom: 15px;
}

/* =========================================
   REVIEW CONTENT
========================================= */

.review-quote {
    display: block;

    height: 32px;

    margin-bottom: 10px;

    color: var(--green);

    font-family: Georgia, serif;
    font-size: 65px;
    font-weight: 700;
    line-height: 1;
}

.review-title {
    margin: 0 0 12px;

    color: var(--black);

    font-size: 18px;
    font-weight: 750;
    line-height: 1.4;
}

.review-text {
    margin: 0;

    color: var(--charcoal);

    font-size: 15px;
    font-weight: 500;
    line-height: 1.8;

    white-space: pre-line;
}

/* =========================================
   READ MORE / READ LESS
========================================= */

.review-read-more {
    align-self: flex-start;

    min-height: 44px;

    padding: 8px 0;

    background: transparent;
    color: var(--green);

    border: 0;

    font-size: 14px;
    font-weight: 750;
    line-height: 1.4;

    text-decoration: underline;
    text-underline-offset: 4px;

    cursor: pointer;

    transition: color 220ms ease;
}

/* =========================================
   REVIEW SOURCE FOOTER
========================================= */

.review-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: auto;
    padding-top: 22px;
}

.review-source {
    display: flex;
    align-items: center;

    gap: 7px;

    width: 100%;

    padding-top: 15px;

    border-top: 1px solid var(--reviews-border);

    color: #626B65;

    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
}

.review-source::before {
    content: '';

    display: block;

    width: 8px;
    height: 8px;

    flex: 0 0 8px;

    background: var(--green);

    border-radius: 50%;
}

.review-card[data-platform="google"]
.review-source::before {
    background: #4285F4;
}

.review-card[data-platform="tripadvisor"]
.review-source::before {
    background: #00AA6C;
}

.review-source-link {
    color: var(--green);

    font-size: 12px;
    font-weight: 750;

    text-decoration: underline;
    text-underline-offset: 3px;

    transition: color 220ms ease;
}

/* =========================================
   CAROUSEL NAVIGATION ARROWS
========================================= */

.reviews-arrow {
    display: none;
}

/* =========================================
   PAGINATION DOTS
========================================= */

.reviews-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    margin-top: 20px;
}

.reviews-dot {
    display: grid;
    place-items: center;

    width: 26px;
    height: 32px;

    padding: 0;

    background: transparent;

    border: 0;

    cursor: pointer;
}

.reviews-dot::before {
    content: '';

    display: block;

    width: 8px;
    height: 8px;

    background: #D2D6D1;

    border-radius: 50%;

    transition:
        background-color 250ms ease,
        transform 250ms ease;
}

.reviews-dot[aria-current="true"]::before {
    background: var(--green);

    transform: scale(1.2);
}

/* =========================================
   LOADING AND EMPTY STATES
========================================= */

.reviews-status {
    max-width: 700px;

    margin: 0 auto;

    padding: 26px 20px;

    background: var(--white);

    border: 1px solid var(--reviews-border);
    border-radius: 12px;

    text-align: center;
}

.reviews-status-text,
.reviews-noscript {
    margin: 0;

    color: var(--charcoal);

    font-size: 15px;
    line-height: 1.7;
}

.reviews-status-link {
    display: inline-block;

    margin-top: 14px;

    color: var(--green);

    font-size: 14px;
    font-weight: 750;

    text-decoration: underline;

    cursor: pointer;
}

/* =========================================
   REVIEW ACTION BUTTONS
========================================= */

.reviews-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 14px;

    margin-top: 36px;
}

.reviews-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    width: 100%;
    max-width: 310px;
    min-height: 56px;

    padding: 14px 22px;

    border: 1px solid var(--green);
    border-radius: 12px;

    font-size: 16px;
    font-weight: 750;
    line-height: 1.4;

    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 250ms ease,
        border-color 250ms ease,
        color 250ms ease;
}

.reviews-view-all {
    background: var(--green);
    color: var(--white);
}

.reviews-write {
    background: transparent;
    color: var(--green);
}

.reviews-action .reviews-icon {
    transition: transform 250ms ease;
}

/* =========================================
   EXPANDED REVIEWS GRID
========================================= */

.reviews-track.is-expanded {
    display: grid;

    grid-template-columns: minmax(0, 1fr);

    gap: var(--reviews-gap);

    margin-inline: 0;

    padding-inline: 2px;

    overflow: visible;

    scroll-snap-type: none;
}

.reviews-track.is-expanded .review-card {
    width: 100%;
}

/* =========================================
   DESKTOP HOVER EFFECTS
========================================= */

@media (hover: hover) and (pointer: fine) {

    .reviews-platform:hover {
        border-color: #A8C4A7;

        transform: translateY(-3px);

        box-shadow: 0 7px 20px rgb(0 0 0 / 6%);
    }

    .reviews-track:not(.is-dragging)
    .review-card:hover {
        border-color: #A8C4A7;

        transform: translateY(-4px);

        box-shadow: 0 8px 20px rgb(0 0 0 / 7%);
    }

    .reviews-filter:hover:not([aria-pressed="true"]) {
        color: var(--green);

        border-color: var(--green);
    }

    .reviews-platform-link:hover,
    .review-read-more:hover,
    .review-source-link:hover,
    .reviews-status-link:hover {
        color: var(--orange);
    }

    .reviews-action:hover {
        background: var(--orange);

        border-color: var(--orange);

        color: var(--black);
    }

    .reviews-view-all:hover .reviews-icon {
        transform: translateX(4px);
    }
}

/* =========================================
   KEYBOARD ACCESSIBILITY
========================================= */

.guest-reviews button:focus-visible,
.guest-reviews a:focus-visible,
.reviews-track:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 3px;
}

/* =========================================
   SMALL SMARTPHONES
========================================= */

@media (max-width: 359px) {

    .guest-reviews {
        --reviews-gap: 14px;
        --reviews-card-width: 90%;
    }

    .reviews-platforms {
        gap: 8px;
    }

    .reviews-platform {
        padding: 18px 9px;
    }

    .reviews-filter {
        padding-inline: 12px;

        font-size: 13px;
    }

    .review-card {
        padding: 22px 18px;
    }
}

/* =========================================
   TABLET LAYOUT — TWO CARDS
========================================= */

@media (min-width: 640px) {

    .guest-reviews {
        --reviews-gap: 22px;

        --reviews-card-width:
            calc((100% - var(--reviews-gap)) / 2);

        padding-block: 64px 72px;
    }

    .reviews-intro {
        margin-bottom: 40px;
    }

    .reviews-intro p {
        font-size: 18px;
    }

    .reviews-platforms {
        gap: 20px;

        margin-bottom: 34px;
    }

    .reviews-platform {
        padding: 26px;
    }

    .reviews-platform-name {
        flex-direction: row;

        gap: 12px;
    }

    .reviews-platform-name h3 {
        font-size: 22px;
    }

    .reviews-platform-description,
    .reviews-platform-link,
    .reviews-platform-count {
        font-size: 15px;
    }

    .reviews-filter {
        min-height: 48px;

        padding-inline: 20px;

        font-size: 16px;
    }

    .reviews-track {
        margin-inline: 0;

        padding-inline: 0;

        scroll-padding-inline-start: 0;
    }

    .review-card {
        padding: 28px 24px;
    }

    .reviews-actions {
        flex-direction: row;

        gap: 18px;
    }

    .reviews-action {
        width: auto;
        max-width: none;

        padding-inline: 25px;
    }

    .reviews-track.is-expanded {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

/* =========================================
   DESKTOP — THREE REVIEW CARDS
========================================= */

@media (min-width: 1100px) {

    .guest-reviews {
        --reviews-gap: clamp(24px, 2vw, 34px);

        --reviews-card-width:
            calc((100% - 2 * var(--reviews-gap)) / 3);

        padding-block: 76px 82px;
    }

    .reviews-intro {
        margin-bottom: 46px;
    }

    .reviews-intro h2 {
        font-size: clamp(32px, 2.25vw, 40px);
    }

    .reviews-intro h2::after {
        width: 80px;

        margin: 24px auto 28px;
    }

    .reviews-intro p {
        font-size: 19px;
        line-height: 1.65;
    }

    .reviews-platforms {
        gap: 24px;

        margin-bottom: 40px;
    }

    .reviews-platform {
        padding: 30px;
    }

    .reviews-filters {
        gap: 12px;

        margin-bottom: 34px;
    }

    /* Desktop carousel with external arrows */

    .reviews-carousel {
        display: grid;

        grid-template-columns:
            40px minmax(0, 1fr) 40px;

        align-items: center;

        gap: 12px;
    }

    .reviews-track {
        grid-column: 2;
        grid-row: 1;
    }

    .reviews-prev {
        grid-column: 1;
        grid-row: 1;
    }

    .reviews-next {
        grid-column: 3;
        grid-row: 1;
    }

    .reviews-arrow {
        display: grid;
        place-items: center;

        width: 38px;
        height: 38px;

        background: var(--charcoal);
        color: var(--white);

        border: 0;
        border-radius: 50%;

        cursor: pointer;

        transition:
            background-color 250ms ease,
            opacity 250ms ease;
    }

    .reviews-arrow:hover:not(:disabled) {
        background: var(--green);
    }

    .reviews-arrow:disabled {
        opacity: 0.22;

        cursor: default;
    }

    .review-card {
        min-height: 320px;

        padding: clamp(24px, 2vw, 32px);
    }

    .review-avatar {
        width: 52px;
        height: 52px;

        flex-basis: 52px;

        font-size: 18px;
    }

    .review-name {
        font-size: 18px;
    }

    .review-meta {
        font-size: 13px;
    }

    .review-title {
        font-size: 20px;
    }

    .review-text {
        font-size: 16px;
    }

    .reviews-pagination {
        margin-top: 24px;
    }

    .reviews-actions {
        margin-top: 40px;
    }

    .reviews-track.is-expanded {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .reviews-action {
        min-height: 57px;

        font-size: 17px;
    }
}

/* =========================================
   REDUCED MOTION ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {

    .reviews-platform,
    .review-card,
    .reviews-filter,
    .reviews-arrow,
    .reviews-platform-link,
    .review-read-more,
    .review-source-link,
    .reviews-action,
    .reviews-action .reviews-icon,
    .reviews-dot::before {
        transition: none;
    }

    .reviews-platform:hover,
    .reviews-track:not(.is-dragging)
    .review-card:hover,
    .reviews-view-all:hover .reviews-icon {
        transform: none;
    }
}