/* ============================================================
   MORETECH -- TESTIMONIALS
   First-party markup + CSS (see partials/testimonials.php's own header
   for the full rationale) -- not derived from the shared platform's own
   testimonials.css. Every recurring visual value is a real --mt-* token.
   ============================================================ */

.mt-testimonials {
    padding: var(--mt-section-py) 0;
    background: var(--mt-page-bg);
    font-family: var(--mt-font-sans);
}

.mt-testimonials__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--mt-space-10);
}

.mt-testimonials__eyebrow {
    display: inline-block;
    font-size: var(--mt-text-xs);
    font-weight: var(--mt-weight-bold);
    letter-spacing: var(--mt-tracking-wider);
    text-transform: uppercase;
    color: var(--mt-accent);
    margin-bottom: var(--mt-space-3);
}

.mt-testimonials__heading {
    font-size: var(--mt-text-2xl);
    font-weight: var(--mt-weight-black);
    color: var(--mt-text-strong);
    margin: 0;
}

.mt-testimonials__stars {
    color: var(--mt-accent);
    font-size: var(--mt-text-sm);
    margin-bottom: var(--mt-space-3);
}

.mt-testimonials__text {
    font-size: var(--mt-text-md);
    color: var(--mt-text-body);
    line-height: var(--mt-leading-relaxed);
    margin: 0 0 var(--mt-space-5);
}

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

.mt-testimonials__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: var(--mt-radius-full);
    background: var(--mt-brand-primary-soft);
    color: var(--mt-brand-primary);
    font-weight: var(--mt-weight-bold);
    font-size: var(--mt-text-sm);
}

.mt-testimonials__author-meta {
    display: flex;
    flex-direction: column;
    line-height: var(--mt-leading-tight);
}

.mt-testimonials__name {
    font-size: var(--mt-text-sm);
    font-weight: var(--mt-weight-bold);
    color: var(--mt-text-strong);
}

.mt-testimonials__role {
    font-size: var(--mt-text-xs);
    color: var(--mt-text-muted);
}

/* ------------------------------------------------------------
   Composition: grid -- card grid, a compact multi-quote overview.
   ------------------------------------------------------------ */

.mt-testimonials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--mt-space-6);
}

.mt-testimonials__card {
    padding: var(--mt-space-6);
    border: 1px solid var(--mt-border-light);
    border-radius: var(--mt-radius-lg);
    background: var(--mt-surface-card);
    box-shadow: var(--mt-shadow-xs);
}

/* Real bug fix (whole-page design review round): `grid-template-columns:
   repeat(auto-fit, minmax(280px, 1fr))` collapses to a single 1fr track
   when there is exactly one real testimonial, stretching that lone card
   across the full content width — confirmed via real computed styles
   (card measured 1296px wide on a 1400px section). Long, unconstrained
   line length hurts readability for a real quote. Scoped to the 'grid'
   composition only (`:not(.mt-testimonials--spotlight)` — spotlight is
   already a deliberately wide, centered single-column treatment via its
   own flex layout and must not be affected).

   Fixed at the GRID level, not the item level — two earlier attempts at
   an item-level fix (max-width alone with justify-self:center, then with
   margin:0 auto instead) were both disproven by real computed styles:
   ANY non-default justify-self value, and margin:auto too, switch a grid
   ITEM's own sizing algorithm from "stretch to fill its track" to
   fit-content — for a short real quote this rendered a ~232px card
   nowhere near the intended ~480px cap, not a fixed, predictable width.
   Redefining the TRACK itself via `:has()` to a single, fixed-by-min()
   column (not a minmax() range, which has the exact same content-
   dependent-shrink problem one level up) forces the track to exactly
   min(480px, 100%) regardless of content length, with `justify-content:
   center` centering that one track within the row — the item then
   stretches (its own default) to fill that already-correctly-sized
   track. 2+ items are completely untouched (:has() with :only-child
   never matches). */
.mt-testimonials:not(.mt-testimonials--spotlight) .mt-testimonials__grid:has(.mt-testimonials__card:only-child) {
    grid-template-columns: min(480px, 100%);
    justify-content: center;
}

/* ------------------------------------------------------------
   Composition: spotlight -- large, centered, single-column
   pull-quotes, stacked. Better suited to just one or two
   weighty, prominent testimonials.
   ------------------------------------------------------------ */

.mt-testimonials--spotlight .mt-testimonials__grid {
    display: flex;
    flex-direction: column;
    gap: var(--mt-space-10);
    max-width: 720px;
    margin: 0 auto;
}

.mt-testimonials--spotlight .mt-testimonials__card {
    text-align: center;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

.mt-testimonials--spotlight .mt-testimonials__stars {
    display: flex;
    justify-content: center;
}

.mt-testimonials--spotlight .mt-testimonials__text {
    font-size: var(--mt-text-xl);
    font-weight: var(--mt-weight-medium);
    color: var(--mt-text-strong);
}

.mt-testimonials--spotlight .mt-testimonials__author {
    justify-content: center;
}
