/* ==========================================================================
   מרכז נגישות - איציק מצברים
   כל המחלקות בתחילית ima11y- כדי שלא יתנגשו עם התבנית או תוספים אחרים.
   ========================================================================== */

:root {
	--ima11y-brand: #1558d6;
	--ima11y-brand-dark: #0e3f9e;
	--ima11y-ink: #14181f;
	--ima11y-muted: #5b6475;
	--ima11y-line: #dfe3ec;
	--ima11y-bg: #ffffff;
	--ima11y-soft: #f3f5fa;
	--ima11y-on: #0f7a3d;
	--ima11y-z: 2147483600;
}

.ima11y-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

/* ---------- כפתור הפתיחה ---------- */
#ima11y-open {
	position: fixed;
	top: 120px;
	left: 20px;
	z-index: var(--ima11y-z);
	width: 56px; height: 56px;
	display: flex; align-items: center; justify-content: center;
	padding: 0;
	border: 3px solid #fff;
	border-radius: 50%;
	background: var(--ima11y-brand);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 22px rgba(11, 13, 18, .35);
	transition: transform .18s ease, background-color .18s ease;
}
#ima11y-open svg { width: 30px; height: 30px; }
#ima11y-open:hover { background: var(--ima11y-brand-dark); transform: scale(1.07); }
#ima11y-open:focus-visible { outline: 4px solid #ffd23f; outline-offset: 3px; }

/* ---------- הפאנל ---------- */
#ima11y-panel {
	position: fixed;
	top: 0; left: 0;
	z-index: var(--ima11y-z);
	width: 400px; max-width: 100vw;
	height: 100vh; height: 100dvh;
	display: flex; flex-direction: column;
	background: var(--ima11y-bg);
	color: var(--ima11y-ink);
	box-shadow: 0 0 60px rgba(11, 13, 18, .4);
	font-family: 'Heebo', 'Arial Hebrew', Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	text-align: right;
	animation: ima11y-in .22s ease;
}
#ima11y-panel[hidden] { display: none !important; }
@keyframes ima11y-in { from { transform: translateX(-24px); opacity: 0; } }

.ima11y-head {
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	background: var(--ima11y-brand);
	color: #fff;
	flex: 0 0 auto;
}
.ima11y-head h2 {
	display: flex; align-items: center; gap: 9px;
	margin: 0;
	font-size: 19px; font-weight: 800; color: #fff;
}
.ima11y-head h2 svg { width: 24px; height: 24px; flex: 0 0 auto; }
#ima11y-close, #ima11y-sheet-close {
	width: 38px; height: 38px;
	display: flex; align-items: center; justify-content: center;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, .5);
	border-radius: 10px;
	background: transparent; color: #fff; cursor: pointer;
}
#ima11y-close svg, #ima11y-sheet-close svg { width: 19px; height: 19px; }
#ima11y-close:hover, #ima11y-sheet-close:hover { background: rgba(255, 255, 255, .18); }
#ima11y-close:focus-visible, #ima11y-sheet-close:focus-visible { outline: 3px solid #ffd23f; outline-offset: 2px; }

.ima11y-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 14px 14px; }
.ima11y-body:focus { outline: none; }

.ima11y-section { margin-top: 16px; }
.ima11y-section-title {
	margin: 0 0 2px;
	font-size: 13px; font-weight: 800;
	letter-spacing: .02em;
	color: var(--ima11y-brand-dark);
	text-transform: none;
}
.ima11y-section-note { margin: 0 0 9px; font-size: 12px; color: var(--ima11y-muted); }
.ima11y-profiles, .ima11y-grid { display: grid; gap: 8px; }
.ima11y-profiles { grid-template-columns: 1fr 1fr; }

/* ---------- פריט ---------- */
.ima11y-item {
	display: flex; align-items: center; gap: 10px;
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	border: 2px solid var(--ima11y-line);
	border-radius: 12px;
	background: var(--ima11y-bg);
	color: var(--ima11y-ink);
	font: inherit;
	text-align: right;
	text-decoration: none;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease;
}
.ima11y-item:hover { border-color: var(--ima11y-brand); background: var(--ima11y-soft); }
.ima11y-item:focus-visible { outline: 3px solid var(--ima11y-brand); outline-offset: 2px; }
.ima11y-profiles .ima11y-item { flex-direction: column; text-align: center; gap: 6px; padding: 12px 8px; }
.ima11y-profiles .ima11y-item-text { align-items: center; text-align: center; }

