/* ==========================================================================
   KANAF site chrome: fallback header and footer, the members' tab bar, שחר's sheet, templates.
   ========================================================================== */

/* Skip link (accessibility) */
.dk-skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 2000; background: var(--dk-teal); color: #fff; padding: .7rem 1.1rem; border-radius: var(--dk-r-sm); font-weight: 700; text-decoration: none; transition: top .2s; }
.dk-skip-link:focus { top: 12px; color: #fff; }
.dk-main:focus { outline: none; }

/* ---------- Logo ---------- */
.dk-logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--dk-teal); flex: none; }
.dk-logo__mark img { width: 44px; height: 44px; border-radius: 50%; display: block; }
.dk-logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.dk-logo__name { font-family: var(--dk-font-display); font-weight: 500; font-size: 1.35rem; letter-spacing: .02em; }
.dk-logo__tag { font-size: 11.5px; color: var(--dk-muted); font-weight: 500; }
.dk-logo:hover { color: var(--dk-teal); }
@media (max-width: 420px) { .dk-logo__tag { display: none; } .dk-logo__name { font-size: 1.1rem; } }
/* The wordmark is the only header element allowed to shrink (narrow phones, enlarged text): it truncates instead of pushing the page wider. */
.dk-header .dk-logo { flex: 0 1 auto; min-width: 44px; }
.dk-header .dk-logo__text { min-width: 0; }
.dk-header .dk-logo__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-header__actions { flex: none; }
@media (max-width: 360px) {
	.dk-header__inner { gap: .5rem; }
	.dk-header .dk-logo { gap: .4rem; }
	.dk-header .dk-logo__name { font-size: .95rem; }
	.dk-header__actions { gap: .15rem; }
	.dk-header__actions .dk-btn--sm { font-size: .78rem; padding: .3em .6em; }
	.dk-header__actions .dk-btn--icon.dk-btn--sm { width: 32px; }
}

/* ---------- Header ---------- */
.dk-header { position: sticky; top: 0; z-index: 500; background: rgba(250, 247, 242, .88); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s, background .25s; }
/* WordPress's own bar: kept on desktop for staff (the theme adds the page offset itself, see inc/setup.php), hidden on phones
   so the app header sits flush with the top of the screen. */
