/* ════════════════════════════════════════════
   Testimonials — V2-family social-proof grid
   Quote cards with accent stars, avatar (image
   or gradient initial), name + meta. Optional
   featured card = gradient, spans two columns.
   Same borders, radius, chips and typography as
   Features V2/V3 and Rating. Full-width, no
   schema. Depends on scw-base (tokens +
   .scw-section, heading group).
   ════════════════════════════════════════════ */

.scw-tm {
    background: var(--scw-tm-bg, #FFFFFF);
    font-family: var(--scw-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.scw-tm *,
.scw-tm *::before,
.scw-tm *::after {
    box-sizing: border-box;
}

/* ── Subtitle override — solid black, regular weight (family rule) ── */
.scw-tm .scw-section-subtitle {
    color: #000000;
    font-weight: 400;
}

/* ── Grid ── */
.scw-tm__grid {
    display: grid;
    grid-template-columns: repeat(var(--scw-tm-cols, 3), minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── Card ── */
.scw-tm__card {
    display: flex;
    background: var(--scw-tm-card-bg, #F7F7F9);
    border: 1px solid var(--scw-tm-border, #EAEAF0);
    border-radius: var(--scw-tm-radius, 24px);
    transition: transform 0.25s var(--scw-ease, cubic-bezier(0.4, 0, 0.2, 1));
    --scw-tm-c-quote: var(--scw-tm-quote, #0F0F0F);
    --scw-tm-c-meta: var(--scw-tm-meta, #8B8B93);
    --scw-tm-c-mark: var(--scw-tm-a1, #A855F7);
}

.scw-tm__card:hover {
    transform: translateY(-4px);
}

/* Featured: gradient card, two columns wide */
.scw-tm__card--featured {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--scw-tm-a1, #A855F7) 0%, var(--scw-tm-a2, #EC4899) 100%);
    border-color: transparent;
    --scw-tm-c-quote: #FFFFFF;
    --scw-tm-c-meta: rgba(255, 255, 255, 0.78);
    --scw-tm-c-mark: rgba(255, 255, 255, 0.55);
}

.scw-tm__figure {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    margin: 0;
    padding: 30px 28px 26px;
}

/* ── Big soft quote mark ── */
.scw-tm__mark {
    position: absolute;
    top: 14px;
    right: 22px;
    font-size: 88px;
    line-height: 1;
    font-weight: 900;
    color: var(--scw-tm-c-mark);
    opacity: 0.16;
    pointer-events: none;
    user-select: none;
}

.scw-tm__card--featured .scw-tm__mark {
    opacity: 1;
    color: rgba(255, 255, 255, 0.18);
}

/* ── Stars ── */
.scw-tm__stars {
    display: flex;
    gap: 3px;
    margin-bottom: 16px;
}

.scw-tm__star {
    display: inline-flex;
    line-height: 0;
}

.scw-tm__star svg {
    width: 18px;
    height: 18px;
    fill: #DCDCE3;
}

.scw-tm__star.is-on svg {
    fill: var(--scw-tm-a2, #EC4899);
}

.scw-tm__card--featured .scw-tm__star svg {
    fill: rgba(255, 255, 255, 0.28);
}

.scw-tm__card--featured .scw-tm__star.is-on svg {
    fill: #FFFFFF;
}

/* ── Quote ── */
.scw-tm__quote {
    margin: 0 0 22px;
    padding: 0;
    flex: 1 1 auto;
}

.scw-tm__quote p {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    font-weight: 500;
    color: var(--scw-tm-c-quote);
}

.scw-tm__card--featured .scw-tm__quote p {
    font-size: 19px;
    line-height: 1.55;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ── Author ── */
.scw-tm__author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.scw-tm__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(15, 15, 15, 0.06);
}

.scw-tm__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gradient initial when no photo */
.scw-tm__avatar--initial {
    background: linear-gradient(135deg, var(--scw-tm-a1, #A855F7) 0%, var(--scw-tm-a2, #EC4899) 100%);
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 700;
}

.scw-tm__card--featured .scw-tm__avatar--initial {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.scw-tm__card--featured .scw-tm__avatar {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.scw-tm__who {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.scw-tm__name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--scw-tm-c-quote);
    line-height: 1.3;
}

.scw-tm__meta {
    font-size: 13px;
    color: var(--scw-tm-c-meta);
    line-height: 1.4;
}

/* ════════════════════════════════════════════
   Responsive — Tablet (≤ 1023px): 2 columns
   ════════════════════════════════════════════ */
@media (max-width: 1023px) {
    .scw-tm__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

/* ════════════════════════════════════════════
   Responsive — Mobile (≤ 640px): single column
   ════════════════════════════════════════════ */
@media (max-width: 640px) {
    .scw-tm__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .scw-tm__card--featured {
        grid-column: auto;
    }

    .scw-tm__figure {
        padding: 26px 22px 22px;
    }

    .scw-tm__mark {
        font-size: 72px;
        top: 10px;
        right: 18px;
    }

    .scw-tm__quote p {
        font-size: 15px;
    }

    .scw-tm__card--featured .scw-tm__quote p {
        font-size: 17px;
    }

    .scw-tm__avatar {
        width: 40px;
        height: 40px;
    }

    .scw-tm__avatar--initial {
        font-size: 15px;
    }
}

/* ── Elementor Editor Overrides ── */
.elementor-editor-active .scw-tm {
    min-height: 120px;
}
