/* WhipWashPro -- Customer Testimonials (cinematic). Namespaced: #wwp-testimonials-root, .wwp-t-*, .wwp-testimonials-* */

#wwp-testimonials-root,
#wwp-testimonials-root *,
#wwp-testimonials-root *::before,
#wwp-testimonials-root *::after {
  box-sizing: border-box;
}

/* Neutralize the site theme's global blockquote::after decorative quote
   mark (wp-content/themes/eduvibe/assets/images/quote.png, applied via an
   unscoped theme selector with a background-image -- not ours, and not
   removable by `content` alone since the theme's rule wins on specificity).
   Our own quote styling is drawn entirely in markup/CSS below, not via
   pseudo-elements. !important is required here because this is cancelling
   a foreign, more-specific theme rule, not styling our own markup. */
#wwp-testimonials-root blockquote::before,
#wwp-testimonials-root blockquote::after,
#wwp-testimonials-root cite::before,
#wwp-testimonials-root cite::after {
  content: none !important;
  background-image: none !important;
  display: none !important;
}

#wwp-testimonials-root {
  --wwp-t-navy: #0a1628;
  --wwp-t-navy-2: #0d1e35;
  --wwp-t-blue: #1177fe;
  --wwp-t-blue-light: #4a9dff;
  --wwp-t-orange: #ff8a3d;
  --wwp-t-gold: #ffc94a;
  --wwp-t-white: #ffffff;
  --wwp-t-ink-soft: rgba(255,255,255,0.82);
  --wwp-t-ink-faint: rgba(255,255,255,0.6);
  --wwp-t-card-bg: rgba(255,255,255,0.94);
  --wwp-t-card-border: rgba(255,255,255,0.55);
  --wwp-t-radius: 18px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--wwp-t-navy);
  min-height: 900px;
}

@media (max-width: 1024px) {
  #wwp-testimonials-root { min-height: 0; }
}

/* ---------- Background stage ---------- */

.wwp-testimonials-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.wwp-t-stage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 50%;
  display: block;
}

.wwp-t-stage-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--wwp-t-navy) 0%, rgba(10,22,40,0.92) 22%, rgba(10,22,40,0.55) 46%, rgba(10,22,40,0.18) 64%, rgba(10,22,40,0.05) 100%),
    linear-gradient(180deg, rgba(10,22,40,0.35) 0%, rgba(10,22,40,0.05) 22%, rgba(10,22,40,0.05) 68%, rgba(10,22,40,0.85) 100%);
}

/* ---------- Layout shell ---------- */

.wwp-testimonials-inner {
  position: relative;
  z-index: 1;
  max-width: 1450px;
  margin: 0 auto;
  padding: 96px 40px 72px;
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 1024px) {
  .wwp-testimonials-inner {
    grid-template-columns: 1fr;
    padding: 56px 24px 48px;
  }
}

@media (max-width: 430px) {
  .wwp-testimonials-inner {
    padding: 40px 16px 36px;
  }
}

/* ---------- Copy column ---------- */

.wwp-testimonials-copy {
  padding-top: 8px;
}

.wwp-t-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--wwp-t-blue-light);
  margin-bottom: 14px;
}

.wwp-t-title {
  margin: 0 0 18px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  font-weight: 700;
  color: var(--wwp-t-white);
}

.wwp-t-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 16px;
  background: linear-gradient(90deg, var(--wwp-t-blue), var(--wwp-t-blue-light));
  border-radius: 4px;
}

.wwp-t-intro {
  font-size: 16px;
  line-height: 1.65;
  color: var(--wwp-t-ink-soft);
  max-width: 46ch;
}

.wwp-t-intro p { margin: 0; }

