/* ===== Accessibility CSS - תקן 5568 ===== */

/* Skip link */
.skip-link {
  position: absolute;
  top: -60px;
  right: 0;
  background: #005fcc;
  color: #fff;
  padding: 12px 24px;
  text-decoration: none;
  z-index: 10000;
  font-size: 16px;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #ffcc00;
  outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus indicators */
:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* ===== Widget Styles ===== */
.a11y-trigger {
  position: fixed;
  bottom: 100px;
  left: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0d1b35;
  color: #fff;
  border: 2px solid #F5A623;
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: all 0.25s ease;
}
.a11y-trigger img {
  filter: brightness(0) invert(1);
  transition: filter 0.25s ease;
}
.a11y-trigger:hover,
.a11y-trigger:focus-visible {
  background: #F5A623;
  border-color: #F5A623;
  box-shadow: 0 4px 20px rgba(245, 166, 35, 0.4);
  outline: 3px solid #fff;
  outline-offset: 2px;
}
.a11y-trigger:hover img {
  filter: brightness(0) invert(0.08);
}
.a11y-trigger::after {
  content: 'נגישות';
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d1b35;
  color: #F5A623;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Heebo', sans-serif;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(245, 166, 35, 0.3);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.a11y-trigger:hover::after {
  opacity: 1;
}

.a11y-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms, visibility 300ms;
}
.a11y-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.a11y-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 320px;
  max-width: 90vw;
  overflow-y: auto;
  background: #fff;
  z-index: 10000;
  padding: 20px;
  direction: rtl;
  font-family: 'Heebo', Arial, sans-serif;
  color: #1a1a1a;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 300ms ease;
}
.a11y-menu.open {
  transform: translateX(0);
}

.a11y-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}
.a11y-menu-header h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #111;
  display: flex;
  gap: 8px;
  align-items: center;
}
.a11y-menu-header button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  padding: 4px 8px;
  color: #6b7280;
  line-height: 1;
  transition: color 0.2s;
}
.a11y-menu-header button:hover { color: #1f2937; }

.a11y-section {
  margin-bottom: 12px;
  font-size: 14px;
  color: #333;
}
.a11y-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.a11y-row button {
  width: 36px;
  height: 36px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.a11y-row button:hover,
.a11y-row button:focus-visible {
  border-color: #3b82f6;
  background: #eff6ff;
}
.a11y-row span {
  font-size: 13px;
  min-width: 50px;
  text-align: center;
  color: #3b82f6;
  font-weight: 600;
}

.a11y-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px;
  margin: 4px 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  text-align: right;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a1a;
  transition: border-color 0.2s, background 0.2s;
}
.a11y-option:hover,
.a11y-option:focus-visible {
  background: #f9fafb;
  outline: none;
}
.a11y-option.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.a11y-toggle {
  width: 40px;
  height: 24px;
  border-radius: 9999px;
  background: #d1d5db;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.a11y-toggle.on {
  background: #3b82f6;
}
.a11y-toggle-knob {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  top: 3px;
  right: 3px;
  transition: transform 0.2s;
}
.a11y-toggle.on .a11y-toggle-knob {
  transform: translateX(-19px);
}

.a11y-size-badge {
  font-size: 11px;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  padding: 2px 10px;
  border-radius: 100px;
  font-weight: 600;
}

.a11y-reset {
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  color: #dc2626;
  transition: background 0.2s;
}
.a11y-reset:hover { background: #fef2f2; }

.a11y-statement-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  font-size: 13px;
  color: #3b82f6 !important;
  text-decoration: underline !important;
}

/* ===== Font Size Scaling (3 levels: small, medium, large) ===== */
html.a11y-font-small body { zoom: 0.9; }
html.a11y-font-large body { zoom: 1.15; }
/* medium = default, no class needed */

/* ===== Accessibility Modes ===== */
html.a11y-high-contrast { filter: contrast(150%); }
html.a11y-invert { filter: invert(100%); }
html.a11y-grayscale { filter: grayscale(100%); }
html.a11y-highlight-links a {
  background: yellow !important;
  color: black !important;
  padding: 0 2px;
}
html.a11y-underline-links a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
}
html.a11y-readable-font,
html.a11y-readable-font * {
  font-family: Arial, Helvetica, sans-serif !important;
}
html.a11y-stop-animations *,
html.a11y-stop-animations *::before,
html.a11y-stop-animations *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
html.a11y-big-cursor,
html.a11y-big-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='1' d='M5 3l14 8-6 1 4 8-3 1-4-8-5 5z'/%3E%3C/svg%3E") 4 2, auto !important;
}

