/* ==========================================================================
   ווידג'ט נגישות
   רכיב עצמאי. משתמש בטוקנים של מערכת העיצוב הקיימת ואינו דורס אותם.
   ========================================================================== */

:root{
  --a11y-edge:24px;          /* מרחק מקצה המסך בדסקטופ */
  --a11y-btn:52px;
  --a11y-lift:0px;           /* הרמה מעל באנר העוגיות */
}

/* קישור דילוג לתוכן: מוסתר עד שהוא מקבל פוקוס ------------------------------ */
.skip-link{
  position:fixed;top:-100px;inset-inline-start:24px;z-index:200;
  background:var(--navy);color:#fff;
  padding:13px 22px;border-radius:0 0 var(--radius-sm) var(--radius-sm);
  font-family:var(--ff-body);font-weight:600;font-size:16px;
  text-decoration:none;box-shadow:var(--shadow-md);
  transition:top .18s ease;
}
.skip-link:focus{top:0}
#main:focus{outline:none}

/* הכפתור הצף ---------------------------------------------------------------- */
.a11y-btn{
  position:fixed;left:var(--a11y-edge);
  bottom:calc(var(--a11y-edge) + var(--a11y-lift));
  z-index:120;
  width:var(--a11y-btn);height:var(--a11y-btn);
  padding:0;border:0;border-radius:50%;cursor:pointer;
  background:var(--navy);
  display:grid;place-items:center;
  box-shadow:0 8px 26px -8px rgba(9,21,40,.45);
  transition:transform .22s ease,background .22s ease,bottom .25s ease;
}
.a11y-btn svg{width:28px;height:28px;fill:#fff}
.a11y-btn:hover{background:var(--navy-deep);transform:translateY(-2px)}
.a11y-btn:focus-visible{outline:3px solid var(--gold);outline-offset:3px}

/* רקע כהה, רק במובייל כשהחלונית פתוחה */
.a11y-backdrop{
  position:fixed;inset:0;z-index:124;
  background:rgba(9,21,40,.42);
  animation:a11y-fade .2s ease both;
}

/* החלונית -------------------------------------------------------------------- */
/* display:flex גובר על ברירת המחדל של [hidden], בלעדיו החלונית נשארת פתוחה */
.a11y-panel[hidden],
.a11y-backdrop[hidden]{display:none !important}

.a11y-panel{
  position:fixed;left:var(--a11y-edge);
  bottom:calc(var(--a11y-edge) + var(--a11y-btn) + 12px + var(--a11y-lift));
  z-index:125;
  width:min(380px,calc(100vw - var(--a11y-edge) * 2));
  max-height:calc(100vh - 120px);
  display:flex;flex-direction:column;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 28px 70px -22px rgba(9,21,40,.38),0 4px 14px -6px rgba(9,21,40,.12);
  overflow:hidden;
  animation:a11y-in .2s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes a11y-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes a11y-fade{from{opacity:0}to{opacity:1}}

.a11y-panel__head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  padding:20px 22px 16px;border-bottom:1px solid var(--line-soft);
  background:var(--cream);
}
.a11y-panel__head h2{
  font-family:var(--ff-display);font-size:20px;font-weight:600;
  color:var(--navy);margin:0 0 4px;letter-spacing:-.02em;
}
.a11y-panel__head p{font-size:14.5px;line-height:1.5;color:var(--text-soft);margin:0}
.a11y-panel__close{
  flex-shrink:0;width:34px;height:34px;padding:0;
  background:transparent;border:1px solid var(--line);border-radius:50%;
  cursor:pointer;display:grid;place-items:center;
  transition:background .2s ease,border-color .2s ease;
}
.a11y-panel__close svg{width:13px;height:13px;fill:var(--text-soft)}
.a11y-panel__close:hover{background:var(--cream-2);border-color:var(--gold-dim)}
.a11y-panel__close:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

.a11y-panel__body{
  overflow-y:auto;overscroll-behavior:contain;
  padding:18px 22px 4px;
}

.a11y-group{margin-bottom:20px}
.a11y-group__title{
  font-family:var(--ff-body);font-size:12.5px;font-weight:700;
  letter-spacing:.14em;color:var(--gold-text);
  margin:0 0 10px;
}
.a11y-group__grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}