.ima11y-item-icon { flex: 0 0 auto; display: flex; color: var(--ima11y-brand); }
.ima11y-item-icon svg { width: 22px; height: 22px; }
.ima11y-item-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.ima11y-item-label { font-weight: 700; font-size: 14px; }
.ima11y-item-desc { font-size: 11.5px; color: var(--ima11y-muted); line-height: 1.35; }

.ima11y-item-state {
	flex: 0 0 auto;
	width: 40px; height: 22px;
	border-radius: 999px;
	background: #c9cedb;
	position: relative;
	transition: background-color .18s ease;
}
.ima11y-item-state::after {
	content: "";
	position: absolute; top: 3px; inset-inline-start: 3px;
	width: 16px; height: 16px;
	border-radius: 50%;
	background: #fff;
	transition: transform .18s ease;
}
.ima11y-profiles .ima11y-item-state { width: 34px; height: 18px; }
.ima11y-profiles .ima11y-item-state::after { width: 12px; height: 12px; }

.ima11y-item[aria-pressed="true"] { border-color: var(--ima11y-on); background: #eef8f1; }
.ima11y-item[aria-pressed="true"] .ima11y-item-state { background: var(--ima11y-on); }
.ima11y-item[aria-pressed="true"] .ima11y-item-state::after { transform: translateX(-18px); }
.ima11y-profiles .ima11y-item[aria-pressed="true"] .ima11y-item-state::after { transform: translateX(-16px); }
.ima11y-item[aria-pressed="true"] .ima11y-item-icon { color: var(--ima11y-on); }

/* ---------- בורר מדורג ---------- */
.ima11y-stepper { cursor: default; }
.ima11y-stepper:hover { border-color: var(--ima11y-line); background: var(--ima11y-bg); }
.ima11y-stepper-btns { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.ima11y-step {
	width: 32px; height: 32px;
	display: flex; align-items: center; justify-content: center;
	padding: 0;
	border: 2px solid var(--ima11y-line);
	border-radius: 9px;
	background: var(--ima11y-soft);
	color: var(--ima11y-ink);
	cursor: pointer;
}
.ima11y-step svg { width: 15px; height: 15px; }
.ima11y-step:hover { border-color: var(--ima11y-brand); color: var(--ima11y-brand); }
.ima11y-step:focus-visible { outline: 3px solid var(--ima11y-brand); outline-offset: 2px; }
.ima11y-step-val { min-width: 42px; text-align: center; font-size: 12.5px; font-weight: 800; }
.ima11y-level { display: flex; gap: 3px; margin-top: 4px; }
.ima11y-level i { width: 14px; height: 4px; border-radius: 2px; background: #d8dce7; }
.ima11y-level i.on { background: var(--ima11y-brand); }

/* ---------- תחתית ---------- */
.ima11y-foot { flex: 0 0 auto; padding: 12px 14px; border-top: 2px solid var(--ima11y-line); background: var(--ima11y-soft); }
.ima11y-reset {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%;
	padding: 11px;
	border: 2px solid #c8102e;
	border-radius: 11px;
	background: #fff; color: #c8102e;
	font: inherit; font-weight: 800;
	cursor: pointer;
}
.ima11y-reset svg { width: 18px; height: 18px; }
.ima11y-reset:hover { background: #c8102e; color: #fff; }
.ima11y-reset:focus-visible { outline: 3px solid var(--ima11y-brand); outline-offset: 2px; }
.ima11y-foot-note { margin: 8px 0 0; font-size: 11.5px; color: var(--ima11y-muted); text-align: center; }

/* ---------- חלונית משנית ---------- */
#ima11y-sheet {
	position: fixed; inset: 0;
	z-index: calc(var(--ima11y-z) + 5);
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
	background: rgba(8, 10, 15, .6);
}
#ima11y-sheet[hidden] { display: none !important; }
.ima11y-sheet-inner {
	width: 520px; max-width: 100%;
	max-height: 80vh;
	display: flex; flex-direction: column;
	border-radius: 16px;
	overflow: hidden;
	background: var(--ima11y-bg);
	color: var(--ima11y-ink);
	font-family: 'Heebo', 'Arial Hebrew', Arial, sans-serif;
	text-align: right;
}
.ima11y-sheet-body { overflow-y: auto; padding: 14px 18px 20px; }
.ima11y-sheet-body:focus { outline: none; }
.ima11y-navlist { list-style: none; margin: 0; padding: 0; }
.ima11y-navlist li { margin: 0 0 6px; }
.ima11y-navlist button {
	display: block; width: 100%;
	padding: 9px 12px;
	border: 2px solid var(--ima11y-line);
	border-radius: 10px;
	background: #fff; color: var(--ima11y-ink);
	font: inherit; text-align: right; cursor: pointer;
}
.ima11y-navlist button:hover { border-color: var(--ima11y-brand); background: var(--ima11y-soft); }
.ima11y-navlist button:focus-visible { outline: 3px solid var(--ima11y-brand); outline-offset: 2px; }
.ima11y-navlist .lvl-3 { padding-inline-start: 18px; font-size: 13.5px; }
.ima11y-navlist .lvl-4 { padding-inline-start: 34px; font-size: 13px; color: var(--ima11y-muted); }
.ima11y-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.ima11y-tabs button {
	flex: 1 1 auto; padding: 9px;
	border: 2px solid var(--ima11y-line); border-radius: 10px;
	background: #fff; color: var(--ima11y-ink);
	font: inherit; font-weight: 700; cursor: pointer;
}
.ima11y-tabs button[aria-selected="true"] { background: var(--ima11y-brand); border-color: var(--ima11y-brand); color: #fff; }
.ima11y-tabs button:focus-visible { outline: 3px solid var(--ima11y-brand); outline-offset: 2px; }
.ima11y-keys { width: 100%; border-collapse: collapse; }
.ima11y-keys th, .ima11y-keys td { padding: 8px 6px; border-bottom: 1px solid var(--ima11y-line); text-align: right; font-size: 14px; }
.ima11y-keys kbd {
	display: inline-block; padding: 3px 8px;
	border: 1px solid #b9c0d0; border-bottom-width: 2px; border-radius: 6px;
	background: var(--ima11y-soft); font-family: inherit; font-size: 12.5px; font-weight: 700;
	direction: ltr;
}

/* ==========================================================================
   האפקטים על האתר עצמו
   ========================================================================== */

/* שכבת פילטרים - מאפשרת ניגודיות/היפוך בלי לשבור אלמנטים קבועים */
#ima11y-filter {
	position: fixed; inset: 0;
	z-index: calc(var(--ima11y-z) - 10);
	pointer-events: none;
}

/* ---------- גופנים ---------- */
body.ima11y-readable, body.ima11y-readable *:not(#ima11y-root):not(#ima11y-root *) {
	font-family: Arial, 'Arial Hebrew', Verdana, sans-serif !important;
}
body.ima11y-dyslexic, body.ima11y-dyslexic *:not(#ima11y-root):not(#ima11y-root *) {
	font-family: 'Comic Sans MS', 'Trebuchet MS', Verdana, Arial, sans-serif !important;
	letter-spacing: .04em !important;
}

/* ---------- ריווח ---------- */
body.ima11y-lh-1 :is(p, li, dd, dt, blockquote, td, th, figcaption, .im-prose) { line-height: 1.9 !important; }
body.ima11y-lh-2 :is(p, li, dd, dt, blockquote, td, th, figcaption, .im-prose) { line-height: 2.3 !important; }
body.ima11y-lh-3 :is(p, li, dd, dt, blockquote, td, th, figcaption, .im-prose) { line-height: 2.8 !important; }

body.ima11y-ls-1 :is(p, li, a, span, h1, h2, h3, h4, h5, h6, td, th, label, button) { letter-spacing: .06em !important; }
body.ima11y-ls-2 :is(p, li, a, span, h1, h2, h3, h4, h5, h6, td, th, label, button) { letter-spacing: .12em !important; }
body.ima11y-ls-3 :is(p, li, a, span, h1, h2, h3, h4, h5, h6, td, th, label, button) { letter-spacing: .2em !important; }

body.ima11y-ws-1 :is(p, li, a, span, h1, h2, h3, h4, h5, h6, td, th, label) { word-spacing: .18em !important; }
body.ima11y-ws-2 :is(p, li, a, span, h1, h2, h3, h4, h5, h6, td, th, label) { word-spacing: .34em !important; }
body.ima11y-ws-3 :is(p, li, a, span, h1, h2, h3, h4, h5, h6, td, th, label) { word-spacing: .55em !important; }

#ima11y-root, #ima11y-root * {
	letter-spacing: normal !important;
	word-spacing: normal !important;
	line-height: 1.5 !important;
	font-family: 'Heebo', 'Arial Hebrew', Arial, sans-serif !important;
}
#ima11y-root .ima11y-item-desc { line-height: 1.35 !important; }

/* ---------- יישור טקסט ---------- */
body.ima11y-align-right :is(p, li, h1, h2, h3, h4, h5, h6, td, div.im-prose) { text-align: right !important; }
body.ima11y-align-center :is(p, li, h1, h2, h3, h4, h5, h6, td, div.im-prose) { text-align: center !important; }
body.ima11y-align-justify :is(p, li, div.im-prose) { text-align: justify !important; }

/* ---------- הדגשות ---------- */
body.ima11y-marktitles :is(h1, h2, h3, h4, h5, h6):not(#ima11y-root *) {
	background: #fff3bf !important;
	color: #14181f !important;
	outline: 2px dashed #b3121f !important;
	outline-offset: 3px;
	padding: 2px 6px !important;
}
body.ima11y-marklinks a:not(#ima11y-root *) {
	text-decoration: underline !important;
	text-underline-offset: 3px !important;
	text-decoration-thickness: 2px !important;
	background: #fffbe6 !important;
	color: #0b3ea8 !important;
	outline: 2px solid #0b3ea8 !important;
	outline-offset: 2px;
}
body.ima11y-marklinks :is(button, [role="button"]):not(#ima11y-root *) {
	outline: 2px dashed #0b3ea8 !important;
	outline-offset: 2px;
}

/* ---------- מיקוד מקלדת ---------- */
body.ima11y-keyboard :is(a, button, input, select, textarea, [tabindex]):focus {
	outline: 4px solid #ff8a00 !important;
	outline-offset: 3px !important;
	background: #fff8ec !important;
	color: #14181f !important;
	box-shadow: 0 0 0 8px rgba(255, 138, 0, .25) !important;
}
body.ima11y-keyboard #ima11y-root :focus { background: none !important; }

/* ---------- ניגודיות גבוהה ---------- */
body.ima11y-contrast, body.ima11y-contrast *:not(#ima11y-root):not(#ima11y-root *) {
	background-color: #000 !important;
	background-image: none !important;
	color: #fff !important;
	border-color: #fff !important;
	text-shadow: none !important;
	box-shadow: none !important;
}
body.ima11y-contrast a:not(#ima11y-root *) { color: #ffe600 !important; text-decoration: underline !important; }
body.ima11y-contrast :is(button, .im-btn, input[type="submit"]):not(#ima11y-root *) {
	background-color: #000 !important; color: #ffe600 !important; border: 2px solid #ffe600 !important;
}
body.ima11y-contrast :is(h1, h2, h3, h4, h5, h6):not(#ima11y-root *) { color: #4dd2ff !important; }
body.ima11y-contrast :is(img, video):not(#ima11y-root *) { opacity: .92; }
body.ima11y-contrast svg:not(#ima11y-root *) { fill: none !important; stroke: #fff !important; }

/* ---------- רקע בהיר ---------- */
body.ima11y-light, body.ima11y-light *:not(#ima11y-root):not(#ima11y-root *) {
	background-color: #fff !important;
	background-image: none !important;
	color: #14181f !important;
	text-shadow: none !important;
}
body.ima11y-light a:not(#ima11y-root *) { color: #0b3ea8 !important; text-decoration: underline !important; }
body.ima11y-light :is(h1, h2, h3, h4, h5, h6):not(#ima11y-root *) { color: #0b0d12 !important; }
body.ima11y-light :is(.im-header, .im-footer, .im-cta-strip):not(#ima11y-root *) { border-bottom: 2px solid #d8dce7 !important; }
body.ima11y-light svg:not(#ima11y-root *) { stroke: #14181f !important; }

/* היפוך צבעים - התמונות מתהפכות פעמיים כדי להישאר טבעיות */
body.ima11y-invert :is(img, video, picture, iframe):not(#ima11y-root *) { filter: invert(1) hue-rotate(180deg); }

/* ---------- סמן עכבר גדול ---------- */
body.ima11y-cursor-black, body.ima11y-cursor-black *:not(#ima11y-root *) {
	cursor: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l13.5 9.5-6 1.2 3.8 7.2-2.8 1.4-3.8-7.3L5 18z' fill='%23000' stroke='%23fff' stroke-width='1.4'/%3E%3C/svg%3E") 4 2, auto !important;
}
body.ima11y-cursor-white, body.ima11y-cursor-white *:not(#ima11y-root *) {
	cursor: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l13.5 9.5-6 1.2 3.8 7.2-2.8 1.4-3.8-7.3L5 18z' fill='%23fff' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") 4 2, auto !important;
}
body.ima11y-cursor-huge, body.ima11y-cursor-huge *:not(#ima11y-root *) {
	cursor: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l13.5 9.5-6 1.2 3.8 7.2-2.8 1.4-3.8-7.3L5 18z' fill='%23e21c29' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") 6 3, auto !important;
}

/* ---------- עצירת אנימציות ---------- */
body.ima11y-stopmotion *:not(#ima11y-root *),
body.ima11y-stopmotion *:not(#ima11y-root *)::before,
body.ima11y-stopmotion *:not(#ima11y-root *)::after {
	animation: none !important;
	transition: none !important;
	scroll-behavior: auto !important;
}
body.ima11y-stopmotion .im-reveal { opacity: 1 !important; transform: none !important; }
body.ima11y-stopmotion .im-brands-track { flex-wrap: wrap !important; width: auto !important; }

/* ---------- תמונות ---------- */
body.ima11y-hideimages :is(img, picture, svg:not(#ima11y-root *), video):not(#ima11y-root *) { visibility: hidden !important; }
body.ima11y-hideimages [style*="background-image"]:not(#ima11y-root *) { background-image: none !important; }
.ima11y-alt-badge {
	display: block;
	margin: 6px 0;
	padding: 8px 10px;
	border: 2px dashed #0b3ea8;
	border-radius: 8px;
	background: #f2f6ff;
	color: #0b3ea8;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
}

/* ---------- מדריך קריאה ---------- */
#ima11y-guide {
	position: fixed;
	inset-inline: 0;
	height: 0;
	border-top: 4px solid #e21c29;
	border-bottom: 4px solid #e21c29;
	background: rgba(226, 28, 41, .12);
	pointer-events: none;
	z-index: calc(var(--ima11y-z) - 5);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .3);
}
/* ---------- מסכת קריאה ---------- */
.ima11y-mask-part {
	position: fixed;
	inset-inline: 0;
	background: rgba(0, 0, 0, .78);
	pointer-events: none;
	z-index: calc(var(--ima11y-z) - 5);
}

/* ---------- זכוכית מגדלת ---------- */
#ima11y-magnifier {
	position: fixed;
	z-index: calc(var(--ima11y-z) - 2);
	max-width: 560px;
	padding: 14px 18px;
	border: 3px solid var(--ima11y-brand);
	border-radius: 14px;
	background: #fff;
	color: #14181f;
	font-family: 'Heebo', Arial, sans-serif;
	font-size: 27px;
	font-weight: 700;
	line-height: 1.45;
	text-align: right;
	box-shadow: 0 16px 50px rgba(11, 13, 18, .45);
	pointer-events: none;
}

/* ---------- הקראה ---------- */
body.ima11y-speak :is(p, h1, h2, h3, h4, h5, h6, li, a, span, td, figcaption, button):not(#ima11y-root *):hover {
	outline: 3px dashed #0f7a3d !important;
	outline-offset: 2px;
	cursor: help !important;
}
.ima11y-speaking {
	background: #d8f5e3 !important;
	outline: 3px solid #0f7a3d !important;
	outline-offset: 2px;
}
#ima11y-speak-bar {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: calc(var(--ima11y-z) + 1);
	display: flex; align-items: center; justify-content: center; gap: 12px;
	padding: 10px;
	background: #0f7a3d;
	color: #fff;
	font-family: 'Heebo', Arial, sans-serif;
	font-size: 14.5px;
	font-weight: 700;
}
#ima11y-speak-bar button {
	padding: 7px 16px;
	border: 2px solid #fff;
	border-radius: 9px;
	background: transparent;
	color: #fff;
	font: inherit;
	cursor: pointer;
}
#ima11y-speak-bar button:hover { background: rgba(255, 255, 255, .2); }
#ima11y-speak-bar button:focus-visible { outline: 3px solid #ffd23f; outline-offset: 2px; }

/* ---------- יעד קפיצה מניווט מהיר ---------- */
.ima11y-jump-target {
	outline: 4px solid #ff8a00 !important;
	outline-offset: 4px;
	scroll-margin-top: 110px;
}

/* ---------- מובייל ---------- */
@media (max-width: 600px) {
	#ima11y-panel { width: 100vw; }
	#ima11y-open { width: 50px; height: 50px; top: 96px; left: 12px; }
	#ima11y-open svg { width: 26px; height: 26px; }
	.ima11y-profiles { grid-template-columns: 1fr 1fr; }
	#ima11y-magnifier { font-size: 22px; max-width: 92vw; }
}

/* סרגל הניהול של וורדפרס */
body.admin-bar #ima11y-panel { top: 32px; height: calc(100vh - 32px); }
@media (max-width: 782px) {
	body.admin-bar #ima11y-panel { top: 46px; height: calc(100vh - 46px); }
}

@media print {
	#ima11y-root, #ima11y-guide, .ima11y-mask-part, #ima11y-magnifier, #ima11y-filter { display: none !important; }
}
