/* Testimonials: the alt band with the services-slider pattern — heading and rating (Google mark when the reviews came
 * from Google) left, the Google reviews link and arrows right, three plain bordered cards per frame with the next one
 * peeking and a progress line. Each card: stars with the Google mark opposite, the quote, the author under a hairline.
 * Lightning "See more" popover for long reviews. */
.ocf-testimonials-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--ocf-grid-gap);
}

.ocf-testimonials .heading-2 { color: var(--ocf-heading); font-size: clamp(28px, 2.9vw, 44px); white-space: pre-line; }

.ocf-testimonials-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: calc(var(--ocf-space-unit) * 0.75);
    margin-top: calc(var(--ocf-grid-gap) * 0.65);
    color: var(--ocf-body);
}

.ocf-testimonials-rating__google svg { display: block; width: 22px; height: 22px; }
.ocf-testimonials-rating__stars { color: var(--ocf-secondary); letter-spacing: 0.1em; }
.ocf-testimonials-rating__value { color: var(--ocf-heading); font-family: var(--ocf-font-heading), system-ui, sans-serif; font-size: calc(var(--font-body-size) * 1.45); font-weight: 700; line-height: 1; }
.ocf-testimonials-rating__label { font-size: calc(var(--font-body-size) * 0.89); }

.ocf-testimonial-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: calc(var(--ocf-grid-gap) * 0.7);
    min-width: 0;
    min-height: 300px;
    padding: calc(var(--ocf-space-unit) * 1.75) calc(var(--ocf-space-unit) * 2) calc(var(--ocf-space-unit) * 1.5);
    border: 1px solid var(--ocf-border);
    border-radius: var(--card-radius);
    background: var(--ocf-bg);
    color: var(--ocf-body);
}

.ocf-testimonial-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ocf-testimonial-google svg { display: block; width: 20px; height: 20px; }

.ocf-testimonial-stars { display: flex; gap: 3px; }
.ocf-testimonial-stars svg { width: 18px; height: 18px; fill: var(--ocf-secondary); }
.ocf-testimonial-stars svg.is-empty { fill: color-mix(in srgb, var(--ocf-heading) 16%, transparent); }

.ocf-testimonial-card blockquote {
    flex: 1;
    margin: 0;
    color: var(--ocf-heading);
    font-size: calc(var(--font-body-size) * 1.05);
    font-weight: 500;
    line-height: 1.6;
}


.ocf-testimonial-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: calc(var(--ocf-space-unit) * 1.125);
    border-top: 1px solid var(--ocf-border);
}

.ocf-testimonial-name {
    color: var(--ocf-heading);
    font-family: var(--ocf-font-heading), system-ui, sans-serif;
    font-size: calc(var(--font-body-size) * 0.83);
    font-weight: 700;
}

.ocf-testimonial-source { color: color-mix(in srgb, var(--ocf-body) 75%, var(--ocf-bg)); font-size: 13px; text-align: right; }

html[data-theme="dark"] .ocf-testimonial-card,
html[data-theme="dark"] .ocf-testimonial-foot { border-color: var(--ocf-dark-border); }
html[data-theme="dark"] .ocf-testimonial-card { background: var(--ocf-bg-alt); }

.testimonial-more-wrap {
    display: inline;
}

.testimonial-more-trigger {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ocf-link);
    font: inherit;
    font-weight: var(--font-weight-bold);
    text-decoration: underline;
    text-underline-offset: 0.2em;
    cursor: pointer;
}

.testimonial-review-popover {
    display: none;
}

.ocf-testimonial-card.is-review-open .testimonial-review-popover {
    position: absolute;
    inset: calc(var(--ocf-grid-gap) * 0.375);
    z-index: 3;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: calc(var(--ocf-grid-gap) * 0.5);
    padding: calc(var(--ocf-grid-gap) * 0.75);
    border: var(--card-border-width) solid var(--ocf-border);
    border-radius: var(--card-radius);
    background: var(--ocf-bg);
    box-shadow: var(--image-shadow);
}

.testimonial-review-popover__text {
    min-height: 0;
    overflow: auto;
    padding-right: calc(var(--ocf-space-unit) * 0.25);
    color: var(--ocf-body);
    font-size: var(--ocf-font-small-size);
    font-weight: var(--font-weight-regular);
    line-height: 1.6;
    white-space: pre-line;
}

.testimonial-review-popover__close {
    justify-self: start;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ocf-link);
    font-size: var(--ocf-font-small-size);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
}

@media (max-width: 1023px) {
    .ocf-testimonials-header { flex-direction: column; align-items: flex-start; }
    .ocf-testimonial-card { min-height: 300px; }
}

@media (max-width: 640px) {
    .ocf-testimonial-card { padding: calc(var(--ocf-space-unit) * 1.5) calc(var(--ocf-space-unit) * 1.5) calc(var(--ocf-space-unit) * 1.25); }
    .ocf-testimonial-card blockquote { font-size: calc(var(--font-body-size) * 0.94); }
}
