/* WhipWashPro — "Services in Motion" curved 3D service carousel.
   Namespaced wwp-svc- throughout so this never collides with the hero,
   manifesto, van-story, the theme, or any other Elementor section. */

#wwp-svc-root, #wwp-svc-root * { box-sizing: border-box; }

#wwp-svc-root {
  --wwp-svc-navy: #04081a;
  --wwp-svc-blue: #2d8eff;
  --wwp-svc-orange: #ff7a1f;
  --wwp-svc-white: #ffffff;
  --wwp-svc-support: rgba(255, 255, 255, 0.78);
  --wwp-svc-track-vh: 380vh;

  position: relative;
  background: var(--wwp-svc-navy);
  color: var(--wwp-svc-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: clip;
}

/* ── scroll track / sticky stage (desktop only — see mobile block) ── */

#wwp-svc-track {
  position: relative;
  height: var(--wwp-svc-track-vh);
}

#wwp-svc-stage {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  background: var(--wwp-svc-navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vh, 56px) 0;
}

/* ── header ──────────────────────────────────────────────────────── */

.wwp-svc-header {
  text-align: center;
  margin-bottom: clamp(24px, 4vh, 48px);
  padding: 0 20px;
}

.wwp-svc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wwp-svc-blue);
}
.wwp-svc-eyebrow::before,
.wwp-svc-eyebrow::after {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--wwp-svc-blue);
  display: inline-block;
}

.wwp-svc-header h2 {
  margin: 14px 0 0;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.02;
  font-size: clamp(30px, 4.2vw, 56px);
  color: var(--wwp-svc-white);
}

/* ── carousel viewport / 3D stage ───────────────────────────────── */

.wwp-svc-viewport {
  position: relative;
  width: 100%;
  max-width: 1500px;
  height: clamp(340px, 46vh, 460px);
  perspective: 1800px;
  perspective-origin: 50% 45%;
  outline: none;
  touch-action: pan-y;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.wwp-svc-viewport:active { cursor: grabbing; }
.wwp-svc-viewport:focus-visible {
  box-shadow: 0 0 0 3px rgba(45, 142, 255, 0.6);
  border-radius: 12px;
}

#wwp-svc-stagearea {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

/* ── cards ───────────────────────────────────────────────────────── */

.wwp-svc-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(220px, 22vw, 320px);
  height: clamp(280px, 38vh, 400px);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  color: var(--wwp-svc-white);
  background: #0a1424;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  will-change: transform, opacity;
  backface-visibility: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  pointer-events: auto;
}

.wwp-svc-card.wwp-svc-card-active {
  border-color: rgba(45, 142, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(45, 142, 255, 0.3), 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 0 40px rgba(45, 142, 255, 0.25);
}

.wwp-svc-card:focus-visible {
  outline: 2px solid var(--wwp-svc-orange);
  outline-offset: 3px;
}

.wwp-svc-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.wwp-svc-card-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 8, 20, 0.05) 0%, rgba(4, 8, 20, 0.15) 40%, rgba(4, 8, 20, 0.92) 100%);
  pointer-events: none;
}

.wwp-svc-card-num {
  position: absolute;
  top: 16px;
  left: 18px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--wwp-svc-orange);
  z-index: 2;
  background: rgba(4, 8, 20, 0.45);
  padding: 3px 9px;
  border-radius: 5px;
}

.wwp-svc-card-body {
  position: relative;
  z-index: 2;
  padding: 16px 18px 20px;
}

.wwp-svc-card-title {
  display: block;
  font-size: clamp(15px, 1.4vw, 19px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.wwp-svc-card-desc {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--wwp-svc-support);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}

.wwp-svc-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wwp-svc-blue);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.wwp-svc-card-cta svg { width: 13px; height: 13px; }

.wwp-svc-card-active .wwp-svc-card-desc { max-height: 90px; opacity: 1; }
.wwp-svc-card-active .wwp-svc-card-cta { opacity: 1; transform: translateY(0); }

/* ── arrows ──────────────────────────────────────────────────────── */

.wwp-svc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(4, 8, 26, 0.55);
  color: var(--wwp-svc-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}
.wwp-svc-arrow:hover { border-color: var(--wwp-svc-blue); background: rgba(45, 142, 255, 0.18); }
.wwp-svc-arrow:focus-visible { outline: 2px solid var(--wwp-svc-orange); outline-offset: 2px; }
.wwp-svc-arrow svg { width: 20px; height: 20px; }
.wwp-svc-arrow[disabled] { opacity: 0.3; cursor: default; pointer-events: none; }
.wwp-svc-prev { left: clamp(6px, 2vw, 28px); }
.wwp-svc-next { right: clamp(6px, 2vw, 28px); }

/* ── dots + progress ─────────────────────────────────────────────── */

.wwp-svc-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(16px, 3vh, 28px);
}
.wwp-svc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.wwp-svc-dot:hover { background: rgba(255, 255, 255, 0.5); }
.wwp-svc-dot.wwp-svc-dot-active { background: var(--wwp-svc-blue); transform: scale(1.35); }
.wwp-svc-dot:focus-visible { outline: 2px solid var(--wwp-svc-orange); outline-offset: 2px; }

