/* Optimal Access Testimonials — self-contained dark carousel.
   Scoped to .oa-testi (the shortcode wrapper) so nothing leaks. */

html body .oa-testi {
  --oa-ground:   #11151b;
  --oa-ground-2: #171d25;
  --oa-ground-3: #1e2630;
  --oa-rule:     rgba(255,255,255,.10);
  --oa-text:     #e8ecf1;
  --oa-dim:      #b7c2ce;
  --oa-teal:     #4fd1c5;
  position: relative;
  background: var(--oa-ground);
  color: var(--oa-text);
  padding: clamp(24px, 3vw, 40px) clamp(16px, 2.5vw, 34px);
  border-radius: 16px;
  box-sizing: border-box;
}
html body .oa-testi *, .oa-testi *::before, .oa-testi *::after { box-sizing: border-box; }

html body .oa-testi .oa-testi-viewport { overflow: hidden; }

html body .oa-testi .oa-quotes {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  grid-template-columns: none !important;
  gap: clamp(14px, 1.6vw, 22px);
  margin: 0;
  padding: 0 0 2px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
html body .oa-testi .oa-quotes::-webkit-scrollbar { display: none; }

html body .oa-testi .oa-quote {
  flex: 0 0 calc((100% - 2 * clamp(14px, 1.6vw, 22px)) / 3) !important;
  width: calc((100% - 2 * clamp(14px, 1.6vw, 22px)) / 3) !important;
  max-width: none !important;
  min-width: 0;
  scroll-snap-align: start;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--oa-ground-2) !important;
  border: 1px solid var(--oa-rule);
  border-radius: 14px;
  padding: clamp(20px, 2.4vw, 28px);
  align-self: stretch;
}

html body .oa-testi .oa-quote-body {
  margin: 0;
  border: 0;
  padding: 0;
  /* Do NOT grow: a stretched clamped box paints overlapping lines in WebKit. */
  flex: 0 1 auto;
  font-family: Georgia, "Newsreader", serif;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.65;
  color: var(--oa-dim) !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  display: block !important;
  max-height: 13.2em; /* ~8 lines at 1.65 line-height */
  overflow: hidden !important;
}
html body .oa-testi .oa-quote-body.is-open {
  display: block !important;
  max-height: none !important;
  overflow: visible !important;
}
html body .oa-testi .oa-quote-body p,
html body .oa-testi .oa-quote-body span,
html body .oa-testi .oa-quote-body li {
  color: var(--oa-dim) !important;
  background: transparent !important;
}
html body .oa-testi .oa-quote-body p { margin: 0 0 .7em; }
html body .oa-testi .oa-quote-body p:last-child { margin-bottom: 0; }
html body .oa-testi .oa-quote-body a { color: var(--oa-teal) !important; }

html body .oa-testi .oa-quote-body::before {
  content: "\201C";
  display: block;
  font-size: 40px;
  line-height: .6;
  color: var(--oa-teal);
  opacity: .45;
  margin-bottom: 10px;
}

html body .oa-testi .oa-quote-more {
  align-self: flex-start;
  background: none !important;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--oa-teal) !important;
  box-shadow: none;
}
html body .oa-testi .oa-quote-more:hover { text-decoration: underline; }
html body .oa-testi .oa-quote-more[hidden] { display: none !important; }

html body .oa-testi .oa-quote figcaption {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--oa-rule);
  padding-top: 14px;
}
html body .oa-testi .oa-quote figcaption img,
html body .oa-testi .oa-quote-initial {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px var(--oa-ground-2), 0 0 0 3px var(--oa-teal);
}
html body .oa-testi .oa-quote-initial {
  display: grid;
  place-items: center;
  background: var(--oa-ground-3);
  font-weight: 600;
  color: var(--oa-teal);
}
html body .oa-testi .oa-quote figcaption b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--oa-text) !important;
}
html body .oa-testi .oa-quote figcaption small {
  display: block;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--oa-teal) !important;
}

/* arrows */
html body .oa-testi .oa-testi-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--oa-ground-3);
  border: 1px solid var(--oa-rule);
  color: var(--oa-text) !important;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  transition: background .18s ease, border-color .18s ease, opacity .18s ease;
}
html body .oa-testi .oa-testi-nav:hover:not(:disabled) {
  background: var(--oa-teal);
  border-color: var(--oa-teal);
  color: #061a18 !important;
}
html body .oa-testi .oa-testi-nav:disabled { opacity: .3; cursor: default; }
html body .oa-testi .oa-testi-prev { left: 6px; }
html body .oa-testi .oa-testi-next { right: 6px; }

/* dots */
html body .oa-testi .oa-testi-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
html body .oa-testi .oa-testi-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  cursor: pointer;
}
html body .oa-testi .oa-testi-dots button.is-active { background: var(--oa-teal); }

@media (max-width: 1080px) {
  html body .oa-testi .oa-quote { flex-basis: calc((100% - clamp(14px, 1.6vw, 22px)) / 2) !important; width: calc((100% - clamp(14px, 1.6vw, 22px)) / 2) !important; }
}
@media (max-width: 720px) {
  html body .oa-testi .oa-quote { flex-basis: 100% !important; width: 100% !important; }
  html body .oa-testi .oa-testi-nav { display: none !important; }
}


/* ------------------------------------------------------------------
 * Hard resets against theme styling (white blockquote panels etc.)
 * ------------------------------------------------------------------ */
html body .oa-testi blockquote,
html body .oa-testi blockquote *,
html body .oa-testi figure,
html body .oa-testi figcaption {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-left: 0 !important;
  box-shadow: none !important;
  quotes: none;
}
html body .oa-testi blockquote::before,
html body .oa-testi blockquote::after { content: none; }
html body .oa-testi .oa-quote-body::before { content: "\201C" !important; }
html body .oa-testi .oa-quote { background: #171d25 !important; }
html body .oa-testi .oa-quote-body,
html body .oa-testi .oa-quote-body * { color: #b7c2ce !important; }
html body .oa-testi .oa-quote figcaption b,
html body .oa-testi .oa-quote figcaption b * { color: #e8ecf1 !important; }

html body .oa-testi .oa-quote-body,
html body .oa-testi .oa-quote-body p,
html body .oa-testi .oa-quote-body div,
html body .oa-testi .oa-quote-body span {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}