/* ===== Accessibility Statement Page ===== */
.a11y-page {
  padding: 140px 0 80px;
}
.a11y-page h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  margin-bottom: 40px;
  color: var(--text-main);
}
.a11y-page section {
  margin-bottom: 40px;
}
.a11y-page h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-main);
}
.a11y-page p,
.a11y-page li,
.a11y-page address {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.a11y-page ul {
  padding-right: 24px;
  margin-bottom: 16px;
}
.a11y-page li {
  margin-bottom: 8px;
}
.a11y-page address {
  font-style: normal;
}
.a11y-page a {
  color: var(--accent);
  text-decoration: underline;
}
.a11y-page a:hover {
  color: var(--text-main);
}

/* ===== Cookie Consent Banner ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  padding: 16px 24px;
  font-family: 'Heebo', Arial, sans-serif;
}
.cookie-main {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  padding: 20px 24px;
  direction: rtl;
  color: #1a1a1a;
}
.cookie-text h3 {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin: 0 0 8px;
}
.cookie-text p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
}
.cookie-text a {
  color: #3b82f6;
  text-decoration: underline;
}
.cookie-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.cookie-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.cookie-btn-accept {
  background: #3b82f6;
  color: #fff;
}
.cookie-btn-accept:hover { background: #2563eb; }
.cookie-btn-reject {
  background: transparent;
  color: #111;
  border: 1px solid #d1d5db;
}
.cookie-btn-reject:hover { background: #f9fafb; }
.cookie-btn-manage {
  background: transparent;
  color: #3b82f6;
  border: none;
}
.cookie-btn-manage:hover { background: rgba(59, 130, 246, 0.05); }
.cookie-btn-save {
  background: transparent;
  color: #111;
  border: 1px solid #3b82f6;
}
.cookie-btn-save:hover { background: rgba(59, 130, 246, 0.05); }
.cookie-prefs-inline {
  margin-top: 12px;
}
.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 10000;
}
.cookie-manage-link {
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-decoration: none;
  padding: 0;
}
.cookie-manage-link:hover {
  text-decoration: underline;
}
.cookie-prefs {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  padding: 20px 24px;
  direction: rtl;
  color: #1a1a1a;
}
.cookie-prefs h3 {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin: 0 0 16px;
}
.cookie-pref-row {
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cookie-pref-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
  cursor: pointer;
  flex: 1;
}
.cookie-pref-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.cookie-pref-label strong {
  color: #111;
}
.cookie-toggle {
  width: 40px;
  height: 24px;
  border-radius: 9999px;
  background: #d1d5db;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
  cursor: pointer;
}
.cookie-toggle.on {
  background: #3b82f6;
}
.cookie-toggle.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.cookie-toggle-knob {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  top: 3px;
  right: 3px;
  transition: transform 0.2s;
}
.cookie-toggle.on .cookie-toggle-knob {
  transform: translateX(-19px);
}





/* ===== Breadcrumb Navigation ===== */
.breadcrumb-nav {
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  font-size: 0.82rem;
}
.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin: 0;
  padding: 0;
}
.breadcrumb-list li a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb-list li a:hover {
  text-decoration: underline;
  color: var(--text-main);
}
.breadcrumb-current {
  color: var(--text-muted);
  font-weight: 500;
}
.breadcrumb-sep {
  color: var(--text-muted);
  font-size: 0.7rem;
  opacity: 0.5;
}

/* ===== Footer Legal Links ===== */
.footer-legal {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  margin-bottom: 0;
}
.footer-legal a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-legal a:hover {
  color: var(--accent);
}

