/* ==========================================================================
   דף הבית להתקשרות — שכבת מובייל "אפליקציה"
   נטען אחרי home.css בדף הבית בלבד. כל מה שכאן פועל רק עד 800px,
   חוץ מהסתרת רכיבי המובייל בדסקטופ.
   ========================================================================== */

.m-only { display: none !important; }

@media (max-width: 800px) {

:root {
	--m-safe-top: env(safe-area-inset-top, 0px);
	--m-safe-bot: env(safe-area-inset-bottom, 0px);
	--m-bar: 72px;                 /* גובה סרגל הלוגו */
	--m-date: 56px;                /* גובה כרטיס התאריך */
	--m-head: calc(var(--m-safe-top) + var(--m-bar) + 6px + var(--m-date) + 12px);
	--m-tab: 64px;                 /* גובה סרגל הלשוניות */
	--m-foot: calc(var(--m-tab) + 10px + var(--m-safe-bot));
	--m-cream: #fffaf1;
	--m-cream-2: #f6eddd;
	--m-ink: #3a2a1b;
	--m-ink-2: #7d6a58;
	--m-wood: #a8682f;
	--m-wood-dark: #7a4519;
	--m-wood-light: #e3ad6c;
	--m-purple: #503895;
	--m-teal: #1a9bb5;
	--m-gold: #fab03c;
	--m-ease: cubic-bezier(.2, .9, .25, 1);
}

html, body { -webkit-tap-highlight-color: transparent; }
html.m-open, html.m-sheet,
html.m-open body, html.m-sheet body { overflow: hidden !important; }

/* ---------- הסתרת הכותרת הישנה ---------- */
.bh,
nav#MainNav,
#MobNavBtn,
body footer.flex { display: none !important; }

/* ---------- סרגל עליון ---------- */
.m-appbar.m-only {
	display: flex !important;
	position: fixed;
	top: 0; left: 0; right: 0;
	height: calc(var(--m-bar) + var(--m-safe-top));
	padding: var(--m-safe-top) 14px 0;
	align-items: center;
	justify-content: space-between;
	direction: rtl;
	z-index: 9;
	background: rgba(255, 250, 241, .9);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid rgba(168, 104, 47, .14);
	box-shadow: 0 2px 16px rgba(60, 35, 10, .08);
}
.m-bh {
	position: absolute;
	top: calc(var(--m-safe-top) + 6px);
	right: 66px;
	font: 700 11px/1 Heebo, sans-serif;
	color: var(--m-wood-dark);
	opacity: .8;
}
.m-iconbtn {
	width: 44px; height: 44px;
	border: 0; padding: 0;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(60, 35, 10, .12), 0 0 0 1px rgba(168, 104, 47, .1);
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	transition: transform .15s var(--m-ease);
}
.m-iconbtn:active { transform: scale(.92); }
.m-burger { position: relative; width: 20px; height: 14px; }
.m-burger span {
	position: absolute; right: 0;
	height: 2.5px; border-radius: 2px;
	background: var(--m-purple);
}
.m-burger span:nth-child(1) { top: 0; width: 100%; }
.m-burger span:nth-child(2) { top: 6px; width: 70%; }
.m-burger span:nth-child(3) { top: 12px; width: 100%; }
.m-reshet {
	width: 44px; height: 44px;
	border-radius: 50%;
	background: linear-gradient(145deg, #0fb0d6, #0089ad);
	box-shadow: 0 2px 8px rgba(0, 110, 140, .3);
	display: flex; align-items: center; justify-content: center;
}
.m-reshet svg { width: 32px; height: auto; display: block; }

/* הלוגו (השלט מהעץ) — באמצע הסרגל */
.top_bg .logo_c > a > svg,
.logo > .logo_c > a > svg {
	position: fixed !important;
	top: calc(var(--m-safe-top) + 6px) !important;
	right: 0 !important; left: 0 !important;
	margin: 0 auto !important;
	height: calc(var(--m-bar) - 12px) !important;
	width: calc((var(--m-bar) - 12px) * 1.739) !important;
	z-index: 12;
	filter: drop-shadow(0 3px 5px rgba(110, 60, 15, .28));
	transition: transform .2s var(--m-ease);
}
.top_bg .logo_c > a:active > svg { transform: scale(.96); }

/* ---------- כרטיס התאריך ---------- */
.top_bg {
	top: calc(var(--m-safe-top) + var(--m-bar) + 6px) !important;
	left: 12px !important; right: 12px !important;
	width: auto !important;
	height: auto !important;
	min-height: var(--m-date);
	border-radius: 18px;
	background: linear-gradient(135deg, #1590a8 0%, #2fb0cc 55%, #2a86ad 100%) !important;
	box-shadow: 0 8px 20px rgba(14, 90, 115, .28), inset 0 1px 0 rgba(255, 255, 255, .3) !important;
}
.top_bg > .container {
	width: 100% !important; max-width: none !important;
	min-height: var(--m-date);
	margin: 0 !important; padding: 0 !important;
}
.top_bg .date_area {
	position: relative !important;
	width: 100% !important;
	min-height: var(--m-date);
	padding: 6px 52px;
	display: flex !important; align-items: center; justify-content: center;
}
.top_bg .HAPPEND_ { width: 100%; min-width: 0; }
.top_bg .HAPPEND_.slick-dotted { padding-bottom: 10px; }
.top_bg .thedate {
	font: 700 15.5px/1.3 Heebo, sans-serif !important;
	padding: 0 !important;
	text-align: center;
	justify-content: center;
	letter-spacing: .2px;
	text-shadow: 0 1px 2px rgba(0, 60, 80, .35);
	text-wrap: balance;
}
.top_bg .HAPPEND_ .txt {
	font: 600 13.5px/1.3 Heebo, sans-serif;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .2);
	border-color: rgba(255, 255, 255, .55);
	width: max-content; max-width: 100%;
}
.top_bg .HAPPEND_ .slick-dots { bottom: 0; }
.top_bg .HAPPEND_ .slick-dots li { margin: 0 3px; }
.top_bg .HAPPEND_ .slick-dots li button { width: 6px; height: 6px; background: rgba(255, 255, 255, .45); }
.top_bg .HAPPEND_ .slick-dots li.slick-active button { background: #fff; width: 16px; border-radius: 3px; }
.top_bg .o_btn {
	width: 38px !important; height: 38px !important;
	top: 50%; right: 9px;
	transform: translateY(-50%);
	border-radius: 50%;
	background: rgba(255, 255, 255, .2);
	border: 1px solid rgba(255, 255, 255, .4);
	box-shadow: none;
}
.top_bg a.o_btn.next { left: 9px; right: auto; }
.top_bg .o_btn:hover { transform: translateY(-50%); box-shadow: none; }
.top_bg .o_btn:active { transform: translateY(-50%) scale(.9); background: rgba(255, 255, 255, .35); }
.top_bg .o_btn::before { border-right-color: #fff; border-top-width: 6px; border-bottom-width: 6px; }
.top_bg .o_btn.prev::before { border-left-color: #fff; }

/* ---------- חדר הספרים ---------- */
.rooms-container > .panel { min-height: 100vh !important; padding: 0 !important; }
.panel > .books-room {
	width: 100%;
	height: 100vh; height: 100svh;
	align-self: flex-start;
	display: flex; flex-direction: column;
	gap: 12px;
	padding: var(--m-head) 12px calc(var(--m-foot) + 12px);
	box-sizing: border-box;
	position: relative;
}
.books-room > .container.c14 {
	width: 100% !important; max-width: none !important;
	margin: 0 !important;
	flex: 1 1 auto; min-height: 0;
	display: flex; align-items: center; justify-content: center;
}
.books-room > .container.c14 > .w100 {
	height: 100%; min-height: 0;
	align-items: center; justify-content: center !important;
}
.books-room .rabi_ {
	width: 100% !important; height: 100%;
	min-height: 0; margin: 0 !important; padding: 0 !important;
}
.books-room .rabi_ img {
	position: static !important;
	top: auto !important; bottom: auto !important;
	display: block;
	width: auto !important; max-width: 100% !important;
	height: auto; max-height: 100%;
	object-fit: contain;
	margin: 0 auto;
	filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .22));
}
.books-room .rabi {
	margin: 0 !important;
	max-height: 100%; overflow: auto;
	padding: 14px 16px;
	border-radius: 20px;
	background: rgba(255, 251, 243, .88);
	box-shadow: 0 8px 24px rgba(40, 20, 0, .18);
	font-size: 16px; line-height: 1.55;
	color: var(--m-purple);
}

/* המדף */
.books-room .shelf {
	--bh: clamp(84px, 12.5vh, 126px);   /* גובה ספר */
	--lbl: 46px;                        /* מקום לכיתוב מתחת למדף */
	--rg: 10px;                         /* רווח בין שורות */
	flex: 0 0 auto;
	width: 100% !important; max-width: none !important;
	min-height: 0 !important;
	position: relative !important; bottom: auto !important;
	margin: 0 !important;
	padding: 16px 12px 6px;
	border-radius: 24px;
	background: rgba(255, 251, 243, .8) !important;
	-webkit-backdrop-filter: blur(10px) saturate(1.2);
	backdrop-filter: blur(10px) saturate(1.2);
	box-shadow: 0 12px 32px rgba(40, 20, 0, .24), inset 0 1px 0 #fff;
}
.books-room ul.books {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: calc(var(--bh) + var(--lbl));
	column-gap: 10px; row-gap: var(--rg);
	height: auto !important;
	padding: 0 !important; margin: 0;
	/* קרש עץ מתחת לכל שורה */
	background-image: linear-gradient(to bottom,
		transparent 0, transparent calc(var(--bh) - 2px),
		var(--m-wood-light) calc(var(--bh) - 2px), #d99a55 calc(var(--bh) + 2px),
		var(--m-wood) calc(var(--bh) + 2px), var(--m-wood-dark) calc(var(--bh) + 12px),
		rgba(70, 35, 5, .22) calc(var(--bh) + 12px), transparent calc(var(--bh) + 20px),
		transparent 100%);
	background-size: 100% calc(var(--bh) + var(--lbl) + var(--rg));
	background-repeat: repeat-y;
}
.books-room ul.books > li:not(.open_book) { display: none !important; }
.books-room ul.books > li.open_book,
.books-room ul.books > li:nth-child(9):last-child {
	display: block !important;
	width: auto !important;
	height: var(--bh) !important;
	margin: 0 !important;
	position: relative !important;
	top: auto !important; right: auto !important; left: auto !important; bottom: auto !important;
	z-index: 1 !important;
	background-size: contain !important;
	background-position: center bottom !important;
	background-repeat: no-repeat !important;
	transform: none !important;
	transition: transform .18s var(--m-ease) !important;
}
.books-room ul.books > li.open_book:active { transform: translateY(-6px) scale(1.04) !important; }
/* קופת צדקה — קישוט בחור שבמדף */
.books-room ul.books > li:nth-child(9):last-child { pointer-events: none; background-size: auto 78% !important; }
/* ספירת העומר */
.books-room ul.books > li.open_book[data-tab="omer"] {
	background: linear-gradient(160deg, #fff8e6, #f3e2bf) !important;
	border-radius: 8px 8px 3px 3px;
	box-shadow: 2px 3px 8px rgba(60, 30, 0, .25);
	height: calc(var(--bh) * .8) !important; align-self: start;
	margin-top: calc(var(--bh) * .2) !important;
	display: flex !important; align-items: center; justify-content: center;
	font: 800 34px/1 Heebo, sans-serif !important;
	letter-spacing: 0 !important;
	color: var(--m-purple);
}
.books-room ul.books > li > div.title {
	position: absolute !important;
	top: calc(100% + 16px) !important; bottom: auto !important;
	right: -4px !important; left: -4px !important;
	width: auto !important; max-height: none !important;
	margin: 0 !important; padding: 0 !important;
	display: block !important;
	background: none !important; box-shadow: none !important; border: 0 !important;
	overflow: visible !important;
	color: var(--m-ink) !important;
	font: 600 12px/1.2 Heebo, sans-serif !important;
	letter-spacing: 0 !important;
	text-align: center;
}
.books-room ul.books > li > div.title > .shine { display: none !important; }

/* ---------- חדר הניגונים ---------- */
.panel.bg_purple { padding: var(--m-head) 12px calc(var(--m-foot) + 12px) !important; }
.panel.bg_purple h2.nigunim_title_holder { top: var(--m-head) !important; right: 8px !important; }
.panel.bg_purple div#music-player-root { margin-top: 96px !important; }

/* ---------- חלון קריאה (Bottom sheet) ---------- */
.screen {
	position: fixed !important;
	top: 0 !important; left: 0 !important; right: 0 !important;
	width: 100% !important; max-width: none !important;
	height: 0 !important; max-height: none !important;
	margin: 0 !important;
	background: transparent !important;
}
.screen::before,
.screen > .zoom { display: none !important; }
.screen > .after {
	z-index: 1 !important;
	background: rgba(28, 18, 8, .55) !important;
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}
.screen > .book1 {
	position: fixed !important;
	top: calc(var(--m-safe-top) + 52px) !important; bottom: 0 !important;
	left: 0 !important; right: 0 !important;
	width: 100% !important; height: auto !important; max-height: none !important;
	margin: 0 !important;
	padding: 64px 16px calc(28px + var(--m-safe-bot)) !important;
	display: block !important;
	border-radius: 26px 26px 0 0;
	background: var(--m-cream) !important;
	box-shadow: 0 -10px 40px rgba(0, 0, 0, .28);
	overflow-y: auto !important; overflow-x: hidden !important;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	opacity: 1 !important;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(104%);
	transition: transform .42s var(--m-ease), visibility 0s linear .42s !important;
	z-index: 5 !important;
	direction: rtl; text-align: right;
	color: var(--m-ink);
	font: 400 16px/1.75 Heebo, sans-serif;
}
.screen > .book1.active {
	visibility: visible;
	pointer-events: auto !important;
	transform: none;
	transition: transform .42s var(--m-ease) !important;
}
.screen > .book1 > img,
.screen.full > .book1 > img {
	display: block;
	width: 100% !important; max-width: 100% !important; height: auto;
	margin: 0 auto;
	border-radius: 14px;
	box-shadow: 0 4px 16px rgba(60, 35, 10, .15);
}
.screen > .book1 h3 { font: 700 20px/1.35 Heebo, sans-serif; color: var(--m-purple); margin-bottom: 10px; }
.screen > .book1 iframe { max-width: 100% !important; width: 100% !important; max-height: none !important; border-radius: 14px; }
.screen > .psukim1 > iframe { height: 56vw !important; }
.screen > .book1.tfila1, .screen > .book1.tfila2 { text-align: center; }
.screen > .book1 audio { width: 100%; margin-top: 30px; }
.screen .sidur-tab-buttons { flex-wrap: wrap; gap: 8px; }
.screen .sidur-tab-btn { flex: 1 1 calc(50% - 8px); padding: 10px 8px; border-radius: 12px; font-size: 14px; }
.screen > .cont input:not([type=submit]):not([type=checkbox]):not([type=radio]),
.screen > .cont textarea,
.screen > .cont select {
	width: 100%; font-size: 16px;
	padding: 12px 14px;
	border: 1px solid #e3d4bf; border-radius: 12px;
	background: #fff;
}
.screen > .cont input[type=submit] {
	width: 100%; padding: 14px;
	border: 0; border-radius: 14px;
	background: var(--m-purple); color: #fff;
	font: 700 16px Heebo, sans-serif;
}
/* ידית + כפתור סגירה */
.screen::after {
	content: '';
	position: fixed;
	top: calc(var(--m-safe-top) + 62px);
	left: 50%; width: 42px; height: 5px;
	margin-left: -21px;
	border-radius: 3px;
	background: #d9cbb6;
	z-index: 10;
	opacity: 0; transition: opacity .2s;
	pointer-events: none;
}
.screen.active::after { opacity: 1; transition-delay: .2s; }
.screen > .rize {
	position: fixed !important;
	top: calc(var(--m-safe-top) + 64px) !important; left: 14px !important; right: auto !important;
	width: 40px; height: 40px;
	border-radius: 50%;
	background: var(--m-cream-2) !important;
	box-shadow: none !important;
	z-index: 10 !important;
	opacity: 0; pointer-events: none;
	transform: translateY(16px);
	transition: opacity .2s, transform .3s var(--m-ease);
	cursor: pointer;
}
.screen.active > .rize { opacity: 1; pointer-events: auto; transform: none; transition-delay: .15s; }
.screen > .rize::before,
.screen > .rize::after {
	content: '';
	position: absolute; top: 50%; left: 50%;
	width: 16px; height: 2.5px;
	margin: 0; border-radius: 2px;
	background: #5a4632;
	transform: translate(-50%, -50%) rotate(45deg);
	box-shadow: none;
}
.screen > .rize::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------- סרגל לשוניות תחתון ---------- */
.m-tabbar.m-only {
	display: flex !important;
	position: fixed;
	left: 10px; right: 10px;
	bottom: calc(8px + var(--m-safe-bot));
	height: var(--m-tab);
	padding: 6px;
	gap: 2px;
	direction: rtl;
	z-index: 20;
	border-radius: 22px;
	background: rgba(255, 250, 241, .93);
	-webkit-backdrop-filter: blur(16px) saturate(1.4);
	backdrop-filter: blur(16px) saturate(1.4);
	box-shadow: 0 10px 30px rgba(60, 35, 10, .22), 0 0 0 1px rgba(168, 104, 47, .12);
}
.m-tab {
	flex: 1 1 0; min-width: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 3px;
	border: 0; padding: 0;
	border-radius: 16px;
	background: none;
	color: var(--m-ink-2);
	font: 600 11px/1 Heebo, sans-serif;
	cursor: pointer;
	transition: background .2s, color .2s, transform .15s var(--m-ease);
}
.m-tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.m-tab.is-active { color: var(--m-purple); background: rgba(80, 56, 149, .1); }
.m-tab:active { transform: scale(.92); }

/* ---------- מגירת תפריט ---------- */
.m-scrim.m-only {
	display: block !important;
	position: fixed; inset: 0;
	z-index: 2147483000;
	background: rgba(28, 18, 8, .45);
	opacity: 0; pointer-events: none;
	transition: opacity .3s;
}
html.m-open .m-scrim { opacity: 1; pointer-events: auto; }
.m-drawer.m-only {
	display: flex !important;
	flex-direction: column;
	position: fixed; top: 0; bottom: 0; right: 0;
	width: min(86vw, 360px);
	z-index: 2147483001;
	direction: rtl; text-align: right;
	background: var(--m-cream);
	border-radius: 26px 0 0 26px;
	box-shadow: -14px 0 44px rgba(0, 0, 0, .22);
	overflow: hidden;
	visibility: hidden;
	transform: translateX(105%);
	transition: transform .38s var(--m-ease), visibility 0s linear .38s;
}
html.m-open .m-drawer { visibility: visible; transform: none; transition: transform .38s var(--m-ease); }
.m-drawer-head {
	position: relative;
	padding: calc(var(--m-safe-top) + 22px) 20px 20px;
	color: #fff;
	background: linear-gradient(160deg, rgba(21, 144, 168, .92), rgba(80, 56, 149, .88)), var(--m-hero, none) center / cover;
}
.m-drawer-title { font: 800 21px/1.2 Heebo, sans-serif; }
.m-drawer-sub { font: 500 13px/1.4 Heebo, sans-serif; color: var(--m-gold); margin-top: 4px; }
.m-drawer-date {
	display: inline-block;
	margin-top: 12px; padding: 5px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .18);
	font: 600 13px/1.3 Heebo, sans-serif;
}
.m-drawer-head .m-close {
	position: absolute;
	top: calc(var(--m-safe-top) + 14px); left: 14px;
	width: 38px; height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .18);
	box-shadow: none;
	color: #fff; font-size: 26px; line-height: 1;
}
.m-drawer-body {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 12px;
}
.m-sec-title {
	padding: 18px 22px 6px;
	font: 700 12px/1 Heebo, sans-serif;
	letter-spacing: .5px;
	color: var(--m-wood);
}
.m-list, .m-wpmenu, .m-wpmenu ul { list-style: none; margin: 0; padding: 0; }
.m-list { margin: 0 10px; padding: 4px; border-radius: 18px; background: #fff; box-shadow: 0 1px 3px rgba(60, 35, 10, .08); }
.m-item,
.m-wpmenu a {
	display: flex; align-items: center; gap: 14px;
	width: 100%; min-height: 52px;
	padding: 6px 12px;
	border: 0; border-radius: 14px;
	background: none;
	color: var(--m-ink);
	font: 500 16px/1.3 Heebo, sans-serif;
	text-align: right;
	cursor: pointer;
	transition: background .15s;
}
.m-item:active,
.m-wpmenu a:active { background: var(--m-cream-2); }
.m-item::after,
.m-wpmenu a::after {
	content: '';
	width: 7px; height: 7px;
	margin-right: auto;
	border-left: 2px solid #c9b79e; border-bottom: 2px solid #c9b79e;
	transform: rotate(45deg);
}
.m-ico {
	flex: 0 0 34px; height: 40px;
	background: center / contain no-repeat;
}
.m-ico-round {
	flex: 0 0 36px; height: 36px;
	border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
	background: var(--m-cream-2);
	color: var(--m-purple);
}
.m-ico-round svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.m-wpmenu { margin: 0 10px; padding: 4px; border-radius: 18px; background: #fff; box-shadow: 0 1px 3px rgba(60, 35, 10, .08); }
.m-wpmenu .sub-menu a { padding-right: 28px; font-size: 15px; color: var(--m-ink-2); min-height: 44px; }
.m-drawer-foot {
	padding: 18px 22px calc(18px + var(--m-safe-bot));
	font: 400 12px/1.6 Heebo, sans-serif;
	color: var(--m-ink-2);
	text-align: center;
	border-top: 1px solid rgba(168, 104, 47, .12);
}
.m-drawer-foot b { color: var(--m-ink); }

@media (prefers-reduced-motion: reduce) {
	.m-drawer, .screen > .book1, .m-scrim, .m-tab, .books-room ul.books > li.open_book { transition: none !important; }
}

} /* end max-width: 800px */