.admin-bar .dk-header { top: 32px; }
@media (min-width: 783px) { body.admin-bar { padding-top: 32px; } }
@media (max-width: 782px) { #wpadminbar { display: none !important; } .admin-bar .dk-header { top: 0; } }
/* Home-screen app on iPhone: the header runs under the status bar, so its content starts below it. */
.dk-header { padding-top: env(safe-area-inset-top, 0px); }
.dk-header.is-scrolled { border-bottom-color: var(--dk-line); box-shadow: 0 6px 18px -14px rgba(21, 35, 63, .3); background: rgba(255, 255, 255, .92); }
.dk-header__inner { display: flex; align-items: center; gap: 1rem; min-height: var(--dk-header-h); }
.dk-header__nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.dk-header__actions { display: flex; align-items: center; gap: .35rem; margin-inline-start: auto; }
.dk-nav__list { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.dk-nav__link, .dk-nav .menu-item > a { display: inline-flex; align-items: center; gap: .4em; padding: .5em .85em; border-radius: var(--dk-r-pill); color: var(--dk-ink-2); text-decoration: none; font-family: var(--dk-font-body); font-weight: 600; font-size: 1rem; transition: background var(--dk-dur), color var(--dk-dur); white-space: nowrap; }
.dk-nav__link .dk-icon { width: 17px; height: 17px; color: var(--dk-mustard-600); }
.dk-nav__link:hover, .dk-nav .menu-item > a:hover { background: var(--dk-cream-2); color: var(--dk-teal); }
.dk-nav__link.is-active, .dk-nav .current-menu-item > a { background: var(--dk-teal); color: #fff; }
.dk-nav__link.is-active .dk-icon { color: var(--dk-mustard); }
.dk-header__user { position: relative; }
.dk-header__avatar { position: relative; border: 0; background: transparent; padding: 2px; border-radius: 50%; cursor: pointer; display: grid; }
.dk-header__avatar .dk-avatar { box-shadow: 0 0 0 2px var(--dk-line-2); }
.dk-header__avatar:hover .dk-avatar { box-shadow: 0 0 0 2px var(--dk-mustard); }
.dk-header__menu { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: 260px; }
.dk-header__menu-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .75rem .65rem; border-bottom: 1px solid var(--dk-line); margin-bottom: .3rem; }
.dk-header__menu-head strong { font-family: var(--dk-font-display); color: var(--dk-teal); }
.dk-header-icon { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--dk-teal); text-decoration: none; background: transparent; border: 0; cursor: pointer; transition: background var(--dk-dur); }
.dk-header-icon:hover { background: var(--dk-cream-2); color: var(--dk-teal); }
.dk-header-icon .dk-icon { width: 22px; height: 22px; }
.dk-header-icon .dk-badge--count { position: absolute; top: 2px; inset-inline-end: 0; }

/* Mobile guest menu */
.dk-mobile-menu__brand { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.dk-mobile-menu__brand img { width: 72px; height: auto; flex: none; }
.dk-mobile-menu__brand p { margin: 0; font-family: var(--dk-font-display); font-weight: 500; color: var(--dk-teal); line-height: 1.4; }
.dk-mobile-menu .dk-sheet__panel { display: flex; flex-direction: column; } /* the close X docks at the inline end */
.dk-mnav__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.dk-mnav__link { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; border-radius: var(--dk-r); background: var(--dk-cream); border: 1px solid var(--dk-line); color: var(--dk-teal); text-decoration: none; font-family: var(--dk-font-display); font-weight: 500; font-size: 1.08rem; }
.dk-mnav__link .dk-icon { color: var(--dk-mustard-600); width: 22px; height: 22px; }

/* ---------- Members' tab bar (phones): בית · מרכז הידע · הקהילה · שחר · כלים לכל יום ---------- */
.dk-bottom-nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 600; height: calc(68px + var(--dk-safe-bottom)); padding: 0 4px var(--dk-safe-bottom); box-sizing: border-box; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center; background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--dk-line); box-shadow: 0 -10px 30px -22px rgba(21, 35, 63, .35); }
.dk-bottom-nav__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; height: 100%; padding-top: 2px; text-decoration: none; color: var(--dk-muted); font-size: 11.5px; font-weight: 600; font-family: var(--dk-font-body); -webkit-tap-highlight-color: transparent; position: relative; }
.dk-bottom-nav__item::before { content: ''; position: absolute; top: 0; left: 50%; width: 26px; height: 2px; margin-left: -13px; border-radius: 0 0 2px 2px; background: var(--dk-mustard); opacity: 0; transition: opacity var(--dk-dur) var(--dk-ease); }
.dk-bottom-nav__icon { position: relative; display: grid; place-items: center; width: 44px; height: 28px; border-radius: 14px; transition: background var(--dk-dur) var(--dk-ease), color var(--dk-dur) var(--dk-ease); }
.dk-bottom-nav__icon .dk-icon { width: 22px; height: 22px; }
.dk-bottom-nav__icon .dk-badge--count { position: absolute; top: -5px; inset-inline-end: 2px; }
.dk-bottom-nav__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-bottom-nav__item.is-active { color: var(--dk-teal); }
.dk-bottom-nav__item.is-active::before { opacity: 1; }
.dk-bottom-nav__item.is-active .dk-bottom-nav__icon { background: var(--dk-teal-50); color: var(--dk-teal); }
body.dk-logged-in { padding-bottom: 0; }
@media (max-width: 959px) {
	/* Room for the tab bar and the floating buttons above it: the last item of a list stays reachable. */
	body.dk-has-bottom-nav .dk-main { padding-bottom: calc(var(--dk-bottom-nav-h) + 84px + var(--dk-safe-bottom)); }
	body.dk-has-bottom-nav .dk-guri { bottom: calc(var(--dk-bottom-nav-h) + 16px + var(--dk-safe-bottom)); }
}

