/* ==============================================================
   סרגל נגישות מובנה בהתאם לתקן הישראלי ת"י 5568 (WCAG 2.1 AA)
   עו"ד תמר יהושע - משרד עורכי דין
   ============================================================== */

/* דילוג לתוכן מרכזי עבור משתמשי מקלדת וקוראי מסך */
.skip-link {
  position: absolute;
  top: -100px;
  right: 16px;
  background: #141212;
  color: #E6C860;
  padding: 14px 22px;
  z-index: 10000;
  font-weight: 800;
  font-size: 16px;
  border-radius: 0 0 10px 10px;
  border: 2px solid #E6C860;
  text-decoration: underline;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 4px solid #E6C860;
  outline-offset: 2px;
}

/* מיקוד מקלדת נגיש וברור לכל האלמנטים */
:focus-visible {
  outline: 3px solid #C9A227 !important;
  outline-offset: 3px !important;
}

/* כפתור פתיחת סרגל נגישות צף */
.a11y-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #141212;
  color: #E6C860;
  border: 2px solid #C9A227;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  transition: transform 0.2s, background 0.2s;
}
.a11y-btn:hover, .a11y-btn:focus-visible {
  transform: scale(1.1);
  background: #252222;
  outline: 3px solid #C9A227;
}
.a11y-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* תפריט הנגישות המוקפץ */
.a11y-menu {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  color: #141212;
  border: 2px solid #141212;
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.3);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Assistant', -apple-system, sans-serif;
  text-align: right;
}
.a11y-menu.active {
  display: flex;
  animation: a11yFadeIn 0.22s ease-out;
}
@keyframes a11yFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.a11y-header {
  background: #141212;
  color: #FBF8F2;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.a11y-header h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #E6C860;
}
.a11y-close {
  background: transparent;
  border: none;
  color: #FBF8F2;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 6px;
}
.a11y-close:hover, .a11y-close:focus-visible {
  color: #E6C860;
  background: rgba(255,255,255,0.1);
}

.a11y-body {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-height: 65vh;
  overflow-y: auto;
}

