/* ═══════════════════════════════ FONTS ═══════════════════════════════ */
@font-face {
  font-family: 'Matricsa';
  src: url('fonts/FbMatritsa-Bold.eot');
  src: url('fonts/FbMatritsa-Bold.eot?#iefix')          format('embedded-opentype'),
       url('fonts/fbmatritsa-boldwebfont.ttf')           format('truetype'),
       url('fonts/fbmatritsa-boldwebfont.svg#fb_matritsabold') format('svg');
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

/* Heavier brand cut used for the benefit circle labels */
@font-face {
  font-family: 'MatricsaEnHeb';
  src: url('assets/FbMatritsaEnHeb-Bold.otf') format('opentype'),
       url('assets/FbMatritsaEnHeb-Bold.ttf') format('truetype');
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

/* ═══════════════════════════════ TOKENS ══════════════════════════════ */
:root {
  /* Brand core */
  --navy:        #00364B;
  --gold:        #F6B31C;
  --cyan:        #00B0D9;
  --hero-grey:   #413F44;
  --bg-grey:     #EDF1F2;
  --white:       #FFFFFF;

  /* Card — BLUE */
  --blue-title:  #00638A;
  --blue-strong: #00B1DB;
  --blue-soft:   #6ACCE5;

  /* Card — ORANGE */
  --orange-title:  #E98E23;
  --orange-strong: #F3B735;
  --orange-soft:   #F8CF7D;

  /* Card — GREEN */
  --green-title:  #7F983C;
  --green-strong: #C2D351;
  --green-soft:   #D5E18B;

  /* Layout */
  --max-width: 1280px;
  --section-pad-v-sm: 40px;
  --section-pad-v-lg: 72px;
}

/* ═══════════════════════════════ RESET ═══════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Matricsa', 'Heebo', 'Arial Hebrew', sans-serif;
  font-weight: 400;
  line-height: 1.4;
  background: var(--white);
  color: #111111;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ═══════════════════════════ 1. VIDEO HERO ═══════════════════════════ */
.video-hero {
  position: relative;           /* positioning context for the sound toggle */
  width: 100%;
  background: var(--bg-grey);   /* shows behind the poster while it loads */
  line-height: 0;               /* kill inline-media descender gap */
}

/* ── Sound on/off toggle — orange circle, bottom-left of the video ──
   Left edge is clamped to a centered 1280px container: on viewports wider
   than 1280px it stays aligned to the container edge instead of drifting
   further toward the viewport's left edge. */
.video-hero__sound {
  --sound-inset: clamp(12px, 2vw, 24px);
  position: absolute;
  left: max(var(--sound-inset), calc(50% - 640px + var(--sound-inset)));
  bottom: clamp(12px, 2vw, 24px);
  z-index: 2;
  width: clamp(44px, 5.5vw, 60px);
  height: clamp(44px, 5.5vw, 60px);
  border: none;
  border-radius: 50%;
  background: var(--orange-title);
  color: #111111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: filter 0.15s ease, transform 0.15s ease;
}
.video-hero__sound:hover  { filter: brightness(1.08); transform: translateY(-2px); }
.video-hero__sound:active { transform: translateY(0); }
.video-hero__sound:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

.video-hero__sound-icon { width: 56%; height: 56%; display: block; }

/* Toggle which icon shows based on .is-on state */
.video-hero__sound .icon-on  { display: none; }
.video-hero__sound.is-on .icon-off { display: none; }
.video-hero__sound.is-on .icon-on  { display: block; }

.video-hero__media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 600;     /* reserve the banner box → no layout shift */
  object-fit: cover;            /* crop gracefully if a source isn't exactly 1920×600 */
  object-position: center;
}

/* Mobile: square (1:1) box, video cropped to fill */
@media (max-width: 767px) {
  .video-hero__media {
    aspect-ratio: 1 / 1;
  }
}

/* ═══════════════════════════════ 2. INTRO ════════════════════════════ */
.intro {
  background: var(--white);
  text-align: center;
  padding-block: var(--section-pad-v-sm);
  padding-inline: 24px;
}

.intro__inner {
  max-width: 980px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.intro__heading {
  font-family: 'Matricsa', 'Heebo', sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 4.2vw, 44px);
  line-height: 1.25;
  color: #111111;
  text-wrap: balance;
}

.intro__heading-accent {
  color: var(--blue-title);
}

.intro__lead {
  font-family: 'Assistant', sans-serif;
  font-weight: 400;
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.65;
  color: #111111;
  max-width: 760px;
  text-wrap: pretty;
}

.intro__badge {
  width: clamp(220px, 34vw, 360px);
  height: auto;
  margin-top: 4px;
}

/* ── Desktop ── */
@media (min-width: 768px) {
  .intro {
    padding-block: var(--section-pad-v-lg);
    padding-inline: 40px;
  }
  .intro__inner { gap: 26px; }
}

/* ═══════════════════════════ 4. SELECTABLE CIRCLES ═══════════════════ */
.circles {
  background: var(--white);
  padding-block: var(--section-pad-v-lg);
  padding-inline: 24px;
}

.circles__row {
  /* Mobile: flex-wrap into a tidy centered grid of circles */
  max-width: 1040px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(12px, 1.8vw, 26px);
}

/* Desktop: exactly 2 rows of 4 (8 circles) */
@media (min-width: 768px) {
  .circles__row {
    max-width: none;
    display: grid;
    grid-template-columns: repeat(4, min-content);
  }
}

/* ── Circle button ── */
.circle {
  --c: var(--cyan);
  position: relative;
  width: clamp(118px, 13.5vw, 176px);
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  background: var(--c);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 14px 14px 14px;
  color: #111111;
  font-family: 'MatricsaEnHeb', 'Matricsa', 'Heebo', sans-serif;
  text-align: center;
  transition: transform 0.2s ease;
}

.circle:hover  { transform: translateY(-4px); }
.circle:active { transform: translateY(-1px); }

.circle:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

/* Text sits above the plus mark (see z-index on .circle__plus) */
.circle__more,
.circle__topic {
  position: relative;
  z-index: 1;
}

.circle__more {
  font-weight: 800;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1;
  color: var(--white);
}

.circle__topic {
  font-weight: 700;
  font-size: clamp(16px, 1.8vw, 23px);
  line-height: 1.1;
}

/* ── Plus mark — placed differently in each circle via --p-* modifiers ── */
/* z-index:0 keeps it behind the label text where they overlap */
.circle__plus {
  position: absolute;
  z-index: 0;
  width: clamp(22px, 2.4vw, 30px);
  height: auto;
}
/* top-right (inline-start = right in RTL) */
.circle--p-tr .circle__plus { top: 15%; inset-inline-start: 17%; }
/* top-center */
.circle--p-tc .circle__plus { top: 10%; left: 50%; transform: translateX(-50%); }
/* mid-left (inline-end = left in RTL) */
.circle--p-l  .circle__plus { top: 39%; inset-inline-end: 11%; }
/* bottom-center */
.circle--p-bc .circle__plus { bottom: 11%; left: 50%; transform: translateX(-50%); }
/* bottom-left */
.circle--p-bl .circle__plus { bottom: 16%; inset-inline-end: 17%; }

/* ── Colour variants ── */
.circle--cyan   { --c: var(--cyan); }
.circle--orange { --c: var(--orange-title); }
.circle--gold   { --c: var(--gold); }
.circle--green  { --c: var(--green-strong); }

/* ── Benefit image popup (lightbox) ── */
.img-popup {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.img-popup.is-open {
  opacity: 1;
  pointer-events: auto;
}

.img-popup__frame {
  position: relative;
  line-height: 0;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.img-popup.is-open .img-popup__frame {
  transform: scale(1);
}

.img-popup__img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw, 600px);
  max-height: 88vh;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 30px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

/* X on the backdrop, above-left of the image's top-left corner, no background */
.img-popup__close {
  position: absolute;
  bottom: 100%;
  left: -8px;
  margin-bottom: 6px;
  padding: 4px 8px;
  border: none;
  background: none;
  color: var(--white);
  font-size: 46px;
  line-height: 0.7;
  cursor: pointer;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.img-popup__close:hover  { transform: scale(1.12); opacity: 0.85; }
.img-popup__close:active { transform: scale(0.96); }

/* ── Mobile: keep the row to a tidy multi-line grid of circles ── */
@media (max-width: 767px) {
  .circles { padding-block: var(--section-pad-v-sm); }
  .circle  { width: clamp(98px, 27vw, 130px); }

  /* fainter plus marks */
  .circle__plus { opacity: 0.5; }
}

/* ═══════════════════════════════ 3. FORM ════════════════════════════════ */
.form-section {
  /*
    Gradient: bright cyan on the visual-right (start in RTL) →
    deep teal on the visual-left (end in RTL).
    Using physical `to left` so it's independent of writing direction.
  */
  background: linear-gradient(to left, #13c5e8, #046882);
  position: relative;
  overflow: hidden;
  padding-block: 28px 68px;
  padding-inline: 24px;
}

/* ── Plus decorations ── */
.form-section__plus {
  position: absolute;
  pointer-events: none;
  /* SVG already has internal white fill + 0.24 opacity */
}

/* Large plus — visual LEFT (inline-end), vertically centred */
.form-section__plus--large {
  width: 160px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  inset-inline-end: -45px;   /* visual LEFT in RTL */
}

/* Small plus — visual RIGHT (inline-start), upper area */
.form-section__plus--small {
  width: 90px;
  inset-block-start: 12%;
  inset-inline-start: -14px; /* visual RIGHT in RTL */
}

/* ── Inner wrapper ── */
.form-section__inner {
  position: relative;   /* sits above the pseudo-element decorations */
  z-index: 1;
  max-width: 960px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ── Heading ── */
.form-section__heading {
  color: var(--white);
  font-family: 'Matricsa', 'Heebo', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 3.5vw, 38px);
  text-align: center;
  line-height: 1.3;
}

/* ── Form ── */
.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/*
  Mobile-first: 2-col grid.
  First 4 fields span both columns (full width).
  Last 2 (עיר + בית ספר) each occupy one column → side-by-side pair.
*/
.form__grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

/* Wrappers are the grid items; first 4 span full width on mobile */
.form__field-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form__field-wrap:nth-child(-n+4) {
  grid-column: 1 / -1;
}

/* ── Field shared style ── */
.form__field {
  background: var(--white);
  border: none;
  border-radius: 8px;
  padding-block: 13px;
  padding-inline: 22px;
  font-family: 'Matricsa', 'Heebo', sans-serif;
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 400;
  color: var(--navy);
  width: 100%;
  outline: none;
  direction: rtl;
}

.form__field::placeholder {
  color: #7a9aaa;
}

.form__field:focus {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
  outline: none;
}

.form__field.is-invalid {
  border: 2px solid #e05252;
  box-shadow: none;
}

.form__field.is-valid {
  border: 2px solid rgba(0, 176, 100, 0.55);
}

/* Inline error message */
.form__error {
  display: inline-block;
  align-self: flex-start;
  color: #e51b25;
  font-family: 'Matricsa', 'Heebo', sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

.form__error:empty {
  display: none;
}

/* Shake keyframe for invalid fields on submit */
@keyframes field-shake {
  0%,  100% { transform: translateX(0);    }
  20%        { transform: translateX(-7px); }
  40%        { transform: translateX( 7px); }
  60%        { transform: translateX(-4px); }
  80%        { transform: translateX( 4px); }
}

.form__field-wrap.shake {
  animation: field-shake 0.35s ease;
}

/* ── Disclaimer ── */
.form__disclaimer {
  width: 100%;
  color: var(--white);
  font-family: 'Matricsa', 'Heebo', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-align: right;
}

.form__disclaimer a {
  color: var(--white);
  text-decoration: underline;
}

.form__disclaimer a:hover {
  color: var(--green-strong);
}


/* ── Select fields ── */
.form__field--select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%2300364B' d='M5 7l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;  /* visual left = end in RTL */
  background-size: 20px;
  padding-inline-end: 40px;
}

/* ── Submit button ── */
.form__submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
  background: var(--green-strong);
  color: var(--navy);
  border: none;
  border-radius: 50px;
  padding-block: 13px;
  padding-inline: 44px;
  font-family: 'Matricsa', 'Heebo', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2vw, 22px);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.form__submit:hover  { filter: brightness(1.08); transform: translateY(-2px); }
.form__submit:active { filter: brightness(0.95); transform: translateY(0); }

.form__submit-text {
  transform: translateY(0.1em);
}

.form__submit-icon {
  width: 22px;
  height: auto;
  flex-shrink: 0;
  filter: brightness(0) invert(29%) sepia(100%) hue-rotate(159deg) saturate(600%) brightness(44%);
}

/* ── Call CTA under submit ──
   Mobile-first: tappable orange pill ("דברו איתנו" + phone icon).
   Desktop (≥768px): collapses to plain white "חייגו *3670" text. */
.form__call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--orange-title);
  color: #fff;
  border-radius: 50px;
  padding-block: 12px;
  padding-inline: 36px;
  font-family: 'Matricsa', 'Heebo', sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.form__call:hover  { filter: brightness(1.06); transform: translateY(-2px); }
.form__call:active { transform: translateY(0); }

.form__call-mobile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.form__call-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.form__call-desktop { display: none; }

@media (min-width: 768px) {
  /* Desktop: no button chrome — just the dialing text */
  .form__call {
    background: none;
    padding: 0;
    color: #fff;
    font-size: clamp(20px, 2vw, 24px);
  }
  .form__call:hover { filter: none; transform: none; }
  .form__call-mobile  { display: none; }
  .form__call-desktop { display: inline; }
}

/* ── Desktop: switch to 3-col grid, reset full-width overrides ── */
@media (min-width: 768px) {
  .form-section {
    padding-block: 40px 80px;
    padding-inline: 40px;
  }

  .form__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .form__field-wrap:nth-child(-n+4) {
    grid-column: auto;  /* let all 6 fill the 3×2 grid naturally */
  }

  .form-section__inner {
    gap: 24px;
  }
}

/* ═══════════════════════════════ 5. FOOTER ══════════════════════════════ */
.site-footer {
  background: var(--navy);
  padding-block: 72px;
  padding-inline: 40px;
}

.site-footer__inner {
  max-width: 1280px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Logo — start (right) side */
.site-footer__logo {
  width: 240px;
  height: auto;
}

/* End (left) side — icons stacked above URL, both center-aligned */
.site-footer__end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* Social icons row */
.site-footer__social {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, opacity 0.15s;
}
.social-icon:hover  { transform: translateY(-3px); opacity: 0.88; }
.social-icon:active { transform: translateY(0); }

.social-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.social-icon--fb     { background: #e88e24; }
.social-icon--tiktok { background: #f3b633; }
.social-icon--ig     { background: #c1d24f; }
.social-icon--yt     { background: #00b2db; }

/* URL — centered below icons */
.site-footer__url {
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Heebo', sans-serif;
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.15s;
}
.site-footer__url:hover { color: var(--white); }

/* Mobile */
@media (max-width: 767px) {
  .site-footer {
    padding-block: 48px;
    padding-inline: 24px;
  }
  .site-footer__inner {
    flex-direction: column;
    align-items: center;
    gap: 36px;
  }
  .site-footer__logo { width: 200px; }
}

/* ══════════════ ACCESSIBILITY WIDGET ══════════════ */

.a11y-widget {
  position: fixed;
  left: 0;
  top: 70%;
  transform: translateY(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
}

.a11y-toggle {
  width: 44px;
  height: 44px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.25);
  flex-shrink: 0;
  transition: background 0.2s;
}
.a11y-toggle:hover,
.a11y-toggle:focus-visible {
  background: #9f1e2e;
  outline: 2px solid #fff;
  outline-offset: -3px;
}

.a11y-panel {
  background: #fff;
  border: 1px solid #d0d4e0;
  border-left: none;
  border-radius: 0 8px 8px 0;
  box-shadow: 4px 4px 18px rgba(0,0,0,0.18);
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 150px;
  direction: rtl;
}
.a11y-panel[hidden] { display: none; }

.a11y-panel-title {
  font-size: 12px;
  font-weight: 700;
  font-family: 'Assistant', sans-serif;
  color: var(--navy);
  text-align: center;
  letter-spacing: 0.04em;
  padding-bottom: 6px;
  border-bottom: 1px solid #e0e4ef;
  margin-bottom: 2px;
}

.a11y-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  background: #f5f6fa;
  border: 1px solid #dde1ef;
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Assistant', sans-serif;
  color: #333;
  text-align: right;
  direction: rtl;
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
}
.a11y-btn:hover,
.a11y-btn:focus-visible {
  background: #e8ecf8;
  border-color: var(--navy);
  outline: none;
}
.a11y-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.a11y-btn-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.a11y-btn-icon svg {
  width: 22px;
  height: 22px;
  overflow: visible;
}

.a11y-btn-label {
  transform: translateY(0.1em);
}

.a11y-reset {
  margin-top: 4px;
  background: none;
  border: 1px solid #bec1c8;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: 'Assistant', sans-serif;
  color: #717379;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: border-color 0.15s, color 0.15s;
}
.a11y-reset:hover,
.a11y-reset:focus-visible {
  border-color: #9f1e2e;
  color: #9f1e2e;
  outline: none;
}

/* ── accessibility mode overrides ──
   Widget lives on <html>; all overrides target body so it's never affected. */

.a11y-font-lg body { zoom: 1.12; }
.a11y-font-xl body { zoom: 1.25; }

.a11y-contrast body *:not(img):not(video):not(canvas) {
  background:   #000 !important;
  color:        #ff0 !important;
  border-color: #ff0 !important;
  text-shadow:  none !important;
  box-shadow:   none !important;
}
.a11y-contrast body svg { fill: #ff0 !important; }
.a11y-contrast body a   { color: #0ff !important; }
.a11y-contrast body img { filter: grayscale(1) contrast(1.2); opacity: .9; }

.a11y-negative body             { filter: invert(1); }
.a11y-negative body img,
.a11y-negative body video       { filter: invert(1); }
.a11y-negative .a11y-widget     { filter: invert(1); }

.a11y-grayscale body            { filter: grayscale(1); }
.a11y-grayscale .a11y-widget    { filter: grayscale(1); }

.a11y-links body a {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.a11y-readable body,
.a11y-readable body * {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.02em !important;
}
