/* ===== תפריט נגישות — כפתור צף ופאנל ===== */

:root {
  --a11y-accent: #e30613;
  --a11y-accent-2: #ec008c;
  --a11y-bg: #ffffff;
  --a11y-text: #1a1a1c;
  --a11y-muted: #5b5b62;
  --a11y-border: #e6e6ea;
  --a11y-shadow: 0 18px 44px rgba(8, 8, 8, 0.22);
  --a11y-radius: 16px;
  --a11y-fab-size: 56px;
}

/* כפתור צף */
.a11y-fab {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  width: var(--a11y-fab-size);
  height: var(--a11y-fab-size);
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, var(--a11y-accent) 0%, var(--a11y-accent-2) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--a11y-shadow);
  z-index: 9998;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
}

.a11y-fab:hover,
.a11y-fab:focus-visible {
  transform: translateY(-2px) scale(1.04);
  outline: none;
  box-shadow: 0 22px 50px rgba(227, 6, 19, 0.35);
}

.a11y-fab svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

/* פאנל */
.a11y-panel {
  position: fixed;
  left: 1rem;
  bottom: calc(var(--a11y-fab-size) + 1.6rem);
  width: min(320px, calc(100vw - 2rem));
  max-height: calc(100vh - 8rem);
  overflow: auto;
  background: var(--a11y-bg);
  color: var(--a11y-text);
  border-radius: var(--a11y-radius);
  box-shadow: var(--a11y-shadow);
  z-index: 9999;
  padding: 1rem 1.1rem 1.1rem;
  font-family: "Heebo", Arial, sans-serif;
  direction: rtl;
  text-align: right;
  border: 1px solid var(--a11y-border);
}

.a11y-panel[hidden] {
  display: none;
}

.a11y-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.a11y-panel__title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: var(--a11y-text);
}

.a11y-panel__close {
  background: transparent;
  border: 0;
  color: var(--a11y-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
}

.a11y-panel__close:hover,
.a11y-panel__close:focus-visible {
  background: #f4f4f6;
  color: var(--a11y-text);
  outline: none;
}

.a11y-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.a11y-actions button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: #f7f7f9;
  color: var(--a11y-text);
  border: 1px solid var(--a11y-border);
  border-radius: 12px;
  padding: 0.7rem 0.5rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  min-height: 78px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.a11y-actions button:hover,
.a11y-actions button:focus-visible {
  background: #fff;
  border-color: var(--a11y-accent);
  outline: none;
  transform: translateY(-1px);
}

.a11y-actions button[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(227, 6, 19, 0.08), rgba(236, 0, 140, 0.08));
  border-color: var(--a11y-accent);
  color: var(--a11y-accent);
}

.a11y-actions button .a11y-ico {
  font-size: 1.25rem;
  line-height: 1;
}

.a11y-actions button[data-a11y="reset"] {
  grid-column: 1 / -1;
  background: #fff;
  border-color: #d9d9df;
  color: var(--a11y-muted);
  min-height: 44px;
  flex-direction: row;
}

.a11y-actions button[data-a11y="reset"]:hover,
.a11y-actions button[data-a11y="reset"]:focus-visible {
  border-color: var(--a11y-accent);
  color: var(--a11y-accent);
}

.a11y-panel__foot {
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--a11y-border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--a11y-muted);
}

.a11y-panel__foot a {
  color: var(--a11y-muted);
  text-decoration: underline;
}

/* ===== מצבי נגישות ===== */

/* ניגודיות גבוהה */
body.a11y-contrast {
  background: #000 !important;
  color: #fff !important;
}

body.a11y-contrast :where(p, h1, h2, h3, h4, h5, h6, span, li, label, strong, em, small, td, th, div) {
  color: #fff !important;
}

body.a11y-contrast :where(a, a *) {
  color: #ffe600 !important;
}

body.a11y-contrast :where(button, .btn) {
  background: #ffe600 !important;
  color: #000 !important;
  border-color: #ffe600 !important;
}

body.a11y-contrast :where(.site-header, .site-footer, section, .container, .card, .plan-card, .lead-card, .faq-item, .package-section, .bottom-cta) {
  background: #000 !important;
  border-color: #fff !important;
}

body.a11y-contrast :where(input, textarea, select) {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.a11y-contrast img {
  filter: contrast(1.2) brightness(1.05);
}

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

/* הדגשת קישורים */
body.a11y-links a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  outline: 2px dashed currentColor;
  outline-offset: 2px;
}

/* פונט קריא */
body.a11y-readable,
body.a11y-readable :where(h1, h2, h3, h4, h5, h6, p, span, li, a, button, label, input, textarea, select, div, td, th) {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;
  letter-spacing: 0.01em !important;
  word-spacing: 0.04em !important;
}

/* סמן גדול */
body.a11y-cursor,
body.a11y-cursor * {
  cursor:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><path d='M4 2 L4 34 L13 26 L19 38 L24 36 L18 24 L30 24 Z' fill='%23000' stroke='%23fff' stroke-width='2' stroke-linejoin='round'/></svg>") 2 2,
    auto !important;
}

/* עצירת אנימציות */
body.a11y-pause,
body.a11y-pause *,
body.a11y-pause *::before,
body.a11y-pause *::after {
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}

/* מעל סרגל ה־CTA הדביק (מוצג מתחת ל־1024px — ראו style.css) */
@media (max-width: 1023px) {
  .a11y-fab {
    bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px));
  }

  .a11y-panel {
    bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px) + var(--a11y-fab-size) + 0.6rem);
  }
}

/* התאמות מובייל צר */
@media (max-width: 480px) {
  :root {
    --a11y-fab-size: 52px;
  }

  .a11y-fab {
    width: 52px;
    height: 52px;
  }

  .a11y-fab svg {
    width: 26px;
    height: 26px;
  }

  .a11y-panel {
    padding: 0.85rem 0.95rem 1rem;
  }

  .a11y-actions {
    gap: 0.5rem;
  }
}