/* ---------- Footer ---------- */
.dk-footer { position: relative; margin-top: 5rem; background: radial-gradient(1200px 500px at 70% -10%, #24365C 0%, var(--dk-teal) 55%, #0F1A31 100%); color: #C9CFDB; padding: 2.4rem 0 calc(1.6rem + var(--dk-safe-bottom)); }
.dk-footer a:not(.dk-btn) { color: #E7E2D8; text-decoration: none; }
.dk-footer a:not(.dk-btn):hover { color: var(--kf-gold-light); }
.dk-footer .dk-btn, .dk-footer .dk-btn:hover { color: var(--btn-fg); }
.dk-footer__cta { position: relative; max-width: 900px; margin: 0 auto 2rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.4rem; padding: 1.2rem 1.4rem; background: rgba(255, 255, 255, .06); border: 1px solid rgba(243, 227, 195, .22); color: #fff; border-radius: var(--dk-r-xl); }
.dk-footer__cta-copy { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.dk-footer__cta-kicker { font-size: .85rem; letter-spacing: .04em; color: var(--kf-gold-light); }
.dk-footer__cta-copy strong { font-family: var(--dk-font-display); font-weight: 500; font-size: 1.15rem; line-height: 1.35; }
.dk-footer__cta .dk-btn { flex: none; }
.dk-footer__main { display: grid; gap: 1.8rem; grid-template-columns: 1fr; padding-top: 1.6rem; }
@media (min-width: 900px) { .dk-footer__main { grid-template-columns: minmax(260px, 1fr) 2fr; gap: 3rem; } }
.dk-footer__brand { display: flex; flex-direction: column; gap: .8rem; align-items: flex-start; }
.dk-footer__brand .dk-logo { color: #fff; }
.dk-footer__brand .dk-logo__tag { color: #AEB6C6; }
.dk-footer__brand .dk-logo__name { background: var(--kf-gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dk-footer__brand p { margin: 0; font-size: .95rem; line-height: 1.7; color: #C9CFDB; max-width: 36ch; }
.dk-footer__nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1rem; }
@media (min-width: 640px) { .dk-footer__nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dk-footer__title { font-family: var(--dk-font-display); font-weight: 500; font-size: 1rem; color: var(--kf-gold-light); margin: 0 0 .7rem; letter-spacing: .02em; }
.dk-footer__group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.dk-footer__group a { font-size: .95rem; color: #DCE0E8; display: inline-block; padding: .15rem 0; }
.dk-footer__group a:hover { color: var(--kf-gold-light); }
.dk-footer__bottom { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid rgba(243, 227, 195, .16); display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
@media (min-width: 900px) { .dk-footer__bottom { flex-direction: row; justify-content: space-between; align-items: center; } }
.dk-footer__fine { margin: 0; font-size: .8rem; color: #AEB6C6; }
.dk-legal-links { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.dk-legal-links a, .dk-legal-links button { display: inline-flex; align-items: center; padding: .3rem .7rem; border-radius: 999px; background: rgba(255,255,255,.07); font-size: .8rem; color: #DCE0E8; border: 0; font-family: inherit; cursor: pointer; text-decoration: none; }
.dk-legal-links a:hover, .dk-legal-links button:hover { background: rgba(255,255,255,.16); color: #fff; }
.dk-app-footer { padding: 1.4rem 0 2rem; color: var(--dk-muted); }
.dk-app-footer .dk-legal-links a, .dk-app-footer .dk-legal-links button { background: var(--dk-cream-2); color: var(--dk-ink-2); }
@media (max-width: 959px) { body.dk-logged-in .dk-footer { padding-bottom: calc(var(--dk-bottom-nav-h) + 30px + var(--dk-safe-bottom)); } }

/* ---------- שחר's sheet ---------- */
.dk-guri-sheet .dk-sheet__panel { display: flex; flex-direction: column; gap: .9rem; }
.dk-guri-sheet__head { display: flex; gap: .9rem; align-items: center; }
.dk-guri-sheet__art { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: var(--dk-shadow-sm); }
.dk-guri-sheet__head h3 { margin: 0 0 .2rem; }
.dk-guri-sheet__head p { margin: 0; }
.dk-guri-ask { display: flex; flex-direction: column; gap: .5rem; }
.dk-guri-ask .dk-textarea { min-height: 70px; border-radius: var(--dk-r); font-size: max(16px, 1rem); } /* never below 16px: iOS would zoom the sheet */
.dk-guri-answer { background: var(--dk-paper); border: 1px solid var(--dk-line); border-radius: 4px 20px 20px 20px; padding: .95rem 1.05rem; font-size: 1rem; box-shadow: var(--dk-shadow-xs); }
.dk-guri-quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.dk-guri-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-weight: 500; }
.dk-guri-perks li { display: flex; align-items: center; gap: .6rem; background: var(--dk-cream); border: 1px solid var(--dk-line); border-radius: var(--dk-r-sm); padding: .65rem .85rem; }
.dk-guri-perks .dk-icon { width: 18px; height: 18px; color: var(--dk-mustard-600); }

/* ---------- Lightbox ---------- */
.dk-lightbox { position: fixed; inset: 0; z-index: 1500; background: rgba(14, 24, 46, .9); display: grid; place-items: center; padding: 16px; animation: dk-rise .25s var(--dk-ease); }
.dk-lightbox img { max-width: 100%; max-height: 90dvh; border-radius: 14px; box-shadow: var(--dk-shadow-lg); }
.dk-lightbox__close { position: absolute; top: 14px; inset-inline-end: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 26px; cursor: pointer; }

/* ---------- Content templates ---------- */
.dk-entry-hero { position: relative; padding: clamp(2rem, 6vw, 4rem) 0 clamp(1.5rem, 4vw, 2.5rem); overflow: hidden; }
.dk-entry-hero__meta { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; color: var(--dk-muted); font-size: var(--dk-fs-sm); margin-top: .8rem; }
.dk-entry-cover { margin: 0 auto 2rem; max-width: 1000px; border-radius: var(--dk-r-xl); overflow: hidden; box-shadow: var(--dk-shadow-lg); aspect-ratio: 16 / 8; }
.dk-entry-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dk-article-card { display: flex; flex-direction: column; background: var(--dk-paper); border: 1px solid var(--dk-line); border-radius: var(--dk-r-lg); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--dk-shadow-sm); transition: transform .3s var(--dk-ease), box-shadow .3s var(--dk-ease); }
.dk-article-card:hover { transform: translateY(-3px); box-shadow: var(--dk-shadow-lg); color: inherit; }
.dk-article-card__img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--dk-cream-2); position: relative; }
.dk-article-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--dk-ease); }
.dk-article-card:hover .dk-article-card__img img { transform: scale(1.03); }
.dk-article-card__lock { position: absolute; top: 12px; inset-inline-start: 12px; }
.dk-article-card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.dk-article-card__title { font-family: var(--dk-font-display); font-weight: 600; font-size: 1.12rem; line-height: 1.3; color: var(--dk-teal); margin: 0; }
.dk-article-card__meta { margin-top: auto; display: flex; gap: .8rem; font-size: var(--dk-fs-xs); color: var(--dk-muted); }
.dk-cat-pills { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: none; }
.dk-cat-pills::-webkit-scrollbar { display: none; }
.dk-404 { text-align: center; padding: 4rem 1rem; }
.dk-404__art { width: min(320px, 80%); margin: 0 auto 1rem; }
.dk-pagination .nav-links { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.dk-pagination .page-numbers { min-width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--dk-paper); border: 1px solid var(--dk-line); text-decoration: none; font-weight: 700; color: var(--dk-teal); }
.dk-pagination .page-numbers.current { background: var(--dk-teal); color: #fff; border-color: var(--dk-teal); }

/* ---------- Elementor harmony ---------- */
.dk-elementor-page .dk-main > .elementor { margin: 0; }
.elementor-widget-shortcode .dk-page { padding-top: 0; }
.e-con-inner .dk-container { padding-inline: 0; }

/* ---------- Print ---------- */
@media print {
	.dk-header, .dk-footer, .dk-bottom-nav, .dk-guri, .dk-toasts { display: none !important; }
	body { background: #fff; }
}

/* ---------- שחר stage (Elementor widget / [derech_guri] shortcode) ---------- */
.dk-guri-stage { position: relative; display: inline-flex; align-items: flex-end; gap: .6rem; }
.dk-guri-stage--bubble-top { flex-direction: column-reverse; align-items: center; }
.dk-guri-stage--bubble-end { flex-direction: row-reverse; }
.dk-guri-stage__img { height: auto; filter: drop-shadow(0 24px 30px rgba(21, 35, 63, .22)); }
.dk-guri-stage--float .dk-guri-stage__img, .dk-guri-stage--glide .dk-guri-stage__img { animation: kf-glide 9s var(--dk-ease) infinite; }
.dk-guri-stage--breathe .dk-guri-stage__img, .dk-guri-stage--bounce .dk-guri-stage__img, .dk-guri-stage--wiggle .dk-guri-stage__img { animation: kf-breathe 6s var(--dk-ease) infinite; }
.dk-guri-stage__bubble { max-width: 300px; background: var(--dk-paper); border: 1px solid var(--dk-line); border-radius: 20px 20px 20px 4px; padding: .95rem 1.15rem; font-family: var(--dk-font-body); font-weight: 600; font-size: 1.05rem; line-height: 1.5; color: var(--dk-teal); box-shadow: var(--dk-shadow); margin-bottom: 40%; animation: dk-rise .8s var(--dk-ease) both .4s; }

/* ---------- Live stats ---------- */
.dk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.dk-stats__item { background: var(--dk-paper); border: 1px solid var(--dk-line); border-radius: var(--dk-r-lg); padding: 1.2rem 1rem; text-align: center; box-shadow: var(--dk-shadow-sm); display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.dk-stats__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--dk-cream); color: var(--dk-mustard-600); margin-bottom: .2rem; }
.dk-stats__icon .dk-icon { width: 22px; height: 22px; }
.dk-stats__num { font-family: var(--dk-font-display); font-weight: 300; font-size: 2.3rem; color: var(--dk-teal); line-height: 1.1; }
.dk-stats__label { font-size: var(--dk-fs-sm); color: var(--dk-muted); }
.dk-guri-stage--bubble-top .dk-guri-stage__bubble { margin-bottom: -6px; align-self: center; position: relative; }
.dk-guri-stage--bubble-top .dk-guri-stage__bubble::after { content: ''; position: absolute; bottom: -9px; inset-inline-start: 46%; width: 16px; height: 16px; background: var(--dk-paper); border-inline-end: 1px solid var(--dk-line); border-bottom: 1px solid var(--dk-line); transform: rotate(45deg); }
.dk-guri-stage.is-video, .dk-guri-stage { max-width: 100%; }
.dk-guri-stage video, .dk-guri-stage img { max-width: 100%; height: auto; }
@media (max-width: 767px) { .dk-guri-stage__bubble { font-size: .95rem; max-width: 230px; } }

/* שחר's inbox: messages read together in his sheet. */
.dk-guri-notif { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 10px; padding: 8px 12px; border-radius: 14px; background: var(--dk-sky); color: var(--dk-teal); font-weight: 600; text-decoration: none; }
.dk-guri-notif .dk-icon { width: 18px; height: 18px; flex: none; }
.dk-guri-notif__go { margin-inline-start: auto; }
.dk-guri-notif:hover { background: #D9E8E9; }
.dk-guri-inbox { display: grid; gap: 8px; padding: 10px 12px; margin-bottom: 10px; background: var(--dk-cream); border: 1px solid var(--dk-line); border-radius: var(--dk-r); }
.dk-guri-inbox__item { display: grid; gap: 6px; padding: 8px 10px; background: var(--dk-paper); border-radius: 14px; }
.dk-guri-inbox__text { font-size: 15px; line-height: 1.55; }
