/* ============================================================
   נגישות + באנר עוגיות: סגנונות משותפים לכל עמודי האתר
   ============================================================ */

/* ---- מצבי תצוגה ---- */
html.a11y-grayscale { filter: grayscale(1); }
html.a11y-contrast { filter: invert(1) hue-rotate(180deg); }
/* תמונות מוחזרות לצבע המקורי. אייקוני svg לא: היפוך חוזר מעלים אותם על הרקע ההפוך. */
html.a11y-contrast img,
html.a11y-contrast .slide,
html.a11y-contrast [style*="background-image"],
html.a11y-contrast iframe { filter: invert(1) hue-rotate(180deg); }
html.a11y-grayscale.a11y-contrast { filter: grayscale(1) invert(1) hue-rotate(180deg); }

html.a11y-readable, html.a11y-readable * {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;
  letter-spacing: .01em !important;
}

html.a11y-links a {
  text-decoration: underline !important;
  text-underline-offset: 3px;
  outline: 2px solid #84442A;
  outline-offset: 2px;
}

html.a11y-noanim *, html.a11y-noanim *::before, html.a11y-noanim *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
/* בלי אנימציה, רכיבים שמתחילים שקופים חייבים להופיע במצב הסופי שלהם */
html.a11y-noanim .reveal, html.a11y-noanim .check-circle { opacity: 1 !important; transform: none !important; }
html.a11y-noanim .check-path { stroke-dashoffset: 0 !important; }
html.a11y-noanim .hero-img, html.a11y-noanim .media-show .slide-base { transform: none !important; }

/* ---- טבעת פוקוס מקלדת ----
   ברירת מחדל: טבעת כהה לרקעים בהירים. על רקע כהה: טבעת בהירה. */
:focus-visible { outline: 3px solid #84442A; outline-offset: 3px; }
.bg-ink-900 :focus-visible,
.cookie-bar :focus-visible { outline-color: #E3B79C; }
.a11y-panel :focus-visible { outline-color: #84442A; }
/* רכיבים כהים שצפים מעל תוכן משתנה: הטבעת בתוך הרכיב עצמו */
.a11y-fab [data-a11y-toggle]:focus-visible,
.skip-link:focus-visible { outline: 3px solid #E3B79C; outline-offset: -6px; }
main[tabindex="-1"]:focus, main[tabindex="-1"]:focus-visible { outline: none; }

/* ---- ווידג'ט נגישות ---- */
.a11y-panel { transform: translateY(12px); opacity: 0; visibility: hidden; pointer-events: none; transition: transform .25s ease, opacity .25s ease, visibility 0s linear .25s; }
.a11y-panel.is-open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; transition: transform .25s ease, opacity .25s ease, visibility 0s; }
.a11y-opt { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.a11y-opt.is-active { background-color:#84442A; border-color:#84442A; color:#FFFFFF; font-weight:600; }
.a11y-press:active { transform: scale(.97); }

/* ---- באנר עוגיות ---- */
.cookie-bar { transform: translateY(140%); transition: transform .45s cubic-bezier(.22,.61,.36,1); }
.cookie-bar.is-visible { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .a11y-panel, .cookie-bar { transition: none !important; }
  .a11y-press:active { transform: none; }
}

/* הרמת כפתור הנגישות מעל סרגל הפעולה במובייל, ומעל באנר העוגיות כשהוא מוצג */
.a11y-fab { transition: bottom .35s cubic-bezier(.22,.61,.36,1); }
body.cta-on .a11y-fab { bottom: calc(5.6rem + env(safe-area-inset-bottom)); }
@media (max-width: 1023px) {
  body:has(.cookie-bar.is-visible) .a11y-fab { bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
}

/* טאבלט צר: הבאנר גבוה יותר, אז כפתור הנגישות עולה מעליו */
@media (min-width:640px) and (max-width:1023px){
  body:has(.cookie-bar.is-visible) .a11y-fab { bottom: calc(9.5rem + env(safe-area-inset-bottom)); }
}
