.reviews {
    position: relative;
}

.reviews .reviews-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 4rem;
    background-color: var(--color-sea-salt-white);

    @media only screen and (max-width: 1023px) {
        padding-inline: 0;
        padding-block: 2rem;
        text-align: center;
    }
}

.reviews .reviews-inner .reviews-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    @media only screen and (max-width: 1023px) {
        padding-inline: 2rem;
    }
}

.reviews .reviews-inner .reviews-wrapper {
    position: relative;
    width: 100%;
    margin-inline: auto;
    padding: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 32px, black calc(100% - 32px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, black 32px, black calc(100% - 32px), transparent 100%);
}

.reviews .reviews-inner .reviews-wrapper::before,
.reviews .reviews-inner .reviews-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 32px;
    z-index: 2;
    pointer-events: none;
}

.reviews .reviews-inner .reviews-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--color-sea-salt-white), rgba(248, 248, 248, 0));
}

.reviews .reviews-inner .reviews-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--color-sea-salt-white), rgba(248, 248, 248, 0));
}

.reviews .reviews-track {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    will-change: transform;
    animation: none;
}

.reviews .review {
    flex: 0 0 clamp(220px, 25vw, 320px);
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--color-coconut-husk);
    border: 1px solid var(--color-coconut-husk);
    box-shadow: none;
    overflow: hidden;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;

    @media only screen and (max-width: 1023px) {
        flex-basis: clamp(240px, 70vw, 340px);
        aspect-ratio: auto;
        min-height: clamp(320px, 90vw, 440px);
    }
}

.reviews .review:hover {
    background: white;
    box-shadow: 1px -1px 53px -1px rgba(0, 0, 0, 0.30);
    -webkit-box-shadow: 1px -1px 53px -1px rgba(0, 0, 0, 0.30);
    -moz-box-shadow: 1px -1px 53px -1px rgba(0, 0, 0, 0.30);

    @media only screen and (max-width: 1023px) {
        background: transparent;
        box-shadow: none;
    }
}

.reviews .review p {
    padding-inline: 1rem;
}

.reviews .review .title {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.2;
    padding-inline: 1rem;
    font-weight: var(--font-weight-medium);
}

.reviews .review p {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    line-height: 1.45;
}

.reviews-wrapper .rating {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-top: auto;
    border-top: 1px solid var(--color-coconut-husk);

    @media only screen and (max-width: 1023px) {
        flex-direction: column;
        gap: 0;
    }
}

.reviews-wrapper .rating div {
    text-align: right;
}

.reviews-wrapper .rating em {
    font-size: var(--font-size-xs);
}

.reviews-wrapper .rating .stars {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.reviews-wrapper .rating .star {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    background-color: var(--color-palm-green);
    mask-image: var(--star-icon);
    -webkit-mask-image: var(--star-icon);
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;
    opacity: 0.95;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .reviews .reviews-track {
        animation: none !important;
        transform: none !important;
    }

    .reviews .review,
    .reviews .review:hover {
        transition: none !important;
        box-shadow: none !important;
        -webkit-box-shadow: none !important;
        -moz-box-shadow: none !important;
    }
}