/* ===== SKIP LINK (IS 5568 — דלג לתוכן הראשי) ===== */
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;   /* RTL-safe off-screen */
  top: 0;
  z-index: 100000;
  background: var(--lime, #0d411d);
  color: #fff;
  padding: 12px 22px;
  border-radius: 0 0 10px 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: none;
}
.skip-link:focus {
  inset-inline-start: 50%;
  transform: translateX(50%);    /* center for RTL */
  outline: 3px solid #fff;
  outline-offset: 2px;
}
#main-content:focus { outline: none; }
#main-content:focus-visible { outline: 3px solid var(--lime-text, #0d411d); outline-offset: -3px; }

/* ===== ACCESSIBILITY WIDGET (v2) ===== */
.a11y-widget {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 99999;
  font-family: 'Heebo', sans-serif;
  direction: rtl;
}

/* Toggle button */
.a11y-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: #0d411d;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(13,65,29,0.55), 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.a11y-toggle:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 8px 32px rgba(13,65,29,0.7), 0 2px 8px rgba(0,0,0,0.3); }
.a11y-toggle svg { width: 26px; height: 26px; flex-shrink: 0; }

/* Panel */
.a11y-panel {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 0;
  width: 340px;
  max-height: min(78vh, 640px);
  overflow-y: auto;
  background: #fdfdfd;
  color: #151515;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(13,65,29,0.25);
  animation: a11yIn 0.25s cubic-bezier(0.34,1.56,0.64,1) both;
}
.a11y-panel[hidden] { display: none; }
.a11y-panel.a11y-panel--light { background: #F8F6F2; color: #1A1A1A; }
.a11y-panel.a11y-panel--light .a11y-panel__foot,
.a11y-panel.a11y-panel--light .a11y-section__label { color: rgba(0,0,0,0.45); }
.a11y-panel.a11y-panel--light .a11y-btn,
.a11y-panel.a11y-panel--light .a11y-opt,
.a11y-panel.a11y-panel--light .a11y-nav__link,
.a11y-panel.a11y-panel--light .a11y-reset { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); color: #1A1A1A; }
.a11y-panel.a11y-panel--light .a11y-btn small,
.a11y-panel.a11y-panel--light .a11y-opt__text { color: rgba(0,0,0,0.5); }
.a11y-panel.a11y-panel--light .a11y-divider,
.a11y-panel.a11y-panel--light .a11y-panel__head,
.a11y-panel.a11y-panel--light .a11y-panel__foot { border-color: rgba(0,0,0,0.08); }
.a11y-panel.a11y-panel--light .a11y-panel__head { background: rgba(13,65,29,0.08); }

@keyframes a11yIn {
  from { opacity:0; transform: translateY(12px) scale(0.96); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

/* Panel head */
.a11y-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  background: rgba(13,65,29,0.14);
  position: sticky;
  top: 0;
  z-index: 1;
}
.a11y-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  margin: 0;
}
.a11y-panel__title svg { width: 18px; height: 18px; color: var(--lime-text, #0d411d); }
.a11y-panel__head-actions { display: flex; align-items: center; gap: 6px; }
.a11y-panel__theme,
.a11y-panel__close {
  background: rgba(0,0,0,0.08);
  border: none;
  color: rgba(0,0,0,0.6);
  width: 30px; height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.a11y-panel__theme:hover,
.a11y-panel__close:hover { background: rgba(0,0,0,0.16); color: #fff; }
.a11y-panel--light .a11y-panel__theme,
.a11y-panel--light .a11y-panel__close { background: rgba(0,0,0,0.06); color: rgba(0,0,0,0.55); }
.a11y-panel--light .a11y-panel__theme:hover,
.a11y-panel--light .a11y-panel__close:hover { background: rgba(0,0,0,0.1); color: #000; }

/* Panel body */
.a11y-panel__body { padding: 16px 18px; }

.a11y-section { margin-bottom: 4px; }
.a11y-section__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.4);
  margin-bottom: 10px;
}

/* Quick nav */
.a11y-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.a11y-nav__link {
  display: block;
  background: rgba(0,0,0,0.06);
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  padding: 10px 8px;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.a11y-nav__link:hover { background: rgba(13,65,29,0.2); border-color: rgba(13,65,29,0.5); }

/* WhatsApp help CTA */
.a11y-help {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(37,211,102,0.1);
  border: 1.5px solid rgba(37,211,102,0.28);
  border-radius: 14px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.a11y-help:hover { background: rgba(37,211,102,0.18); border-color: rgba(37,211,102,0.5); }
.a11y-help__icon { font-size: 22px; flex-shrink: 0; }
.a11y-help__text strong { display: block; font-size: 12.5px; font-weight: 800; margin-bottom: 2px; }
.a11y-help__text span { display: block; font-size: 11px; color: rgba(0,0,0,0.55); line-height: 1.4; }
.a11y-panel--light .a11y-help__text span { color: rgba(0,0,0,0.55); }

/* Smart toggles (mic / screen reader / focus guide) */
.a11y-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 4px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.a11y-switch:last-child { border-bottom: none; }
.a11y-switch__label { display: flex; flex-direction: column; gap: 2px; }
.a11y-switch__label strong { font-size: 13px; font-weight: 700; }
.a11y-switch__label span { font-size: 11px; color: rgba(0,0,0,0.45); line-height: 1.4; }
.a11y-panel--light .a11y-switch__label span { color: rgba(0,0,0,0.5); }
.a11y-switch__toggle {
  position: relative;
  width: 42px; height: 24px;
  min-width: 42px;
  background: rgba(0,0,0,0.12);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s;
}
.a11y-switch__toggle::after {
  content: '';
  position: absolute;
  top: 3px; right: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.a11y-switch__toggle[aria-checked="true"] { background: #0d411d; }
.a11y-switch__toggle[aria-checked="true"]::after { transform: translateX(-18px); }

/* Size adjustment tabs (font / line-height / letter-spacing / scale) */
.a11y-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.a11y-tab {
  background: transparent;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  color: rgba(0,0,0,0.55);
  cursor: pointer;
  padding: 8px 4px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: 'Heebo', sans-serif;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.a11y-tab:hover { border-color: rgba(13,65,29,0.5); }
.a11y-tab[aria-selected="true"] { background: rgba(13,65,29,0.22); border-color: #0d411d; color: #fff; }
.a11y-panel--light .a11y-tab { color: rgba(0,0,0,0.55); }
.a11y-panel--light .a11y-tab[aria-selected="true"] { color: #1A1A1A; }

.a11y-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.a11y-btn {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  background: rgba(0,0,0,0.06);
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  font-family: 'Heebo', sans-serif;
}
.a11y-btn:hover { background: rgba(13,65,29,0.25); border-color: rgba(13,65,29,0.5); transform: translateY(-1px); }
.a11y-btn:active { transform: translateY(0); }
.a11y-row__value {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--lime-text, #0d411d);
}

/* Options grid (legacy display toggles) */
.a11y-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.a11y-opt {
  background: rgba(0,0,0,0.05);
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
  padding: 14px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s;
  font-family: 'Heebo', sans-serif;
  position: relative;
}
.a11y-opt__icon { font-size: 22px; line-height: 1; }
.a11y-opt__text { font-size: 11px; text-align: center; line-height: 1.3; color: rgba(0,0,0,0.6); }
.a11y-panel--light .a11y-opt__text { color: rgba(0,0,0,0.55); }
.a11y-opt__status {
  position: absolute;
  top: 8px; left: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s;
}
.a11y-opt:hover { background: rgba(13,65,29,0.18); border-color: rgba(13,65,29,0.4); }
.a11y-opt[aria-checked="true"] { background: rgba(13,65,29,0.25); border-color: #0d411d; }
.a11y-opt[aria-checked="true"] .a11y-opt__status { background: #7ED957; }
.a11y-opt[aria-checked="true"] .a11y-opt__text { color: #A9E88E; }

/* Divider */
.a11y-divider { height: 1px; background: rgba(0,0,0,0.07); margin: 14px 0; }
.a11y-panel--light .a11y-divider { background: rgba(0,0,0,0.08); }

/* Reset button */
.a11y-reset {
  width: 100%;
  background: rgba(0,0,0,0.05);
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  color: rgba(0,0,0,0.55);
  cursor: pointer;
  padding: 11px;
  font-family: 'Heebo', sans-serif;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.a11y-reset:hover { background: rgba(255,100,100,0.12); border-color: rgba(255,100,100,0.3); color: #FCA5A5; }

/* Color scheme override (כותרות / רקעים / טקסטים) */
.a11y-colorrow { margin-bottom: 14px; }
.a11y-colorrow:last-of-type { margin-bottom: 10px; }
.a11y-colorrow__label { font-size: 12px; font-weight: 700; margin-bottom: 8px; text-align: center; }
.a11y-swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.a11y-swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.15);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.a11y-swatch:hover { transform: scale(1.12); }
.a11y-swatch[aria-pressed="true"] { border-color: #0d411d; box-shadow: 0 0 0 2px rgba(13,65,29,0.45); }
.a11y-swatch--white { border-color: rgba(0,0,0,0.35); }
.a11y-panel--light .a11y-swatch--white { border-color: rgba(0,0,0,0.2); }
.a11y-colors-clear {
  display: block;
  margin: 4px auto 0;
  background: transparent;
  border: 1.5px solid rgba(0,0,0,0.15);
  color: inherit;
  border-radius: 100px;
  padding: 6px 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Heebo', sans-serif;
}
.a11y-colors-clear:hover { border-color: #0d411d; color: var(--lime-text, #0d411d); }

/* Panel footer */
.a11y-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 12px 14px;
  border-top: 1px solid rgba(0,0,0,0.07);
  background: rgba(21,154,150,0.12);
}
.a11y-panel__foot button,
.a11y-panel__foot a {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Heebo', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: rgba(0,0,0,0.7);
  text-decoration: none;
  padding: 4px 6px;
  transition: color 0.15s;
}
.a11y-panel--light .a11y-panel__foot button,
.a11y-panel--light .a11y-panel__foot a { color: rgba(0,0,0,0.6); }
.a11y-panel__foot button:hover,
.a11y-panel__foot a:hover { color: var(--lime-text, #0d411d); text-decoration: underline; }
.a11y-panel__foot button[aria-pressed="true"] { color: #b91c1c; }

.a11y-panel--light .a11y-panel__title svg,
.a11y-panel--light .a11y-row__value,
.a11y-panel--light .a11y-colors-clear:hover,
.a11y-panel--light .a11y-panel__foot button:hover,
.a11y-panel--light .a11y-panel__foot a:hover { color: var(--lime, #0d411d); }

/* ===== כיבוד העדפת מערכת ההפעלה: תנועה מופחתת ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== ACCESSIBILITY MODES (applied to <body>) ===== */

/* Contrast group — mutually exclusive (JS enforces only one at a time) */
body.a11y-high-contrast { filter: contrast(1.5) brightness(1.1); }
body.a11y-contrast-light { filter: brightness(1.25) contrast(0.95); }
body.a11y-contrast-dark { filter: brightness(0.72) contrast(1.15); }
body.a11y-grayscale { filter: grayscale(1); }
body.a11y-sat-low { filter: saturate(0.4); }
body.a11y-sat-high { filter: saturate(2.2); }

body.a11y-highlight-links a {
  outline: 2px solid #FACC15 !important;
  outline-offset: 2px;
  text-decoration: underline !important;
}

body.a11y-highlight-headings h1, body.a11y-highlight-headings h2,
body.a11y-highlight-headings h3, body.a11y-highlight-headings h4,
body.a11y-highlight-headings h5, body.a11y-highlight-headings h6 {
  outline: 2px dashed #FACC15 !important;
  outline-offset: 4px;
  background: rgba(250,204,21,0.08) !important;
}

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

body.a11y-enlarge-text,
body.a11y-enlarge-text p, body.a11y-enlarge-text li, body.a11y-enlarge-text span,
body.a11y-enlarge-text a, body.a11y-enlarge-text button {
  font-size: 1.25em !important;
  line-height: 1.6 !important;
}

body.a11y-stop-animations *,
body.a11y-stop-animations *::before,
body.a11y-stop-animations *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

body.a11y-hide-images img,
body.a11y-hide-images picture,
body.a11y-hide-images video,
body.a11y-hide-images svg:not(.a11y-widget svg) {
  visibility: hidden !important;
}

body.a11y-reading-mode header,
body.a11y-reading-mode nav,
body.a11y-reading-mode footer,
body.a11y-reading-mode aside,
body.a11y-reading-mode .cta-banner,
body.a11y-reading-mode .lead-popup {
  display: none !important;
}
body.a11y-reading-mode main,
body.a11y-reading-mode #main-content {
  max-width: 760px !important;
  margin: 0 auto !important;
  float: none !important;
  background: #fff !important;
  color: #111 !important;
  font-size: 1.1em !important;
  line-height: 1.9 !important;
  padding: 40px 20px !important;
}
body.a11y-reading-mode main *,
body.a11y-reading-mode #main-content * {
  background: transparent !important;
  color: #111 !important;
}

body.a11y-highlight-clickable a,
body.a11y-highlight-clickable button,
body.a11y-highlight-clickable [role="button"],
body.a11y-highlight-clickable input[type="submit"],
body.a11y-highlight-clickable input[type="button"] {
  outline: 2px solid #159a96 !important;
  outline-offset: 2px !important;
}

body.a11y-highlight-hover a:hover,
body.a11y-highlight-hover button:hover,
body.a11y-highlight-hover [role="button"]:hover {
  background: #FACC15 !important;
  color: #111 !important;
  outline: 3px solid #e08b28 !important;
}

body.a11y-keyboard-nav *:focus {
  outline: 3px solid #FACC15 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(250,204,21,0.25) !important;
}

/* Screen-reader-active cursor cue */
body.a11y-sr-active { cursor: pointer !important; }
body.a11y-sr-active .a11y-sr-speaking {
  outline: 2px dashed #0d411d !important;
  outline-offset: 3px !important;
}

/* תומך מיקוד — פס מיקוד מעומעם שעוקב אחרי העכבר */
.a11y-reading-guide {
  position: fixed;
  left: 0; right: 0;
  height: 64px;
  pointer-events: none;
  z-index: 9500;
  box-shadow: 0 0 0 2000px rgba(0,0,0,0.55);
  border-top: 2px solid #0d411d;
  border-bottom: 2px solid #0d411d;
  display: none;
}
body.a11y-focus-support-on .a11y-reading-guide { display: block; }

/* תומך קריאה — סרגל קריאה שעוקב אחרי העכבר (ללא עמעום) */
.a11y-reading-ruler {
  position: fixed;
  left: 0; right: 0;
  height: 3px;
  background: #FACC15;
  box-shadow: 0 0 10px 2px rgba(250,204,21,0.6);
  pointer-events: none;
  z-index: 9500;
  display: none;
}
body.a11y-reading-support-on .a11y-reading-ruler { display: block; }

/* Voice control listening indicator */
.a11y-mic-indicator {
  position: fixed;
  bottom: 96px;
  left: 28px;
  z-index: 99998;
  display: none;
  align-items: center;
  gap: 8px;
  background: #13131A;
  color: #fff;
  border: 1px solid rgba(13,65,29,0.4);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.a11y-mic-indicator.on { display: flex; }
.a11y-mic-indicator__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #b91c1c;
  animation: a11yPulse 1.2s ease infinite;
}
@keyframes a11yPulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* מסכי מגע (מובייל + טאבלט) */
@media (hover: none) and (pointer: coarse) {
  .a11y-panel__theme,
  .a11y-panel__close { width: 40px; height: 40px; font-size: 16px; }
  .a11y-swatch { width: 34px; height: 34px; }
  .a11y-btn { width: 48px; height: 48px; font-size: 20px; }
  .a11y-tab { padding: 11px 4px; font-size: 11px; }
  .a11y-opt { padding: 16px 8px 14px; min-height: 84px; justify-content: center; }
  .a11y-opt__icon { font-size: 24px; }
  .a11y-switch__toggle { width: 46px; height: 27px; min-width: 46px; }
  .a11y-switch__toggle::after { width: 20px; height: 20px; }
  .a11y-switch__toggle[aria-checked="true"]::after { transform: translateX(-19px); }
  .a11y-nav__link { padding: 12px 8px; }
  .a11y-panel__foot button,
  .a11y-panel__foot a { padding: 8px 6px; }
}

/* טאבלט */
@media (min-width: 481px) and (max-width: 1024px) {
  .a11y-panel { width: min(360px, calc(100vw - 40px)); }
}

/* מובייל */
@media (max-width: 480px) {
  .a11y-widget { bottom: 16px; left: 16px; }
  .a11y-panel { width: calc(100vw - 32px); left: 0; max-height: min(72vh, 640px); }
  .a11y-mic-indicator { left: 16px; bottom: 84px; }
  .a11y-options { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .a11y-opt__text { font-size: 10.5px; }
}

/* מובייל צר במיוחד */
@media (max-width: 360px) {
  .a11y-options { grid-template-columns: repeat(2, 1fr); }
}
