/* ─── שכבת נגישות (תקנה 35 / ת"י 5568) — מחלקות על <html> ─── */

/* קישור דילוג — מוסתר כלפי מעלה (לא הצידה, כדי לא ליצור גלילה אופקית) */
.skip-link {
  position: fixed; top: -80px; inset-inline-start: 16px; z-index: 200;
  background: #1c2333; color: #fff; padding: 10px 18px; border-radius: 0 0 10px 10px;
  font-size: 16px; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 0; }

/* פוקוס נראה */
:focus-visible { outline: 3px solid #3956d8 !important; outline-offset: 2px; }

/* גודל טקסט */
html.a11y-text-115 { font-size: 115%; }
html.a11y-text-130 { font-size: 130%; }
html.a11y-text-150 { font-size: 150%; }

/* ריווח שורות */
html.a11y-lines-16 body { line-height: 1.9 !important; }
html.a11y-lines-20 body { line-height: 2.3 !important; }

/* ניגודיות גבוהה */
html.a11y-contrast-high body { background: #fff !important; color: #000 !important; }
html.a11y-contrast-high p, html.a11y-contrast-high li, html.a11y-contrast-high span,
html.a11y-contrast-high h1, html.a11y-contrast-high h2, html.a11y-contrast-high h3,
html.a11y-contrast-high label, html.a11y-contrast-high div { color: #000 !important; }
html.a11y-contrast-high a { color: #001a9e !important; text-decoration: underline !important; }
html.a11y-contrast-high .card, html.a11y-contrast-high .about, html.a11y-contrast-high .contact-card,
html.a11y-contrast-high .chip, html.a11y-contrast-high .legal-box { background: #fff !important; border-color: #000 !important; }

/* היפוך צבעים */
html.a11y-contrast-invert { filter: invert(1) hue-rotate(180deg); background: #0a0a0a; }
html.a11y-contrast-invert #a11yWidgetPanel,
html.a11y-contrast-invert #a11yWidgetBtn { filter: invert(1) hue-rotate(180deg); }

/* מונוכרום */
html.a11y-contrast-mono { filter: grayscale(1); }

/* הדגשת קישורים */
html.a11y-links a { text-decoration: underline !important; background: #fff3bf !important; color: #1c2333 !important; }

/* הדגשת כותרות */
html.a11y-headings h1, html.a11y-headings h2, html.a11y-headings h3 {
  background: #fff3bf !important; color: #1c2333 !important; padding: 2px 8px; border-radius: 6px;
}

/* גופן קריא (מערכת בלבד) */
html.a11y-font body, html.a11y-font button, html.a11y-font input, html.a11y-font textarea {
  font-family: Arial, "Segoe UI", Tahoma, sans-serif !important;
}

/* סמן גדול */
html.a11y-cursor-big, html.a11y-cursor-big * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path d="M4 2 L20 12 L12 13.5 L16 21 L13 22.5 L9 15 L4 19 Z" fill="black" stroke="white" stroke-width="1.4"/></svg>') 4 2, auto !important;
}

/* עצירת אנימציות */
html.a11y-reduce-motion *, html.a11y-reduce-motion *::before, html.a11y-reduce-motion *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
html.a11y-reduce-motion .reveal { opacity: 1 !important; transform: none !important; }

/* כיבוד העדפת מערכת */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ─── הווידג'ט עצמו ─── */
#a11yWidgetBtn {
  position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 150;
  width: 54px; height: 54px; border-radius: 50%; border: 2px solid #fff;
  background: #1d4ed8; color: #fff; font-size: 26px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center;
}
#a11yWidgetBtn:hover { background: #1e40af; }
#a11yWidgetPanel {
  position: fixed; bottom: 86px; inset-inline-start: 22px; z-index: 150;
  width: min(340px, calc(100vw - 44px)); max-height: min(70vh, 560px); overflow-y: auto;
  background: #fff; color: #1c2333; border: 1px solid #cbd5e1; border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25); padding: 16px; display: none;
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
}
#a11yWidgetPanel.open { display: block; }
#a11yWidgetPanel h2 { font-size: 17px; margin: 0 0 12px; }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a11y-toggle {
  border: 1px solid #cbd5e1; border-radius: 10px; background: #f8fafc; color: #1c2333;
  padding: 10px 8px; font-size: 13.5px; cursor: pointer; text-align: center; line-height: 1.4;
}
.a11y-toggle .ic { display: block; font-size: 19px; margin-bottom: 4px; }
.a11y-toggle[aria-pressed="true"], .a11y-toggle.active { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.a11y-reset { margin-top: 10px; width: 100%; border: 0; border-radius: 10px; background: #e2e8f0; padding: 10px; font-size: 14px; cursor: pointer; }
.a11y-foot { margin-top: 10px; font-size: 12px; color: #5b6478; text-align: center; }
.a11y-foot a { color: #1d4ed8; }

@media print {
  html[class*="a11y-contrast"] { filter: none !important; background: #fff; }
  html[class*="a11y-text-"] { font-size: 100% !important; }
  html[class*="a11y-lines-"] body { line-height: normal !important; }
  #a11yWidgetBtn, #a11yWidgetPanel, .skip-link { display: none !important; }
}
