/* ───────── 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-count="1"] .testi:nth-child(n) {
    grid-column: span 6;
}

.testi-grid[data-count="2"] .testi:nth-child(n),
.testi-grid[data-count="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-count] .testi:nth-child(n) {
        grid-column: auto;
    }
}
