/* ===== Interaction layer — from Figma comments (hover / popup / validation) =====
   Loaded LAST. Covers behavior the static pixel build did not capture.
   Source notes: sites/lawyers-lp.local/figma-comments.md */

/* ---------- A. Circle-arrow micro-interaction: arrow moves left+up on hover ----------
   Figma: "hover: arrow moves left and up" (×16). RTL → left = -X. */
.hdr__cta-circle img,
.hf__submit .circ img,
.about__cta .circ img,
.ab2__cta .circ img,
.seo__cta .circ img,
.tsum__btn .circ img,
.tcard__ic img,
.pcard__ic img,
.ft__totop {
  transition: transform .25s ease, filter .25s ease, opacity .2s ease;
}
.hdr__cta:hover .hdr__cta-circle img,
.hf__submit:hover .circ img,
.about__cta:hover .circ img,
.ab2__cta:hover .circ img,
.seo__cta:hover .circ img,
.tsum__btn:hover .circ img,
.tcard:hover .tcard__ic img,
.pcard:hover .pcard__ic img {
  transform: translate(-4px, -4px);
}
.ft__totop:hover { transform: translateY(-4px); }

/* circle container subtle lift */
.hdr__cta, .hf__submit, .about__cta, .ab2__cta, .seo__cta, .tsum__btn,
.tcard, .pcard, .vcard {
  transition: transform .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
}

/* ---------- Green "המשך קריאה" CTAs — hover bg 0D2C21 + white text ----------
   Figma: "hover: 0D2C21" / "hover: 0D2C21" (#14,#17,#32,#33). */
