/* ==========================================================================
   TESTIMONIALS — redesign: light panel, "spotlight" slider. Heading on the
   left, one card at a time on the right that slides in from the side. Works
   with the existing markup; js/testimonial-slider.js enhances it. Without JS
   the testimonials stack as clean cards.
   ========================================================================== */

body .outer-wrapper-testimonial {
  --ink: #0f243e;
  --lime: #a6cf37;
  --teal: #52cfae;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --pad: clamp(1rem, 4vw, 4.5rem);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: clamp(1.5rem, 4vw, 3rem) var(--pad);
  padding: clamp(2.25rem, 4.5vw, 3.75rem) clamp(1.25rem, 4vw, 4rem);
  border-radius: clamp(24px, 3.5vw, 40px);
  background:
    radial-gradient(48rem 24rem at 0% 0%, rgba(166, 207, 55, 0.26), transparent 70%),
    radial-gradient(40rem 24rem at 100% 100%, rgba(82, 207, 174, 0.2), transparent 70%),
    linear-gradient(165deg, #fbfdf4 0%, #f1f8e2 55%, #eaf6ee 100%);
  color: var(--ink);
  font-family: var(--sans);
  box-shadow: 0 50px 90px -56px rgba(15, 36, 62, 0.35);
}

/* the old decorative side images are not used in this design */
body .outer-wrapper-testimonial .right-absolute-img,
body .outer-wrapper-testimonial .left-side { display: none; }

body .outer-wrapper-testimonial .testimonial-main-wrapper { display: block; max-width: none; margin: 0; padding: 0; }
body .outer-wrapper-testimonial .right-side { width: 100%; }

/* ----- Layout: heading left, quote right --------------------------------- */
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .testimonial-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  text-align: center;
  align-items: center;
}
@media (min-width: 900px) {
  body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .testimonial-section {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
    column-gap: clamp(2rem, 5vw, 5rem);
    row-gap: 0.9rem;
    text-align: left;
  }
  body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .label { grid-column: 1; grid-row: 1; align-self: end; justify-self: start; }
  body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .heading-testimonial { grid-column: 1; grid-row: 2; align-self: start; text-align: left; margin: 0; }
  body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .testimonial { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
}

body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  justify-self: center;
  padding: 0.42rem 0.9rem 0.42rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 36, 62, 0.1);
  font: 800 0.72rem/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .label::before {
  content: "";
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--lime), var(--teal));
  box-shadow: 0 0 0 4px rgba(166, 207, 55, 0.3);
}
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .heading-testimonial {
  max-width: 11ch;
  margin: 0 auto;
  font: 300 clamp(2rem, 3.8vw, 3.2rem)/1.06 var(--serif);
  letter-spacing: -0.025em;
  text-transform: none;
  text-align: center;
  color: var(--ink);
  text-wrap: balance;
}
@media (max-width: 899px) {
  body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .heading-testimonial { max-width: 18ch; font-size: clamp(1.8rem, 6vw, 2.4rem); }
}
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .testimonial { margin-top: 0.5rem; }

/* ----- Card content (shared by the no-JS fallback and the slider) -------- */
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .main-testimonial { margin: 0; padding: 0; text-align: left; }
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .paragraph--type--testimonial { height: 100%; }
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .testimonial-content-wrapper {
  position: relative;
  height: 100%;
  padding: clamp(1.4rem, 2.8vw, 2.25rem);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.82) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 36px 70px -46px rgba(15, 36, 62, 0.4), 0 2px 0 rgba(255, 255, 255, 0.9) inset;
  text-align: left;
}
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .testimonial-content-wrapper .body,
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .testimonial-content-wrapper .qt__text {
  margin: 0;
  font: 300 clamp(1.1rem, 1.7vw, 1.45rem)/1.55 var(--serif);
  font-style: normal;
  letter-spacing: -0.005em;
  text-align: left;
  color: var(--ink);
}
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .testimonial-content-wrapper .body::before { content: none; }
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .testimonial-content-wrapper .body p { margin: 0; }
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .testimonial-content-wrapper .name {
  font: 800 0.95rem/1.2 var(--sans);
  color: var(--ink);
  text-align: left;
}
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .testimonial-content-wrapper .title {
  margin-top: 0.25rem;
  font: 700 0.7rem/1.2 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5d8510;
  text-align: left;
}
/* thin static gradient edge */
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .qt__slide .testimonial-content-wrapper::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--lime), rgba(166, 207, 55, 0) 45%, rgba(82, 207, 174, 0) 55%, var(--teal));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .qt__quote { display: block; margin-bottom: 0.9rem; line-height: 0; }
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .qt__quote svg { width: clamp(1.8rem, 2.6vw, 2.3rem); height: auto; }
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .qt__author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: clamp(1rem, 2vw, 1.4rem);
  padding-top: clamp(0.9rem, 1.8vw, 1.15rem);
  border-top: 1px solid rgba(15, 36, 62, 0.1);
}
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .qt__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lime), var(--teal));
  color: var(--ink);
  font: 800 0.9rem/1 var(--sans);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 12px 24px -10px rgba(120, 190, 40, 0.7);
}
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .qt__meta .name,
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .qt__meta .title { margin-top: 0; }
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .qt__meta .title { margin-top: 0.25rem; }

