/* =====================================================
   Testimonials — Capital Flex
   All values use CSS custom properties only.
   ===================================================== */

/* ---- 3-column card grid ---- */

.testi__grid {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: var(--space-6);
}

/* ---- Card ---- */

.testi-card {
    position: relative;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    transition: transform var(--ease-slow), box-shadow var(--ease-slow);
}

.testi-card:hover {
    transform: translateY( -5px );
    box-shadow: var(--shadow-lg);
}

/* ---- Decorative quote mark ---- */

.testi-card__quote-mark {
    color: var(--color-primary);
    opacity: 0.18;
    width: 40px;
    height: auto;
    flex-shrink: 0;
}

.testi-card__quote-mark svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ---- Stars ---- */

.testi-card__stars {
    display: flex;
    gap: var(--space-1);
    color: #F59E0B;
}

.testi-card__stars svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ---- Quote text ---- */

.testi-card__text {
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    color: var(--color-text);
    font-style: italic;
    flex: 1;
    quotes: none;
    border: none;
    padding: 0;
    margin: 0;
}

/* ---- Divider ---- */

.testi-card__divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 0;
}

/* ---- Author row ---- */

.testi-card__author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Avatar — image */
.testi-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    object-fit: cover;
}

/* Avatar — initials fallback */
.testi-card__avatar--initials {
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-primary-light) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: var(--text-sm);
    color: var(--color-white);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

/* Author info */
.testi-card__author-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}

.testi-card__name {
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    font-size: var(--text-body);
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.testi-card__role {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--color-muted);
    font-weight: var(--fw-medium);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================================================
   Responsive — Tablet ≤ 1024px
   ===================================================== */

@media ( max-width: 1024px ) {
    .testi__grid {
        grid-template-columns: repeat( 3, 1fr );
        gap: var(--space-5);
    }

    .testi-card {
        padding: var(--space-6);
        gap: var(--space-4);
    }
}

/* =====================================================
   Responsive — Large mobile ≤ 768px
   ===================================================== */

@media ( max-width: 768px ) {
    .testi__grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
        gap: var(--space-5);
    }
}

/* =====================================================
   Responsive — Small mobile ≤ 640px
   ===================================================== */

@media ( max-width: 640px ) {
    .testi-card {
        padding: var(--space-5);
    }

    .testi__grid {
        max-width: 100%;
    }
}
