/* Testimonials section (WordPress, WooCommerce and e-commerce server pages).
   Built on tokens.css. Older page CSS also styles these classes and loads later
   in the page, so every selector here starts with .testimonials-section and
   carries one more class than the rule it replaces. */

/* ---- Stats row: one equal-width row, no frame around it ---- */
.testimonials-section .testimonials-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 0;
    margin-bottom: 40px;
    background: none;
    border: none;
    border-radius: 0;
}

.testimonials-section .testimonials-stats .stat-item {
    min-width: 0;
    padding: 24px 16px;
    background: var(--nc-surface, #FFFFFF);
    border: 1px solid var(--nc-border, #E6ECF8);
    border-radius: 16px;
    text-align: center;
}

.testimonials-section .testimonials-stats .stat-item::after {
    content: none;
}

.testimonials-section .testimonials-stats .stat-number {
    color: var(--nc-navy, #001538);
    font-size: 36px;
    line-height: 1.2;
    gap: 6px;
    align-items: baseline;
}

.testimonials-section .testimonials-stats .stat-number .stat-unit {
    white-space: nowrap;
    color: var(--nc-text-muted, #64748B);
    font-size: 18px;
    font-weight: 600;
}

.testimonials-section .testimonials-stats .stat-label {
    color: var(--nc-text-muted, #64748B);
    font-size: 14px;
    margin-top: 6px;
}

/* ---- Cards: equal columns, equal heights, authors aligned at the bottom ---- */
/* Column count follows the number of reviews on the page (set in the markup). */
.testimonials-section .testimonials-bento {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.testimonials-section .testimonials-bento.cards-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.testimonials-section .testimonials-bento.cards-0 {
    grid-template-columns: minmax(0, 1fr);
}

.testimonials-section .testimonials-bento .testimonial-card {
    grid-column: auto;
    display: flex;
    flex-direction: column;
    padding: 32px;
    border: 1px solid var(--nc-border, #E6ECF8);
    border-radius: 20px;
}

.testimonials-section .testimonials-bento .testimonial-card::before {
    content: none;
}

.testimonials-section .testimonials-bento .testimonial-card.featured {
    border-color: transparent;
}

.testimonials-section .testimonials-bento .testimonial-card .quote-icon {
    flex: none;
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
    color: var(--nc-teal, #1AB8C9);
}

.testimonials-section .testimonials-bento .testimonial-quote,
.testimonials-section .testimonials-bento .testimonial-card.large .testimonial-quote {
    flex: 1 1 auto;
    font-size: 16px;
    line-height: 1.9;
    color: var(--nc-text, #334155);
    margin-bottom: 24px;
}

.testimonials-section .testimonials-bento .testimonial-card.featured .testimonial-quote {
    color: rgba(255, 255, 255, 0.9);
}

/* The highlighted phrase in the featured quote now actually stands out. */
.testimonials-section .testimonials-bento .testimonial-card.featured .highlight {
    color: var(--nc-teal, #1AB8C9);
    font-weight: 600;
}

.testimonials-section .testimonials-bento .testimonial-author {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--nc-border, #E6ECF8);
}

.testimonials-section .testimonials-bento .testimonial-card.featured .testimonial-author {
    border-top-color: rgba(255, 255, 255, 0.12);
}

/* Photos came in mixed colour and black-and-white; show them all the same way. */
.testimonials-section .testimonials-bento .testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex: none;
}

.testimonials-section .testimonials-bento .testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

.testimonials-section .testimonials-bento .testimonial-author-name {
    color: var(--nc-navy, #001538);
}

.testimonials-section .testimonials-bento .testimonial-card.featured .testimonial-author-name {
    color: #FFFFFF;
}

.testimonials-section .testimonials-bento .testimonial-author-role {
    color: var(--nc-text-muted, #64748B);
    font-weight: 500;
}

.testimonials-section .testimonials-bento .testimonial-card.featured .testimonial-author-role {
    color: rgba(255, 255, 255, 0.7);
}

.testimonials-section .testimonials-bento .testimonial-cta-card {
    grid-column: 1 / -1;
}

@media (max-width: 991px) {
    .testimonials-section .testimonials-bento {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .testimonials-section .testimonials-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .testimonials-section .testimonials-stats .stat-number {
        font-size: 28px;
    }

    .testimonials-section .testimonials-bento,
    .testimonials-section .testimonials-bento.cards-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .testimonials-section .testimonials-bento .testimonial-card {
        padding: 24px;
    }
}
