/* ============================================================
   Pure Pools - נגישות + עוגיות
   תקן ישראלי 5568 / WCAG 2.0 AA
   נטען בכל עמודי האתר
   ============================================================ */

/* ---------- דילוג לתוכן ----------
   מוסתר בעזרת translate ולא במיקום שלילי,
   כדי שלא ייווצר גלישה אופקית בפריסת RTL */
.skip-link{
  position:fixed;
  top:0;
  inset-inline-start:0;
  z-index:9999;
  background:#0a2036;
  color:#fff;
  padding:14px 24px;
  border-radius:0 0 12px 0;
  font-weight:700;
  font-family:inherit;
  text-decoration:none;
  transform:translateY(-200%);
  transition:transform .2s ease;
}
.skip-link:focus{
  transform:translateY(0);
  outline:3px solid #93d3ec;
  outline-offset:-3px;
}

/* ---------- מיקוד מקלדת גלוי בכל האתר ---------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
summary:focus-visible{
  outline:3px solid #1f6595;
  outline-offset:3px;
  border-radius:6px;
}
body.a11y-contrast a:focus-visible,
body.a11y-contrast button:focus-visible{
  outline-color:#ffe600;
}

/* ============================================================
   כפתור הנגישות הצף
   ============================================================ */
.a11y-toggle{
  position:fixed;
  inset-inline-start:16px;
  bottom:16px;
  z-index:9000;
  width:56px;
  height:56px;
  border-radius:50%;
  border:2px solid #fff;
  background:#0f2f4c;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 10px 26px -8px rgba(6,21,32,0.6);
  transition:transform .25s ease, background .25s ease;
}
.a11y-toggle:hover{ transform:scale(1.07); background:#164a75; }
.a11y-toggle svg{ width:30px; height:30px; fill:currentColor; }

/* ============================================================
   פאנל הנגישות
   ============================================================ */
.a11y-panel{
  position:fixed;
  inset-inline-start:16px;
  bottom:84px;
  z-index:9001;
  width:min(320px, calc(100vw - 32px));
  max-height:min(72vh, 560px);
  overflow-y:auto;
  background:#fff;
  color:#0a2036;
  border-radius:20px;
  border:1px solid rgba(15,47,76,0.12);
  box-shadow:0 30px 60px -18px rgba(6,21,32,0.45);
  padding:20px;
  font-family:'Heebo', system-ui, sans-serif;
  opacity:0;
  visibility:hidden;
  transform:translateY(14px) scale(.97);
  transition:opacity .25s ease, transform .25s ease, visibility .25s;
}
.a11y-panel.open{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
}
.a11y-panel h2{
  font-size:19px;
  font-weight:700;
  margin:0 0 4px;
  font-family:inherit;
}
.a11y-panel .a11y-sub{
  font-size:13px;
  color:#5c7893;
  margin-bottom:16px;
}
.a11y-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.a11y-close{
  background:transparent;
  border:none;
  cursor:pointer;
  font-size:26px;
  line-height:1;
  color:#5c7893;
  padding:2px 6px;
  border-radius:8px;
}
.a11y-close:hover{ background:#eef5f9; color:#0a2036; }

.a11y-group{
  border-top:1px solid rgba(15,47,76,0.1);
  padding-top:14px;
  margin-top:14px;
}
.a11y-group-title{
  font-size:12px;
  font-weight:700;
  letter-spacing:.4px;
  color:#1f6595;
  text-transform:none;
  margin-bottom:10px;
}
.a11y-options{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.a11y-btn{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:12px 6px;
  min-height:74px;
  border-radius:12px;
  border:1.5px solid rgba(15,47,76,0.14);
  background:#f7fbfd;
  color:#0a2036;
  font-family:inherit;
  font-size:12.5px;
  font-weight:600;
  line-height:1.25;
  text-align:center;
  cursor:pointer;
  transition:border-color .2s, background .2s, transform .15s;
}
.a11y-btn:hover{ border-color:#3985b3; background:#eef6fb; }
.a11y-btn:active{ transform:scale(.97); }
.a11y-btn[aria-pressed="true"]{
  border-color:#1f6595;
  background:#1f6595;
  color:#fff;
}
.a11y-btn svg{ width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.8; }
.a11y-btn .a11y-val{
  font-size:11px;
  font-weight:700;
  opacity:.75;
}
.a11y-reset{
  width:100%;
  margin-top:14px;
  padding:12px;
  border-radius:12px;
  border:1.5px solid #c8342f;
  background:#fff;
  color:#c8342f;
  font-family:inherit;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
}
.a11y-reset:hover{ background:#c8342f; color:#fff; }
.a11y-statement{
  display:block;
  text-align:center;
  margin-top:12px;
  font-size:13px;
  font-weight:600;
  color:#1f6595;
  text-decoration:underline;
}

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

/* גודל טקסט - נשלט דרך משתנה על html */
html{ font-size:calc(16px * var(--a11y-font-scale, 1)); }

/* ניגודיות גבוהה - כהה */
body.a11y-contrast,
body.a11y-contrast section,
body.a11y-contrast footer,
body.a11y-contrast .service-card,
body.a11y-contrast .trust-card,
body.a11y-contrast .legal-card{
  background:#000 !important;
  color:#fff !important;
}
body.a11y-contrast *:not(.a11y-panel):not(.a11y-panel *):not(.a11y-toggle):not(.a11y-toggle *){
  background-image:none !important;
  color:#fff !important;
  border-color:#fff !important;
  box-shadow:none !important;
  text-shadow:none !important;
}
body.a11y-contrast a:not(.btn):not(.a11y-btn){ color:#ffe600 !important; text-decoration:underline !important; }
body.a11y-contrast .btn{ background:#ffe600 !important; color:#000 !important; }
body.a11y-contrast .btn *{ color:#000 !important; }
body.a11y-contrast img{ filter:grayscale(.2) contrast(1.15); }
/* הסלקטור * לא מכסה פסאודו-אלמנטים, ובלי זה הזוהר הצבעוני של ה-hero נשאר */
body.a11y-contrast *::before, body.a11y-contrast *::after{ background-image:none !important; }
body.a11y-contrast .trust-card .num{ -webkit-text-stroke-width:0 !important; }

/* ניגודיות בהירה */
body.a11y-light,
body.a11y-light section,
body.a11y-light footer{
  background:#fff !important;
  color:#000 !important;
}
body.a11y-light *:not(.a11y-panel):not(.a11y-panel *):not(.a11y-toggle):not(.a11y-toggle *){
  background-image:none !important;
  color:#000 !important;
  text-shadow:none !important;
}
body.a11y-light a:not(.btn){ color:#00408f !important; text-decoration:underline !important; }
body.a11y-light .btn{ background:#00408f !important; color:#fff !important; }
body.a11y-light .btn *{ color:#fff !important; }
body.a11y-light *::before, body.a11y-light *::after{ background-image:none !important; }
body.a11y-light .trust-card .num{ -webkit-text-stroke-width:0 !important; }

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

/* היפוך צבעים */
body.a11y-invert{ filter:invert(1) hue-rotate(180deg); }
body.a11y-invert img,
body.a11y-invert video{ filter:invert(1) hue-rotate(180deg); }

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

/* גופן קריא */
body.a11y-readable,
body.a11y-readable *:not(.a11y-panel):not(.a11y-panel *){
  font-family:Arial, 'Heebo', sans-serif !important;
  letter-spacing:.4px !important;
  word-spacing:2px !important;
  line-height:1.75 !important;
}

/* עצירת אנימציות */
body.a11y-noanim *,
body.a11y-noanim *::before,
body.a11y-noanim *::after{
  animation:none !important;
  transition:none !important;
  scroll-behavior:auto !important;
}
body.a11y-noanim .reveal,
body.a11y-noanim .service-card,
body.a11y-noanim .gallery-pair{
  opacity:1 !important;
  transform:none !important;
}

/* כיבוד העדפת מערכת */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
}

/* סמן גדול */
body.a11y-bigcursor,
body.a11y-bigcursor *{
  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 2 L6 38 L15 30 L21 44 L28 41 L22 27 L34 27 Z' fill='%23000' stroke='%23fff' stroke-width='2.5'/%3E%3C/svg%3E") 4 2, auto !important;
}

/* ============================================================
   באנר עוגיות
   ============================================================ */
.cookie-banner{
  position:fixed;
  inset-inline:0;
  bottom:0;
  z-index:9500;
  background:#0a2036;
  color:#fff;
  padding:20px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow:0 -12px 40px -12px rgba(0,0,0,0.5);
  font-family:'Heebo', system-ui, sans-serif;
  transform:translateY(110%);
  transition:transform .5s cubic-bezier(.2,.8,.2,1);
}
.cookie-banner.show{ transform:translateY(0); }
.cookie-inner{
  max-width:1100px;
  margin-inline:auto;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.cookie-text{
  font-size:14.5px;
  line-height:1.6;
  color:rgba(255,255,255,0.88);
}
.cookie-text strong{ color:#fff; display:block; margin-bottom:4px; font-size:16px; }
.cookie-text a{ color:#93d3ec; text-decoration:underline; }
.cookie-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.cookie-actions button{
  flex:1 1 140px;
  padding:13px 20px;
  border-radius:999px;
  font-family:inherit;
  font-weight:700;
  font-size:14.5px;
  cursor:pointer;
  border:1.5px solid transparent;
  transition:transform .2s, filter .2s;
}
.cookie-actions button:hover{ transform:translateY(-2px); }
.cookie-accept{ background:#25D366; color:#fff; }
.cookie-reject{ background:transparent; color:#fff; border-color:rgba(255,255,255,0.4); }

@media (min-width:820px){
  .cookie-inner{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
  }
  .cookie-actions{ flex-wrap:nowrap; }
  .cookie-actions button{ flex:0 0 auto; }
}

/* ============================================================
   מניעת התנגשות בין הרכיבים הצפים בתחתית המסך.
   --cookie-h נמדד בזמן אמת ב-a11y.js לפי הגובה בפועל של הבאנר,
   כי הוא משתנה לפי גלישת הטקסט ברוחבי מסך שונים.
   ============================================================ */
:root{ --cookie-h:0px; }

/* במובייל סרגל הוואטסאפ הדביק תופס את התחתית */
@media (max-width:979px){
  .a11y-toggle{ bottom:calc(84px + var(--cookie-h)); }
  .a11y-panel{ bottom:calc(152px + var(--cookie-h)); }
  body.cookie-open .sticky-cta{ bottom:var(--cookie-h); }
}

@media (min-width:980px){
  .a11y-toggle{ bottom:calc(16px + var(--cookie-h)); }
  .a11y-panel{ bottom:calc(84px + var(--cookie-h)); }
}