/* כל אפשרות היא כרטיס: אייקון, כותרת וסימון מצב ------------------------------ */
.a11y-opt{
  position:relative;
  display:flex;flex-direction:column;align-items:flex-start;gap:8px;
  min-height:84px;
  padding:13px 13px 12px;
  font-family:var(--ff-body);font-size:14.5px;font-weight:600;line-height:1.35;
  text-align:start;text-decoration:none;
  color:var(--navy);
  background:var(--cream);
  border:1.5px solid transparent;
  border-radius:var(--radius-sm);
  cursor:pointer;
  transition:background .2s ease,border-color .2s ease,color .2s ease;
}
.a11y-opt:hover{background:var(--cream-2)}
.a11y-opt:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.a11y-opt__ico{display:grid;place-items:center;width:22px;height:22px}
.a11y-opt.has-level .a11y-opt__label{padding-inline-end:4px}
.a11y-opt__ico svg{width:20px;height:20px;fill:var(--text-soft)}
.a11y-opt__label{display:block}

/* מצב פעיל: רקע מודגש, גבול בצבע המותג וסימן וי */
.a11y-opt[aria-pressed="true"]{
  background:rgba(176,141,87,.12);
  border-color:var(--gold);
  color:var(--navy);
}
.a11y-opt[aria-pressed="true"] .a11y-opt__ico svg{fill:var(--gold)}
.a11y-opt[aria-pressed="true"] .a11y-opt__state{
  position:absolute;top:10px;inset-inline-end:10px;
  width:17px;height:17px;border-radius:50%;
  background:var(--gold);
}
.a11y-opt[aria-pressed="true"] .a11y-opt__state::after{
  content:"";position:absolute;top:5px;inset-inline-start:4.5px;
  width:7px;height:3.5px;
  border:2px solid #fff;border-top:0;border-inline-end:0;
  transform:rotate(-45deg);
}
/* דרגה נוכחית, למשל 125% או "בינוני". מחליפה את סימן הווי */
.a11y-opt__level{
  position:absolute;top:9px;inset-inline-end:9px;
  padding:2px 8px;border-radius:99px;
  background:var(--gold-text);color:#fff;
  font-size:11px;font-weight:700;line-height:1.5;letter-spacing:.01em;
  white-space:nowrap;
}
.a11y-opt.has-level .a11y-opt__state{display:none}

.a11y-opt--link{min-height:84px}

.a11y-panel__foot{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 22px;border-top:1px solid var(--line-soft);background:var(--cream);
}
.a11y-reset{
  flex:1;
  font-family:var(--ff-body);font-size:15px;font-weight:600;
  color:var(--navy);background:var(--white);
  border:1.5px solid var(--navy);border-radius:99px;
  padding:11px 18px;cursor:pointer;
  transition:background .25s ease,color .25s ease;
}
.a11y-reset:hover{background:var(--navy);color:#fff}
.a11y-reset:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.a11y-statement{
  font-size:14px;color:#1F5566;text-decoration:underline;white-space:nowrap;
}

/* מובייל: bottom sheet ------------------------------------------------------- */
@media (max-width:720px){
  :root{--a11y-edge:16px}
  .a11y-panel{
    left:0;right:0;bottom:0;
    width:auto;max-width:none;
    max-height:min(82vh,calc(100vh - 70px));
    border-radius:20px 20px 0 0;
    border-inline:0;border-bottom:0;
    animation:a11y-sheet .24s cubic-bezier(.22,.61,.36,1) both;
  }
  @keyframes a11y-sheet{from{transform:translateY(100%)}to{transform:none}}
  .a11y-panel__body{padding-bottom:8px}
  .a11y-panel__foot{padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))}
}
@media (max-width:360px){
  .a11y-group__grid{grid-template-columns:1fr}
  .a11y-opt{min-height:0;flex-direction:row;align-items:center;gap:10px}
}

/* ==========================================================================
   המצבים שהווידג'ט מפעיל על האתר
   ========================================================================== */

/* --- טקסט --- */
html[data-a11y-lineheight="medium"] body :is(p,li,dd,dt,blockquote,figcaption,label,span.a11y-none){line-height:1.9}
html[data-a11y-lineheight="large"]  body :is(p,li,dd,dt,blockquote,figcaption,label){line-height:2.3}

html[data-a11y-letterspacing="medium"] body :is(p,li,h1,h2,h3,h4,a,button,label,dd,dt){letter-spacing:.06em}
html[data-a11y-letterspacing="large"]  body :is(p,li,h1,h2,h3,h4,a,button,label,dd,dt){letter-spacing:.12em}

/* יישור טקסט. רכיבי ניווט, כפתורים, טבלאות ואייקונים נשארים כפי שהם */
html[data-a11y-textalignment="right"]  body :is(p,li,h1,h2,h3,h4,blockquote):not(.nav *):not(.btn):not(.footer__inner *){text-align:right}
html[data-a11y-textalignment="center"] body :is(p,li,h1,h2,h3,h4,blockquote):not(.nav *):not(.btn):not(.footer__inner *){text-align:center}
html[data-a11y-textalignment="left"]   body :is(p,li,h1,h2,h3,h4,blockquote):not(.nav *):not(.btn):not(.footer__inner *){text-align:left}

