/* ============================================
   נגישות — ד"ר אלדד כץ
   תוסף נגישות + תיקוני WCAG 2.0 AA (ת"י 5568)
   נטען אחרי styles.css כדי לגבור היכן שצריך.
   ============================================ */

/* ---------- תיקון ניגודיות צבע אקסנט (AA) ----------
   ה-clay המקורי (#a07857) על לבן ~3.96:1 — נכשל ל-AA בטקסט קטן.
   גרסה כהה יותר לטקסט בלבד; הקישוטים (קווים/נקודות) נשארים בגוון המקורי. */
:root { --accent-text: #8a6446; }
.eyebrow { color: var(--accent-text); }
.service-card__link,
.contact-info__value a:hover,
.about-split__copy .quote-mark { color: var(--accent-text); }

/* ---------- Skip link ---------- */
/* טקסט לקוראי מסך בלבד (שמירה על היררכיית כותרות) */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -200px;
  right: 16px;
  z-index: 2000;
  background: var(--primary, #1a3a5c);
  color: #fff;
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus {
  top: 16px;
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

/* ---------- Focus visible אחיד (WCAG 2.4.7) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #1f6feb;
  outline-offset: 2px;
  border-radius: 2px;
}
/* לא להסתיר focus כשמנווטים במקלדת */
:focus { outline-offset: 2px; }

/* ============================================
   כפתור + פאנל הנגישות
   ============================================ */

.acc-fab {
  position: fixed;
  bottom: 22px;
  left: 22px;            /* בצד שמאל כדי לא להתנגש ב-CTA המרחף */
  z-index: 1600;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary, #1a3a5c);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 6px 20px rgba(15,37,64,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.acc-fab:hover { transform: scale(1.06); }
.acc-fab svg { width: 30px; height: 30px; }

.acc-panel {
  position: fixed;
  bottom: 90px;
  left: 22px;
  z-index: 1601;
  width: 320px;
  max-width: calc(100vw - 44px);
  max-height: 80vh;
  overflow-y: auto;
  background: #fff;
  color: #14181d;
  border: 1px solid #d9d4c8;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(15,37,64,0.25);
  padding: 18px;
  display: none;
  font-family: var(--sans, sans-serif);
  direction: rtl;
}
.acc-panel.is-open { display: block; }

.acc-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ece8de;
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.acc-panel__title { font-size: 1.15rem; font-weight: 700; color: var(--primary, #1a3a5c); }
.acc-panel__close {
  background: none; border: none; font-size: 1.6rem; line-height: 1;
  color: #6b7480; cursor: pointer; padding: 4px 8px;
}

.acc-group { margin-bottom: 16px; }
.acc-group__label {
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #6b7480; margin-bottom: 8px; font-weight: 600;
}

.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.acc-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid #d9d4c8;
  border-radius: 8px;
  background: #fff;
  color: #14181d;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: border-color .12s, background .12s;
}
.acc-btn:hover { border-color: var(--primary, #1a3a5c); }
.acc-btn[aria-pressed="true"] {
  border-color: var(--primary, #1a3a5c);
  background: #eaf0f6;
  box-shadow: inset 0 0 0 1px var(--primary, #1a3a5c);
}
.acc-btn svg { width: 22px; height: 22px; }

.acc-font-row { display: flex; align-items: center; gap: 8px; }
.acc-font-row button {
  flex: 1; padding: 12px; border: 1px solid #d9d4c8; border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 1rem; font-weight: 700;
  color: var(--primary, #1a3a5c);
}
.acc-font-row button:hover { border-color: var(--primary, #1a3a5c); }
.acc-font-row .acc-font-val { min-width: 58px; text-align: center; font-weight: 700; }

.acc-reset {
  width: 100%; padding: 12px; border: none; border-radius: 8px;
  background: #c4453d; color: #fff; font-weight: 700; cursor: pointer;
  margin-top: 4px;
}
.acc-reset:hover { background: #a93932; }

.acc-panel__statement {
  display: block; text-align: center; margin-top: 14px;
  font-size: 0.85rem; color: var(--primary, #1a3a5c);
  text-decoration: underline;
}

/* ============================================
   מצבי תצוגה — מופעלים ע"י class על <html>
   ============================================ */

/* קנה-מידה לטקסט (1.0 ברירת מחדל) */
html { font-size: calc(16px * var(--acc-font-scale, 1)); }

/* ניגודיות גבוהה */
html.acc-contrast body { background: #000 !important; color: #fff !important; }
html.acc-contrast .site-header,
html.acc-contrast .acc-panel,
html.acc-contrast .lead-form,
html.acc-contrast .service-card,
html.acc-contrast .modal { background: #000 !important; }
html.acc-contrast h1, html.acc-contrast h2, html.acc-contrast h3,
html.acc-contrast h4, html.acc-contrast p, html.acc-contrast li,
html.acc-contrast span, html.acc-contrast a, html.acc-contrast label,
html.acc-contrast div { color: #fff !important; }
html.acc-contrast a { color: #ffea00 !important; text-decoration: underline !important; }
html.acc-contrast .btn--primary { background: #ffea00 !important; color: #000 !important; }
html.acc-contrast .eyebrow { color: #ffd000 !important; }
html.acc-contrast img, html.acc-contrast .photo, html.acc-contrast .about-split__photo {
  filter: grayscale(100%) contrast(1.2);
}
html.acc-contrast *,
html.acc-contrast .service-card,
html.acc-contrast .faq-item { border-color: #fff !important; }

/* גווני אפור */
html.acc-grayscale { filter: grayscale(100%); }

/* היפוך צבעים */
html.acc-invert { filter: invert(100%) hue-rotate(180deg); }
html.acc-invert img, html.acc-invert .photo, html.acc-invert .about-split__photo {
  filter: invert(100%) hue-rotate(180deg);  /* להחזיר תמונות לטבעי */
}

/* הדגשת קישורים */
html.acc-links a {
  text-decoration: underline !important;
  outline: 1px solid currentColor;
  outline-offset: 2px;
  background: #fff8d6;
  color: #14181d !important;
  padding: 0 2px;
}

/* פונט קריא + ריווח (WCAG 1.4.8 / 1.4.12) */
html.acc-readable body,
html.acc-readable h1, html.acc-readable h2, html.acc-readable h3,
html.acc-readable h4, html.acc-readable p, html.acc-readable a,
html.acc-readable li, html.acc-readable span, html.acc-readable button,
html.acc-readable input, html.acc-readable label {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;
}
html.acc-spacing p, html.acc-spacing li {
  line-height: 1.9 !important;
  letter-spacing: 0.03em !important;
  word-spacing: 0.12em !important;
}

/* סמן עכבר גדול */
html.acc-cursor, html.acc-cursor * {
  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 4l30 18-13 3 7 14-5 2-7-14-9 9z' fill='%23000' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 4 4, auto !important;
}

/* עצירת אנימציות (WCAG 2.2.2) — גם ה-CSS וגם ה-JS (הסליידר קורא את ה-class) */
html.acc-stop-motion *,
html.acc-stop-motion *::before,
html.acc-stop-motion *::after {
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  transition-duration: 0s !important;
  scroll-behavior: auto !important;
}

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

/* ---------- עמוד הצהרת נגישות ---------- */
.acc-doc { max-width: 820px; margin: 0 auto; }
.acc-doc h2 {
  font-size: 1.4rem;
  margin: 36px 0 12px;
  color: var(--primary, #1a3a5c);
}
.acc-doc p { color: var(--ink-2, #3a434d); margin-bottom: 14px; }
.acc-doc ul { padding-inline-start: 22px; margin: 0 0 14px; }
.acc-doc li { color: var(--ink-2, #3a434d); margin-bottom: 8px; line-height: 1.7; }
.acc-doc a { color: var(--accent-text, #8a6446); text-decoration: underline; }
.acc-doc [data-fill] { color: #c4453d; font-weight: 600; }

@media (max-width: 600px) {
  .acc-panel { left: 12px; bottom: 84px; }
  .acc-fab { left: 14px; bottom: 14px; }
}