.wwp-svc-progress {
  width: min(220px, 40vw);
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  margin: 10px auto 0;
}
#wwp-svc-progressbar {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--wwp-svc-orange), var(--wwp-svc-blue));
}

/* ── static / reduced-motion / no-js fallback: plain accessible grid ── */

#wwp-svc-root.wwp-svc-static #wwp-svc-track,
.wwp-svc-noscript-fallback #wwp-svc-track { height: auto; }
#wwp-svc-root.wwp-svc-static #wwp-svc-stage,
.wwp-svc-noscript-fallback #wwp-svc-stage {
  position: relative;
  height: auto;
  min-height: 0;
  padding: clamp(48px, 8vh, 88px) 20px;
}
#wwp-svc-root.wwp-svc-static .wwp-svc-viewport,
.wwp-svc-noscript-fallback .wwp-svc-viewport {
  height: auto;
  max-width: 1400px;
  perspective: none;
  cursor: default;
  touch-action: auto;
}
#wwp-svc-root.wwp-svc-static #wwp-svc-stagearea,
.wwp-svc-noscript-fallback #wwp-svc-stagearea {
  position: static;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  transform: none !important;
}
#wwp-svc-root.wwp-svc-static .wwp-svc-card,
.wwp-svc-noscript-fallback .wwp-svc-card {
  position: static;
  width: auto;
  height: auto;
  min-height: 300px;
  margin: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}
#wwp-svc-root.wwp-svc-static .wwp-svc-card-desc,
.wwp-svc-noscript-fallback .wwp-svc-card-desc { max-height: none; opacity: 1; }
#wwp-svc-root.wwp-svc-static .wwp-svc-card-cta,
.wwp-svc-noscript-fallback .wwp-svc-card-cta { opacity: 1; transform: none; }
#wwp-svc-root.wwp-svc-static .wwp-svc-arrow,
#wwp-svc-root.wwp-svc-static .wwp-svc-dots,
#wwp-svc-root.wwp-svc-static .wwp-svc-progress,
.wwp-svc-noscript-fallback .wwp-svc-arrow,
.wwp-svc-noscript-fallback .wwp-svc-dots,
.wwp-svc-noscript-fallback .wwp-svc-progress { display: none; }

@media (prefers-reduced-motion: reduce) {
  #wwp-svc-track { height: auto; }
  #wwp-svc-stage { position: relative; height: auto; min-height: 0; padding: clamp(48px, 8vh, 88px) 20px; }
  .wwp-svc-viewport { height: auto; max-width: 1400px; perspective: none; cursor: default; touch-action: auto; }
  #wwp-svc-stagearea { position: static; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; transform: none !important; }
  .wwp-svc-card { position: static; width: auto; height: auto; min-height: 300px; margin: 0 !important; transform: none !important; opacity: 1 !important; visibility: visible !important; }
  .wwp-svc-card-desc { max-height: none; opacity: 1; }
  .wwp-svc-card-cta { opacity: 1; transform: none; }
  .wwp-svc-arrow, .wwp-svc-dots, .wwp-svc-progress { display: none; }
}

/* ── responsive: tablets — reduced depth/rotation, non-pinned ────── */

@media (max-width: 1024px) {
  #wwp-svc-track { height: auto !important; }
  #wwp-svc-stage {
    position: relative;
    height: auto;
    min-height: 0;
    padding: clamp(40px, 7vh, 64px) 0;
  }
  .wwp-svc-viewport { height: clamp(320px, 50vh, 420px); cursor: grab; }
  .wwp-svc-progress { display: none; }
}

/* ── mobile & small-tablet (≤767px) — isolated override block ────── */
@media (max-width: 767px) {
  .wwp-svc-header { margin-bottom: 18px; }
  .wwp-svc-header h2 { font-size: clamp(24px, 7.4vw, 32px); }

  #wwp-svc-stage {
    padding: calc(var(--wwp-svc-header-offset, 64px) + 20px) 0 calc(var(--wwp-mobile-bottom-bar-height, 0px) + max(16px, env(safe-area-inset-bottom)) + 20px);
  }

  .wwp-svc-viewport { height: clamp(300px, 62vh, 420px); }

  .wwp-svc-card {
    width: clamp(200px, 66vw, 260px);
    height: clamp(260px, 52vh, 340px);
  }

  .wwp-svc-card-title { font-size: 15px; }
  .wwp-svc-card-desc { font-size: 12px; }

  .wwp-svc-arrow { width: 42px; height: 42px; }
  .wwp-svc-prev { left: 4px; }
  .wwp-svc-next { right: 4px; }
}

@media (max-width: 767px) and (max-height: 699px) {
  .wwp-svc-viewport { height: clamp(260px, 56vh, 360px); }
  .wwp-svc-card {
    height: clamp(230px, 46vh, 300px);
  }
}
