/* =========================================================
   ד.ר שחקים – רכיב נגישות (תקן ישראלי 5568 / WCAG 2.0 AA)
   ========================================================= */

/* ---------- דלג לתוכן ---------- */
.acc-skip-link {
  position: fixed;
  top: -100px;
  right: 16px;
  z-index: 100000;
  background: #0B1E3D;
  color: #fff;
  padding: 12px 22px;
  border-radius: 0 0 8px 8px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s ease;
}
.acc-skip-link:focus {
  top: 0;
  outline: 3px solid #C9972B;
  outline-offset: 2px;
}

/* ---------- מיקוד מקלדת ברור בכל האתר ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #C9972B !important;
  outline-offset: 2px !important;
  border-radius: 3px;
}

/* ---------- כפתור פתיחת התפריט ---------- */
.acc-widget * { box-sizing: border-box; }

.acc-toggle {
  position: fixed;
  bottom: 22px;
  inset-inline-start: 22px; /* צד שמאל ב-RTL */
  z-index: 99990;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #0B1E3D;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 6px 22px rgba(0,0,0,.32);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, background .25s ease;
}
.acc-toggle:hover { background: #12294F; transform: scale(1.06); }
.acc-toggle:focus-visible { outline: 3px solid #C9972B; outline-offset: 3px; }
.acc-toggle svg { width: 32px; height: 32px; fill: #fff; }

@media (max-width: 600px) {
  .acc-toggle { width: 50px; height: 50px; bottom: 16px; inset-inline-start: 16px; }
  .acc-toggle svg { width: 27px; height: 27px; }
}

/* ---------- חלונית התפריט ---------- */
.acc-panel {
  position: fixed;
  bottom: 90px;
  inset-inline-start: 22px;
  z-index: 99991;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: 80vh;
  overflow-y: auto;
  background: #fff;
  color: #1a1a1a;
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(0,0,0,.3);
  border: 1px solid #e2e2e2;
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 15px;
  direction: rtl;
  text-align: right;
}
.acc-panel[hidden] { display: none; }

@media (max-width: 600px) {
  .acc-panel { bottom: 76px; inset-inline-start: 16px; width: calc(100vw - 32px); }
}

.acc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0B1E3D;
  color: #fff;
  padding: 14px 18px;
  border-radius: 14px 14px 0 0;
  position: sticky;
  top: 0;
}
.acc-panel-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.acc-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
}
.acc-close:hover { background: rgba(255,255,255,.15); }

.acc-panel-body { padding: 14px; }

/* קבוצת גודל טקסט */
.acc-fontsize {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #f4f6f9;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.acc-fontsize .acc-fs-label { font-weight: 700; font-size: 14px; }
.acc-fontsize .acc-fs-btns { display: flex; gap: 6px; }
.acc-fontsize button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #cfd6e0;
  background: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  color: #0B1E3D;
}
.acc-fontsize button:hover { background: #0B1E3D; color: #fff; }

/* רשת כפתורי נגישות */
.acc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.acc-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  min-height: 72px;
  padding: 10px 6px;
  border: 1px solid #d7dce3;
  border-radius: 10px;
  background: #fff;
  color: #1a1a1a;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  line-height: 1.3;
}
.acc-btn:hover { border-color: #0B1E3D; background: #f4f6f9; }
.acc-btn svg { width: 24px; height: 24px; fill: #0B1E3D; }
.acc-btn.is-active {
  background: #0B1E3D;
  color: #fff;
  border-color: #0B1E3D;
}
.acc-btn.is-active svg { fill: #C9972B; }

/* כותרת קטגוריה */
.acc-cat-title {
  font-size: 12px;
  font-weight: 700;
  color: #6B7280;
  margin: 14px 4px 8px;
  text-transform: none;
}
.acc-cat-title:first-child { margin-top: 0; }

/* תחתית */
.acc-panel-foot {
  padding: 12px 14px 16px;
  border-top: 1px solid #eee;
}
.acc-reset {
  width: 100%;
  padding: 10px;
  background: #C9972B;
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
}
.acc-reset:hover { background: #b3851f; }
.acc-statement-link {
  display: block;
  text-align: center;
  font-size: 13.5px;
  color: #0B1E3D;
  font-weight: 700;
  text-decoration: underline;
}
.acc-credit {
  text-align: center;
  font-size: 11px;
  color: #9aa1ab;
  margin-top: 10px;
}

/* =========================================================
   מצבי נגישות שמופעלים על <html> / <body>
   ========================================================= */

/* הערה: בכל מצבי הניגודיות אנו מחריגים את רכיב הנגישות עצמו
   (.acc-widget והצאצאים שלו, וכן קישור הדילוג) כדי שהתפריט יישאר קריא */

/* גווני אפור (מונוכרום) – על תוכן הדף בלבד, לא על התפריט */
body.acc-grayscale > *:not(.acc-widget):not(.acc-skip-link) {
  filter: grayscale(100%);
}

/* ---------- ניגודיות כהה ---------- */
body.acc-dark { background: #000 !important; }
body.acc-dark *:not(.acc-widget):not(.acc-widget *):not(.acc-skip-link) {
  background-color: #000 !important;
  background-image: none !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
/* קישורים – צהוב בולט */
body.acc-dark a:not(.acc-widget *):not(.acc-skip-link),
body.acc-dark a:not(.acc-widget *) *:not(.acc-widget *) {
  color: #ffea00 !important;
}
/* כפתורים – צהוב עם טקסט שחור, קריא */
body.acc-dark .btn:not(.acc-widget *),
body.acc-dark .btn-gold:not(.acc-widget *),
body.acc-dark .btn-submit:not(.acc-widget *),
body.acc-dark button:not(.acc-widget *):not(.acc-skip-link) {
  background-color: #ffea00 !important;
  color: #000 !important;
  border: 2px solid #fff !important;
}
body.acc-dark .btn:not(.acc-widget *) *,
body.acc-dark button:not(.acc-widget *) * { color: #000 !important; }
body.acc-dark img:not(.acc-widget *) { opacity: .92; }

/* ---------- ניגודיות בהירה ---------- */
body.acc-light { background: #fff !important; }
body.acc-light *:not(.acc-widget):not(.acc-widget *):not(.acc-skip-link) {
  background-color: #fff !important;
  background-image: none !important;
  color: #000 !important;
  border-color: #000 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
/* קישורים – כחול כהה עם קו תחתון */
body.acc-light a:not(.acc-widget *):not(.acc-skip-link),
body.acc-light a:not(.acc-widget *) *:not(.acc-widget *) {
  color: #00148c !important;
  text-decoration: underline !important;
}
/* כפתורים – כהה עם טקסט לבן, קריא */
body.acc-light .btn:not(.acc-widget *),
body.acc-light .btn-gold:not(.acc-widget *),
body.acc-light .btn-submit:not(.acc-widget *),
body.acc-light button:not(.acc-widget *):not(.acc-skip-link) {
  background-color: #0B1E3D !important;
  color: #fff !important;
  border: 2px solid #000 !important;
}
body.acc-light .btn:not(.acc-widget *) *,
body.acc-light button:not(.acc-widget *) * { color: #fff !important; }
body.acc-light img:not(.acc-widget *) { filter: contrast(1.1); }

/* ---------- הדגשת קישורים ---------- */
body.acc-links a:not(.acc-widget *):not(.acc-skip-link) {
  text-decoration: underline !important;
  text-underline-offset: 3px;
  outline: 2px solid #C9972B;
  outline-offset: 1px;
  background-color: #fff8e6 !important;
  color: #0B1E3D !important;
  border-radius: 3px;
}
body.acc-links a:not(.acc-widget *) * { color: #0B1E3D !important; }

/* ---------- הדגשת כותרות (כולל כפיית טקסט כהה כדי שלא ייעלם) ---------- */
body.acc-titles h1:not(.acc-widget *),
body.acc-titles h2:not(.acc-widget *),
body.acc-titles h3:not(.acc-widget *),
body.acc-titles h4:not(.acc-widget *),
body.acc-titles h5:not(.acc-widget *) {
  outline: 3px solid #C9972B;
  outline-offset: 3px;
  background-color: #fff8e6 !important;
  color: #0B1E3D !important;
  -webkit-text-fill-color: #0B1E3D !important;
  text-shadow: none !important;
  border-radius: 4px;
  padding: 2px 6px;
}
body.acc-titles h1:not(.acc-widget *) *,
body.acc-titles h2:not(.acc-widget *) *,
body.acc-titles h3:not(.acc-widget *) *,
body.acc-titles h4:not(.acc-widget *) *,
body.acc-titles h5:not(.acc-widget *) * {
  color: #0B1E3D !important;
  -webkit-text-fill-color: #0B1E3D !important;
}

/* גופן קריא */
body.acc-readable,
body.acc-readable * {
  font-family: Arial, "Segoe UI", "Tahoma", sans-serif !important;
  letter-spacing: .3px;
}

/* ריווח טקסט מוגדל */
body.acc-spacing p,
body.acc-spacing li,
body.acc-spacing a,
body.acc-spacing span,
body.acc-spacing td,
body.acc-spacing h1,
body.acc-spacing h2,
body.acc-spacing h3,
body.acc-spacing h4 {
  letter-spacing: 1.5px !important;
  word-spacing: 4px !important;
  line-height: 2 !important;
}

/* עצירת אנימציות והבהובים */
body.acc-no-anim *,
body.acc-no-anim *::before,
body.acc-no-anim *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* סמן גדול */
body.acc-cursor,
body.acc-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='1' d='M5 2l14 7-6 1.5L17 17l-2.5 1.5L11 12l-4 4z'/%3E%3C/svg%3E"), auto !important;
}

/* תמיכה בהעדפת מערכת – הקטנת תנועה */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
