/* =========================================================
   TREMPIYADA – ACCESSIBILITY STYLES (Israel Standard IS 5568 / WCAG 2.1 AA)
   ========================================================= */

/* ---------- SKIP LINK ---------- */
.skip-to-content {
  position: absolute;
  top: -100px;
  right: 0;
  background: #6C3FC5;
  color: #fff;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  z-index: 99999;
  border-radius: 0 0 8px 8px;
  transition: top 0.2s;
  font-family: 'Heebo', sans-serif;
}
.skip-to-content:focus {
  top: 0;
  outline: 3px solid #F59E0B;
  outline-offset: 2px;
}

/* ---------- GLOBAL FOCUS OUTLINE ---------- */
*:focus-visible {
  outline: 3px solid #6C3FC5 !important;
  outline-offset: 3px !important;
  border-radius: 4px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #6C3FC5 !important;
  outline-offset: 3px !important;
}

/* ---------- ACCESSIBILITY TOOLBAR ---------- */
#a11y-toolbar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 99998;
  direction: rtl;
}

#a11y-toggle-btn {
  background: #6C3FC5;
  color: #fff;
  border: none;
  border-radius: 0 10px 10px 0;
  width: 46px;
  height: 46px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.25);
  transition: background 0.2s;
  writing-mode: horizontal-tb;
}
#a11y-toggle-btn:hover,
#a11y-toggle-btn:focus-visible {
  background: #4C1D95;
  outline: 3px solid #F59E0B;
  outline-offset: 2px;
}

#a11y-panel {
  position: absolute;
  left: 46px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border: 2px solid #6C3FC5;
  border-radius: 14px;
  padding: 18px 16px;
  min-width: 200px;
  box-shadow: 4px 4px 24px rgba(0,0,0,0.18);
  display: none;
  direction: rtl;
}
#a11y-panel.open {
  display: block;
}
#a11y-panel h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #6C3FC5;
  text-align: center;
  margin-bottom: 14px;
  border-bottom: 1px solid #E5E7EB;
  padding-bottom: 10px;
  font-family: 'Heebo', sans-serif;
}
.a11y-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: #F5F3FF;
  color: #374151;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.2s;
  font-family: 'Heebo', sans-serif;
  text-align: right;
}
.a11y-btn:last-child { margin-bottom: 0; }
.a11y-btn:hover,
.a11y-btn:focus-visible {
  background: #EDE9FE;
  border-color: #6C3FC5;
  color: #4C1D95;
}
.a11y-btn.active {
  background: #6C3FC5;
  color: #fff;
  border-color: #6C3FC5;
}
.a11y-btn i {
  font-size: 0.9rem;
  min-width: 16px;
  text-align: center;
}

/* ---------- FONT SIZE MODES ---------- */
body.a11y-font-lg { font-size: 118% !important; }
body.a11y-font-xl { font-size: 136% !important; }

/* ---------- HIGH CONTRAST MODE ---------- */
body.a11y-contrast {
  background: #000 !important;
  color: #fff !important;
}
body.a11y-contrast *:not(script):not(style):not(#a11y-toolbar):not(#a11y-toolbar *) {
  background: transparent !important;
  color: #fff !important;
  border-color: #fff !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none !important;
}
body.a11y-contrast .navbar,
body.a11y-contrast footer,
body.a11y-contrast .hero,
body.a11y-contrast section,
body.a11y-contrast .stats-section,
body.a11y-contrast .cta-section,
body.a11y-contrast .founder-section,
body.a11y-contrast .trust-bar,
body.a11y-contrast #cookie-banner {
  background: #000 !important;
}
body.a11y-contrast a,
body.a11y-contrast .nav-link,
body.a11y-contrast .footer-links a {
  color: #FFD700 !important;
  text-decoration: underline !important;
  -webkit-text-fill-color: #FFD700 !important;
}
body.a11y-contrast img { filter: grayscale(100%) contrast(120%); }
body.a11y-contrast #a11y-panel {
  background: #111 !important;
  border-color: #fff !important;
}
body.a11y-contrast .a11y-btn {
  background: #222 !important;
  color: #fff !important;
  border-color: #fff !important;
}
body.a11y-contrast .a11y-btn.active {
  background: #FFD700 !important;
  color: #000 !important;
}

/* ---------- INVERT COLORS ---------- */
body.a11y-invert {
  filter: invert(1) hue-rotate(180deg);
}
body.a11y-invert img {
  filter: invert(1) hue-rotate(180deg);
}

/* ---------- LINKS UNDERLINE ---------- */
body.a11y-underline-links a {
  text-decoration: underline !important;
}

/* ---------- READABLE FONT (dyslexia-friendly) ---------- */
body.a11y-readable-font,
body.a11y-readable-font * {
  font-family: Arial, sans-serif !important;
  letter-spacing: 0.06em !important;
  word-spacing: 0.12em !important;
  line-height: 1.8 !important;
}

/* ---------- REDUCED MOTION ---------- */
body.a11y-no-animation *,
body.a11y-no-animation *::before,
body.a11y-no-animation *::after {
  animation: none !important;
  transition: none !important;
}

/* ---------- ACCESSIBILITY STATEMENT LINK (footer) ---------- */
.a11y-footer-link {
  color: rgba(255,255,255,0.65);
  text-decoration: underline;
  font-size: 0.92rem;
}
.a11y-footer-link:hover {
  color: #fff;
}

/* ---------- ENSURE MINIMUM TOUCH TARGET ---------- */
button, a, input, select, textarea {
  min-height: 44px;
}
.nav-link {
  min-height: 44px;
  display: inline-flex !important;
  align-items: center;
}

/* ---------- RESPONSIVE TOOLBAR ---------- */
@media (max-width: 480px) {
  #a11y-panel {
    left: auto;
    right: 46px;
    min-width: 180px;
    transform: translateY(-50%);
  }
  #a11y-toggle-btn {
    border-radius: 10px 0 0 10px;
  }
  #a11y-toolbar {
    left: auto;
    right: 0;
  }
  #a11y-panel {
    right: 46px;
    left: auto;
  }
}
