/* ============================================================
   WOLICOIN — enhancement layer
   Custom scrollbar + safe polish. Loaded AFTER the site's own CSS.
   Nothing here changes layout or interferes with the syllabus
   ScrollTrigger — the site already handles mobile on its own
   (it skips the pin when innerWidth <= 900).
   Brand: #1D65FF (blue) · #FF7C09 (orange)
   ============================================================ */

/* ---------- Custom scrollbar ---------- */
/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: #ff7c09 rgba(255, 255, 255, 0.06);
}
/* WebKit / Chromium / Edge / Safari */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1d65ff 0%, #ff7c09 100%);
  border-radius: 999px;
  border: 3px solid transparent;      /* transparent inset → floating pill */
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #3f83ff 0%, #ff9a3d 100%);
  background-clip: padding-box;
}
::-webkit-scrollbar-corner {
  background: transparent;
}

/* ---------- Safe polish (no layout impact) ---------- */
html {
  -webkit-text-size-adjust: 100%;      /* stop iOS auto-inflating text */
  text-size-adjust: 100%;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;   /* no grey flash on tap */
}
a, button, [role="button"] {
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Honeypot field (spam trap; see _enhance.js) ----------
   Kept in the DOM (NOT display:none — bots skip hidden fields) but pushed
   off-screen and made unfocusable so real users never see or fill it. */
.wl-hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ---------- Lead form status message (see _enhance.js) ---------- */
.wl-form-msg {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}
.wl-form-msg[data-state="ok"] {
  color: #eafff2;
  background: rgba(29, 101, 255, 0.16);
  border: 1px solid rgba(29, 101, 255, 0.45);
}
.wl-form-msg[data-state="error"] {
  color: #fff2e8;
  background: rgba(255, 124, 9, 0.16);
  border: 1px solid rgba(255, 124, 9, 0.5);
}

/* ============================================================
   Lead-form submit button — loading / success state
   (paired with setBtnState() in _enhance.js)
   The captured button is an orange gradient pill with idle "breathe"
   motion. On submit its label is swapped for a spinner + short status,
   and a check flashes on success — so the wait until the thank-you page
   never reads as "stuck". Its idle animations keep running underneath,
   which reads as "alive / working". Size is fixed (height + full width),
   so nothing shifts when the content swaps.
   ============================================================ */

/* The loading cluster lives inside the button's content wrapper, hidden
   until the button goes busy. inline-flex keeps spinner + label centered. */
.wl-btn-fx {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}
.elementor-button.wl-submitting .wl-btn-fx {
  display: inline-flex;
}
/* Hide the original label (and its animated arrow ::after) while busy. */
.elementor-button.wl-submitting .elementor-button-text {
  display: none;
}
/* Busy = fully opaque, "working" cursor, no press feedback. */
.elementor-button.wl-submitting {
  cursor: progress;
  opacity: 1;
}
/* Keep the spinner/label above the progress sweep (below). */
.elementor-button.wl-submitting .elementor-button-content-wrapper {
  position: relative;
  z-index: 2;
}

/* ---------- Spinner: a tapered "comet" ring in the button's dark ink ---------- */
.wl-btn-spinner {
  width: 1.25em;
  height: 1.25em;
  border-radius: 50%;
  /* transparent tail → solid head, in the dark button-text colour (#0A0F1E) */
  background: conic-gradient(from 0deg,
    rgba(10, 15, 30, 0) 0%, rgba(10, 15, 30, 0.15) 40%, #0A0F1E 100%);
  /* punch out the centre → a ring, not a disc */
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 3px), #000 calc(100% - 2.5px));
          mask: radial-gradient(farthest-side, #0000 calc(100% - 3px), #000 calc(100% - 2.5px));
  animation: wl-spin 0.7s linear infinite;   /* fast → reads as snappy */
}
@keyframes wl-spin { to { transform: rotate(1turn); } }

/* ---------- Status label next to the spinner ---------- */
.wl-btn-status {
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ---------- Progress sweep: a soft light band travelling across the pill ---------- */
.elementor-button.wl-submitting::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    transparent 25%, rgba(255, 255, 255, 0.28) 50%, transparent 75%);
  transform: translateX(-120%);
  animation: wl-sweep 1.15s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes wl-sweep { to { transform: translateX(120%); } }

/* ---------- Success: swap spinner → drawn check + celebratory pop ---------- */
.wl-btn-check {
  display: none;
  width: 1.3em;
  height: 1.3em;
  color: #0A0F1E;
}
.elementor-button.wl-success .wl-btn-spinner { display: none; }
.elementor-button.wl-success .wl-btn-check { display: inline-block; }
.elementor-button.wl-success::after { animation: none; opacity: 0; } /* stop the sweep */

.wl-btn-check path {
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  animation: wl-check 0.4s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes wl-check { to { stroke-dashoffset: 0; } }

.elementor-button.wl-success .wl-btn-fx {
  animation: wl-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes wl-pop {
  0%   { transform: scale(0.9); }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* ---------- Reduced motion: keep essential feedback, drop decoration ---------- */
@media (prefers-reduced-motion: reduce) {
  .wl-btn-spinner { animation-duration: 1.1s; }         /* still conveys "busy" */
  .elementor-button.wl-submitting::after { animation: none; opacity: 0; }
  .wl-btn-check path { animation: none; stroke-dashoffset: 0; }
  .elementor-button.wl-success .wl-btn-fx { animation: none; }
}

/* ============================================================
   WhatsApp group CTA — thank-you page
   (markup: assets/whatsapp-cta.html · click tracking: _enhance.js)

   The thank-you page is a single centered Modernist headline on a dark
   orange→blue gradient, with the whole lower half empty. The CTA drops into
   that space as a quiet second beat: hairline rule → invitation copy →
   green pill → reassurance line. It never competes with the headline.

   Colour: WhatsApp green (#25D366) over DARK ink, matching the site's own
   button language (dark #0A0F1E text on a bright gradient pill) — and giving
   ~11:1 contrast, which white-on-green would not.
   ============================================================ */

.wl-wa {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 640px;
  margin: 38px auto 0;
  padding-inline: 20px;
  text-align: center;
  /* Mirrors the fadeInUp Elementor runs on the headline above, one beat later
     so the eye lands on the confirmation first. */
  animation: wl-wa-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

/* Hairline that separates the CTA from the confirmation headline. */
.wl-wa__rule {
  width: 220px;
  max-width: 60%;
  height: 1px;
  margin-bottom: 6px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.wl-wa__lead {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
  text-wrap: pretty;          /* avoids a lonely word on the last line */
}
.wl-wa__lead b {
  font-weight: 800;
  color: #fff;
}

/* ---------- The pill ----------
   .wl-wa__cta is the positioning context. The halo and the link are SIBLINGS
   inside it, so the link is free to take a filter on hover (which creates a
   stacking context) without burying the halo — the bug a nested z-index:-1
   glow would hit. */
.wl-wa__cta {
  position: relative;
  display: inline-flex;
  margin-top: 12px;
  max-width: 100%;
}

/* Slow breathing halo — the same "alive" idle motion the landing-page CTA
   uses, at a much lower amplitude. Purely decorative. */
.wl-wa__halo {
  position: absolute;
  inset: -14px -10px;
  border-radius: 999px;
  background: radial-gradient(55% 130% at 50% 50%, rgba(37, 211, 102, 0.55), transparent 72%);
  filter: blur(14px);
  pointer-events: none;
  animation: wl-wa-breathe 3.4s ease-in-out infinite;
}

.wl-wa__btn {
  position: relative;         /* above the halo */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #25d366 0%, #12b76a 100%);
  color: #04231a;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 14px 34px -10px rgba(37, 211, 102, 0.75),
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.22s ease,
              filter 0.22s ease;
}
.wl-wa__btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow:
    0 20px 44px -10px rgba(37, 211, 102, 0.9),
    0 3px 10px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}
.wl-wa__btn:active {
  transform: translateY(0);
  box-shadow:
    0 8px 20px -10px rgba(37, 211, 102, 0.7),
    0 1px 5px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
/* Keyboard focus only — mouse users never see the ring. */
.wl-wa__btn:focus-visible {
  outline: 3px solid rgba(37, 211, 102, 0.7);
  outline-offset: 4px;
}

.wl-wa__icon {
  width: 22px;
  height: 22px;
  flex: none;
}
.wl-wa__label { display: inline-block; }

@keyframes wl-wa-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes wl-wa-breathe {
  0%, 100% { opacity: 0.35; transform: scale(0.98); }
  50%      { opacity: 0.65; transform: scale(1.03); }
}

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  .wl-wa {
    margin-top: 28px;
    gap: 12px;
  }
  .wl-wa__lead { font-size: 16.5px; line-height: 1.7; }
  .wl-wa__cta { width: 100%; max-width: 400px; }
  .wl-wa__btn {
    width: 100%;
    padding: 16px 22px;
    font-size: 16.5px;
    /* The label is long; allow it to wrap rather than overflow on 320px. */
    white-space: normal;
    text-wrap: balance;
  }
}

/* ---------- Reduced motion: keep the CTA, drop the movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .wl-wa { animation: none; }
  .wl-wa__halo { animation: none; opacity: 0.55; }
  .wl-wa__btn { transition: box-shadow 0.2s ease, filter 0.2s ease; }
  .wl-wa__btn:hover, .wl-wa__btn:active { transform: none; }
}

/* ---------- Mobile video fit (≤767px) ---------- */
@media (max-width: 767px) {
  /* "סרטון קטן" — the Vimeo clip is portrait (9:16) but its Elementor frame is
     16:9, so Vimeo letterboxes it with black side bars. Match the frame to the
     video's aspect so it fills edge-to-edge. */
  .elementor-widget-video .elementor-wrapper {
    aspect-ratio: 9 / 16 !important;
    padding-bottom: 0 !important;
    max-width: 330px;
    margin-inline: auto;
  }

  /* Testimonials carousel — keep the original (dvh-based) video sizing, but
     GUARANTEE the frame is horizontally centered. The page is RTL, so whenever
     the frame is narrower than the card (the height-limited case at some
     window sizes) a plain block gets pushed to the right — that was the "נדחק
     הצידה". Auto side-margins center it at every width; max-width stops overflow. */
  .vid-carousel__viewport {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100% !important;
  }
}
