/* New site header (template-parts/nh-header.php). Desktop from 900 px:
 * bar + «Ещё» panel; below: bar with a burger, topic strip, full-screen
 * menu. Selectors are scoped to .nh-header / .nh-drawer and reset the
 * parent theme's nav, list and button styles. */

.nh-header, .nh-drawer {
	--nh-ink: #17141d; --nh-muted: #5f5a68; --nh-line: #ebe8ef; --nh-soft: #f7f6f9; --nh-accent: #5b1a85;
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--nh-ink);
}
.nh-header *, .nh-drawer * { box-sizing: border-box; font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif !important; }
.nh-header ul, .nh-drawer ul { list-style: none; margin: 0; padding: 0; }
.nh-header li, .nh-drawer li { margin: 0; padding: 0; }
.nh-header a, .nh-drawer a { color: var(--nh-ink); text-decoration: none; box-shadow: none; }
.nh-header a:hover, .nh-drawer a:hover { color: var(--nh-accent); }
.nh-header button, .nh-drawer button { margin: 0; border: 0; border-radius: 0; background: none; font: inherit; color: inherit; letter-spacing: normal; text-transform: none; line-height: normal; cursor: pointer; box-shadow: none; min-height: 0; }
.nh-dot { display: inline-block; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--nh-color, #8a8494); }

/* Sticky header. The parent theme's #page has overflow-x: hidden, which
 * makes it a scroll box and stops sticky; clip cuts the same overflow
 * without that. Browsers without clip keep a static header. The admin
 * bar is fixed from 601 px. */
@supports (overflow: clip) {
	.nh-has-header #page.site { overflow: visible; overflow-x: clip; }
}
.site-header.nh-header { position: sticky; top: 0; z-index: 1000; margin: 0; padding: 0; background: #fff; border: 0; }
.admin-bar .site-header.nh-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header.nh-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header.nh-header { top: 0; } }

/* Bar */
.nh-bar { position: relative; border-bottom: 1px solid var(--nh-line); background: #fff; }
.nh-bar-in { max-width: 1240px; height: 64px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 36px; }
.nh-logo { display: block; flex: 0 0 auto; line-height: 0; }
h1.nh-logo { margin: 0; padding: 0; border: 0; font-size: 0; }
.nh-logo img { display: block; width: 150px; height: auto; }
.nh-bar-links { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.nh-bar-links > li > a, .nh-more-btn { display: inline-flex; align-items: center; gap: 6px; height: 64px; padding: 0; font-size: 15px; font-weight: 500; color: var(--nh-ink); }
.nh-bar-links > li > a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--nh-ink); }
.nh-more-btn svg { transition: transform .15s; }
.nh-more-btn[aria-expanded="true"] { color: var(--nh-accent); box-shadow: inset 0 -2px 0 var(--nh-accent); }
.nh-more-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nh-bar-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nh-icon-btn { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--nh-ink); border-radius: 8px; }
.nh-icon-btn:hover, .nh-icon-btn[aria-expanded="true"] { background: var(--nh-soft); }
.nh-header a.nh-tg-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: #229ed9; color: #fff; font-size: 14px; font-weight: 500; line-height: 1.2; }
.nh-header a.nh-tg-btn:hover { background: #1b8dc4; color: #fff; }
.nh-header a.nh-lang { padding: 6px 2px; font-size: 14px; font-weight: 500; color: var(--nh-muted); }
.nh-burger { display: none; }

/* Search row */
.nh-search-row { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--nh-line); box-shadow: 0 16px 40px rgba(23, 20, 29, .12); }
.nh-search-in { max-width: 1240px; margin: 0 auto; padding: 16px 24px; }
.nh-search-form { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border: 1px solid #d6d1dd; border-radius: 10px; color: var(--nh-muted); background: #fff; }
.nh-search-form:focus-within { border-color: var(--nh-accent); }
.nh-search-form input[type="search"] { flex: 1 1 auto; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; outline: none; background: transparent; box-shadow: none; font: inherit; font-size: 16px; color: var(--nh-ink); }

/* «Ещё» panel */
.nh-more { position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: 0 16px 40px rgba(23, 20, 29, .12); }
.nh-more-in { max-width: 1240px; margin: 0 auto; padding: 28px 24px 32px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; }
.nh-header .nh-more-h { margin: 0 0 12px; font-size: 12px; line-height: 1.3; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--nh-muted); }
.nh-more-topics ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; }
.nh-header a.nh-more-topic { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 4px 12px; padding: 12px; border-radius: 10px; }
.nh-header a.nh-more-topic:hover { background: var(--nh-soft); color: var(--nh-ink); }
.nh-more-topic .nh-dot { margin-top: 5px; }
.nh-more-topic-t { display: block; font-size: 16px; line-height: 1.3; font-weight: 700; }
.nh-more-topic-d { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--nh-muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.nh-more-side { display: flex; flex-direction: column; gap: 28px; padding-left: 40px; border-left: 1px solid var(--nh-line); }
.nh-more-side a { display: block; padding: 8px 0; font-size: 16px; line-height: 1.3; font-weight: 500; }
.nh-header .nh-more-side a.nh-more-tg { color: var(--nh-accent); }

/* Phone topic strip */
.nh-strip { display: none; }

@media (max-width: 1199px) {
	.nh-bar-hub-3, .nh-bar-hub-4, .nh-bar-hub-5, .nh-bar-hub-6, .nh-bar-hub-7 { display: none; }
	.nh-bar-in { gap: 28px; }
	.nh-bar-links { gap: 22px; }
}
@media (max-width: 1023px) {
	.nh-bar-hub-2 { display: none; }
}
@media (max-width: 899px) {
	.nh-bar-in { height: 56px; padding: 0 8px 0 16px; gap: 12px; }
	.nh-logo img { width: 124px; }
	.nh-bar-links, .nh-header a.nh-tg-btn, .nh-header a.nh-lang, .nh-more { display: none; }
	.nh-bar-tools { gap: 0; }
	.nh-icon-btn { width: 44px; height: 44px; }
	.nh-burger { display: inline-flex; }
	.nh-search-in { padding: 12px 16px; }
	.nh-strip { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; border-bottom: 1px solid var(--nh-line); background: #fff; white-space: nowrap; scrollbar-width: none; }
	.nh-strip::-webkit-scrollbar { display: none; }
	.nh-header .nh-strip a { flex: 0 0 auto; padding: 7px 12px; border-radius: 999px; background: #f1eff4; font-size: 14px; line-height: 1.2; font-weight: 500; color: var(--nh-ink); }
	.nh-header .nh-strip a[aria-current="page"] { background: var(--nh-ink); color: #fff; }
}

/* Phone menu: full screen */
.nh-drawer { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; background: #fff; }
.nh-drawer[hidden] { display: none; }
.nh-drawer-top { flex: 0 0 auto; height: 56px; padding: 0 8px 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--nh-line); }
.nh-drawer-top .nh-logo img { width: 124px; }
.nh-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 12px 16px 16px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.nh-drawer .nh-search-form { height: 44px; padding: 0 12px; }
.nh-drawer a.nh-drawer-main { display: flex; align-items: center; justify-content: space-between; height: 48px; margin-top: 8px; border-bottom: 1px solid var(--nh-line); font-size: 17px; font-weight: 700; }
.nh-drawer-main span { color: #a59fae; }
.nh-drawer .nh-drawer-h { margin: 18px 0 4px; font-size: 12px; line-height: 1.3; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--nh-muted); }
.nh-drawer-topics a { display: flex; align-items: center; gap: 12px; height: 46px; border-bottom: 1px solid var(--nh-line); font-size: 16px; font-weight: 500; }
.nh-drawer-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.nh-drawer-chips a { padding: 9px 12px; border-radius: 999px; border: 1px solid var(--nh-line); font-size: 14px; line-height: 1.2; font-weight: 500; }
.nh-drawer-foot { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px 20px; border-top: 1px solid var(--nh-line); }
.nh-drawer a.nh-drawer-tg { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 999px; background: #229ed9; color: #fff; font-size: 15px; font-weight: 500; }
.nh-drawer a.nh-drawer-lang { flex: 0 0 auto; display: flex; align-items: center; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #d6d1dd; font-size: 15px; font-weight: 500; }
.nh-drawer-tg + .nh-drawer-lang { margin-left: 0; }
.nh-drawer a.nh-drawer-lang:only-child { margin-left: auto; }
html.nh-drawer-open, html.nh-drawer-open body { overflow: hidden; }
