/* SocialPost — Testimonials Marquee
   Base classes handle layout only.
   --theme classes inherit from your theme.
   --custom classes apply override typography.
   ------------------------------------------------------------------ */

.stm {
  position: relative;
  overflow: hidden;
  background: var(--stm-section-bg, #ffffff);
  padding: var(--stm-vpad, 96px) 0;
  isolation: isolate;
}

.stm__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

/* Eyebrow --------------------------------------------------------- */
.stm-eyebrow {
  color: var(--stm-accent, #2F56D5);
  text-transform: uppercase;
  letter-spacing: -0.005em;
  margin-bottom: 20px;
  display: inline-block;
}
.stm-eyebrow--theme {
  /* Inherit theme. Small nudge for the eyebrow feel without redefining typography. */
  font-weight: 800;
}
.stm-eyebrow--custom {
  font-family: var(--font-heading, 'Outfit', ui-sans-serif, system-ui, sans-serif);
  font-weight: 800;
  font-size: var(--stm-eyebrow-size-custom, 20px);
  line-height: 1.2;
}

/* Badge ----------------------------------------------------------- */
.stm-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(217, 217, 217, 0.25);
  border-radius: 100px;
  padding: 10px 22px;
  height: 50px;
  margin-bottom: 28px;
}
.stm-badge__logo { width: 24px; height: 24px; object-fit: contain; }
.stm-badge__text { font-size: 16px; color: #111; }

/* Heading --------------------------------------------------------- */
.stm-heading {
  margin: 0 auto 12px;
  color: var(--stm-heading-color, #000);
  text-wrap: balance;
  max-width: 18ch;
}
.stm-heading__line { display: block; }
.stm-heading--theme {
  /* Only layout — theme controls size / family / weight. */
}
.stm-heading--custom {
  font-family: var(--font-heading, 'Outfit', ui-sans-serif, system-ui, sans-serif);
  font-weight: 600;
  font-size: clamp(32px, 5vw, var(--stm-heading-size-custom, 64px));
  line-height: 1.26;
  letter-spacing: -0.01em;
}

/* Marquee --------------------------------------------------------- */
.stm-marquee {
  margin-top: 56px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.stm-track {
  display: flex;
  gap: 24px;
  width: max-content;
  padding: 8px 0;
  will-change: transform;
}

.stm--animated .stm-track {
  animation: stm-marquee var(--stm-duration, 55s) linear infinite;
}
.stm[data-direction="right"].stm--animated .stm-track {
  animation-direction: reverse;
}

@keyframes stm-marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.stm--pause-on-hover .stm-marquee:hover .stm-track,
.stm--pause-on-hover .stm-marquee:focus-within .stm-track {
  animation-play-state: paused;
}

.stm[data-marquee-paused="true"] .stm-track {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .stm--animated .stm-track {
    animation: none;
    transform: none;
    flex-wrap: wrap;
    justify-content: center;
  }
  .stm-marquee {
    -webkit-mask-image: none;
            mask-image: none;
  }
}

/* Card ------------------------------------------------------------ */
.stm-card {
  flex: 0 0 326px;
  width: 326px;
  min-height: 324px;
  background: var(--stm-card-bg, #fff);
  border: 1px solid var(--stm-card-border, rgba(0,0,0,0.1));
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  box-sizing: border-box;
}

.stm-card__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: #e9ecf5;
}
.stm-card__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stm-accent, #2F56D5);
  font-weight: 700;
  font-size: 22px;
  font-family: var(--font-heading, 'Outfit', ui-sans-serif, system-ui, sans-serif);
}

.stm-card__name {
  margin: 0;
  color: var(--stm-heading-color, #000);
}
.stm-card__name--theme {
  font-weight: 700;
}
.stm-card__name--custom {
  font-family: var(--font-body, 'Inter', ui-sans-serif, system-ui, sans-serif);
  font-weight: 700;
  font-size: var(--stm-name-size-custom, 20px);
  line-height: 1.3;
}

.stm-card__highlight {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: color-mix(in srgb, var(--stm-accent, #2F56D5) 14%, transparent);
  border-radius: 100px;
  max-width: 100%;
}
/* color-mix fallback for older browsers — approximate with a fixed tint. */
@supports not (background: color-mix(in srgb, red, blue)) {
  .stm-card__highlight { background: rgba(47, 86, 213, 0.14); }
}

.stm-card__highlight-emoji {
  font-size: 20px;
  line-height: 1;
}
.stm-card__highlight-text {
  font-family: var(--font-body, 'Inter', ui-sans-serif, system-ui, sans-serif);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--stm-accent, #2F56D5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stm-card__body {
  margin: 0;
  color: var(--stm-body-color, #111);
}
.stm-card__body p { margin: 0 0 8px; }
.stm-card__body p:last-child { margin-bottom: 0; }

.stm-card__body--theme {
  /* Inherit theme body. */
}
.stm-card__body--custom {
  font-family: var(--font-body, 'Inter', ui-sans-serif, system-ui, sans-serif);
  font-weight: 400;
  font-size: var(--stm-body-size-custom, 16px);
  line-height: 1.4;
}

/* Decorative gradient glow at bottom ------------------------------- */
.stm__blur {
  position: absolute;
  left: 50%;
  bottom: -120px;
  transform: translateX(-50%);
  width: 120%;
  height: 280px;
  background:
    radial-gradient(closest-side at 30% 50%, color-mix(in srgb, var(--stm-accent, #2F56D5) 22%, transparent), transparent 70%),
    radial-gradient(closest-side at 70% 50%, rgba(148, 115, 255, 0.22), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}
@supports not (background: color-mix(in srgb, red, blue)) {
  .stm__blur {
    background:
      radial-gradient(closest-side at 30% 50%, rgba(47,86,213,0.22), transparent 70%),
      radial-gradient(closest-side at 70% 50%, rgba(148,115,255,0.22), transparent 70%);
  }
}

/* Responsive ------------------------------------------------------- */
@media (max-width: 640px) {
  .stm-card { flex: 0 0 280px; width: 280px; min-height: 280px; padding: 20px; }
  .stm-heading--custom { font-size: clamp(28px, 8vw, 40px); }
  .stm-marquee { margin-top: 36px; }
}