.about__cta:hover,
.ab2__cta:hover,
.seo__cta:hover,
.tsum__btn:hover {
  background: #0d2c21;
  border-radius: 900px;
}
.about__cta:hover .lbl,
.ab2__cta:hover .lbl,
.seo__cta:hover .lbl,
.tsum__btn:hover .lbl { color: #fff; }
.about__cta:hover .circ,
.ab2__cta:hover .circ,
.seo__cta:hover .circ,
.tsum__btn:hover .circ { border-color: rgba(255,255,255,.5); }
.about__cta:hover .circ img,
.ab2__cta:hover .circ img,
.seo__cta:hover .circ img,
.tsum__btn:hover .circ img { filter: brightness(0) invert(1); }

/* ---------- Gold circle-border on zoom badges / carousel chevrons (#43,#44,#53,#60) ---------- */
.tcert__zoom, .psak__zoom {
  cursor: zoom-in;
  transition: border-color .2s ease, box-shadow .2s ease;
  border: 1px solid transparent;
}
.tcert:hover .tcert__zoom,
.psak:hover .psak__zoom { border-color: #e5c38b; box-shadow: 0 0 0 2px rgba(229,195,139,.35); }
.tcert, .psak { transition: transform .25s ease; }
.tcert:hover, .psak:hover { transform: translateY(-3px); }

/* zoomable images get zoom cursor (#45,#54 open full-size in popup) */
.tcert__img, .psak__doc { cursor: zoom-in; }

/* ---------- B. Header turns white on hover (#6 "hover on header - all turns to white") ---------- */
.hdr:hover {
  background: #fff;
  backdrop-filter: none;
  box-shadow: 0 2px 18px rgba(0,0,0,.07);
}
.hdr:hover .hdr__logo-names .he,
.hdr:hover .hdr__logo-names .en,
.hdr:hover .hdr__nav a,
.hdr:hover .hdr__phone-label,
.hdr:hover .hdr__cta-label { color: #141414; }
.hdr:hover .hdr__phone-num { color: #b58d41; }
.hdr:hover .hdr__logo-tag { color: #8a8a8a; }
.hdr:hover .hdr__line { background: rgba(0,0,0,.12); }
.hdr:hover .hdr__cta-circle img,
.hdr:hover .hdr__phone-ic img { filter: brightness(0); }
.hdr:hover .hdr__cta { border-color: #d6b577; }
.hdr:hover .hdr__cta-circle { border-color: rgba(214,181,119,.55); }
.hdr:hover .hdr__nav a:hover { color: var(--gold); }
.hdr:hover .hdr__nav a.is-active::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: -4px; height: 2px; background: #141414;
}
/* nav underline on hover (#5 "underline link on hover") */
.hdr__nav a { position: relative; }
.hdr__nav a::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: -2px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .22s ease;
}
.hdr__nav a:hover::after { transform: scaleX(1); }

/* video cards (#20,#61 click → play). NO hover/mouseover effect — per client:
   the play button is an icon only, the card itself must stay static. */
.vcard { cursor: pointer; }

/* practice-area cards (#39 hover: E5C38B) — circle border + title turn gold */
.tcard { transition: transform .25s ease; }
.tcard:hover { transform: translateY(-3px); }
.tcard__ic { transition: border-color .25s ease, background .25s ease; }
.tcard:hover .tcard__ic { border-color: #e5c38b; background: rgba(229,195,139,.14); }
.tcard__title { transition: color .25s ease; }
.tcard:hover .tcard__title { color: #e5c38b; }

/* press cards (#49,#52 clickable hover: E5C38B) — circle border + label turn gold */
.pcard__ic { transition: border-color .25s ease, background .25s ease; }
.pcard:hover .pcard__ic { border-color: #e5c38b; background: rgba(229,195,139,.14); }
.pcard__txt { transition: color .25s ease; }
.pcard:hover .pcard__txt { color: #e5c38b; }

/* footer quick-nav links (#62 hover: white) */
.ft__col a:hover { color: #fff; }
/* footer social (#64 hover: icon + border color white) */
.ft__social a { transition: border-color .2s ease, background .2s ease; }
.ft__social a:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.ft__social a img { transition: filter .2s ease; }
.ft__social a:hover img { filter: brightness(0) invert(1); }

/* ---------- C. Modal (contact popup #3 / image lightbox #45,#54 / video #20,#61) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(7,28,55,.62); backdrop-filter: blur(3px);
}
.modal.is-open { display: flex; }
.modal__box {
  position: relative; background: #fff; border-radius: 14px; max-width: 480px; width: 100%;
  padding: 34px 30px 30px; box-shadow: 0 24px 70px rgba(0,0,0,.32);
  animation: modalPop .28s cubic-bezier(.2,.9,.3,1.2);
}
.modal--media .modal__box {
  max-width: min(92vw, 1000px); background: transparent; box-shadow: none; padding: 0;
}
@keyframes modalPop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal__close {
  position: absolute; top: 12px; left: 12px; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(13,44,33,.08); color: #0d2c21; font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center; z-index: 2; transition: background .2s;
}
.modal--media .modal__close { background: rgba(255,255,255,.92); }
.modal__close:hover { background: var(--gold); color: #0d2c21; }
.modal__img { width: 100%; height: auto; max-height: 86vh; object-fit: contain; border-radius: 8px; display: block; margin: 0 auto; }
.modal__video { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 10px; background: #000; }
/* video-poster popup: poster gets a scrim + centered "watch on YouTube" CTA */
.modal--media .modal__box:has(.modal__ytcta[style*="inline-flex"]) .modal__img { max-height: 80vh; filter: brightness(.78); }
.modal__ytcta {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 12px; z-index: 3;
  background: rgba(13,44,33,.92); color: #fff; font-weight: 700; font-size: 18px;
  padding: 12px 22px 12px 14px; border-radius: 900px; box-shadow: 0 8px 26px rgba(0,0,0,.4);
  transition: background .2s ease, transform .2s ease;
}
.modal__ytcta:hover { background: #0d2c21; transform: translate(-50%, -50%) scale(1.04); }
.modal__ytcta-ic { width: 40px; height: 40px; display: flex; }
.modal__ytcta-ic img { width: 100%; height: 100%; }

/* Contact popup form */
.cmodal__title { font-size: 26px; font-weight: 800; color: #0d2c21; text-align: center; margin-bottom: 4px; }
.cmodal__sub { font-size: 15px; color: #555; text-align: center; margin-bottom: 20px; }
.cmodal__field { margin-bottom: 14px; }
.cmodal__field input, .cmodal__field textarea {
  width: 100%; height: 50px; border: 1px solid var(--cream-border); border-radius: 6px;
  background: var(--cream); padding: 0 14px; font: inherit; color: #161616;
}
.cmodal__field textarea { height: 84px; padding: 12px 14px; resize: vertical; }
.cmodal__submit {
  width: 100%; height: 54px; border: 0; border-radius: 900px; background: var(--green-900);
  color: #fff; font-weight: 700; font-size: 18px; margin-top: 6px;
  display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .2s;
}
.cmodal__submit:hover { background: #0d3a2b; }
.cmodal__ok { display: none; text-align: center; color: #0d2c21; font-weight: 700; font-size: 19px; padding: 30px 0; }
.cmodal.is-sent .cmodal__form { display: none; }
.cmodal.is-sent .cmodal__ok { display: block; }

/* ---------- D. Hebrew form validation (#11,#27 error msg for mandatory fields) ---------- */
.field-wrap { position: relative; display: block; }
.hf__fields .field-wrap { width: 307px; }
@media (max-width: 1024px) { .hf__fields .field-wrap { width: 100%; } }
.hf__input.is-invalid,
.cmodal__field input.is-invalid,
.cmodal__field textarea.is-invalid {
  border-color: #d23b3b !important; background: #fff4f4;
}
.field-err {
  position: absolute; left: 8px; top: -9px; background: #d23b3b; color: #fff;
  font-size: 11px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 4px;
  white-space: nowrap; z-index: 3; pointer-events: none;
  box-shadow: 0 2px 6px rgba(210,59,59,.3);
}
.field-err::after {
  content: ""; position: absolute; bottom: -4px; left: 12px; width: 8px; height: 8px;
  background: #d23b3b; transform: rotate(45deg);
}

/* ---------- E. Floating TOC scroll-spy (#29,#30) ---------- */
.cnt__toc-list li { transition: color .2s ease, font-weight .2s ease; cursor: default; }
.cnt__toc-list li.is-reading { color: var(--gold-deep); font-weight: 700; }

/* ---------- Mobile sticky CTA bar (#68 sticky, #69 opens popup) ---------- */
.mbar { display: none; }
@media (max-width: 1024px) {
  .mbar {
    display: flex; position: fixed; bottom: 0; right: 0; left: 0; z-index: 96;
    background: #0d2c21; box-shadow: 0 -3px 16px rgba(0,0,0,.25);
    padding: 9px 12px; gap: 10px;
  }
  .mbar a {
    flex: 1; height: 46px; border-radius: 900px; display: flex; align-items: center;
    justify-content: center; gap: 8px; font-weight: 700; font-size: 15px;
  }
  .mbar__call { background: rgba(255,255,255,.12); color: #fff; }
  .mbar__lead { background: var(--gold); color: #0d2c21; }
  .mbar img { width: 20px; height: 20px; }
  body { padding-bottom: 64px; }
  /* nudge whatsapp float above the bar */
  .wa-float { bottom: 76px; }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
