/* ============================================================
   יעלילנד - רכיב נגישות
   תקן ישראלי 5568 / WCAG 2.0 AA
   נטען בכל עמודי האתר
   ============================================================ */

/* טקסט לקוראי מסך בלבד */
.sr-only{
  position:absolute !important;
  width:1px; height:1px;
  margin:-1px; padding:0;
  overflow:hidden;
  clip:rect(0,0,0,0);
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}

/* ---------- דילוג לתוכן ---------- */
.skip-link{
  position:fixed;
  top:0;
  inset-inline-start:0;
  z-index:9999;
  background:#26315A;
  color:#fff;
  padding:14px 24px;
  border-radius:0 0 12px 0;
  font-weight:700;
  font-family:inherit;
  text-decoration:none;
  transform:translateY(-200%);
  transition:transform .2s ease;
}
.skip-link:focus{
  transform:translateY(0);
  outline:3px solid #fff;
  outline-offset:-3px;
}

/* ---------- מיקוד מקלדת גלוי בכל האתר ---------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
summary:focus-visible{
  outline:3px solid #26315A;
  outline-offset:3px;
  box-shadow:0 0 0 6px rgba(255,255,255,.9);
  border-radius:6px;
}
body.a11y-contrast :is(a,button,[tabindex],input,summary):focus-visible{
  outline-color:#ffe600 !important;
}

/* ============================================================
   כפתור הנגישות הצף
   ============================================================ */