/* ===== Legal Pages (shared with a11y-page) ===== */
.a11y-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
}
.a11y-page th,
.a11y-page td {
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: right;
  font-size: 14px;
  color: var(--text-dark);
}
.a11y-page th {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-main);
  font-weight: 700;
}
.a11y-page h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text-main);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .a11y-trigger {
    bottom: 90px;
    left: 16px;
    width: 44px;
    height: 44px;
  }
  .a11y-menu {
    width: 100%;
    max-width: 100vw;
  }
  .cookie-main,
  .cookie-prefs {
    margin: 0 8px;
  }
}

/* The shared widget's copy carried michaelwaknin's own .privacy-notice rules; loaded after
   sg-consent.css they turned the notice transparent on the black footer (1.59:1). Removed. */

/* ===== shared-widget fixes (found on zhutavot/michaelwaknin, 2026-09-13) ===== */

/* 1. The closed panel is only moved with `transform: translateX(100%)`. A
      transformed element still counts toward the document's scrollable area, so
      on a phone the page gained ~85px of horizontal scroll and the browser
      shrank the whole layout to fit — text clipped on both edges sitewide.
      `overflow-x: clip` (not `hidden`) contains it WITHOUT creating a scroll
      container, so the sticky header keeps working. */
html { overflow-x: clip; }

/* 2. `transform` does not remove anything from the tab order: a keyboard user
      tabbing through the page walked into 11 invisible controls of a panel that
      was not open. `visibility` removes them; it is also animatable alongside
      the existing transform, so the slide-in is unchanged. */
.a11y-menu {
  visibility: hidden;
  transition: transform 300ms ease, visibility 0s linear 300ms;
}
.a11y-menu.open {
  visibility: visible;
  transition: transform 300ms ease, visibility 0s;
}


/* ===== auto-it.co.il overrides (Stage 4, 2026-09-17) — IS 5568 / WCAG 2.0 AA ===== */

/* 1.3.1 heading order: build.py re-levels skipped / extra headings and tags each changed one with
   its ORIGINAL level, so the visual size does not change. */
.ait-h1{font-size:2.5rem}.ait-h2{font-size:2rem}.ait-h3{font-size:1.75rem}
.ait-h4{font-size:1.5rem}.ait-h5{font-size:1.25rem}.ait-h6{font-size:1rem}
div[role="heading"]{margin-block:0 .5rem;font-weight:500;line-height:1.2}

/* 1.4.1 links inside running text were distinguishable by colour alone */
.elementor-widget-text-editor p a,.elementor-widget-text-editor li a,.elementor-widget-theme-post-content p a,
.elementor-widget-theme-post-content li a,.ait-legal p a,.ait-legal li a{text-decoration:underline;text-underline-offset:2px}

/* skip link sits at the inline-start edge in RTL */
.skip-link{right:0;left:auto}

/* <main> wrapper added by build.py around post content must not change layout */
main#content[role="main"]:focus{outline:none}

