/* Israeli Accessibility Suite — ת״י 5568 / WCAG 2.0 AA */

:root {
  --a11y-font-scale: 1;
  --a11y-color-primary:   #1a3c6e;
  --a11y-color-accent:    #c9a84c;
  --a11y-color-focus:     #005fcc;
  --a11y-color-text:      #1a1a1a;
  --a11y-color-bg:        #ffffff;
  --a11y-color-surface:   #f0f4f8;
  --a11y-color-border:    #d0d8e4;
  --a11y-color-link:      #005fcc;
}

html { font-size: calc(16px * var(--a11y-font-scale)); }

/* Focus — never remove without replacement */
:focus { outline: 3px solid var(--a11y-color-focus); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 3px solid var(--a11y-color-focus); outline-offset: 2px; border-radius: 3px; }

/* Skip Links */
.a11y-skip-links { position: absolute; top: 0; right: 0; z-index: 99999; }
.a11y-skip-link {
  position: absolute; top: -100px; right: 0;
  background: var(--a11y-color-primary); color: #fff;
  padding: 12px 20px; font-weight: 600; text-decoration: none;
  border-radius: 0 0 6px 6px; transition: top .15s; z-index: 99999;
  font-size: 16px;
}
.a11y-skip-link:focus { top: 0; outline: 3px solid #fff; outline-offset: -3px; }

/* Screen Reader Only */
.a11y-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* ════════════════════════════════════
   Accessibility Widget (11 controls)
   ════════════════════════════════════ */
.a11y-widget { position: fixed; bottom: 1.5rem; left: 1.5rem; z-index: 99998; }
.a11y-widget * { box-sizing: border-box; }
.a11y-trigger {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--a11y-color-primary); color: #fff;
  border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.25);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s; padding: 0;
}
.a11y-trigger:hover { background: #0d2240; transform: scale(1.07); }
.a11y-trigger:focus-visible { outline: 3px solid var(--a11y-color-focus); outline-offset: 3px; }

.a11y-panel {
  position: absolute; bottom: calc(100% + 12px); left: 0;
  width: 280px; max-height: 80vh; overflow-y: auto;
  background: var(--a11y-color-bg); border: 2px solid var(--a11y-color-primary);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  padding: 1.25rem; direction: rtl; text-align: right;
  font-family: inherit; color: var(--a11y-color-text);
}
.a11y-panel-title {
  font-size: 1.1rem; font-weight: 700; color: var(--a11y-color-primary);
  margin: 0 0 1rem; padding-bottom: .75rem; border-bottom: 2px solid var(--a11y-color-border);
}
.a11y-control { margin-bottom: .6rem; }
.a11y-lbl { display: block; font-size: .875rem; font-weight: 600; color: var(--a11y-color-primary); margin-bottom: .4rem; }
.a11y-font-row { display: flex; align-items: center; gap: .5rem; }
.a11y-font-btn {
  width: 36px; height: 36px; border: 2px solid var(--a11y-color-primary);
  border-radius: 6px; background: var(--a11y-color-bg); color: var(--a11y-color-primary);
  font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; padding: 0;
}
.a11y-font-btn:hover:not(:disabled) { background: var(--a11y-color-surface); }
.a11y-font-btn:focus-visible { outline: 3px solid var(--a11y-color-focus); outline-offset: 2px; }
.a11y-font-btn:disabled { opacity: .4; cursor: not-allowed; }
.a11y-font-val { flex: 1; text-align: center; font-size: .85rem; }

.a11y-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: .45rem .625rem; background: var(--a11y-color-surface);
  border: 2px solid var(--a11y-color-border); border-radius: 8px;
  cursor: pointer; font-size: .875rem; font-weight: 500;
  color: var(--a11y-color-primary); text-align: right; transition: border-color .15s;
  font-family: inherit;
}
.a11y-toggle:hover { border-color: var(--a11y-color-primary); }
.a11y-toggle:focus-visible { outline: 3px solid var(--a11y-color-focus); outline-offset: 2px; }
.a11y-toggle--on { background: #e8f0fd; border-color: var(--a11y-color-focus); }

.a11y-track {
  width: 38px; height: 20px; background: var(--a11y-color-border);
  border-radius: 10px; position: relative; flex-shrink: 0; transition: background .2s;
}
.a11y-track.on { background: var(--a11y-color-focus); }
.a11y-thumb {
  position: absolute; top: 2px; right: 2px;
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s;
}
.a11y-track.on .a11y-thumb { transform: translateX(-18px); }

.a11y-reset {
  width: 100%; margin-top: .75rem; padding: .5rem;
  background: none; border: 2px solid var(--a11y-color-border);
  border-radius: 6px; font-size: .875rem; cursor: pointer;
  color: var(--a11y-color-text); transition: background .15s;
  font-family: inherit;
}
.a11y-reset:hover { background: var(--a11y-color-surface); }
.a11y-reset:focus-visible { outline: 3px solid var(--a11y-color-focus); outline-offset: 2px; }
.a11y-decl-link {
  display: block; margin-top: .75rem; text-align: center;
  color: var(--a11y-color-link); font-size: .85rem; text-decoration: underline;
}
.a11y-decl-link:focus-visible { outline: 3px solid var(--a11y-color-focus); outline-offset: 2px; border-radius: 3px; }

/* ════════════════════════════════════
   Accessibility Modes
   ════════════════════════════════════ */

/* High Contrast */
html.a11y-high-contrast { background: #000 !important; color: #fff !important; }
html.a11y-high-contrast body,
html.a11y-high-contrast body * {
  background-color: #000 !important; color: #fff !important;
  border-color: #fff !important;
}
html.a11y-high-contrast a,
html.a11y-high-contrast a * { color: #ff0 !important; }
html.a11y-high-contrast img,
html.a11y-high-contrast video,
html.a11y-high-contrast iframe { filter: none !important; }
/* Keep a11y-widget itself usable */
html.a11y-high-contrast .a11y-widget,
html.a11y-high-contrast .a11y-widget * { background: #000 !important; color: #fff !important; border-color: #fff !important; }

/* Invert Colors */
html.a11y-invert-colors { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert-colors img,
html.a11y-invert-colors video,
html.a11y-invert-colors iframe { filter: invert(1) hue-rotate(180deg); }

/* Grayscale */
html.a11y-grayscale { filter: grayscale(100%); }
html.a11y-invert-colors.a11y-grayscale { filter: invert(1) hue-rotate(180deg) grayscale(100%); }

/* Underline Links */
html.a11y-underline-links a { text-decoration: underline !important; text-underline-offset: 3px !important; }

/* Stop Animations */
html.a11y-stop-animations *,
html.a11y-stop-animations *::before,
html.a11y-stop-animations *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
  scroll-behavior: auto !important;
}

/* Dyslexia Font */
@import url('https://fonts.googleapis.com/css2?family=OpenDyslexic&display=swap');
html.a11y-dyslexia-font,
html.a11y-dyslexia-font * { font-family: 'OpenDyslexic', Arial, sans-serif !important; }

/* Line Height */
html.a11y-line-height *:not(.a11y-widget):not(.a11y-widget *) { line-height: 2 !important; letter-spacing: .05em !important; }

/* Enhanced Focus */
html.a11y-enhanced-focus :focus-visible {
  outline: 4px solid #ff6600 !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 8px rgba(255,102,0,.25) !important;
}

/* Big Cursor */
html.a11y-big-cursor,
html.a11y-big-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='10' cy='10' r='8' fill='black'/%3E%3Ccircle cx='10' cy='10' r='5' fill='white'/%3E%3C/svg%3E") 10 10, auto !important;
}

/* System Preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  .a11y-trigger { border: 2px solid ButtonText; background: ButtonFace; color: ButtonText; }
  .a11y-skip-link { background: ButtonFace; color: ButtonText; border: 2px solid ButtonText; }
  .a11y-track { background: ButtonText; }
}
@media print {
  .a11y-widget, .a11y-skip-links { display: none !important; }
}

/* Declaration page */
.a11y-declaration { max-width: 800px; margin: 3rem auto; padding: 0 1.5rem 4rem; line-height: 1.7; }
.a11y-declaration h1 { font-size: 2rem; color: var(--a11y-color-primary); border-bottom: 3px solid var(--a11y-color-accent); padding-bottom: .75rem; margin-bottom: 2rem; }
.a11y-declaration h2 { font-size: 1.5rem; color: var(--a11y-color-primary); margin-top: 2rem; }
.a11y-declaration h3 { font-size: 1.2rem; margin-top: 1.5rem; }
.a11y-declaration section { padding-bottom: 1.5rem; border-bottom: 1px solid var(--a11y-color-border); margin-bottom: 1rem; }
.a11y-declaration section:last-child { border-bottom: none; }
.a11y-declaration ul { padding-right: 1.5rem; padding-left: 0; }
.a11y-declaration li { margin-bottom: .5rem; }
.a11y-declaration a { color: var(--a11y-color-link); text-decoration: underline; }
.a11y-declaration a:focus-visible { outline: 3px solid var(--a11y-color-focus); outline-offset: 2px; border-radius: 2px; }
.a11y-declaration address { font-style: normal; background: var(--a11y-color-surface); border-right: 4px solid var(--a11y-color-primary); padding: 1rem 1.25rem; border-radius: 6px; margin: 1rem 0; }
.a11y-declaration kbd { background: var(--a11y-color-surface); border: 1px solid var(--a11y-color-border); border-radius: 4px; padding: .125rem .375rem; font-family: monospace; font-size: .875em; }

/* CTA block — replaces broken Elementor forms in static mirror */
.zhutavot-cta-block { display: flex; flex-direction: column; gap: .75rem; max-width: 480px; margin: 1rem auto; }
.zhutavot-cta-btn { display: flex; align-items: center; justify-content: center; gap: .65rem; padding: 1rem 1.25rem; border-radius: 6px; text-decoration: none; font-size: 1.1rem; font-weight: 600; line-height: 1.3; transition: transform .15s ease, box-shadow .15s ease; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.zhutavot-cta-btn:hover, .zhutavot-cta-btn:focus-visible { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.15); text-decoration: none; }
.zhutavot-cta-btn:focus-visible { outline: 3px solid var(--a11y-color-focus, #ff6b00); outline-offset: 2px; }
.zhutavot-cta-btn--call { background: #39b54a; color: #fff; }
.zhutavot-cta-btn--call:hover, .zhutavot-cta-btn--call:focus-visible { background: #2f9c3e; color: #fff; }
.zhutavot-cta-btn--email { background: #1c63b8; color: #fff; }
.zhutavot-cta-btn--email:hover, .zhutavot-cta-btn--email:focus-visible { background: #14528f; color: #fff; }
.zhutavot-cta-btn i { font-size: 1.1em; }

/* Legal-links footer bar — site-wide compliance with privacy/terms requirements */
.zhutavot-legal-footer { background: #2c3e50; color: #ecf0f1; padding: 1.5rem 1rem; text-align: center; font-size: .9rem; line-height: 1.7; direction: rtl; font-family: inherit; }
.zhutavot-legal-footer nav ul { list-style: none; padding: 0; margin: 0 0 .75rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center; }
.zhutavot-legal-footer nav li { display: inline-block; }
.zhutavot-legal-footer nav a { color: #ecf0f1; text-decoration: none; }
.zhutavot-legal-footer nav a:hover, .zhutavot-legal-footer nav a:focus-visible { text-decoration: underline; color: #fff; }
.zhutavot-legal-footer nav a:focus-visible { outline: 2px solid var(--a11y-color-focus, #ff6b00); outline-offset: 2px; border-radius: 2px; }
.zhutavot-legal-footer .zhutavot-legal-copyright { margin: 0; opacity: .85; font-size: .85rem; }
@media (max-width: 600px) {
  .zhutavot-legal-footer { padding: 1rem .5rem; font-size: .85rem; }
  .zhutavot-legal-footer nav ul { gap: .35rem 1rem; }
}

/* Cookie consent banner — own implementation, gates Google Analytics */
.zhutavot-consent { position: fixed; bottom: 0; inset-inline: 0; background: #fff; border-top: 3px solid #1c63b8; box-shadow: 0 -6px 20px rgba(0,0,0,.18); padding: 1.5rem 1.25rem; z-index: 9998; max-height: 90vh; overflow-y: auto; font-family: inherit; line-height: 1.6; direction: rtl; color: #2c3e50; }
.zhutavot-consent[hidden] { display: none; }
.zhutavot-consent__main { max-width: 1100px; margin: 0 auto; }
.zhutavot-consent h2 { font-size: 1.15rem; margin: 0 0 .5rem; color: #1c2935; }
.zhutavot-consent p { margin: 0 0 1rem; color: #2c3e50; }
.zhutavot-consent a { color: #1c63b8; text-decoration: underline; }
.zhutavot-consent__buttons { display: flex; flex-wrap: wrap; gap: .65rem; }
.zhutavot-consent__btn { padding: .65rem 1.25rem; border-radius: 6px; border: 2px solid transparent; font-size: 1rem; font-weight: 600; cursor: pointer; line-height: 1.3; min-width: 130px; transition: background .15s ease, color .15s ease, border-color .15s ease; font-family: inherit; }
.zhutavot-consent__btn:focus-visible { outline: 3px solid var(--a11y-color-focus, #ff6b00); outline-offset: 2px; }
.zhutavot-consent__btn--accept { background: #39b54a; color: #fff; }
.zhutavot-consent__btn--accept:hover { background: #2f9c3e; }
.zhutavot-consent__btn--reject { background: #fff; color: #2c3e50; border-color: #95a5a6; }
.zhutavot-consent__btn--reject:hover { background: #ecf0f1; border-color: #7f8c8d; }
.zhutavot-consent__btn--prefs { background: #fff; color: #1c63b8; border-color: #1c63b8; }
.zhutavot-consent__btn--prefs:hover { background: #ebf2fa; }
.zhutavot-consent__btn--save { background: #1c63b8; color: #fff; }
.zhutavot-consent__btn--save:hover { background: #14528f; }
.zhutavot-consent__prefs { max-width: 1100px; margin: 1rem auto 0; border-top: 1px solid #ecf0f1; padding-top: 1rem; }
.zhutavot-consent__prefs[hidden] { display: none; }
.zhutavot-consent__prefs fieldset { border: 1px solid #d5dbe0; border-radius: 6px; padding: .75rem 1rem; margin: 0 0 .75rem; }
.zhutavot-consent__prefs legend { font-weight: 600; color: #1c2935; padding: 0 .5rem; }
.zhutavot-consent__prefs p { font-size: .9rem; margin: 0 0 .5rem; }
.zhutavot-consent__prefs label { display: flex; align-items: center; gap: .5rem; margin: 0; cursor: pointer; }
.zhutavot-consent__prefs label input[type=checkbox] { width: 1.1em; height: 1.1em; cursor: pointer; }
.zhutavot-consent__prefs label input[type=checkbox]:disabled { cursor: not-allowed; }
@media (max-width: 600px) {
  .zhutavot-consent { padding: 1rem .75rem; }
  .zhutavot-consent__btn { flex: 1 1 calc(50% - .325rem); min-width: 0; padding: .65rem .5rem; }
}

/* Gallery — masonry-ish grid with click-to-zoom lightbox */
.zhu-gallery-wrap { max-width: 1240px; margin: 1.5rem auto 2.5rem; padding: 0 1rem; direction: rtl; }
.zhu-gallery-heading { font-size: 1.5rem; color: #1c2935; margin: 0 0 1.25rem; text-align: center; font-weight: 700; }
.zhu-gallery { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); grid-auto-rows: 200px; grid-auto-flow: dense; }
.zhu-gallery__item { margin: 0; position: relative; border-radius: 10px; overflow: hidden; background: #ecf0f1; box-shadow: 0 2px 8px rgba(0,0,0,.08); transition: box-shadow .25s ease, transform .25s ease; }
.zhu-gallery__item:hover { box-shadow: 0 6px 22px rgba(0,0,0,.18); transform: translateY(-2px); }
/* Visual rhythm — span certain cells */
.zhu-gallery__item:nth-child(7n+3) { grid-column: span 2; }
.zhu-gallery__item:nth-child(11n+5) { grid-row: span 2; }
.zhu-gallery__item:nth-child(13n+9) { grid-column: span 2; grid-row: span 2; }
.zhu-gallery__btn { display: block; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; background: transparent; cursor: zoom-in; position: relative; overflow: hidden; }
.zhu-gallery__btn:focus-visible { outline: 3px solid var(--a11y-color-focus, #ff6b00); outline-offset: -3px; }
.zhu-gallery__btn img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.zhu-gallery__btn:hover img, .zhu-gallery__btn:focus-visible img { transform: scale(1.06); }
.zhu-gallery__btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.55)); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.zhu-gallery__btn:hover::after, .zhu-gallery__btn:focus-visible::after { opacity: 1; }
.zhu-gallery__caption { position: absolute; inset-inline: 12px; bottom: 10px; color: #fff; font-size: .9rem; line-height: 1.3; opacity: 0; transition: opacity .25s ease; pointer-events: none; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.zhu-gallery__btn:hover .zhu-gallery__caption, .zhu-gallery__btn:focus-visible .zhu-gallery__caption { opacity: 1; }
@media (max-width: 600px) {
  .zhu-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); grid-auto-rows: 140px; gap: 8px; }
  .zhu-gallery__item:nth-child(13n+9) { grid-column: span 2; grid-row: auto; }
}

/* Lightbox */
.zhu-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.93); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 1.5rem; direction: rtl; }
.zhu-lightbox[hidden] { display: none; }
.zhu-lightbox__figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.zhu-lightbox__img { max-width: min(92vw, 1400px); max-height: 80vh; object-fit: contain; display: block; border-radius: 6px; background: #111; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.zhu-lightbox__caption { color: #fff; text-align: center; margin: 0; font-size: 1rem; max-width: 90vw; line-height: 1.5; }
.zhu-lightbox__counter { color: rgba(255,255,255,.65); font-size: .85rem; font-variant-numeric: tabular-nums; }
.zhu-lightbox__close, .zhu-lightbox__nav { position: absolute; background: rgba(0,0,0,.55); color: #fff; border: 0; cursor: pointer; line-height: 1; border-radius: 999px; transition: background .2s ease, transform .15s ease; display: flex; align-items: center; justify-content: center; font-family: inherit; }
.zhu-lightbox__close:hover, .zhu-lightbox__close:focus-visible, .zhu-lightbox__nav:hover, .zhu-lightbox__nav:focus-visible { background: rgba(255,255,255,.22); transform: scale(1.05); }
.zhu-lightbox__close:focus-visible, .zhu-lightbox__nav:focus-visible { outline: 3px solid var(--a11y-color-focus, #ff6b00); outline-offset: 3px; }
.zhu-lightbox__close { top: 1rem; inset-inline-start: 1rem; width: 2.75rem; height: 2.75rem; font-size: 1.6rem; }
.zhu-lightbox__nav { top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; font-size: 2rem; font-weight: 700; }
.zhu-lightbox__nav:hover, .zhu-lightbox__nav:focus-visible { transform: translateY(-50%) scale(1.05); }
.zhu-lightbox__nav--prev { inset-inline-end: 1rem; }
.zhu-lightbox__nav--next { inset-inline-start: 1rem; }
.zhu-lightbox .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 600px) {
  .zhu-lightbox { padding: .5rem; }
  .zhu-lightbox__nav { width: 2.5rem; height: 2.5rem; font-size: 1.6rem; }
  .zhu-lightbox__close { width: 2.5rem; height: 2.5rem; top: .5rem; inset-inline-start: .5rem; }
}
