/* =======================================================================
   7SEERS - TESTIMONIALS SHORTCODE STYLES
   Standalone, self-contained CSS for [s7_testimonials] shortcode.

   Re-synced from the current home.css "WHAT OUR COMMUNITY SAYS" carousel
   (the authoritative, most-iterated-on version of this component) so the
   shortcode renders and animates identically wherever it's dropped in —
   including the full "genie into dot" exit animation, which depends on
   testimonials.js measuring the dot/card on-screen and writing
   --exit-left/--exit-top/--exit-scale-x/--exit-scale-y onto the element
   right before it becomes .is-prev (see that file).
   ======================================================================= */

.s7-community-testimonials {
  background: var(--s7-ct-bg, #F7F4FD);
  padding: 110px 0 130px 0;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 54px;
}

.s7-community-testimonials *,
.s7-community-testimonials *::before,
.s7-community-testimonials *::after {
  box-sizing: border-box;
}

/* Scroll-reveal (progressive enhancement — driven by the sitewide
   main.js, which is already enqueued globally per this project's
   convention). Scoped to .s7-community-testimonials instead of .s7-home
   since this shortcode's root isn't wrapped in .s7-home — home.css's
   own [data-reveal] rule wouldn't reach these elements otherwise.
   Visible by default so nothing depends on this JS running. */
html.reveal-armed .s7-community-testimonials [data-reveal]:not(.is-visible) {
  opacity: 0;
  transform: translateY(20px);
}
.s7-community-testimonials [data-reveal] {
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  html.reveal-armed .s7-community-testimonials [data-reveal]:not(.is-visible) {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.s7-community-testimonials .s7-ct-header-container {
  width: 1200px;
  max-width: 92%;
  margin: 0 auto;
}

.s7-community-testimonials .s7-ct-heading-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.s7-community-testimonials .s7-ct-subheading {
  color: #613C73;
  font-family: var(--font-primary), 'Inter', sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px; /* 142.857% */
  margin: 0;
}

.s7-community-testimonials .s7-ct-heading {
  color: #2A0D38;
  font-family: var(--font-primary), 'Inter', sans-serif;
  font-size: 40px;
  font-style: normal;
  font-weight: 800;
  line-height: 48px; /* 120% */
  margin: 0;
}

.s7-community-testimonials .s7-ct-heading-bar {
  width: 220px;
  height: 4px;
  background: #D4C7F5;
  border-radius: 2px;
  margin-top: 0;
}

/* Full Width Stage Container */
.s7-community-testimonials .s7-ct-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Dots Track (Left side passed items - aligned with section heading left edge) */
.s7-community-testimonials .s7-ct-dots-track {
  position: absolute;
  left: max(4%, calc((100% - 1200px) / 2));
  top: 50%;
  transform: translateY(80px);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 20;
}

.s7-community-testimonials .s7-ct-dot {
  width: 40px;
  height: 40px;
  border-radius: 132px;
  background: #6E56F2;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(110, 86, 242, 0.35);
  animation: s7VanishIntoDot 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.35, 1), background 0.4s ease, box-shadow 0.4s ease;
}
.s7-community-testimonials .s7-ct-dot.is-active-dot {
  background: #6E56F2;
  transform: scale(1.15);
  box-shadow: 0 6px 18px rgba(110, 86, 242, 0.55);
}
.s7-community-testimonials .s7-ct-dot:hover {
  transform: scale(1.15);
}

@keyframes s7VanishIntoDot {
  0% {
    opacity: 0.3;
    transform: scale(0.3);
    box-shadow: 0 0 0 rgba(110, 86, 242, 0);
  }
  50% {
    transform: scale(1.3);
    box-shadow: 0 0 24px rgba(110, 86, 242, 0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 4px 14px rgba(110, 86, 242, 0.35);
  }
}

/* Main Figma Bounding Container (680.983px x 426px) shifted to right per Figma inspect */
.s7-community-testimonials .s7-ct-quote-box {
  position: relative;
  width: 680.983px;
  height: 426px;
  margin-left: 280px;
  flex-shrink: 0;
}

/* Background Quote SVG Graphic fills the 680.983px x 426px container */
.s7-community-testimonials .s7-ct-bg-quote {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
  opacity: 0.95;
}

/* Cards Track Layout inside 680.983px x 426px box */
.s7-community-testimonials .s7-ct-cards-track {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.s7-community-testimonials .s7-ct-card-wrapper {
  position: absolute;
  transform-origin: 10px 38px !important;
  transition-property: top, left, opacity, transform;
  transition-duration: 1100ms;
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.s7-community-testimonials .s7-ct-card-wrapper.is-next {
  transition-property: top, left, opacity, transform;
  transition-duration: 1100ms;
  transition: all 0.6s cubic-bezier(0, 0, 0.2, 1);
}

/* ACTIVE CARD STATE (Centered relative to stage, offset inside quote box) */
.s7-community-testimonials .s7-ct-card-wrapper.is-active {
  top: 73.25px;
  left: 0px;
  transform: scale(1) rotate(0deg);
  opacity: 1;
  z-index: 25;
  pointer-events: auto;
  transform-origin: 10px 38px !important;
}

/* ENTRANCE INITIAL STATE — Materializes / forms out of the exact center of the purple quote dot */
.s7-community-testimonials .s7-ct-card-wrapper.is-entering {
  top: 73.25px;
  left: 0px;
  transform: scale(0.05) rotate(4deg);
  opacity: 0;
  z-index: 9;
  pointer-events: none;
  transform-origin: 10px 38px !important;
}

/* NEXT PREVIEW CARD STATE — normal sliding card with full quote icon visible */
.s7-community-testimonials .s7-ct-card-wrapper.is-next {
  top: 73.25px;
  left: 660px;
  transform: scale(0.92);
  transform-origin: 10px 38px !important;
  opacity: 0.50;
  z-index: 4;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.55s 0.8s cubic-bezier(0, 0, 0.2, 1);
}
.s7-community-testimonials .s7-ct-card-wrapper.is-next .s7-ct-card {
  -webkit-mask-image: none !important;
  mask-image: none !important;
  box-shadow: -12px 0 24px -8px rgba(0, 0, 0, 0.12);
}

.s7-community-testimonials .s7-ct-card-wrapper.is-next .s7-ct-quote-badge,
.s7-community-testimonials .s7-ct-card-wrapper.is-next .s7-ct-labels-row {
  -webkit-mask-image: none !important;
  mask-image: none !important;
  opacity: 1 !important;
}

/* EXIT ANIMATION — two-stage "genie" collapse into the dot.
   The end position/size (--exit-top / --exit-left / --exit-scale-x /
   --exit-scale-y) are NOT guessed static offsets — testimonials.js
   measures the real dot's on-screen center and the card's real on-screen
   size right when a card becomes .is-prev, and writes them onto this
   element as inline custom properties. That's what makes the card
   actually land inside the dot at any viewport width/dot position,
   instead of drifting whenever the layout changes. The px/scale
   fallbacks below only apply if that measurement never ran (e.g. JS
   disabled). transform-origin is pinned to the quote-icon circle's
   center (top:10px; left:-18px; 56x56 — see .s7-ct-quote-badge below)
   for the whole animation. */
.s7-community-testimonials .s7-ct-card-wrapper.is-prev {
  top: 73.25px;
  left: 0px;
  transform-origin: 10px 38px !important;
  animation: 1100ms cubic-bezier(0, 0, 0.2, 1) 0s 1 normal both running s7CtExitToDot;
  z-index: 15;
  pointer-events: none;
  transition: none; /* superseded by the keyframe animation above */
  will-change: transform, opacity;
}

@keyframes s7CtExitToDot {
  from {
    transform: translate(0px, 0px) scale(1, 1);
    opacity: 1;
  }
  to {
    transform: translate(
        calc(var(--exit-left, -660px) - 0px),
        calc(var(--exit-top, 209px) - 73.25px)
      )
      scale(var(--exit-scale-x, 0.07), var(--exit-scale-y, 0.19));
    opacity: 0;
  }
}

/* Inner card's shape tightens toward a full pill/circle as it shrinks,
   in lockstep with the wrapper animation above. */
.s7-community-testimonials .s7-ct-card-wrapper.is-prev .s7-ct-card {
  animation: s7CtExitCardShape 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes s7CtExitCardShape {
  0%   { border-radius: 168px; }
  25%  { border-radius: 999px; }
  100% { border-radius: 999px; }
}

/* Quote text stays fully visible and shrinks in place along with the
   rest of the card during exit; smaller flat font + 2-line clamp so it
   doesn't overflow/wrap messily as the box narrows faster than it
   shortens. */
.s7-community-testimonials .s7-ct-card-wrapper.is-prev .s7-ct-quote-text {
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* Accessibility: skip straight to the resting (vanished) state instead
   of animating the collapse. */
@media (prefers-reduced-motion: reduce) {
  .s7-community-testimonials .s7-ct-card-wrapper.is-prev,
  .s7-community-testimonials .s7-ct-card-wrapper.is-prev .s7-ct-card,
  .s7-community-testimonials .s7-ct-card-wrapper.is-prev .s7-ct-quote-text,
  .s7-community-testimonials .s7-ct-card-wrapper.is-prev .s7-ct-labels-row {
    animation: none;
  }
  .s7-community-testimonials .s7-ct-card-wrapper.is-prev {
    top: var(--exit-top, 209px);
    left: var(--exit-left, -660px);
    transform: scale(var(--exit-scale-x, 0.07), var(--exit-scale-y, 0.19));
    opacity: 0;
  }
}

/* HIDDEN CARDS OFF-SCREEN ON DESKTOP */
.s7-community-testimonials .s7-ct-card-wrapper.is-hidden {
  top: 73.25px;
  left: 1200px;
  opacity: 0;
  pointer-events: none;
}

/* Inner Card Style */
.s7-community-testimonials .s7-ct-card {
  position: relative;
  width: 558.755px;
  max-width: 100%;
  min-height: 208px;
  padding: 24px 64px 50px;
  padding-bottom: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  border-radius: 168px;
  background: #FFF;
  box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.07);
  box-sizing: border-box;
}

/* Desktop-only nudge — mobile centers the card via the wrapper's own
   transform (see @media max-width:1023px below), so this stays scoped
   to >=1024px instead of touching the base rule. */
@media (min-width: 1024px) {
  .s7-community-testimonials .s7-ct-card {
    left: -350px;
  }

  /* Active/next wrapper positions shifted the same +127px to the right
     as the .s7-ct-card nudge above, so the whole stage (card + wrapper)
     moves right in lockstep instead of the inner card sliding left
     relative to a wrapper that stayed put. */
  .s7-community-testimonials .s7-ct-card-wrapper.is-active {
    left: 127px;
  }
  .s7-community-testimonials .s7-ct-card-wrapper.is-next {
    left: 787px;
  }
}

/* Circle Quote Badge at top-left */
.s7-community-testimonials .s7-ct-quote-badge {
  position: absolute;
  top: 10px;
  left: -18px;
  width: 56px;
  height: 56px;
  z-index: 12;
}

/* Labels Row */
.s7-community-testimonials .s7-ct-labels-row {
  display: flex;
  align-items: center;
  justify-content: space-between; /* spreads label 1 (left) and label 2
    (right) apart when both exist; with only one label present, this
    behaves like flex-start, so it just sits at the left where label 1
    would've been — no separate margin-left:auto needed on either label */
  gap: 12px;
  width: 100%;
}

.s7-community-testimonials .s7-ct-label {
  display: flex;
  padding: 6px 10px;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  box-sizing: border-box;
}

.s7-community-testimonials .s7-ct-label--readiness {
  border: 1px solid #F7F4FD;
  background: #F7F4FD;
}

.s7-community-testimonials .s7-ct-label--tpo {
  border: 1px solid #E5E7EB;
  background: #FFF;
}

.s7-community-testimonials .s7-ct-label-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.s7-community-testimonials .s7-ct-label span {
  color: #2A0D38;
  font-family: var(--font-primary), 'Inter', sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
}

/* Special / Highlight Quote Field (shortcode-only addition, rendered
   ONLY when the "highlight_quote" ACF value is non-empty — otherwise the
   template skips this element entirely and only the testimonial itself
   shows). margin-bottom is 6px, not the requested 18px, on purpose: the
   parent .s7-ct-card already applies a 12px flex `gap` between every
   child, so 12px(gap) + 6px(margin) = the requested 18px total visual
   gap down to .s7-ct-quote-text right below it — bumping margin to a
   full 18px here would have doubled up with that gap for 30px instead. */
.s7-community-testimonials .s7-ct-special-quote {
  color: #2A0D38;
  font-family: var(--font-primary), 'Inter', sans-serif;
  font-size: 17px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin: 0 0 6px 0;
}

/* Main Quote Text (the testimonial itself) */
.s7-community-testimonials .s7-ct-quote-text {
  color: #2A0D38;
  font-family: var(--font-primary), 'Inter', sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%; /* 24px */
  margin: 0;
}

/* Author Badge (Pill overlapping bottom - aligned RIGHT) */
.s7-community-testimonials .s7-ct-author-badge {
  position: absolute;
  bottom: -40px;
  right: 0px;
  left: auto;
  transform: none;
  display: flex;
  width: auto;
  max-width: 90%;
  padding: 13px 30px 13px 13px;
  padding-right: 30px;
  align-items: center;
  gap: 12px;
  border-radius: 40px;
  background: #6E56F2;
  box-shadow: 0 10px 24px rgba(110, 86, 242, 0.25);
  z-index: 15;
  box-sizing: border-box;
}

.s7-community-testimonials .s7-ct-author-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.s7-community-testimonials .s7-ct-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.s7-community-testimonials .s7-ct-author-name {
  color: #FFF;
  font-family: var(--font-primary), 'Inter', sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

.s7-community-testimonials .s7-ct-author-role {
  color: #F3E8FF;
  font-family: var(--font-primary), 'Inter', sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
  .s7-community-testimonials .s7-ct-quote-box { margin: 0 auto; transform: scale(0.9); }
  .s7-community-testimonials .s7-ct-dots-track { left: max(4%, calc((100% - 1200px) / 2)); }
}

@media (max-width: 1023px) {
  .s7-community-testimonials {
    padding: 64px 16px 80px 16px;
    min-height: auto;
    gap: 32px;
  }

  .s7-community-testimonials .s7-ct-stage {
    position: relative;
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
  }

  .s7-community-testimonials .s7-ct-quote-box {
    order: 1;
    position: relative;
    width: 100%;
    max-width: 520px;
    height: auto;
    min-height: 320px;
    margin: 0 auto;
    transform: none;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Background Quote SVG centered clearly as a decorative backdrop */
  .s7-community-testimonials .s7-ct-bg-quote {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 440px;
    height: auto;
    opacity: 0.30;
    z-index: 1;
    pointer-events: none;
  }

  .s7-community-testimonials .s7-ct-cards-track {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
  }

  .s7-community-testimonials .s7-ct-card-wrapper {
    position: absolute;
    top: 0;
    left: 50% !important;
    width: 100%;
    max-width: 520px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(120%) scale(0.95) !important;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.35, 1), opacity 0.4s ease;
    display: block !important;
  }

  /* ACTIVE CARD (Centered) */
  .s7-community-testimonials .s7-ct-card-wrapper.is-active {
    transform: translateX(-50%) scale(1) !important;
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
  }

  /* NEXT CARD (Waits on the right offscreen) */
  .s7-community-testimonials .s7-ct-card-wrapper.is-next {
    transform: translateX(120%) scale(0.95) !important;
    opacity: 0;
    z-index: 4;
    pointer-events: none;
  }

  /* PREV CARD (Slides off to the left offscreen) */
  .s7-community-testimonials .s7-ct-card-wrapper.is-prev {
    transform: translateX(-220%) scale(0.95) !important;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
  }

  /* HIDDEN CARDS */
  .s7-community-testimonials .s7-ct-card-wrapper.is-hidden {
    transform: translateX(150%) scale(0.90) !important;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
  }

  /* Passed dots Track placed BELOW the card with specific spacing */
  .s7-community-testimonials .s7-ct-dots-track {
    order: 2;
    position: relative;
    inset: auto;
    top: auto;
    left: auto;
    bottom: auto;
    transform: none !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 56px;
    z-index: 20;
  }
}

@media (max-width: 767px) {
  .s7-community-testimonials {
    padding: 48px 16px;
  }
  .s7-community-testimonials .s7-ct-heading {
    font-size: 30px;
    line-height: 38px;
  }
  .s7-community-testimonials .s7-ct-heading-bar {
    width: 160px;
  }
  .s7-community-testimonials .s7-ct-quote-box {
    max-width: 100%;
    min-height: 400px;
  }
  .s7-community-testimonials .s7-ct-cards-track {
    min-height: 300px;
  }
  .s7-community-testimonials .s7-ct-card-wrapper {
    max-width: 100%;
  }
  /* Card Sizing & Min-Height to prevent overflow */
  .s7-community-testimonials .s7-ct-card {
    width: 100%;
    min-height: 250px;
    padding: 24px 24px 44px 24px;
    border-radius: 36px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .s7-community-testimonials .s7-ct-quote-text {
    font-size: 14px;
    line-height: 22px;
  }
  .s7-community-testimonials .s7-ct-quote-badge {
    width: 44px;
    height: 44px;
    top: -12px;
    left: -10px;
  }
  .s7-community-testimonials .s7-ct-author-badge {
    width: calc(100% - 32px);
    max-width: 340px;
    padding: 6px 14px 6px 6px;
    bottom: -28px;
    gap: 10px;
  }
  .s7-community-testimonials .s7-ct-author-img {
    width: 38px;
    height: 38px;
  }
  .s7-community-testimonials .s7-ct-author-name {
    font-size: 15px;
  }
  .s7-community-testimonials .s7-ct-author-role {
    font-size: 13px;
  }
  .s7-community-testimonials .s7-ct-dots-track {
    margin-top: 52px;
  }
  .s7-community-testimonials .s7-ct-dot {
    width: 28px;
    height: 28px;
    background: #D4C7F5;
    box-shadow: none;
  }
  .s7-community-testimonials .s7-ct-dot.is-active-dot {
    background: #6E56F2;
    transform: scale(1.2);
    box-shadow: 0 4px 14px rgba(110, 86, 242, 0.45);
  }
}
