/* =========================================================================
   כלי נגישות — ג'מאל עבודות עפר
   ========================================================================= */

/* ---------- Toggle button ---------- */
.a11y-toggle {
  position: fixed; inset-block-end: 20px; inset-inline-start: 20px; z-index: 96;
  width: 56px; height: 56px; border-radius: 50%; border: 2px solid #fff;
  background: #1D6FE0; color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 12px 28px rgba(20,23,28,.22);
}
.a11y-toggle:hover { background: #175ac0; }
.a11y-toggle svg { width: 30px; height: 30px; }
@media (max-width: 960px) { .a11y-toggle { inset-block-end: 84px; } }

/* ---------- Panel ---------- */
.a11y-panel {
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 190;
  width: min(360px, 92vw); background: #fff; color: #15171C;
  box-shadow: 0 0 60px rgba(0,0,0,.3); padding: 1.25rem;
  transform: translateX(-105%); transition: transform .28s ease, visibility .28s;
  visibility: hidden;
  overflow-y: auto; font-family: var(--font, sans-serif);
}
[dir="rtl"] .a11y-panel { inset-inline-start: auto; inset-inline-end: 0; transform: translateX(105%); }
.a11y-panel.is-open { transform: translateX(0); visibility: visible; }
.a11y-panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.a11y-panel__head h2 { font-size: 1.15rem; margin: 0; }
.a11y-close { width: 40px; height: 40px; border: 1px solid #D3CEC4; background: #F2EFEA; border-radius: 8px; cursor: pointer; font-size: 1.2rem; line-height: 1; }

.a11y-backdrop {
  position: fixed; inset: 0; z-index: 180; background: rgba(20,23,28,.4);
  opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.a11y-backdrop.is-open { opacity: 1; visibility: visible; }

.a11y-group { border: 1px solid #E4E0D9; border-radius: 12px; padding: .5rem; margin-bottom: .8rem; }
.a11y-group > p { font-weight: 700; font-size: .8rem; letter-spacing: .04em; color: #6B7280; margin: .3rem .4rem .5rem; text-transform: uppercase; }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.a11y-btn {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .7rem .4rem; border: 1.5px solid #E4E0D9; border-radius: 8px;
  background: #fff; color: #15171C; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 600;
  text-align: center; min-height: 64px; justify-content: center;
}
.a11y-btn svg { width: 22px; height: 22px; }
.a11y-btn:hover { border-color: #1D6FE0; background: #F5F8FF; }
.a11y-btn[aria-pressed="true"] { background: #1D6FE0; color: #fff; border-color: #1D6FE0; }
.a11y-btn--wide { grid-column: 1 / -1; flex-direction: row; }

.a11y-reset {
  width: 100%; margin-top: .3rem; padding: .8rem; border: 0; border-radius: 8px;
  background: #C8391B; color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.a11y-reset:hover { background: #AE2F14; }
.a11y-panel__foot { margin-top: 1rem; font-size: .82rem; color: #6B7280; }
.a11y-panel__foot a { color: #C8391B; }

/* =========================================================================
   מצבי תצוגה — מוחלים על <html> דרך data-attributes / classes
   ========================================================================= */

/* Font scaling */
html[data-a11y-font="1"] body { font-size: 1.12rem; }
html[data-a11y-font="2"] body { font-size: 1.24rem; }
html[data-a11y-font="3"] body { font-size: 1.38rem; }

/* Line spacing */
html.a11y-spacing body, html.a11y-spacing p, html.a11y-spacing li { line-height: 2.1 !important; letter-spacing: .02em; word-spacing: .12em; }

/* Readable font */
html.a11y-readable body, html.a11y-readable button, html.a11y-readable input, html.a11y-readable textarea {
  font-family: Arial, "Segoe UI", Tahoma, sans-serif !important;
}

/* High contrast */
html.a11y-contrast, html.a11y-contrast body { background: #000 !important; color: #fff !important; }
html.a11y-contrast :where(section, header, footer, .card, .step, .area-card, .lead-form, .hero, .cta-band, .trust-strip, .pricing-note, .faq__item, .section--tint, .section--dark) {
  background: #000 !important; color: #fff !important; border-color: #fff !important;
}
html.a11y-contrast :where(h1,h2,h3,h4,p,li,span,b,strong,summary,label,.lead,.eyebrow) { color: #fff !important; background: transparent !important; }
html.a11y-contrast :where(a, .card__more) { color: #ffff00 !important; }
html.a11y-contrast .btn { background: #ffff00 !important; color: #000 !important; border-color: #fff !important; }
html.a11y-contrast .hero__media, html.a11y-contrast img.is-decorative { filter: grayscale(1) contrast(1.2); }
html.a11y-contrast .hero__media::after { background: rgba(0,0,0,.85) !important; }

/* Grayscale */
html.a11y-grayscale { filter: grayscale(1); }

/* Highlight links */
html.a11y-links a { text-decoration: underline !important; outline: 2px solid #1D6FE0; outline-offset: 2px; background: #FFF7CC; color: #15171C; }
html.a11y-contrast.a11y-links a { background: #000 !important; color: #ffff00 !important; }

/* Stop animations */
html.a11y-no-motion *, html.a11y-no-motion *::before, html.a11y-no-motion *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
html.a11y-no-motion .hero__media img { transform: none !important; }

/* Big cursor */
html.a11y-cursor, html.a11y-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 2l30 18-14 3 8 16-5 2-8-16-11 9z' fill='%23000' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 4 2, auto !important;
}

/* Reading guide */
.a11y-reading-guide {
  position: fixed; inset-inline: 0; height: 2.4rem; z-index: 170; pointer-events: none;
  background: rgba(29,111,224,.16); border-block: 2px solid rgba(29,111,224,.7); display: none;
}
html.a11y-guide .a11y-reading-guide { display: block; }