/* no-JS fallback: stacked cards */
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .main-testimonial:not(.qt) { display: grid; gap: 1rem; }
body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .main-testimonial:not(.qt) .testimonial-content-wrapper .name { margin-top: 1.25rem; }

/* ----- Slider (added by JS): the card slides in from the side ------------ */
body .outer-wrapper-testimonial .qt { outline: none; }
body .outer-wrapper-testimonial .qt:focus-visible .qt__stage { outline: 2px solid var(--ink); outline-offset: 8px; border-radius: 32px; }

body .outer-wrapper-testimonial .qt__stage { position: relative; touch-action: pan-y; }
body .outer-wrapper-testimonial .qt__slide {
  --travel: 150px;
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: none;
  transition: transform 0.85s var(--ease), opacity 0.55s ease, visibility 0s linear 0.85s;
}
body .outer-wrapper-testimonial .qt__slide[data-pos="before"] { transform: translateX(calc(var(--travel) * -1)) scale(0.96); }
body .outer-wrapper-testimonial .qt__slide[data-pos="after"]  { transform: translateX(var(--travel)) scale(0.96); }
body .outer-wrapper-testimonial .qt__slide[data-pos="0"] {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition-delay: 0s;
}
@media (max-width: 899px) { body .outer-wrapper-testimonial .qt__slide { --travel: 70px; } }

/* timer line under the card */
body .outer-wrapper-testimonial .qt__timer {
  position: relative;
  height: 3px;
  margin: 1.1rem 0 0;
  border-radius: 3px;
  background: rgba(15, 36, 62, 0.1);
  overflow: hidden;
}
body .outer-wrapper-testimonial .qt__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--lime), var(--teal));
  animation: qt-fill 7s linear forwards;
}
body .outer-wrapper-testimonial .qt.is-paused .qt__fill { animation-play-state: paused; }
body .outer-wrapper-testimonial .qt.is-user-paused .qt__fill { animation: none; width: 100%; opacity: 0.45; }
@keyframes qt-fill { from { width: 0; } to { width: 100%; } }

/* controls */
body .outer-wrapper-testimonial .qt__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
}
body .outer-wrapper-testimonial .qt__people { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
body .outer-wrapper-testimonial .qt__person {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  border: 1.5px solid transparent;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: rgba(15, 36, 62, 0.6);
  font: 800 0.72rem/1 var(--sans);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}
body .outer-wrapper-testimonial .qt__person:hover { color: var(--ink); background: #fff; transform: translateY(-2px); }
body .outer-wrapper-testimonial .qt__person.is-active {
  background: linear-gradient(135deg, var(--lime), var(--teal));
  color: var(--ink);
  box-shadow: 0 8px 18px -8px rgba(120, 190, 40, 0.8);
}
body .outer-wrapper-testimonial .qt__person:focus-visible,
body .outer-wrapper-testimonial .qt__btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

body .outer-wrapper-testimonial .qt__side { display: flex; align-items: center; gap: 0.5rem; flex: none; }
body .outer-wrapper-testimonial .qt__count {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-right: 0.4rem;
  font: 300 1.25rem/1 var(--serif);
  color: var(--ink);
}
body .outer-wrapper-testimonial .qt__sep { width: 1rem; height: 1px; background: rgba(15, 36, 62, 0.3); align-self: center; }
body .outer-wrapper-testimonial .qt__tot { font-size: 0.9rem; color: rgba(15, 36, 62, 0.5); }
body .outer-wrapper-testimonial .qt__btn {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  border: 1px solid rgba(15, 36, 62, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 22px -14px rgba(15, 36, 62, 0.4);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.3s var(--ease), border-color 0.25s ease;
}
body .outer-wrapper-testimonial .qt__btn:hover { background: var(--lime); border-color: var(--lime); transform: translateY(-2px); }
body .outer-wrapper-testimonial .qt__toggle { width: 2rem; height: 2rem; }

@media (max-width: 599px) {
  body .outer-wrapper-testimonial .qt__controls { flex-wrap: wrap; justify-content: center; gap: 0.9rem; }
  body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .testimonial-content-wrapper { border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  body .outer-wrapper-testimonial .qt__slide,
  body .outer-wrapper-testimonial .qt__slide[data-pos="before"],
  body .outer-wrapper-testimonial .qt__slide[data-pos="after"] { transition-duration: 0.01ms; transform: none; }
  body .outer-wrapper-testimonial .qt__fill { animation: none; width: 100%; }
}

/* desktop alignment (placed last so it wins over the base rules above) */
@media (min-width: 900px) {
  body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .label { justify-self: start; }
  body .outer-wrapper-testimonial .testimonial-main-wrapper .right-side .heading-testimonial { margin: 0; text-align: left; }
}
