/* Reviews section (template-parts/bks/reviews.php) */
.reviews-section {
    --reviews-bg: #e6bca9;
    --reviews-text: #333333;
    --reviews-stars: #e0a36f;
    background-color: var(--reviews-bg);
    color: var(--reviews-text);
    /* The next section (CTA) starts 77px higher, under this one. */
    padding: 40px 0 140px;
}

.reviews-title {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    text-align: center;
    margin: 0 0 40px;
    color: inherit;
}

.reviews-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.review-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 32px 28px;
    background-color: rgba(255, 255, 255, 0.55);
    border-radius: 20px;
}

.review-stars {
    position: relative;
    align-self: flex-start;
    font-size: 20px;
    letter-spacing: 3px;
    line-height: 1;
    white-space: nowrap;
    margin-bottom: 18px;
}

/* Five pale stars, and the same five in colour on top, cut to the rating. */
.review-stars-empty {
    color: rgba(0, 0, 0, 0.15);
}

.review-stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: var(--reviews-stars);
}

.review-quote {
    flex-grow: 1;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    font-size: 17px;
    line-height: 1.6;
}

.review-quote p {
    margin: 0;
    quotes: "\201C" "\201D";
}

.review-quote p::before {
    content: open-quote;
}

.review-quote p::after {
    content: close-quote;
}

.review-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 15px;
    line-height: 1.4;
}

.review-author strong {
    font-size: 16px;
}

.reviews-note {
    margin: 32px 0 0;
    text-align: center;
    font-size: 15px;
}

@media (max-width: 991px) {
    .reviews-list {
        grid-template-columns: minmax(0, 1fr);
        max-width: 640px;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .reviews-section {
        padding: 30px 0 120px;
    }

    .reviews-title {
        font-size: 28px;
        margin-bottom: 24px;
    }

    .reviews-list {
        gap: 16px;
    }

    .review-card {
        padding: 24px 20px;
    }

    .review-quote {
        font-size: 16px;
        margin-bottom: 18px;
    }
}

/* Slider: two or more reviews (js/reviews.js); the buttons show only when the cards do not fit */
.reviews-section--slider .reviews-list {
    display: flex;
    max-width: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.reviews-section--slider .reviews-list::-webkit-scrollbar {
    display: none;
}

.reviews-section--slider .review-card {
    flex: 0 0 calc((100% - 48px) / 3);
    scroll-snap-align: start;
}

.reviews-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.reviews-nav[hidden] {
    display: none;
}

.reviews-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}

.reviews-nav-btn:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.55);
}

.reviews-nav-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

@media (max-width: 991px) {
    .reviews-section--slider .review-card {
        flex-basis: calc((100% - 24px) / 2);
    }
}

@media (max-width: 767px) {
    .reviews-section--slider .review-card {
        flex-basis: 85%;
    }
}
