/* =====================================================================
   SHAFA — shared UI components (2026-11-22). One source for the home page and every redesigned page
   (see shafa_is_v2_page() in functions.php): tokens, buttons, header CTAs, content sections, steps, FAQ,
   hours, footer, mobile contact bar. Font: Heebo (local woff2, OFL) declared once in theme.json.
   Page-specific layout lives in home-final.css (home hero) and shafa-service.css (service pages).
   ===================================================================== */
:root {
  --sh-font: var(--wp--preset--font-family--hebrew);
  --sh-font-head: var(--wp--preset--font-family--hebrew);
  --sh-font-body: var(--wp--preset--font-family--hebrew);
  --hs-ink: #0D2440; --hs-muted: #3F4D5C; --hs-line: #DED8CE;
  --hs-blue: #0F4C81; --hs-blue-deep: #0A3A63; --hs-green: #1D6B45; --hs-green-deep: #14533A;
  --hs-gold: #E2B13C; --hs-cream: #F6F3EE;
  --hs-measure: 68ch;
}
body.shafa-v2, body.shafa-v2 button, body.shafa-v2 input { font-family: var(--sh-font-body); }
body.shafa-v2 :is(h1, h2, h3, h4, summary) { font-family: var(--sh-font-head); }
.shafa-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------------------------------------------------------------- buttons (WhatsApp primary, phone secondary) */
.shafa-cta { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-block-size: 48px; padding: .7rem 1.35rem;
  border-radius: 999px; font: 600 max(16px, 1.0625rem)/1.2 var(--sh-font-head); text-decoration: none !important; border: 2px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.shafa-cta .shafa-icon { inline-size: 1.25em; block-size: 1.25em; flex: none; stroke-width: 1.9; }
.shafa-cta--wa { background: var(--hs-green); color: #fff !important; }
.shafa-cta--wa:hover { background: var(--hs-green-deep); }
.shafa-hs--physio .shafa-cta--wa, .shafa-svc--physio .shafa-cta--wa { background: var(--hs-blue); }
.shafa-hs--physio .shafa-cta--wa:hover, .shafa-svc--physio .shafa-cta--wa:hover { background: var(--hs-blue-deep); }
.shafa-cta--tel { background: #fff; color: var(--hs-ink) !important; border-color: var(--hs-ink); }
.shafa-cta--tel:hover { background: var(--hs-ink); color: #fff !important; }
.shafa-cta--on-dark { background: #fff; color: var(--hs-ink) !important; min-block-size: 44px; padding: .55rem 1.05rem; font-size: 16px; line-height: 1.2; }
.shafa-cta--on-dark:hover { background: #FFF6DA; }
.shafa-cta:focus-visible { outline: 3px solid var(--hs-gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .shafa-cta { transition: none; } }

/* ---------------------------------------------------------------- header: WhatsApp + phone */
.shafa-header-ctas { display: flex; align-items: center; gap: calc(14 * var(--u, 1px)); flex: none; }
.shafa-header-ctas > p, .shafa-header-ctas p { margin: 0; display: contents; }
.shafa-header-ctas a { box-sizing: border-box; }
.shafa-site-header .shafa-header-wa { min-block-size: 40px; block-size: calc(49 * var(--u)); padding: 0 calc(20 * var(--u)); font-size: max(15px, calc(21 * var(--u))); }
.shafa-site-header .shafa-header-call--secondary { inline-size: auto !important; background: transparent !important; color: var(--hs-ink) !important;
  box-shadow: none !important; border: 2px solid var(--hs-ink); padding: 0 calc(16 * var(--u)) !important; font-size: max(15px, calc(21 * var(--u))) !important; }
.shafa-site-header .shafa-header-call--secondary:hover { background: var(--hs-ink) !important; color: #fff !important; }
/* 600–1023px: WordPress shows the full menu (no hamburger) -> own row so nothing overflows (200% zoom) */
@media (min-width: 600px) and (max-width: 1023px) {
  .shafa-site-header .shafa-header__bar { flex-wrap: wrap !important; block-size: auto !important; row-gap: 4px; padding-block: 8px 6px !important; }
  .shafa-site-header .shafa-nav { order: 3; flex: 1 0 100% !important; font-size: 16px !important; }
  .shafa-site-header .shafa-nav .wp-block-navigation__container { gap: 6px 18px !important; justify-content: center; flex-wrap: wrap; }
}
/* phone number lives in the bottom bar wherever the bar is shown (<=1024px) */
@media (max-width: 1024px) { .shafa-site-header .shafa-header-call--secondary { display: none !important; } }
@media (max-width: 767px) { .shafa-site-header .shafa-header-wa { block-size: 40px; padding: 0 12px; font-size: 15px; } }
@media (max-width: 359px) {
  .shafa-site-header .shafa-header-wa span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .shafa-site-header .shafa-header-wa { inline-size: 44px; padding: 0; }
}

/* ---------------------------------------------------------------- content sections */
.shafa-hs-wrap { font-size: 1.0625rem; line-height: 1.75; color: var(--hs-ink); }
.shafa-hs { padding-block: clamp(48px, 7vw, 88px); padding-inline: 16px; }
.shafa-hs:nth-of-type(odd) { background: #fff; }
.shafa-hs:nth-of-type(even) { background: var(--hs-cream); }
.shafa-hs__inner { max-inline-size: 1120px; margin-inline: auto; }
.shafa-hs__inner--narrow { max-inline-size: 1120px; }
.shafa-hs h2 { margin: 0 0 1rem; font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2rem); line-height: 1.3; font-weight: 700; color: var(--hs-ink); text-wrap: balance; }
.shafa-hs h3 { margin: 2rem 0 .75rem; font-size: clamp(1.1875rem, 1rem + .6vw, 1.4375rem); line-height: 1.35; font-weight: 700; color: var(--hs-ink); }
.shafa-hs h4 { margin: 0 0 .35rem; font-size: 1.125rem; line-height: 1.4; font-weight: 600; color: var(--hs-ink); }
.shafa-hs p { margin: 0 0 1rem; max-inline-size: var(--hs-measure); }
.shafa-hs p:last-child { margin-block-end: 0; }
.shafa-hs a:not(.shafa-cta) { color: var(--hs-blue); text-underline-offset: 3px; }
.shafa-hs a:not(.shafa-cta):hover { color: var(--hs-blue-deep); text-decoration-thickness: 2px; }
.shafa-hs--ortho a:not(.shafa-cta) { color: var(--hs-green-deep); }
.shafa-hs__lead { font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem); line-height: 1.65; font-weight: 500; }
.shafa-hs--approach .shafa-hs__inner { border-inline-start: 4px solid var(--hs-gold); padding-inline-start: clamp(16px, 3vw, 32px); }
.shafa-hs--service h2 { padding-block-start: .9rem; border-block-start: 4px solid var(--hs-blue); display: inline-block; }
.shafa-hs--ortho h2 { border-color: var(--hs-green); }
.shafa-hs__cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.shafa-hs__aside { background: var(--hs-cream); border-radius: 18px; padding: clamp(18px, 2.4vw, 28px); }
.shafa-hs:nth-of-type(even) .shafa-hs__aside { background: #fff; }
.shafa-hs__aside h3 { margin-block-start: 0; }
.shafa-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.shafa-checks li { position: relative; padding-inline-start: 1.7rem; }
.shafa-checks li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .55em; inline-size: .75rem; block-size: .42rem;
  border-inline-start: 2.5px solid var(--hs-blue); border-block-end: 2.5px solid var(--hs-blue); transform: rotate(-45deg) scaleX(-1); }
.shafa-hs__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-block-start: 2rem; }
.shafa-hs__actions--contact { margin-block-start: 1.5rem; }
.shafa-hs__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.shafa-hs__links a { display: inline-flex; align-items: center; min-block-size: 44px; font-weight: 600; }
.shafa-hs__more { margin-block-start: 1rem !important; }
.shafa-hs__more a { font-weight: 600; }
.shafa-hs__note { margin-block-start: 2rem; padding: clamp(18px, 2.4vw, 28px); border-radius: 18px; background: var(--hs-cream); max-inline-size: 820px; }
.shafa-hs__note h3 { margin-block-start: 0; }

/* numbered steps */
.shafa-steps4 { list-style: none; counter-reset: s4; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.shafa-steps4 li { counter-increment: s4; background: var(--hs-cream); border-radius: 16px; padding: 20px 18px 18px; border-block-start: 4px solid var(--hs-green); }
.shafa-steps4 li::before { content: counter(s4); display: grid; place-items: center; inline-size: 2rem; block-size: 2rem; margin-block-end: .6rem; border-radius: 50%;
  background: var(--hs-green-deep); color: #fff; font-weight: 700; font-size: 1rem; line-height: 1; }
.shafa-steps4 p { font-size: 1rem; line-height: 1.65; }

/* FAQ */
.shafa-hs--faq .shafa-faq { max-inline-size: 860px; }
.shafa-hs--faq .shafa-faq details { background: #fff; border: 1px solid var(--hs-line); border-radius: 14px; padding: 0 1.1rem; margin-block: .6rem; }
.shafa-hs--faq:nth-of-type(odd) .shafa-faq details { background: var(--hs-cream); border-color: transparent; }
.shafa-hs--faq .shafa-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-block-size: 48px; padding-block: .8rem;
  font-weight: 600; font-size: 1.0625rem; line-height: 1.45; cursor: pointer; list-style: none; }
.shafa-hs--faq .shafa-faq summary::-webkit-details-marker { display: none; }
.shafa-hs--faq .shafa-faq summary::after { content: "+"; flex: none; display: grid; place-items: center; inline-size: 1.75rem; block-size: 1.75rem; border-radius: 50%;
  border: 2px solid currentColor; font-weight: 600; line-height: 1; }
.shafa-hs--faq .shafa-faq details[open] summary::after { content: "−"; }
.shafa-hs--faq .shafa-faq details[open] summary { border-block-end: 1px solid var(--hs-line); margin-block-end: .75rem; }
.shafa-hs--faq .shafa-faq details p { padding-block-end: 1rem; }
.shafa-hs--faq .shafa-faq summary:focus-visible { outline: 3px solid var(--hs-gold); outline-offset: 2px; border-radius: 8px; }

/* hours */
.shafa-hours { margin: 0; display: grid; gap: .4rem; }
.shafa-hours > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .45rem; border-block-end: 1px solid var(--hs-line); }
.shafa-hours > div:last-child { border-block-end: 0; }
.shafa-hours dt { font-weight: 600; }
.shafa-hours dd { margin: 0; }

/* footer (v2 part): column titles are text, not headings */
.shafa-footer p.shafa-footer__title { color: #fff; font-size: 1.05rem; font-weight: 700; margin: 0 0 .6rem; }
.shafa-footer__contact a { color: #fff; }
.shafa-footer .shafa-logo__word { color: #fff !important; }
.shafa-footer__phone .shafa-icon { vertical-align: middle; }

/* ---------------------------------------------------------------- mobile contact bar: WhatsApp + phone (opaque) */
.shafa-callbar--v2 { gap: 10px; background: #FAF8F4; }
.shafa-callbar--v2 .shafa-callbar__btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; text-decoration: none; font: 600 1.0625rem/1 var(--sh-font-head); }
.shafa-callbar--v2 .shafa-callbar__btn--wa { flex: 1.6; background: var(--hs-green) !important; color: #fff !important; }
.shafa-callbar--v2 .shafa-callbar__btn--tel { flex: 1; background: #fff !important; color: var(--hs-ink) !important; border: 2px solid var(--hs-ink); }
.shafa-callbar--v2 .shafa-icon { inline-size: 1.2em; block-size: 1.2em; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1199px) { .shafa-steps4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .shafa-hs__cols { grid-template-columns: minmax(0, 1fr); }
  .shafa-hs__actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .shafa-hs__actions .shafa-cta { inline-size: 100%; }
  .shafa-steps4 { grid-template-columns: minmax(0, 1fr); }
  .shafa-hs--approach .shafa-hs__inner { padding-inline-start: 14px; }
}
/* touch targets: header WhatsApp / phone at least 44px tall (site completion QA, 2026-11-22) */
.shafa-site-header .shafa-header-wa, .shafa-site-header .shafa-header-call--secondary { min-block-size: 44px !important; }
@media (max-width: 767px) { .shafa-site-header .shafa-header-wa { block-size: 44px; } }
/* local preview only: draft markers (publication gate) */
/* .shafa-nav-draft removed 2026-11-24 — no draft label in the menu */
a.shafa-draft-link { text-decoration-style: dashed; }

/* ===== trust content: certificate wall + testimonial summaries (2026-11-23) ===== */
.shafa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shafa-cert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-block: 12px 28px; }
.shafa-cert-grid--mini { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.shafa-cert { margin: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid #E3E8E5; border-radius: 14px; overflow: hidden; }
.shafa-cert__link { display: block; background: #F4F6F5; padding: 14px; }
.shafa-cert__link:focus-visible { outline: 3px solid #1F6B4E; outline-offset: -3px; }
.shafa-cert img { display: block; width: 100%; height: 240px; object-fit: contain; }
.shafa-cert figcaption { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 4px; font-size: .95rem; line-height: 1.5; }
.shafa-cert figcaption span { color: #4A5551; font-size: .875rem; }
.shafa-cert__flag, .shafa-review__flag { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 6px; background: #FFF3CD; color: #5B4500; font-size: .8rem; font-weight: 600; }
.shafa-review-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; padding: 0; list-style: none; }
.shafa-review-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid #1F6B4E; border-radius: 999px; color: #1F6B4E; font-weight: 600; text-decoration: none; }
.shafa-review-nav a:hover, .shafa-review-nav a:focus-visible { background: #1F6B4E; color: #fff; }
.shafa-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.shafa-review-grid--mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shafa-review { background: #fff; border: 1px solid #E3E8E5; border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.shafa-review h3 { margin: 0; font-size: 1.1rem; }
.shafa-review p { margin: 0; line-height: 1.6; }
.shafa-review__kind { font-size: .82rem; color: #1F6B4E; font-weight: 600; }
.shafa-review__hist { margin-inline-start: 8px; padding: 1px 8px; border-radius: 6px; background: #EEF2F0; color: #3F4A46; font-weight: 500; }
.shafa-review__src { margin-top: auto !important; padding-top: 8px; font-size: .85rem; color: #4A5551; }
.shafa-review__src a { color: #1F6B4E; }
@media (max-width: 1023px) { .shafa-cert-grid, .shafa-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .shafa-cert-grid, .shafa-cert-grid--mini, .shafa-review-grid, .shafa-review-grid--mini { grid-template-columns: minmax(0, 1fr); } .shafa-cert img { height: 220px; } }
.shafa-edu-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 12px 0 8px; padding: 0; list-style: none; }
.shafa-edu-strip li { background: #fff; border: 1px solid #E3E8E5; border-inline-start: 4px solid #1F6B4E; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.shafa-edu-strip span { color: #4A5551; font-size: .9rem; }
.shafa-review h4 { margin: 0; font-size: 1.05rem; }
@media (max-width: 767px) { .shafa-edu-strip { grid-template-columns: minmax(0, 1fr); } }
.shafa-lightbox { max-width: min(92vw, 820px); max-height: 92vh; padding: 16px; border: 0; border-radius: 14px; background: #fff; }
.shafa-lightbox::backdrop { background: rgba(10, 20, 16, .75); }
.shafa-lightbox figure { margin: 0; }
.shafa-lightbox img { display: block; max-width: 100%; max-height: calc(92vh - 110px); margin: 0 auto; object-fit: contain; }
.shafa-lightbox figcaption { margin-top: 10px; text-align: center; font-weight: 600; }
.shafa-lightbox__close { position: sticky; top: 0; float: left; width: 44px; height: 44px; border: 1px solid #1F6B4E; border-radius: 50%; background: #fff; color: #1F6B4E; font-size: 26px; line-height: 1; cursor: pointer; }
.shafa-lightbox__close:focus-visible { outline: 3px solid #1F6B4E; outline-offset: 2px; }
.shafa-review__quote { margin: 4px 0 0; padding: 8px 12px; border-inline-start: 3px solid #1F6B4E; background: #F4F7F5; border-radius: 0 8px 8px 0; }
.shafa-review__quote p { font-weight: 600; }
.shafa-review__quote footer { font-size: .78rem; color: #4A5551; margin-top: 2px; }

/* Round 3 a11y: reserve the real height of the v2 call bar (64px buttons + 2×.55rem padding) so content/footer is never hidden. */
@media (max-width: 781px) { body:has(.shafa-callbar--v2) { padding-block-end: calc(64px + 1.1rem + 2px + env(safe-area-inset-bottom)); } }
/* Round 3 a11y: 24×24 minimum pointer target for the submenu toggles, without moving the visible icon. */
.wp-block-navigation-submenu__toggle.wp-block-navigation__submenu-icon { box-sizing: content-box; padding: 7px; margin: -7px; }
/* 2026-11-24 header: current section marker + 44px hit area for the mobile menu open/close buttons (layout unchanged) */
.shafa-nav .current-menu-ancestor > .wp-block-navigation-item__content { box-shadow: inset 0 -3px 0 var(--shafa-ink); }
.shafa-nav .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content { box-shadow: none; background: var(--shafa-sand); font-weight: 700; }
.shafa-nav .wp-block-navigation__responsive-container-open, .shafa-nav .wp-block-navigation__responsive-container-close { box-sizing: content-box; padding: 10px; margin: -10px; }
/* 2026-11-24 in-content illustrations (AI, labelled) */
.shafa-svc-photo { margin: 1.5rem auto; }
.shafa-svc-photo img { display: block; width: 100%; height: auto; border-radius: 14px; background: #EEF1EF; }
.shafa-svc-photo figcaption { margin-top: .55rem; font-size: .9rem; line-height: 1.55; color: #3E4A46; }
.shafa-svc-photo figcaption strong { color: #081F39; }
.shafa-svc-photo figcaption em { font-style: normal; color: #5A6662; }
