/* ========= תפריט נגישות – עיצוב והתאמות ========= */

/* ---------- הכפתור והתפריט ---------- */
.a11y { position: fixed; bottom: calc(20px + var(--banner-h, 0px)); right: 20px; z-index: 2000; font-family: var(--font); transition: bottom .3s ease; }
.a11y-toggle {
  width: 56px; height: 56px; border-radius: 50%; border: 3px solid #fff; background: #1181c8; color: #fff; cursor: pointer;
  display: grid; place-items: center; padding: 0; box-shadow: 0 8px 22px -6px rgba(10, 37, 64, .55); transition: transform .15s, background .2s;
}
.a11y-toggle:hover { background: #0d6aa8; transform: scale(1.06); }
.a11y-toggle svg { width: 30px; height: 30px; }
.a11y-toggle.is-active::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #f5a623; border: 2px solid #fff; }
.a11y-toggle:focus-visible, .a11y-panel button:focus-visible, .a11y-statement:focus-visible { outline: 3px solid #f5a623; outline-offset: 2px; }

.a11y-panel {
  position: absolute; bottom: 70px; right: 0; width: min(360px, calc(100vw - 24px)); max-height: min(calc(100vh - 110px - var(--banner-h, 0px)), 640px);
  display: flex; flex-direction: column; background: #fff; color: #1b2a3a; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px -12px rgba(10, 37, 64, .45), 0 0 0 1px rgba(10, 37, 64, .08);
  opacity: 0; transform: translateY(10px) scale(.98); transform-origin: bottom right; transition: opacity .18s, transform .18s;
}
.a11y-panel[hidden] { display: none; }
.a11y-panel.open { opacity: 1; transform: none; }

.a11y-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: #0a2540; color: #fff; }
.a11y-head h2 { margin: 0; font-size: 1.1rem; color: #fff; line-height: 1.3; }
.a11y-close { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; padding: 0; }
.a11y-close:hover { background: rgba(255,255,255,.25); }
.a11y-close svg { width: 18px; height: 18px; }

.a11y-body { padding: 6px 18px 4px; overflow-y: auto; overscroll-behavior: contain; }
.a11y-sec { padding: 12px 0; border-bottom: 1px solid #e3eaf1; }
.a11y-sec:last-child { border-bottom: 0; }
.a11y-label { font-size: .82rem; font-weight: 700; color: #5a6b7d; letter-spacing: .02em; margin-bottom: 10px; }

.a11y-size { display: grid; grid-template-columns: 52px 1fr 52px; align-items: stretch; border: 1.5px solid #cfdbe7; border-radius: 10px; overflow: hidden; }
.a11y-size button { display: grid; place-items: center; height: 46px; border: 0; background: #eef5fb; color: #0a2540; cursor: pointer; padding: 0; }
.a11y-size button:hover { background: #dcebf7; }
.a11y-size button svg { width: 20px; height: 20px; }
.a11y-size output { display: grid; place-items: center; font-weight: 700; font-size: 1.05rem; color: #0a2540; background: #fff; }

.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a11y-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: right;
  padding: 12px 12px 10px; min-height: 76px; font: 600 .88rem/1.25 var(--font); color: #0a2540; background: #f4f8fc;
  border: 1.5px solid #d6e1ec; border-radius: 10px; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.a11y-tile svg { width: 24px; height: 24px; flex: none; color: #1181c8; }
.a11y-tile:hover { border-color: #1181c8; background: #eaf3fb; }
.a11y-tile[aria-pressed="true"] { background: #1181c8; border-color: #1181c8; color: #fff; }
.a11y-tile[aria-pressed="true"] svg { color: #fff; }
.a11y-tile[aria-pressed="true"]::after {
  content: ""; position: absolute; top: 10px; left: 10px; width: 16px; height: 16px; border-radius: 50%; background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.500l2.700 2.700L12 5.500' fill='none' stroke='%231181c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.a11y-foot { display: flex; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid #e3eaf1; background: #f9fbfd; }
.a11y-reset, .a11y-statement {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 10px; border-radius: 10px;
  font: 600 .88rem/1.2 var(--font); cursor: pointer; text-decoration: none; transition: background .15s, color .15s;
}
.a11y-reset { background: #fff; color: #b3261e; border: 1.5px solid #e9b8b4; }
.a11y-reset:hover { background: #b3261e; border-color: #b3261e; color: #fff; }
.a11y-statement { background: #0a2540; color: #fff; border: 1.5px solid #0a2540; }
.a11y-statement:hover { background: #1181c8; border-color: #1181c8; }
.a11y-reset svg, .a11y-statement svg { width: 18px; height: 18px; flex: none; }

@media (max-width: 620px) {
  .a11y { right: 14px; }
  .a11y-toggle { width: 52px; height: 52px; }
}

/* סרגל קריאה */
.a11y-guide { position: fixed; left: 0; right: 0; top: -100px; height: 44px; z-index: 1900; pointer-events: none; background: rgba(255, 221, 51, .18); border-top: 3px solid #f5a623; border-bottom: 3px solid #f5a623; }
.a11y-guide[hidden] { display: none; }

/* ======================= התאמות לאתר ======================= */
/* הערה: לא משתמשים ב-filter על body כי הוא שובר אלמנטים קבועים (כותרת עליונה). */

/* גודל טקסט – נשלט מ-JS דרך font-size על html (האתר בנוי ב-rem) */

/* גופן קריא */
html.a11y-font body, html.a11y-font body *:not(svg):not(svg *) { font-family: Arial, "Arial Hebrew", Tahoma, sans-serif !important; }
/* ריווח אותיות */
html.a11y-letters body { letter-spacing: .08em; word-spacing: .12em; }
/* ריווח שורות */
html.a11y-lh1 body, html.a11y-lh1 p, html.a11y-lh1 li, html.a11y-lh1 dd { line-height: 2.1 !important; }
html.a11y-lh2 body, html.a11y-lh2 p, html.a11y-lh2 li, html.a11y-lh2 dd { line-height: 2.6 !important; }
/* הדגשת קישורים */
html.a11y-links a:not(.a11y-toggle):not(.btn):not(.brand):not(.fab):not(.nav-apps *) { text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 2px; background: rgba(255, 221, 51, .35); color: inherit; }
/* הדגשת כותרות */
html.a11y-headings h1, html.a11y-headings h2, html.a11y-headings h3, html.a11y-headings h4 { outline: 2px dashed #1181c8; outline-offset: 6px; background: rgba(17, 129, 200, .08); }
html.a11y-headings .a11y-head h2 { outline: 0; background: none; }
/* סמן גדול */
html.a11y-cursor, html.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M6 3l26 20-11.500 2.500L27 38l-5.500 2.500-6-12.500L6 36z' fill='%23000' stroke='%23fff' stroke-width='2.500' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}
/* הדגשת פוקוס */
html.a11y-focus :focus, html.a11y-focus :focus-visible { outline: 4px solid #f5a623 !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px rgba(0, 0, 0, .75) !important; }
/* עצירת אנימציות */
html.a11y-nomotion *, html.a11y-nomotion *::before, html.a11y-nomotion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
/* הסתרת תמונות (למעט הלוגו) */
html.a11y-noimg img:not(.brand img) { visibility: hidden !important; }
html.a11y-noimg .hero-photo, html.a11y-noimg .photo, html.a11y-noimg .values-img .ph { background: #e8eef4 !important; }

/* גווני אפור והיפוך – על אלמנט html (לא על body) */
html.a11y-gray { filter: grayscale(1); }
html.a11y-invert { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert.a11y-gray { filter: invert(1) hue-rotate(180deg) grayscale(1); }
html.a11y-invert img:not(.brand img), html.a11y-invert video { filter: invert(1) hue-rotate(180deg); }

/* ---------- ניגודיות כהה: צהוב ולבן על שחור ---------- */
html.a11y-dark :where(body, body *:not(svg):not(svg *):not(img):not(.a11y-guide)) {
  background-color: #000 !important; background-image: none !important; color: #fff !important; border-color: #fff !important;
  text-shadow: none !important; box-shadow: none !important;
}
html.a11y-dark a, html.a11y-dark a * { color: #ffeb3b !important; }
html.a11y-dark .btn, html.a11y-dark button { border: 2px solid #ffeb3b !important; color: #ffeb3b !important; }
html.a11y-dark .btn-primary, html.a11y-dark .btn-signal, html.a11y-dark .btn-dark, html.a11y-dark .nav-cta { background-color: #ffeb3b !important; color: #000 !important; }
html.a11y-dark .hl, html.a11y-dark .label, html.a11y-dark .fact b, html.a11y-dark .n { color: #ffeb3b !important; }
html.a11y-dark svg { color: #ffeb3b; }
html.a11y-dark .fab { background-color: #ffeb3b !important; color: #000 !important; }
html.a11y-dark .fab, html.a11y-dark .fab * { color: #000 !important; }
html.a11y-dark .burger span { background-color: #fff !important; }
/* הלוגו ולוגואי הלקוחות על רקע בהיר כדי שיישארו גלויים */
html.a11y-dark .brand img { background: #fff !important; border-radius: 6px; padding: 3px; }
html.a11y-dark .logo, html.a11y-dark .logo * { background-color: #fff !important; mix-blend-mode: normal !important; }
html.a11y-dark .logo .no-logo-name { color: #000 !important; }
html.a11y-dark .cookie-bar { border-top: 3px solid #ffeb3b !important; }
/* מתג הנגישות עצמו */
html.a11y-dark .a11y-toggle { background-color: #ffeb3b !important; color: #000 !important; border-color: #000 !important; }
html.a11y-dark .a11y-toggle svg { color: #000 !important; }
html.a11y-dark .a11y-tile[aria-pressed="true"] { background-color: #ffeb3b !important; color: #000 !important; }
html.a11y-dark .a11y-tile[aria-pressed="true"] svg, html.a11y-dark .a11y-tile[aria-pressed="true"] span { color: #000 !important; }
html.a11y-dark .a11y-tile svg { color: #ffeb3b; }
html.a11y-dark .a11y-guide { background: rgba(255, 235, 59, .2); }

/* ---------- ניגודיות בהירה: שחור על לבן ---------- */
html.a11y-light :where(body, body *:not(svg):not(svg *):not(img):not(.a11y-guide)) {
  background-color: #fff !important; background-image: none !important; color: #000 !important; border-color: #000 !important;
  text-shadow: none !important; box-shadow: none !important;
}
html.a11y-light a, html.a11y-light a * { color: #0033cc !important; text-decoration: underline !important; }
html.a11y-light .btn, html.a11y-light button { border: 2px solid #000 !important; }
html.a11y-light .btn-primary, html.a11y-light .btn-signal, html.a11y-light .btn-dark, html.a11y-light .nav-cta,
html.a11y-light .site-header .btn { background-color: #000 !important; color: #fff !important; }
html.a11y-light .btn-primary *, html.a11y-light .btn-signal *, html.a11y-light .btn-dark *, html.a11y-light .nav-cta * { color: #fff !important; }
html.a11y-light .hero, html.a11y-light .hero * { background-color: #fff !important; }
html.a11y-light .hero h1, html.a11y-light .hero p, html.a11y-light .hero .eyebrow { color: #000 !important; }
html.a11y-light .brand, html.a11y-light .brand * { text-decoration: none !important; }
html.a11y-light .brand img { background: #fff !important; }
html.a11y-light .logo, html.a11y-light .logo * { mix-blend-mode: normal !important; }
html.a11y-light .fab { background-color: #000 !important; color: #fff !important; }
html.a11y-light .fab, html.a11y-light .fab * { color: #fff !important; text-decoration: none !important; }
html.a11y-light .burger span { background-color: #000 !important; }
html.a11y-light .a11y-toggle { background-color: #000 !important; color: #fff !important; }
html.a11y-light .a11y-toggle svg { color: #fff !important; }
html.a11y-light .a11y-tile[aria-pressed="true"], html.a11y-light .a11y-tile[aria-pressed="true"] span { background-color: #000 !important; color: #fff !important; }
html.a11y-light .a11y-tile[aria-pressed="true"] svg { color: #fff !important; }
html.a11y-light .a11y-head, html.a11y-light .a11y-head * { background-color: #000 !important; color: #fff !important; }
html.a11y-light .a11y-statement, html.a11y-light .a11y-statement * { background-color: #000 !important; color: #fff !important; text-decoration: none !important; }
html.a11y-light .a11y-guide { background: rgba(255, 221, 51, .3); }
