/* Purpose: Testimonials section — aggregate rating + featured quote + 2-up review carousel. */

.testi {
    background: var(--color-bg);
    padding: var(--space-20) 0 var(--space-20);
}


/* ---- Header row: rating (left) + featured quote (right) ---- */
.testi__header {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0;
    align-items: center;
    margin-bottom: var(--space-12);
}

.testi__rating {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-right: var(--space-10);
}

.testi__rating-num {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 4vw, 4rem);
    font-weight: var(--weight-regular);
    font-variant-numeric: lining-nums;
    color: var(--color-primary);
    line-height: 1;
}

.testi__stars {
    margin-top: 8px;
}

/* Rating stars — unicode glyph to match Figma (Jost Light 14px, #c9a84c). */
.testi__stars, .testi__card-stars {
    font-family: var(--font-body);
    font-weight: var(--weight-light);
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 2px;
    color: #c9a84c;
}

.testi__rating-label {
    font-family: var(--font-body);
    font-size: 12px;
    font-style: normal;
    font-weight: var(--weight-light);
    line-height: 16px;
    text-transform: uppercase;
    color: #7a7870;
    white-space: nowrap;
    margin: 2px 0 0;
}

.testi__featured-quote {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    font-style: italic;
    font-weight: var(--weight-regular);
    color: var(--color-primary);
    line-height: var(--leading-snug);
    margin: 0;
    padding: 0 0 0 var(--space-10);
    border: none;
    max-width: 660px;
}

/* ---- Carousel ---- */
.testi__carousel { position: relative; }

.testi__track-wrap {
    overflow: visible;
}

/* Native scroll-snap carousel: 2-up on desktop, 1-up with peek on mobile. */
.testi__track {
    display: flex;
    gap: var(--space-6);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.testi__track::-webkit-scrollbar { display: none; }

/* ---- Review card ---- */
.testi__card {
    scroll-snap-align: start;
    flex: 0 0 calc(50% - (var(--space-6) / 2));  /* 2-up desktop */
    background: var(--color-bg-alt);
    border: var(--border-thin);
    border-radius: 0;
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.testi__card-stars { display: flex; gap: 2px; }

.testi__card-quote {
    font-family: var(--font-heading);
    font-size: var(--text-md);
    font-style: italic;
    color: var(--color-text);
    line-height: var(--leading-snug);
    margin: 0;
    padding: 0;
    border: none;
    flex: 1;
}

.testi__card-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

.testi__card-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.testi__card-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.testi__card-name {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text);
}

.testi__card-detail {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.testi__card-verified { color: var(--color-text-muted); }

/* ---- Dots ---- */
.testi__dots {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-8);
}

.testi__dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--color-border);
    cursor: pointer;
    padding: 0;
    transition: background var(--duration-base) var(--ease-out),
                transform var(--duration-base) var(--ease-out);
}

.testi__dot.is-active {
    background: var(--color-primary);
    transform: scale(1.2);
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .testi { padding-top: var(--space-10); padding-bottom: var(--space-10); }  /* 40px */
    .testi__header {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    .testi__rating {
        padding-right: 0;
    }
    .testi__featured-quote {
        padding-left: 0;
        font-size: 1.5rem;  /* 24px */
    }
    /* All cards share one height (stretch); compact padding keeps it tidy. */
    .testi__card {
        flex: 0 0 85%;  /* 1-up with next card peeking */
        padding: var(--space-5);
        gap: var(--space-3);
    }
    .testi__card-author { margin-top: var(--space-3); }
}