.wwp-t-intro a {
  color: var(--wwp-t-blue-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wwp-t-trust {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--wwp-t-ink-soft);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 8px 14px;
  border-radius: 999px;
}

.wwp-t-google-g { width: 16px; height: 16px; flex: none; }

.wwp-t-cta-row {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.wwp-t-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 13px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.wwp-t-cta-primary {
  background: var(--wwp-t-blue);
  color: var(--wwp-t-white);
  box-shadow: 0 8px 24px rgba(17,119,254,0.35);
}

.wwp-t-cta-primary:hover { background: #0e63d6; transform: translateY(-1px); }

.wwp-t-cta-secondary {
  background: transparent;
  color: var(--wwp-t-white);
  border: 1.5px solid rgba(255,255,255,0.5);
}

.wwp-t-cta-secondary:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); }

.wwp-t-cta:focus-visible {
  outline: 3px solid var(--wwp-t-blue-light);
  outline-offset: 3px;
}

.wwp-t-external-icon { width: 13px; height: 13px; }

.wwp-t-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Review grid / rail ---------- */

.wwp-testimonials-grid {
  display: grid;
  gap: 20px;
  padding-top: 8px;
}

/* Push the review column down on wide viewports so cards clear the
   technician's face/cap in the background stage instead of covering it --
   cards should only ever overlap the lower portion of the image. */
@media (min-width: 1025px) {
  .wwp-testimonials-grid { margin-top: 190px; }
}

@media (min-width: 1600px) {
  .wwp-testimonials-grid { margin-top: 230px; }
}

.wwp-t-featured-slot { display: block; }

.wwp-t-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding: 4px 4px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.35) transparent;
}

.wwp-t-rail:focus-visible {
  outline: 3px solid var(--wwp-t-blue-light);
  outline-offset: 3px;
}

.wwp-t-rail-track {
  display: flex;
  gap: 18px;
}

.wwp-t-rail::-webkit-scrollbar { height: 8px; }
.wwp-t-rail::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 8px; }

.wwp-t-rail-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}

.wwp-t-rail-prev,
.wwp-t-rail-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--wwp-t-white);
  cursor: pointer;
  transition: background 0.15s ease;
}

.wwp-t-rail-prev:hover,
.wwp-t-rail-next:hover { background: rgba(255,255,255,0.2); }

.wwp-t-rail-prev:focus-visible,
.wwp-t-rail-next:focus-visible {
  outline: 3px solid var(--wwp-t-blue-light);
  outline-offset: 2px;
}

.wwp-t-rail-prev svg,
.wwp-t-rail-next svg { width: 18px; height: 18px; }

.wwp-t-rail-prev:disabled,
.wwp-t-rail-next:disabled { opacity: 0.35; cursor: default; }

.wwp-t-rail-progress {
  font-size: 13px;
  font-weight: 700;
  color: var(--wwp-t-ink-faint);
  min-width: 44px;
  text-align: center;
}

/* No JS: hide the rail buttons/progress that would otherwise do nothing; the
   rail remains natively horizontally scrollable via touch/trackpad/keyboard. */
.wwp-t-rail-controls { display: none; }
#wwp-testimonials-root.wwp-t-js .wwp-t-rail-controls { display: flex; }

/* ---------- Review cards ---------- */

