﻿/* ==========================================================================
   Latest Reviews & Agent Spotlight carousel
   Breakpoints: desktop 3 / tablet 2 / mobile 1 card per slide.
   Cards-per-slide is read by the JS from --rc-per-view, so breakpoints
   live only here.
   ========================================================================== */
.rc {
    --rc-per-view: 3;
    --rc-gap: 24px;
    --rc-purple: #6b5fa8;
    --rc-border: #b9b0dc;
    --rc-orange: #f47b20;
    --rc-quote: #fbdcc7;
    --rc-text: #5a5a5a;
    --rc-heading: #2b2b2b;

    margin: 0 auto;
    padding: 40px 16px;
    box-sizing: border-box;
}

    .rc *, .rc *::before, .rc *::after {
        box-sizing: border-box;
    }

@media (max-width: 991.98px) {
    .rc {
        --rc-per-view: 2;
    }
}
/* tablet */
@media (max-width: 575.98px) {
    .rc {
        --rc-per-view: 1;
        --rc-gap: 16px;
    }
}
/* mobile */

.rc-title {
    margin: 0 0 32px;
    text-align: center;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    color: var(--rc-heading);
}

/* Stage: [prev] [viewport] [next] */
.rc-stage {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rc-viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    padding: 10px 0; /* room for hover shadow */
    touch-action: pan-y; /* horizontal swipe handled by JS */
}

.rc-track {
    display: flex;
    gap: var(--rc-gap);
    transition: transform .45s ease;
    will-change: transform;
}

/* Card (whole card is the link) */
.rc-card {
    flex: 0 0 calc((100% - (var(--rc-per-view) - 1) * var(--rc-gap)) / var(--rc-per-view));
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--rc-border);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: box-shadow .2s ease, border-color .2s ease;
    -webkit-user-drag: none;
    user-select: none;
}

    .rc-card:hover {
        border-color: var(--rc-purple);
        box-shadow: 0 6px 18px rgba(107, 95, 168, .15);
    }

    .rc-card:focus-visible {
        outline: 2px solid var(--rc-purple);
        outline-offset: -3px;
    }

.rc-quote {
    width: 44px;
    height: 36px;
    color: var(--rc-quote);
    margin-bottom: 20px;
    flex-shrink: 0;
}

.rc-text {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.5;
    font-style: italic;
    color: var(--rc-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.5em * 3);
}

/* Rating row */
.rc-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--rc-text);
    margin-bottom: 18px;
}

.rc-stars {
    position: relative;
    width: 90px;
    height: 16px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e2e2e2' d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'/%3E%3C/svg%3E") repeat-x 0 0 / 18px 16px;
}

    .rc-stars > span {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f47b20' d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'/%3E%3C/svg%3E") repeat-x 0 0 / 18px 16px;
    }

.rc-score {
    font-weight: 700;
    color: var(--rc-heading);
}

.rc-date {
    padding-left: 8px;
    border-left: 1px solid #d5d5d5;
}

/* Agent row */
.rc-agent {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.rc-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
    background: #f3f3f3;
    flex-shrink: 0;
}

.rc-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--rc-heading);
}

/* Arrows */
.rc-nav {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rc-purple);
    border-radius: 50%;
    background: #fff;
    color: var(--rc-purple);
    cursor: pointer;
    transition: background .2s, color .2s;
}

    .rc-nav:hover {
        background: var(--rc-purple);
        color: #fff;
    }

    .rc-nav:focus-visible {
        outline: 2px solid var(--rc-purple);
        outline-offset: 2px;
    }

    .rc-nav svg {
        width: 14px;
        height: 14px;
    }

/* Dots */
.rc-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.rc-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 1px solid var(--rc-purple);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

    .rc-dot[aria-current="true"] {
        background: var(--rc-purple);
    }

    .rc-dot:focus-visible {
        outline: 2px solid var(--rc-purple);
        outline-offset: 2px;
    }

.rc [hidden] {
    display: none !important;
}

.rc-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .rc-stage {
        gap: 8px;
    }

    .rc-card {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rc-track, .rc-card, .rc-nav {
        transition: none;
    }
}
