/* ───────── Testimonials ───────── */

.testi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.testi:nth-child(-n+3) {
    grid-column: span 2;
}

.testi:nth-child(4),
.testi:nth-child(5) {
    grid-column: span 3;
}

.testi {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s var(--ease), border-color 0.25s;
}

.testi:hover {
    transform: translateY(-3px);
    border-color: rgba(180, 124, 253, 0.3);
}

.stars {
    display: flex;
    gap: 3px;
    margin-bottom: 18px;
}

.stars svg {
    color: var(--star-gold);
}

.testi-quote {
    font-size: 1.02rem;
    line-height: 1.6;
    color: #e8e4f0;
    margin: 0 0 24px;
    flex: 1;
}

.testi-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.testi-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient-cta);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    color: #1A0530;
    font-size: 15px;
    flex: 0 0 auto;
}

.testi-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14.5px;
    color: #fff;
}

.testi-role {
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 980px) {
    .testi-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .testi:nth-child(-n+3),
    .testi:nth-child(4),
    .testi:nth-child(5) {
        grid-column: auto;
    }
}

/* Fewer than five cards: fill the row instead of leaving gaps. */
.testi-grid[data-quotes="1"] .testi:nth-child(n) {
    grid-column: span 6;
}

.testi-grid[data-quotes="2"] .testi:nth-child(n),
.testi-grid[data-quotes="4"] .testi:nth-child(n) {
    grid-column: span 3;
}

.testi-link {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-purple);
    text-decoration: none;
    align-self: flex-start;
}

.testi-link:hover,
.testi-link:focus-visible {
    text-decoration: underline;
}

@media (max-width: 980px) {
    .testi-grid[data-quotes] .testi:nth-child(n) {
        grid-column: auto;
    }
}

/* Featured testimonial: full width above the grid, photo beside the words. */
.testi-feature {
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    margin: 0 0 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(180, 124, 253, 0.3);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.testi-feature-photo {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    display: block;
}

.testi-feature-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 44px;
}

.testi-feature-words {
    margin: 0;
}

.testi-feature-quote {
    margin: 0 0 28px;
    padding: 0;
    border: 0;
}

.testi-feature-quote p {
    font-size: 1.14rem;
    line-height: 1.65;
    color: #f1eef7;
    margin: 0 0 14px;
}

.testi-feature-quote p:last-child {
    margin-bottom: 0;
}

@media (max-width: 980px) {
    .testi-feature {
        grid-template-columns: 1fr;
        margin-bottom: 14px;
    }

    .testi-feature-photo {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .testi-feature-body {
        padding: 26px 24px 28px;
    }

    .testi-feature-quote p {
        font-size: 1.04rem;
    }
}
