/* SocialPost — Testimonials Marquee
   Header row puts the eyebrow next to a Google review badge.
   When animation is OFF, testimonials render as a centered, non-repeating grid.
   ------------------------------------------------------------------ */

.stm {
  position: relative;
  overflow: hidden;
  background: transparent;            /* inherits from theme/page */
  padding: var(--stm-vpad, 96px) 0;
  isolation: isolate;
}

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

/* Header row (eyebrow + badge) ------------------------------------ */
.stm-header-row {
  display: flex;
  align-items: center;
  justify-content: var(--stm-hr-align, center);
  flex-wrap: wrap;
  gap: var(--stm-hr-gap, 16px);
  margin-bottom: 24px;
}

/* Eyebrow --------------------------------------------------------- */
.stm-eyebrow {
  color: var(--stm-accent, #2F56D5);
  text-transform: uppercase;
  letter-spacing: -0.005em;
  display: inline-block;
  white-space: nowrap;
}
.stm-eyebrow--theme {
  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, 22px);
  line-height: 1.2;
}

/* Badge ----------------------------------------------------------- */
.stm-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--stm-badge-bg, rgba(217,217,217,0.25));
  border-radius: 100px;
  padding: 8px 18px;
  height: 50px;
  box-sizing: border-box;
  white-space: nowrap;
}

.stm-badge__logo {
  width: var(--stm-badge-logo-size, 24px);
  height: var(--stm-badge-logo-size, 24px);
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
}

.stm-badge__sep {
  display: inline-block;
  width: 1px;
  height: 24px;
  background: var(--stm-badge-sep, rgba(0,0,0,0.18));
  flex: 0 0 auto;
}

.stm-badge__rating {
  font-family: var(--font-heading, 'Outfit', ui-sans-serif, system-ui, sans-serif);
  font-weight: 600;
  font-size: var(--stm-badge-rating-size, 22px);
  line-height: 1;
  color: #111;
  letter-spacing: -0.01em;
}

.stm-badge__stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--stm-badge-stars-color, #FBBC04);
  flex: 0 0 auto;
}

.stm-badge__star {
  width: var(--stm-badge-stars-size, 16px);
  height: var(--stm-badge-stars-size, 16px);
  display: block;
}

/* 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;
}

/* === Static (animation off) — center, wrap, no fade mask === */
.stm--static .stm-marquee {
  -webkit-mask-image: none;
          mask-image: none;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}
.stm--static .stm-track {
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  animation: none !important;
  transform: none !important;
}

@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: #ffffff;                /* solid white card */
  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%;
}
@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; }
  .stm-header-row { gap: 10px; }
  .stm-badge { padding: 6px 14px; height: 42px; }
  .stm-badge__rating { font-size: 18px; }
}

/* ── Video slider ─────────────────────────────────────────────────── */
.stm-vslider {
  margin-top: 64px;
  position: relative;
}

.stm-vslider__heading {
  margin: 0 auto 32px;
  color: var(--stm-heading-color, #000);
  text-align: center;
  font-family: var(--font-heading, 'Outfit', ui-sans-serif, system-ui, sans-serif);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.26;
  letter-spacing: -0.01em;
}

.stm-vslider__outer {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 52px;
}

.stm-vslider__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 0 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.stm-vslider__track::-webkit-scrollbar { display: none; }
.stm-vslider__track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

/* Card — exactly 3 per view, gaps accounted for */
.stm-vcard {
  flex: 0 0 calc((100% - 40px) / 3);
  width: calc((100% - 40px) / 3);
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--stm-card-border, rgba(0,0,0,0.1));
  border-radius: 16px;
  overflow: hidden;
  box-sizing: border-box;
}

/* Thumbnail — 16:9 */
.stm-vcard__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #2A2F45;
  overflow: hidden;
}
.stm-vcard__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 250ms ease;
}
.stm-vcard:hover .stm-vcard__thumb img { transform: scale(1.03); }
.stm-vcard__thumb iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* HubSpot videoplayer embed container */
.stm-vcard__thumb .hs-video-widget,
.stm-vcard__thumb .hs-video-embed { position: absolute; inset: 0; width: 100%; height: 100%; }
.stm-vcard__thumb iframe           { position: absolute; inset: 0; width: 100%; height: 100%; border: none; display: block; }
.stm-vcard__thumb video            { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Play button */
.stm-vcard__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 150ms ease;
}
.stm-vcard__play:hover { transform: scale(1.1); }
.stm-vcard__play svg {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.3));
}
.stm-vcard__play.is-hidden { display: none; }

/* Card info */
.stm-vcard__info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stm-vcard__title {
  font-family: var(--font-body, 'Inter', ui-sans-serif, system-ui, sans-serif);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: var(--stm-heading-color, #000);
}
.stm-vcard__plan {
  font-family: var(--font-body, 'Inter', ui-sans-serif, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 400;
  color: #888;
  line-height: 1.4;
}
.stm-vcard__quote {
  font-family: var(--font-body, 'Inter', ui-sans-serif, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 400;
  color: var(--stm-body-color, #111);
  line-height: 1.5;
  margin-top: 6px;
}

/* Nav arrows */
.stm-vslider__nav {
  position: absolute;
  top: calc(300px * 9/16 / 2); /* vertically centered on the thumb area */
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  z-index: 2;
  transition: box-shadow 150ms ease, opacity 150ms ease;
  padding: 0;
}
.stm-vslider__nav:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
.stm-vslider__nav:focus { outline: none; }
.stm-vslider__nav--prev { left: 6px; }
.stm-vslider__nav--next { right: 6px; }
.stm-vslider__nav svg { width: 20px; height: 20px; }
.stm-vslider__nav[disabled] { opacity: 0.3; cursor: default; pointer-events: none; }

@media (max-width: 640px) {
  .stm-vcard { flex: 0 0 100%; width: 100%; }
  .stm-vslider__nav { display: none; }
  .stm-vslider__outer { padding: 0; }
  .stm-vslider__track { padding: 8px 0 20px; }
}

/* ── Video modal lightbox ─────────────────────────────────────────── */
.stm-vmodal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  animation: stm-vmodal-in 180ms ease;
}
@keyframes stm-vmodal-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.stm-vmodal__inner {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
}
.stm-vmodal__close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.8;
  transition: opacity 120ms;
}
.stm-vmodal__close:hover { opacity: 1; }
.stm-vmodal__close:focus { outline: none; }
.stm-vmodal__player {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.stm-vmodal__player iframe,
.stm-vmodal__player video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