.wwp-t-card {
  margin: 0;
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: var(--wwp-t-card-bg);
  border: 1px solid var(--wwp-t-card-border);
  border-radius: var(--wwp-t-radius);
  padding: 22px 22px 20px;
  box-shadow: 0 18px 40px rgba(4,10,25,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wwp-t-card-featured {
  flex: none;
  width: 100%;
  padding: 28px 28px 24px;
  background: linear-gradient(165deg, #ffffff 0%, #f3f7ff 100%);
}

.wwp-t-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wwp-t-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  background: #dde6f5;
  flex: none;
}

.wwp-t-card-identity { min-width: 0; }

.wwp-t-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--wwp-t-navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wwp-t-name cite { font-style: normal; }

.wwp-t-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.wwp-t-date {
  font-size: 12.5px;
  color: #5b6b85;
}

.wwp-t-source { display: inline-flex; }

.wwp-t-stars {
  display: inline-flex;
  gap: 2px;
}

.wwp-t-star {
  width: 15px;
  height: 15px;
  fill: var(--wwp-t-gold);
}

.wwp-t-star-empty { fill: #e3e7ee; }

.wwp-t-quote {
  margin: 2px 0 0;
}

.wwp-t-quote-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: #2a3348;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wwp-t-card-featured .wwp-t-quote-text {
  font-size: 16.5px;
  -webkit-line-clamp: 7;
}

/* Expanded state (JS-driven "Read more") */
.wwp-t-card.wwp-t-expanded .wwp-t-quote-text {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.wwp-t-readmore {
  align-self: flex-start;
  margin-top: 2px;
  background: none;
  border: none;
  padding: 6px 0;
  min-height: 32px;
  color: var(--wwp-t-blue);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.wwp-t-readmore:focus-visible {
  outline: 2px solid var(--wwp-t-blue);
  outline-offset: 2px;
}

/* No-JS fallback: full text always visible, no clamp, no read-more control */
#wwp-testimonials-root:not(.wwp-t-js) .wwp-t-quote-text {
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* ---------- Reveal-on-scroll (progressive enhancement only) ---------- */

#wwp-testimonials-root.wwp-t-js .wwp-t-reveal,
#wwp-testimonials-root.wwp-t-js .wwp-t-card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#wwp-testimonials-root.wwp-t-js .wwp-t-in-view {
  opacity: 1;
  transform: translateY(0);
}

#wwp-testimonials-root.wwp-t-js .wwp-t-card.wwp-t-in-view:nth-child(1) { transition-delay: 0.02s; }
#wwp-testimonials-root.wwp-t-js .wwp-t-card.wwp-t-in-view:nth-child(2) { transition-delay: 0.08s; }
#wwp-testimonials-root.wwp-t-js .wwp-t-card.wwp-t-in-view:nth-child(3) { transition-delay: 0.14s; }
#wwp-testimonials-root.wwp-t-js .wwp-t-card.wwp-t-in-view:nth-child(4) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  #wwp-testimonials-root.wwp-t-js .wwp-t-reveal,
  #wwp-testimonials-root.wwp-t-js .wwp-t-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .wwp-t-rail { scroll-behavior: auto; }
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
  .wwp-testimonials-grid { grid-template-columns: 1fr 1fr; }
  .wwp-t-featured-slot { grid-column: 1 / -1; }
  .wwp-t-rail { grid-column: 1 / -1; }
  .wwp-t-card { flex-basis: 280px; }
}

@media (min-width: 601px) and (max-width: 1024px) {
  .wwp-testimonials-stage { position: relative; height: 340px; }
  .wwp-testimonials-inner { padding-top: 0; }
  #wwp-testimonials-root { min-height: 0; }
  .wwp-t-stage-overlay {
    background: linear-gradient(180deg, rgba(10,22,40,0.55) 0%, rgba(10,22,40,0.25) 50%, var(--wwp-t-navy) 100%);
  }
  .wwp-testimonials-inner { grid-template-columns: 1fr; }
  .wwp-testimonials-copy { padding-top: 24px; }
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
  #wwp-testimonials-root { min-height: 0; background: var(--wwp-t-navy-2); }
  .wwp-testimonials-stage { position: relative; height: 420px; }
  .wwp-t-stage-img { object-position: 50% 20%; }
  .wwp-t-stage-overlay {
    background: linear-gradient(180deg, rgba(10,22,40,0.15) 0%, rgba(10,22,40,0.35) 60%, var(--wwp-t-navy-2) 100%);
  }
  .wwp-testimonials-inner {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }
  .wwp-testimonials-copy { text-align: left; }
  .wwp-t-title { font-size: 26px; }
  .wwp-t-cta-row { flex-direction: column; }
  .wwp-t-cta { width: 100%; }
  .wwp-testimonials-grid { grid-template-columns: 1fr; }
  .wwp-t-card { flex-basis: 86vw; }
  .wwp-t-card-featured { padding: 22px 20px 20px; }
}

@media (max-width: 360px) {
  .wwp-t-card { flex-basis: 88vw; }
}

/* ---------- Full-bleed section background fix (outer gutter removal) ---------- */
/* Elementor container elementor-element-30b5f5a is boxed (max-width constrained)
   and the section's own dark background lives on the inner content-width wrapper
   (#wwp-testimonials-root), which also has overflow:hidden, so it cannot be
   stretched to the viewport directly. This adds a decorative full-viewport-width
   background layer on the OUTER Elementor container (outside that overflow:hidden
   wrapper) so the color reaches true left/right viewport edges. Purely additive:
   no existing element, HTML, or content position is modified. */
.elementor-element-30b5f5a::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  background: #0a1628;
  z-index: -1;
  pointer-events: none;
}