.a11y-tool-btn {
  background: #F4EFE6;
  border: 1px solid rgba(20,18,18,0.15);
  border-radius: 10px;
  padding: 12px 10px;
  font-size: 14px;
  font-weight: 700;
  color: #141212;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}
.a11y-tool-btn:hover {
  background: #E8DDC7;
  border-color: #141212;
}
.a11y-tool-btn.active {
  background: #141212;
  color: #E6C860;
  border-color: #C9A227;
}
.a11y-tool-btn .icon {
  font-size: 20px;
}

.a11y-footer {
  background: #FAF7EE;
  border-top: 1px solid rgba(20,18,18,0.1);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  text-align: center;
}
.a11y-reset {
  background: #EAE3D2;
  border: 1px solid rgba(20,18,18,0.2);
  border-radius: 8px;
  padding: 8px;
  font-weight: 700;
  cursor: pointer;
  color: #141212;
  transition: background 0.2s;
}
.a11y-reset:hover {
  background: #DACFB8;
}
.a11y-statement-link {
  color: #9C7A1E;
  text-decoration: underline;
  font-weight: 700;
  display: inline-block;
  padding: 4px;
}
.a11y-statement-link:hover {
  color: #141212;
}

/* ==============================================================
   החלת מצבי הנגישות על כל הדף בעת הפעלה
   ============================================================== */

/* הגדלת גופן */
body.a11y-font-lg {
  font-size: 19.5px !important;
}
body.a11y-font-lg h1 { font-size: clamp(34px, 4.5vw, 52px) !important; }
body.a11y-font-lg h2 { font-size: clamp(28px, 3.8vw, 42px) !important; }
body.a11y-font-lg h3 { font-size: 24px !important; }
body.a11y-font-lg p, body.a11y-font-lg li, body.a11y-font-lg a, body.a11y-font-lg button, body.a11y-font-lg input, body.a11y-font-lg select, body.a11y-font-lg textarea {
  font-size: 19px !important;
}

body.a11y-font-xl {
  font-size: 22px !important;
}
body.a11y-font-xl h1 { font-size: clamp(38px, 5vw, 58px) !important; }
body.a11y-font-xl h2 { font-size: clamp(32px, 4.2vw, 46px) !important; }
body.a11y-font-xl h3 { font-size: 27px !important; }
body.a11y-font-xl p, body.a11y-font-xl li, body.a11y-font-xl a, body.a11y-font-xl button, body.a11y-font-xl input, body.a11y-font-xl select, body.a11y-font-xl textarea {
  font-size: 21px !important;
}

/* ניגודיות גבוהה (שחור וצהוב) */
body.a11y-high-contrast {
  background: #000000 !important;
  color: #FFFF00 !important;
}
body.a11y-high-contrast header,
body.a11y-high-contrast section,
body.a11y-high-contrast footer,
body.a11y-high-contrast .sub-hero,
body.a11y-high-contrast .card,
body.a11y-high-contrast .topic-card,
body.a11y-high-contrast .step-box,
body.a11y-high-contrast .contact-card,
body.a11y-high-contrast .gallery-item,
body.a11y-high-contrast details {
  background: #000000 !important;
  color: #FFFF00 !important;
  border-color: #FFFF00 !important;
}
body.a11y-high-contrast h1,
body.a11y-high-contrast h2,
body.a11y-high-contrast h3,
body.a11y-high-contrast h4,
body.a11y-high-contrast strong,
body.a11y-high-contrast em {
  color: #FFFF00 !important;
}
body.a11y-high-contrast p,
body.a11y-high-contrast span,
body.a11y-high-contrast li,
body.a11y-high-contrast label {
  color: #FFFFFF !important;
}
body.a11y-high-contrast a,
body.a11y-high-contrast .btn {
  background: #000000 !important;
  color: #FFFF00 !important;
  border: 2px solid #FFFF00 !important;
}
body.a11y-high-contrast input,
body.a11y-high-contrast select,
body.a11y-high-contrast textarea {
  background: #000000 !important;
  color: #FFFFFF !important;
  border: 2px solid #FFFF00 !important;
}

/* ניגודיות הפוכה (מצב כהה יוקרתי ונגיש) - ללא שימוש ב-filter על ה-body ששובר position:fixed */
body.a11y-inverted-contrast {
  background: #111111 !important;
  color: #FBF8F2 !important;
}
body.a11y-inverted-contrast header,
body.a11y-inverted-contrast .sub-hero,
body.a11y-inverted-contrast section,
body.a11y-inverted-contrast footer,
body.a11y-inverted-contrast .card,
body.a11y-inverted-contrast .topic-card,
body.a11y-inverted-contrast .step-box,
body.a11y-inverted-contrast .contact-card,
body.a11y-inverted-contrast .gallery-item,
body.a11y-inverted-contrast .hero-portrait-frame,
body.a11y-inverted-contrast details {
  background: #1C1A1A !important;
  color: #FBF8F2 !important;
  border-color: rgba(201, 162, 39, 0.4) !important;
}
body.a11y-inverted-contrast h1,
body.a11y-inverted-contrast h2,
body.a11y-inverted-contrast h3,
body.a11y-inverted-contrast h4,
body.a11y-inverted-contrast .eyebrow,
body.a11y-inverted-contrast strong {
  color: #E6C860 !important;
}
body.a11y-inverted-contrast p,
body.a11y-inverted-contrast span,
body.a11y-inverted-contrast li,
body.a11y-inverted-contrast label {
  color: #E2DDD5 !important;
}
body.a11y-inverted-contrast a {
  color: #E6C860 !important;
}
body.a11y-inverted-contrast input,
body.a11y-inverted-contrast select,
body.a11y-inverted-contrast textarea {
  background: #262424 !important;
  color: #FFFFFF !important;
  border-color: #C9A227 !important;
}
body.a11y-inverted-contrast .phone-pill {
  color: #FBF8F2 !important;
}
body.a11y-inverted-contrast .btn-outline {
  border-color: #E6C860 !important;
  color: #E6C860 !important;
}

/* גווני אפור (מונוכרום) - ללא filter על body כדי לשמור על אלמנטים צפים בגלילה */
body.a11y-grayscale header,
body.a11y-grayscale main,
body.a11y-grayscale section,
body.a11y-grayscale footer {
  filter: grayscale(100%) !important;
}

/* הדגשת קישורים */
body.a11y-highlight-links a {
  text-decoration: underline 3px !important;
  font-weight: 800 !important;
  background-color: #FFEB3B !important;
  color: #000000 !important;
}

/* פונט קריא */
body.a11y-readable-font * {
  font-family: Arial, Tahoma, Helvetica, sans-serif !important;
  letter-spacing: 0.5px !important;
}

/* עצירת הבהובים ואנימציות */
body.a11y-stop-anim * {
  animation: none !important;
  transition: none !important;
}