.a11y-toggle{
  position:fixed;
  inset-inline-end:16px;
  bottom:16px;
  z-index:9000;
  width:56px;
  height:56px;
  border-radius:50%;
  border:2px solid #fff;
  background:#26315A;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 10px 26px -8px rgba(38,49,90,.55);
  transition:transform .25s ease, background .25s ease;
}
.a11y-toggle:hover{ transform:scale(1.07); background:#E0489A; }
.a11y-toggle svg{ width:30px; height:30px; fill:currentColor; }

/* ============================================================
   פאנל הנגישות
   ============================================================ */
.a11y-panel{
  position:fixed;
  inset-inline-end:16px;
  bottom:84px;
  z-index:9001;
  width:min(320px, calc(100vw - 32px));
  max-height:min(72vh, 560px);
  overflow-y:auto;
  background:#fff;
  color:#26315A;
  border-radius:20px;
  border:1px solid rgba(38,49,90,.12);
  box-shadow:0 30px 60px -18px rgba(38,49,90,.4);
  padding:20px;
  font-family:"Segoe UI","Arial Hebrew",-apple-system,"Rubik",system-ui,sans-serif;
  opacity:0;
  visibility:hidden;
  transform:translateY(14px) scale(.97);
  transition:opacity .25s ease, transform .25s ease, visibility .25s;
}
.a11y-panel.open{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
}
.a11y-panel h2{
  font-size:19px;
  font-weight:700;
  margin:0 0 4px;
  font-family:inherit;
}
.a11y-panel .a11y-sub{
  font-size:13px;
  color:#5B6690;
  margin-bottom:16px;
}
.a11y-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.a11y-close{
  background:transparent;
  border:none;
  cursor:pointer;
  font-size:26px;
  line-height:1;
  color:#5B6690;
  min-width:44px;
  min-height:44px;
  padding:2px 6px;
  border-radius:8px;
}
.a11y-close:hover{ background:#F9D9EB; color:#26315A; }

.a11y-group{
  border-top:1px solid rgba(38,49,90,.1);
  padding-top:14px;
  margin-top:14px;
}
.a11y-group-title{
  font-size:12px;
  font-weight:700;
  letter-spacing:.4px;
  color:#C42B7D;
  margin-bottom:10px;
}
.a11y-options{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.a11y-btn{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:12px 6px;
  min-height:74px;
  border-radius:12px;
  border:1.5px solid rgba(38,49,90,.14);
  background:#F9FAFD;
  color:#26315A;
  font-family:inherit;
  font-size:12.5px;
  font-weight:600;
  line-height:1.25;
  text-align:center;
  cursor:pointer;
  transition:border-color .2s, background .2s, transform .15s;
}
.a11y-btn:hover{ border-color:#E0489A; background:#FBEFF5; }
.a11y-btn:active{ transform:scale(.97); }
.a11y-btn[aria-pressed="true"]{
  border-color:#C42B7D;
  background:#C42B7D;
  color:#fff;
}
.a11y-btn svg{ width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.8; }
.a11y-btn .a11y-val{
  font-size:11px;
  font-weight:700;
  opacity:.75;
}
.a11y-reset{
  width:100%;
  margin-top:14px;
  padding:12px;
  border-radius:12px;
  border:1.5px solid #c8342f;
  background:#fff;
  color:#c8342f;
  font-family:inherit;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
}
.a11y-reset:hover{ background:#c8342f; color:#fff; }
.a11y-statement{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  text-align:center;
  margin-top:8px;
  font-size:13px;
  font-weight:600;
  color:#17688C;
  text-decoration:underline;
}

/* ============================================================
   מצבי הנגישות עצמם
   ============================================================ */

/* גודל טקסט - נשלט דרך משתנה על html */
html{ font-size:calc(16px * var(--a11y-font-scale, 1)); }

/* ניגודיות גבוהה - כהה
   הכלל הכללי עטוף ב-:where כדי שלא יגבר על כללים ספציפיים (כפתורים, קישורים). */
body.a11y-contrast,
body.a11y-contrast .page,
body.a11y-contrast section,
body.a11y-contrast .foot,
body.a11y-contrast .final-card,
body.a11y-contrast .addon,
body.a11y-contrast .legal-card{
  background:#000 !important;
  color:#fff !important;
}
body.a11y-contrast :where(*:not(.a11y-panel):not(.a11y-panel *):not(.a11y-toggle):not(.a11y-toggle *):not(canvas)){
  color:#fff !important;
  background-color:#000 !important;
  border-color:#fff !important;
  box-shadow:none !important;
  text-shadow:none !important;
}
body.a11y-contrast :where(*:not(.a11y-panel):not(.a11y-panel *):not(.a11y-toggle):not(.a11y-toggle *):not(.badge)){
  background-image:none !important;
}
body.a11y-contrast a:not(.btn):not(.a11y-btn){ color:#ffe600 !important; text-decoration:underline !important; }
body.a11y-contrast .fab-stack{ background-color:transparent !important; }
body.a11y-contrast .btn{ background:#ffe600 !important; color:#000 !important; }
body.a11y-contrast .btn *{ color:#000 !important; background-color:transparent !important; }
body.a11y-contrast .btn .ig{ stroke:#000; }
body.a11y-contrast .btn .ig [fill="#fff"]{ fill:#000; }
body.a11y-contrast .btn .wa{ fill:#000; }
body.a11y-contrast img{ filter:grayscale(.2) contrast(1.15); }
body.a11y-contrast *::before, body.a11y-contrast *::after{
  background-image:none !important;
  background-color:transparent !important;
  color:#fff !important;
  border-color:#fff !important;
  box-shadow:none !important;
}

/* ניגודיות בהירה */
body.a11y-light,
body.a11y-light .page,
body.a11y-light section,
body.a11y-light .foot{
  background:#fff !important;
  color:#000 !important;
}
body.a11y-light :where(*:not(.a11y-panel):not(.a11y-panel *):not(.a11y-toggle):not(.a11y-toggle *)){
  color:#000 !important;
  text-shadow:none !important;
}
body.a11y-light :where(*:not(.a11y-panel):not(.a11y-panel *):not(.a11y-toggle):not(.a11y-toggle *):not(.badge)){
  background-image:none !important;
}
body.a11y-light a:not(.btn){ color:#00408f !important; text-decoration:underline !important; }
body.a11y-light .btn{ background:#00408f !important; color:#fff !important; }
body.a11y-light .btn *{ color:#fff !important; }
body.a11y-light .ig-icon,
body.a11y-light .fab-ig{ background-color:#00408f !important; }
body.a11y-light *::before, body.a11y-light *::after{ background-image:none !important; }

/* גווני אפור והיפוך צבעים - הפילטר על html ולא על body: פילטר על body הופך אותו
   לגוף ההתייחסות של אלמנטים עם position:fixed (הכפתור הצף והווידג'ט היו קופצים לתחתית העמוד) */
html.a11y-grayscale{ filter:grayscale(1); }
html.a11y-invert{ filter:invert(1) hue-rotate(180deg); }
html.a11y-invert img,
html.a11y-invert video{ filter:invert(1) hue-rotate(180deg); }

/* הדגשת קישורים */
body.a11y-links a{
  text-decoration:underline !important;
  text-underline-offset:3px !important;
  font-weight:700 !important;
  outline:1.5px dashed currentColor;
  outline-offset:2px;
}

/* גופן קריא */
body.a11y-readable,
body.a11y-readable *:not(.a11y-panel):not(.a11y-panel *){
  font-family:Arial, "Heebo", sans-serif !important;
  letter-spacing:.4px !important;
  word-spacing:2px !important;
  line-height:1.75 !important;
}

/* עצירת אנימציות */
body.a11y-noanim *,
body.a11y-noanim *::before,
body.a11y-noanim *::after{
  animation:none !important;
  transition:none !important;
  scroll-behavior:auto !important;
}
body.a11y-noanim .reveal{
  opacity:1 !important;
  transform:none !important;
}

/* כיבוד העדפת מערכת */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
}

/* סמן גדול */
body.a11y-bigcursor,
body.a11y-bigcursor *{
  cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 2 L6 38 L15 30 L21 44 L28 41 L22 27 L34 27 Z' fill='%23000' stroke='%23fff' stroke-width='2.5'/%3E%3C/svg%3E") 4 2, auto !important;
}

@media (min-width:980px){
  .a11y-toggle{ bottom:16px; }
  .a11y-panel{ bottom:84px; }
}
