/*
 * هدر سایت — قواعد ساده (بدون Tailwind، بدون بیلد).
 * اکتبر ۲۰۲۶: هدر چسبان روی تصویر روشن شفاف بود و متن منو خوانده نمی‌شد.
 * زمینهٔ تیرهٔ ۹۲٪ (همان نوار فهرست مطالب) + بلور؛ متن سفید روی بدترین حالت (زمینهٔ سفید زیرش) ≈ ۱۵:۱.
 * نسخهٔ C «گرافیت» (اکتبر ۲۰۲۶): زمینه همان #121316 صفحه با ۹۲٪، به‌جای rgba(0,0,10,.92).
 * سلکتور با ID تا بر `.hero-header.is-sticky{background:unset!important}` در main.css غلبه کند.
 */
#site-header.hero-header.is-sticky {
	background-color: rgba(18, 19, 22, 0.92) !important;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	#site-header.hero-header.is-sticky {
		background-color: #121316 !important;
	}
}

/*
 * ارتفاع هدر (تصمیم صاحب سایت، اکتبر ۲۰۲۶): ردیف دسکتاپ دقیقاً ۷۲px و ردیف موبایل دقیقاً ۶۴px،
 * محتوا وسط‌چین عمودی؛ هر دکمهٔ هدر موبایل (منو، جستجو) دقیقاً ۴۴×۴۴.
 * - ارتفاع را خودِ ردیف‌ها تعیین می‌کنند (py-4 ظرف صفر می‌شود) و min-height:80px تنظیمات قالب
 *   (`#site-header.hero-header{min-height}` در theme-settings) خنثی می‌شود؛ پس چسبان شدن، باز شدن
 *   پنل یا کشو و بارگذاری JS هیچ جابه‌جایی‌ای نمی‌سازد.
 * - --nz-header-height (padding-top بدنهٔ صفحه‌های داخلی) و پیش‌فرض --zm-header-h (نوار فهرست مطالب،
 *   که اسکریپتش بعداً از ارتفاع واقعی می‌خواند) با همین دو عدد برابرند تا زیر هدر نوار خالی نماند و
 *   اولین فریم درست باشد. html:root از :root در theme-settings و article-toc.css قوی‌تر است.
 */
html #site-header.hero-header {
	min-height: 0;
}
/* the sticky state's 1px bottom border (main.css + front-page critical CSS) grew the header 64→65 / 72→73
   on the first scroll: the same line is drawn as an inset shadow instead, so the box never changes size */
#site-header.hero-header.is-sticky {
	border-bottom: 0 !important;
	box-shadow: inset 0 -1px 0 rgba(58, 60, 66, 0.5), 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}
#site-header .zm-hdr {
	padding-top: 0;
	padding-bottom: 0;
}
#site-header .zm-hdr__mob {
	box-sizing: border-box;
	height: 64px;
}
/* !important: beats the Elementor-kit rule (2,1,1) and the search button's inline box-sizing */
#site-header #nz-mobile-toggle,
#site-header #nz-mobile-search-toggle {
	box-sizing: border-box !important;
	width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
	flex: none;
}
/* the header's icon buttons get the same focus ring as the nav (2px #99f6e4 + 2px #121316 gap,
   palette-judge.md), not the browser default; the search overlay's close button too */
#site-header #nz-mobile-toggle:focus-visible,
#site-header #nz-mobile-search-toggle:focus-visible,
#site-header #nz-header-search-toggle:focus-visible,
#nz-header-search-panel button[data-header-search-close]:focus-visible {
	outline: 2px solid #99f6e4 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 2px #121316 !important;
}
html:root {
	--nz-header-height: 64px;
	--zm-header-h: 64px;
}
@media (min-width: 1024px) {
	#site-header .zm-hdr__desk {
		box-sizing: border-box;
		height: 72px;
	}
	html:root {
		--nz-header-height: 72px;
		--zm-header-h: 72px;
	}
}