/* גופן קריא. אייקוני SVG אינם מושפעים */
html[data-a11y-readablefont="1"] body,
html[data-a11y-readablefont="1"] body :is(h1,h2,h3,h4,p,li,a,button,input,select,textarea,label,span,div){
  font-family:Arial,"Segoe UI",Helvetica,sans-serif;
  letter-spacing:normal;
}

/* --- צבעים ותצוגה --- */
/* ניגודיות גבוהה: משנים טקסט ורקע, לא filter עיוור */
html[data-a11y-highcontrast="1"] body{background:#fff}
html[data-a11y-highcontrast="1"] .hero::after{
  background:linear-gradient(to left,#fff 0%,#fff 46%,rgba(255,255,255,.86) 70%,rgba(255,255,255,.45) 100%) !important;
}
html[data-a11y-highcontrast="1"] body :is(p,li,span,dd,dt,label,figcaption){color:#111 !important}
html[data-a11y-highcontrast="1"] body :is(h1,h2,h3,h4){color:#000 !important}
html[data-a11y-highcontrast="1"] .section--navy,
html[data-a11y-highcontrast="1"] .section--navy-deep,
html[data-a11y-highcontrast="1"] .footer,
html[data-a11y-highcontrast="1"] #cc-main .cm,
html[data-a11y-highcontrast="1"] #cc-main .pm{background:#fff;border-color:#000}
html[data-a11y-highcontrast="1"] :is(.section--navy,.section--navy-deep,.footer) :is(p,li,span,h1,h2,h3,h4,a){color:#fff !important}
html[data-a11y-highcontrast="1"] .hero__sub--lead strong{color:#000 !important;box-shadow:none !important;text-decoration:underline}
html[data-a11y-highcontrast="1"] a:not(.btn){color:#00409e !important}
html[data-a11y-highcontrast="1"] :is(.section--navy,.section--navy-deep,.footer) a:not(.btn){color:#ffd77a !important}
html[data-a11y-highcontrast="1"] .btn--primary{background:#000;color:#fff;border-color:#000}
html[data-a11y-highcontrast="1"] :is(.btn--outline,.btn--ghost-light){border-color:currentColor}

/* ניגודיות הפוכה: ערכה כהה. תמונות, לוגואים וסרטונים לא מושפעים */
html[data-a11y-invertedcontrast="1"] body{background:#0B0F16;color:#F2F4F8}
html[data-a11y-invertedcontrast="1"] body :is(section,header,footer,.footer,.form-wrap,.svc__item,.pillars__item,.legal,.tst,.a11y-none){
  background-color:#0B0F16 !important;
}
html[data-a11y-invertedcontrast="1"] body :is(p,li,span,dd,dt,label,figcaption,h1,h2,h3,h4){color:#F2F4F8 !important}
html[data-a11y-invertedcontrast="1"] body a:not(.btn){color:#8FD0FF !important}
html[data-a11y-invertedcontrast="1"] body :is(.svc__item,.pillars__item,.form-wrap,.logo-tile,.faq__item){
  border-color:#3A4658 !important;
}
html[data-a11y-invertedcontrast="1"] body :is(input,select,textarea){
  background:#151C27 !important;color:#F2F4F8 !important;border-color:#3A4658 !important;
}
html[data-a11y-invertedcontrast="1"] .btn--primary{background:#D3B583;color:#0B0F16}
/* אזורים עם תמונת רקע בהירה: הצעיף הופך לכהה, אחרת טקסט בהיר על תמונה בהירה */
html[data-a11y-invertedcontrast="1"] .hero::after{
  background:linear-gradient(to left,
    rgba(11,15,22,.96) 0%,rgba(11,15,22,.92) 32%,
    rgba(11,15,22,.70) 56%,rgba(11,15,22,.30) 80%,rgba(11,15,22,.12) 100%) !important;
}
html[data-a11y-invertedcontrast="1"] .partners::after{
  background:linear-gradient(to bottom,#0B0F16 0%,rgba(11,15,22,.80) 18%,
    rgba(11,15,22,.62) 50%,rgba(11,15,22,.80) 84%,#0B0F16 100%) !important;
}
html[data-a11y-invertedcontrast="1"] .branch-band::after{
  background:linear-gradient(to bottom,#0B0F16 0%,rgba(11,15,22,.45) 30%,
    rgba(11,15,22,.45) 70%,#0B0F16 100%) !important;
}
html[data-a11y-invertedcontrast="1"] :is(.hero__bg,.partners__bg,.pillars__bg,.branch-band){
  filter:brightness(.62);
}

html[data-a11y-invertedcontrast="1"] .hero__sub--lead strong{
  color:#FFE2A8 !important;box-shadow:none !important;
}
html[data-a11y-invertedcontrast="1"] .btn--ghost-light{
  color:#F2F4F8 !important;border-color:#F2F4F8 !important;
}
html[data-a11y-invertedcontrast="1"] .hero__meta{color:#E8C98F !important}

/* החלונית עצמה נשארת קריאה */
html[data-a11y-invertedcontrast="1"] .a11y-panel,
html[data-a11y-invertedcontrast="1"] .a11y-panel__head,
html[data-a11y-invertedcontrast="1"] .a11y-panel__foot{background:#151C27 !important;border-color:#3A4658}
html[data-a11y-invertedcontrast="1"] .a11y-panel :is(h2,h3,p,.a11y-opt){color:#F2F4F8 !important}
html[data-a11y-invertedcontrast="1"] .a11y-opt{background:#0B0F16 !important}

/* גווני אפור: על התוכן בלבד, החלונית נשארת צבעונית וברורה */
html[data-a11y-grayscale="1"] body > *:not(.a11y-panel):not(.a11y-btn):not(.a11y-backdrop){
  filter:grayscale(1);
}

/* רקע בהיר */
html[data-a11y-lightbackground="1"] body,
html[data-a11y-lightbackground="1"] body :is(.section--cream,.section--cream2,.section--white,.section--navy,.section--navy-deep,.footer,.pillars,.partners,.figures-band){
  background-image:none !important;background-color:#fff !important;
}
html[data-a11y-lightbackground="1"] body :is(p,li,span,h1,h2,h3,h4,dd,dt,label){color:#16294A !important}
html[data-a11y-lightbackground="1"] body :is(section,.footer){border-bottom:1px solid #D8DDE6}
html[data-a11y-lightbackground="1"] .hero__bg,
html[data-a11y-lightbackground="1"] .partners__bg,
html[data-a11y-lightbackground="1"] .pillars__bg{opacity:.18}
html[data-a11y-lightbackground="1"] .hero::after{background:rgba(255,255,255,.72)}

/* הדגשת קישורים: רק קישורי טקסט, לא כפתורים ולא כרטיסים */
html[data-a11y-highlightlinks="1"] body a:not(.btn):not(.brand):not(.fab):not(.logo-tile):not(.svc__item):not(.a11y-opt){
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:2px;
  text-decoration-color:var(--gold);
}
html[data-a11y-highlightlinks="1"] body a:not(.btn):not(.brand):not(.fab):not(.a11y-opt):hover{
  outline:2px dashed var(--gold);outline-offset:2px;
}

/* --- ניווט ומיקוד --- */
/* סמן גדול, מקובץ מקומי. לא מופעל במכשירי מגע */
@media (hover:hover) and (pointer:fine){
  html[data-a11y-largecursor="1"],
  html[data-a11y-largecursor="1"] body{
    cursor:url("../img/cursor/arrow.svg") 4 2,auto;
  }
  html[data-a11y-largecursor="1"] :is(a,button,[role="button"],input[type="submit"],label,select,summary){
    cursor:url("../img/cursor/pointer.svg") 14 4,pointer;
  }
}

/* הדגשת פוקוס. אינה מסירה פוקוס קיים, רק מחזקת אותו */
html[data-a11y-focushighlight="1"] body :is(a,button,input,select,textarea,[tabindex]):focus-visible{
  outline:3px solid #B8860B !important;
  outline-offset:3px !important;
  border-radius:4px;
}

/* עצירת אנימציות */
html[data-a11y-reducemotion="1"] *,
html[data-a11y-reducemotion="1"] *::before,
html[data-a11y-reducemotion="1"] *::after{
  animation-duration:.001ms !important;
  animation-iteration-count:1 !important;
  transition-duration:.001ms !important;
  scroll-behavior:auto !important;
}
html[data-a11y-reducemotion="1"]{scroll-behavior:auto !important}
html[data-a11y-reducemotion="1"] .reveal{opacity:1 !important;transform:none !important}
html[data-a11y-reducemotion="1"] video{display:none}

/* כבוד להעדפת מערכת ההפעלה, גם בלי הפעלה ידנית */
@media (prefers-reduced-motion:reduce){
  .a11y-panel,.a11y-backdrop{animation:none}
}
