/* ---------- מסך השיעורים ---------- */
/* ראש העמוד (אפשרות 5 שיקיר בחר): שלוש לשוניות טקסט ממורכזות בגובה כפתור התפריט ועיטור קטן — בלי כותרת גדולה */
.hub { padding-top: 0 !important; } /* השוליים הבטוחים כבר בתוך פס הלשוניות — לא פעמיים */
.hub-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hub-tabs {
  position: sticky; top: 0; z-index: 5; display: flex; justify-content: center; gap: 30px;
  margin: 0 -20px; padding: calc(27px + env(safe-area-inset-top)) 80px 12px; background: var(--navy); box-shadow: 0 10px 14px -8px rgba(0, 0, 0, .8);
}
.hub .hub-tabs a { padding: 0; border: 0; border-radius: 0; background: none; color: #9a927f; font-weight: 500; font-size: 1.02rem; text-decoration: none; white-space: nowrap; }
.hub .hub-tabs a:hover { color: #fff; }
.hub .hub-tabs a.on { background: none; color: var(--gold-2); font-weight: 700; }
.hub-orn { display: block; width: 120px; height: auto; margin: 0 auto 22px; opacity: .8; }
.lib-cats a {
  flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; background: var(--paper);
}
.lib-cats a:hover { border-color: var(--gold); color: var(--gold-2); }
.hub-group { padding-top: 34px; scroll-margin-top: 60px; }
.hub-group-head h2 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.hub-sub { color: var(--gold-2); margin: 4px 0 16px; font-size: .95rem; }
.hub-box, .hub-cat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 18px; margin-bottom: 16px; }
.hub-cat { border-top: 2px solid var(--gold); padding-top: 22px; margin-bottom: 44px !important; }
.hub-cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hub-cat-head h3 { font: 700 1.35rem var(--serif); color: #fff; }
.hub-more { color: var(--gold-2); text-decoration: none; font-weight: 600; font-size: .92rem; }
.hub-more:hover { text-decoration: underline; }
.lib-cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; padding-bottom: 2px; }
.lib-cats::-webkit-scrollbar { display: none; }
.lib-cats a.on { background: var(--gold); border-color: var(--gold); color: var(--navy); }

/* ---------- כרטיס שיעור ברשימות: תמונה לפי הנושא ---------- */
.list .item { display: block; padding: 0; border-bottom: 1px solid var(--line); }
.item-hit {
  display: flex; align-items: center; gap: 16px; width: 100%; padding: 14px 0; border: 0; background: none;
  color: inherit; font: inherit; text-align: start; text-decoration: none; cursor: pointer;
}
.thumb { position: relative; flex: none; width: 96px; height: 96px; border-radius: 14px; overflow: hidden; background: var(--navy-2); box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; transition: transform .3s var(--ease); }
.thumb .play {
  position: absolute; inset-inline-start: 8px; bottom: 8px; width: 34px; height: 34px; font-size: .8rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.thumb .play.ext { background: rgba(11, 11, 12, .75); }
.item-hit:hover .thumb img { transform: scale(1.05); }
.item-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.item-cat { color: var(--gold); font-size: .8rem; font-weight: 600; }
.list .item-title { font-size: 1.12rem; font-weight: 700; line-height: 1.35; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { color: var(--ink-soft); font-size: .88rem; }
.item.playing .thumb { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (min-width: 961px) { .thumb { width: 112px; height: 112px; } }

/* ---------- נגן סרטונים ומאמרים ---------- */
.video-modal { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .85); display: grid; place-items: center; padding: 16px; }
.video-box { width: min(960px, 100%); background: var(--paper); border: 1px solid var(--gold); border-radius: 16px; overflow: hidden; }
.video-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.video-head strong { flex: 1; color: #fff; font-size: 1rem; }
.video-head button { background: none; border: 0; color: var(--ink); font-size: 1.2rem; min-width: 44px; min-height: 44px; cursor: pointer; }
.video-frame { position: relative; padding-top: 56.25%; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.item.is-video .thumb { width: 150px; height: 96px; }
.narrow { max-width: 760px; }
.article { padding-top: calc(84px + env(safe-area-inset-top)) !important; }
/* עמוד המאמר: כותרת ממורכזת, טור קריאה צר ונוח, יישור לימין (בלי יישור לשני הצדדים שיוצר רווחים) */
.article .narrow { max-width: 680px; }
.article-head { text-align: center; margin: 14px 0 30px; }
.article h1 { color: #fff; font-size: clamp(1.7rem, 5.5vw, 2.6rem); line-height: 1.3; margin: 0; }
.article-intro { color: var(--gold-2); margin: 10px 0 0; font-size: .98rem; }
.article-head .ornament { display: block; width: 170px; height: auto; margin: 18px auto 16px; }
.text-size { display: inline-flex; gap: 6px; }
.text-size button {
  display: inline-flex; align-items: baseline; gap: 1px; min-width: 46px; height: 36px; padding: 0 12px; justify-content: center;
  border: 1px solid #2e2b25; border-radius: 999px; background: none; color: #cfc6b2; font: inherit; font-weight: 700; cursor: pointer;
}
.text-size button small { font-size: .8em; }
.text-size button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-2); }
.text-size button:disabled { opacity: .35; cursor: default; }
.article-body p {
  font-size: var(--article-size, 1.05rem); line-height: 1.9; color: #e9e2d2; margin: 0 0 1.25em;
  text-align: start; word-spacing: .02em; hyphens: none;
}
.article-body p.fn { font-size: .92rem; color: var(--ink-soft); line-height: 1.7; }
.phone-lines { color: var(--gold-2); font-size: .98rem; line-height: 1.9; }
.phone-lines bdi { white-space: nowrap; }

/* כפתורי הקטגוריות במסך הבית */
.home-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 120px)); justify-content: center; gap: 10px; }
.home-cats a {
  padding: 11px 10px; border: 1.5px solid var(--gold); border-radius: 999px; color: var(--gold-2);
  text-decoration: none; font-weight: 700; text-align: center; background: rgba(11, 11, 12, .55);
}
.home-cats a:hover { background: var(--gold); color: var(--navy); }
@media (min-width: 961px) { .home-cats { grid-template-columns: repeat(3, auto); justify-content: start; } }
.hub .hub-sub { margin: 6px 0 4px; }

/* מגירות שעולות מלמטה: קווי הטלפון, בחירת נושא, סינון */
button.soc { background: none; padding: 0; cursor: pointer; font: inherit; }
button.soc:hover { background: var(--gold); color: var(--navy); transform: translateY(-2px); }
.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 480px; max-height: none;
  padding: 10px 22px calc(26px + env(safe-area-inset-bottom)); border: 0; border-radius: 22px 22px 0 0;
  background: #161618; color: #fff; box-shadow: 0 -10px 40px rgba(0, 0, 0, .5);
}
.sheet::backdrop { background: rgba(0, 0, 0, .55); }
.sheet[open] { animation: sheet-up .26s var(--ease); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-handle { display: block; width: 40px; height: 4px; margin: 0 auto 18px; padding: 0; border: 0; border-radius: 2px; background: #4a4740; cursor: pointer; }
.sheet h2 { margin: 0 0 4px; font-size: .82rem; font-weight: 600; color: var(--ink-soft); letter-spacing: .04em; }
.tel-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; color: #fff; text-decoration: none; border-bottom: 1px solid #2a2824; }
.tel-row:last-child { border-bottom: 0; }
.tel-row > span:first-child { display: grid; gap: 3px; }
.tel-row b { font-size: 1.05rem; }
.tel-row small { color: var(--ink-soft); font-size: .82rem; }
.tel-num { display: flex; align-items: center; gap: 10px; color: var(--gold-2); font-weight: 700; font-size: 1.12rem; white-space: nowrap; }
.tel-row:hover .tel-num, .tel-row:focus-visible .tel-num { color: #fff; }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }

/* ראש עמוד הנושא (אפשרות 1): כותרת ממורכזת בגובה כפתור התפריט — נגיעה בה בוחרת נושא — ועיטור קטן */
.lib-head { padding-block: calc(24px + env(safe-area-inset-top)) 0; text-align: center; }
.lib-head h1 { margin: 0; font-size: 1.2rem; }
.lib-pick { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.lib-pick svg { flex: none; width: 18px; height: 18px; color: var(--gold); transition: transform .2s var(--ease); }
.lib-pick:hover svg { transform: translateY(2px); }
.lib-orn { display: block; width: 110px; height: auto; margin: 8px auto 0; opacity: .8; }
.lib-body { padding-block: 0 64px; }
.lib-tools { display: flex; align-items: center; gap: 8px; margin: 14px 0 16px; }
.lib-tools .lib-count { flex: 1; margin: 0; color: var(--ink-soft); font-size: .85rem; }
.lib-ic { position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: #17171a; color: var(--gold-2); cursor: pointer; }
.lib-ic:hover, .lib-ic[aria-expanded="true"] { background: #222226; color: var(--gold-2); }
.lib-badge { position: absolute; top: -3px; left: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--gold); color: var(--navy); font-size: .7rem; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--navy); }
.lib-search { display: flex; align-items: center; gap: 10px; height: 48px; margin: -6px 0 18px; padding: 0 8px 0 14px; padding-inline: 14px 8px; border-radius: 14px; background: #17171a; color: var(--ink-soft); animation: tel-fade .18s var(--ease); }
.lib-search[hidden] { display: none; }
.lib-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: #fff; font: inherit; font-size: 1rem; }
.lib-search input:focus { outline: none; }
.lib-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--gold); }
.lib-x { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--ink-soft); cursor: pointer; }
@keyframes tel-fade { from { opacity: 0; transform: translateY(-4px); } }

/* מגירת בחירת נושא */
.topic-list { display: grid; }
.topic-list a { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid #2a2824; color: #fff; text-decoration: none; font-size: 1.05rem; }
.topic-list a:last-child { border-bottom: 0; }
.topic-list a.on { color: var(--gold-2); font-weight: 700; }
.topic-list a.on::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* מגירת סינון — עדינה: כותרות קטנות וגלולות דקות */
.f-sec { margin-top: 18px; }
.f-sec[hidden] { display: none; }
.f-sec h3 { margin: 0 0 10px; font-size: .78rem; font-weight: 600; color: var(--ink-soft); letter-spacing: .04em; }
.f-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.f-chips button {
  padding: 6px 13px; border: 1px solid #2e2b25; border-radius: 999px; background: none;
  color: #cfc6b2; font: inherit; font-size: .88rem; cursor: pointer; transition: border-color .15s, color .15s, background-color .15s;
}
.f-chips button:hover { border-color: #5a5242; color: #fff; }
.f-chips button[aria-checked="true"] { border-color: var(--gold); background: rgba(212, 173, 90, .12); color: var(--gold-2); }
.f-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding-top: 14px; border-top: 1px solid #2a2824; }
.f-reset, .f-done { padding: 8px 2px; border: 0; background: none; font: inherit; font-size: .92rem; cursor: pointer; }
.f-reset { color: var(--ink-soft); }
.f-reset:hover { color: #fff; }
.f-done { color: var(--gold-2); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .lib-search { animation: none; } }
.lib-search input::-webkit-search-cancel-button { display: none; }
.lib-sentinel { height: 1px; }
.lib-pick:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 4px; border-radius: 10px; }

/* מגירות יצירת הקשר: שורה = אייקון בעיגול זהב, שם, ומתחתיו מספר/כתובת או הסבר קצר */
#contact-rows .tel-row { justify-content: flex-start; gap: 14px; }
#contact-rows .tel-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid rgba(212, 173, 90, .5); color: var(--gold-2); background: none; }
#contact-rows .tel-ic svg { width: 19px; height: 19px; }
#contact-rows .tel-row > span:last-child { display: grid; gap: 2px; }
#contact-rows bdi { color: var(--gold-2); font-weight: 700; font-size: .95rem; justify-self: start; }
#contact-rows .tel-row.soon { opacity: .45; cursor: default; }

/* חיפוש בכל השיעורים, הסרטונים והמאמרים — אייקון בפס הלשוניות, מול כפתור התפריט */
.hub-search-btn {
  position: absolute; inset-inline-end: 20px; top: calc(19px + env(safe-area-inset-top)); width: 40px; height: 40px;
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #17171a; color: var(--gold-2); cursor: pointer;
}
.hub-search-btn:hover, .hub-search-btn[aria-expanded="true"] { background: #222226; color: var(--gold-2); }
.hub-search { margin: 10px 0 18px; }
.hub-search:not([hidden]) ~ .hub-orn { display: none; }
.hub-search[hidden] { display: none; }
.hub-search-count { margin: 0 0 14px; color: var(--ink-soft); font-size: .88rem; }