/* --- footer legal strip (P12) --- #ddd on #111 13.9:1 */
.ait-legal-links{display:flex;flex-wrap:wrap;gap:8px 18px;justify-content:center;align-items:center;
  padding:14px 20px;background:#111;color:#ddd;font:14px/1.6 "Rubik",Arial,sans-serif}
.ait-legal-links a,.ait-legal-links button{color:#ddd;text-decoration:underline;background:none;border:0;
  font:inherit;cursor:pointer;padding:0;min-height:24px;text-transform:none;letter-spacing:0}
.ait-legal-links a:hover,.ait-legal-links button:hover{color:#fff;background:none}
.ait-legal-links a:focus-visible,.ait-legal-links button:focus-visible{outline:3px solid #7fb3ff;outline-offset:3px}

/* --- legal pages --- #222 on #fff 15.9:1 */
.ait-legal{max-width:860px;margin:40px auto 64px;padding-inline:20px;line-height:1.85;font-size:17px;color:#222;
  background:#fff;text-align:start}
.ait-legal h1{margin:0 0 6px;color:#111;font-size:clamp(28px,5vw,38px)}
.ait-legal h2{margin:32px 0 10px;font-size:1.3em;color:#111}
.ait-legal p,.ait-legal li{max-width:75ch}
.ait-legal a{color:#0b5d1e}
.ait-legal-updated{color:#555;font-size:15px;margin:0 0 24px}
.ait-legal-list{padding-inline-start:1.3em}
.ait-legal-table{width:100%;border-collapse:collapse;margin:14px 0;font-size:15px;display:block;overflow-x:auto}
.ait-legal-table th,.ait-legal-table td{border:1px solid #ccc;padding:8px 10px;text-align:start;vertical-align:top}
.ait-legal-table th{background:#f2f2f2;font-weight:700}
.ait-legal button.ait-consent-reopen{background:#006400;color:#fff;border:0;border-radius:4px;padding:10px 20px;
  min-height:44px;font:inherit;cursor:pointer}
@media (max-width:600px){.ait-legal-links{gap:6px 12px;padding:12px 14px;font-size:13px}}

/* 1.4.3 contrast — each measured by Lighthouse on the built pages (Stage 4). Same hue, darker/lighter. */
/* kit accent #61CE70 as a button background: white text 1.98:1 -> #1E7B30 5.34:1 */
.elementor-widget-form .elementor-button[type="submit"],.elementor-widget-button .elementor-button{background-color:#1e7b30}
/* post-card "קרא עוד" in kit green on #525252 3.93:1 -> #8FE39B 5.07:1; red on #EDEDED 3.41:1 -> #C00000 5.53:1 */
.elementor-post__card .elementor-post__read-more{color:#8fe39b}
.elementor-2355 .elementor-element.elementor-element-2630837 .elementor-post__read-more{color:#c00000}
/* contact page: #F84D43 heading on #EBEBEB 2.87:1, white on #F84D43 3.42:1 -> #B3261E (5.48:1 / 6.54:1) */
.elementor-2172 .elementor-element.elementor-element-65ed68b2 .elementor-heading-title{color:#b3261e}
.elementor-2172 .elementor-element.elementor-element-44b99511 .elementor-button[type="submit"]{background-color:#b3261e}
.elementor-2172 .elementor-element.elementor-element-3f4643b7:not(.elementor-motion-effects-element-type-background),
.elementor-2172 .elementor-element.elementor-element-3f4643b7 > .elementor-motion-effects-container > .elementor-motion-effects-layer{background-color:#b3261e}
/* Google reviews widget on #CECECE: rating #FB8E28 1.48:1 -> #7A3F00 5.26:1; "powered by" #777 2.84:1 -> #3D3D3D 6.9:1 */
.wp-gr .wp-google-place .wp-google-rating{color:#7a3f00!important}   /* plugin: .wp-gr .wp-google-rating{…!important} */
.wp-gr .wp-google-place .wp-google-powered{color:#3d3d3d!important}
/* footer copyright rgba(255,255,255,.37) on black 3.23:1 -> #9A9A9A 7.46:1 */
.elementor-2517 .elementor-element.elementor-element-b0e2d91 .elementor-heading-title{color:#9a9a9a}
/* Hello theme page title and bare post content (#333) on the site's black body 1.66:1 -> #F2F2F2 18.8:1 */
.page-header .entry-title,main#content[role="main"] > :is(p,h1,h2,h3,h4,h5,h6,ul,ol,figure,blockquote),
.page-content > article.post :is(p,h2,h3,a),main#content > nav.pagination a{color:#f2f2f2}   /* archive listings + pagination (Hello theme) */
/* breadcrumb current item #2200FF on black 2.51:1 -> #A3B5FF 10.6:1; in-article link #CC3366 4.23:1 -> #E46A92 6.78:1 */
#breadcrumbs .breadcrumb_last{color:#a3b5ff}
.elementor-widget-theme-post-content p a,.elementor-widget-text-editor p a[style*="cc3366"]{color:#e46a92}

/* 2.5.8 target size: 6px slider dots packed 8px apart -> 24px between centres */
.elementor-swiper .swiper-pagination-bullet{margin:0 9px!important}
/* slider arrows 20x20 -> 24x24 hit area (icon size unchanged) */
.elementor-swiper .elementor-swiper-button{min-width:24px;min-height:24px;display:flex;align-items:center;justify-content:center}

/* visually hidden text (hidden h1 from the page title, "קרא עוד" link names) — defined here too, so it
   never depends on which combined theme file a page happens to load */
.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
