/*
 * Шапка и hero справки (header.php). Токены — docs/Reportkey Design System/colors_and_type.css.
 * Шапка стоит вне #wrapper, поэтому legacy-правила style.css на неё не действуют.
 */
.rk-hh,
.rk-hh-hero,
.rk-hh-search-host {
	--rk-text-primary: #23384f;
	--rk-text-secondary: #53677b;
	--rk-blue-50: #eaf0fb;
	--rk-blue-500: #5178d4;
	--rk-blue-600: #245bdb;
	--rk-blue-700: #1a46ab;
	--rk-border-soft: #dde7f0;
	--rk-border-medium: #c6d3e0;
	--rk-surface-soft-blue: #f5f8fc;
	--rk-surface-soft-warm: #fffaf6;
	--rk-cta-gradient: linear-gradient(135deg, #f76f1c 0%, #dc5a0f 100%);
	--rk-cta-gradient-hover: linear-gradient(135deg, #e2620f 0%, #c24e08 100%);
	--rk-shadow-cta: 0 8px 20px rgba(238, 108, 21, 0.28);
	--rk-shadow-md: 0 4px 12px rgba(35, 56, 79, 0.06), 0 1px 3px rgba(35, 56, 79, 0.04);
	--rk-shadow-lg: 0 12px 32px rgba(35, 56, 79, 0.08), 0 2px 6px rgba(35, 56, 79, 0.04);
	--rk-focus-ring: 0 0 0 3px rgba(81, 120, 212, 0.35);
	--rk-ease: cubic-bezier(0.2, 0, 0, 1);
	font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--rk-text-primary);
	box-sizing: border-box;
}

.rk-hh *,
.rk-hh-hero *,
.rk-hh-search-host * {
	box-sizing: inherit;
}

.rk-hh-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---- Bar ---- */
/* Якоря (#…) не уходят под липкую шапку. */
html {
	scroll-padding-top: 80px;
}

.rk-hh {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--rk-border-soft);
}

.rk-hh__bar {
	display: flex;
	align-items: center;
	gap: 32px;
	max-width: 1128px;
	min-height: 64px;
	margin: 0 auto;
	padding: 0 24px;
}

.rk-hh__brand {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 12px;
	border-radius: 8px;
	text-decoration: none;
}

.rk-hh__logo {
	display: block;
	width: 143px;
	height: 26px;
}

.rk-hh__brand-label {
	padding-left: 12px;
	border-left: 1px solid var(--rk-border-medium);
	color: var(--rk-text-secondary);
	font-size: 16px;
	line-height: 22px;
	font-weight: 600;
}

.rk-hh__nav {
	flex: 1 1 auto;
	min-width: 0;
}

.rk-hh__menu {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rk-hh__menu li {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rk-hh__menu a {
	display: flex;
	align-items: center;
	gap: 6px;
	border-radius: 10px;
	color: var(--rk-text-secondary);
	font-size: 15px;
	line-height: 22px;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: color 180ms var(--rk-ease), background-color 180ms var(--rk-ease);
}

.rk-hh__menu > li > a {
	padding: 8px 12px;
}

.rk-hh__menu a:hover {
	color: var(--rk-text-primary);
	background: var(--rk-surface-soft-blue);
	text-decoration: none;
}

.rk-hh__menu .current-menu-item > a,
.rk-hh__menu .current-menu-ancestor > a,
.rk-hh__menu .current-menu-parent > a {
	color: var(--rk-blue-600);
	font-weight: 600;
}

.rk-hh__menu .menu-item-has-children > a::after {
	content: "";
	width: 6px;
	height: 6px;
	margin-top: -3px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transition: transform 180ms var(--rk-ease);
}

.rk-hh__menu .sub-menu {
	margin: 0;
	padding: 8px;
	list-style: none;
	border: 1px solid var(--rk-border-soft);
	border-radius: 12px;
	background: #fff;
	box-shadow: var(--rk-shadow-lg);
}

.rk-hh__menu .sub-menu a {
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--rk-text-primary);
}

.rk-hh__menu .sub-menu a:hover {
	color: var(--rk-blue-600);
}

/* Primary CTA: класс пункта меню «rk-hh-cta» задаётся в «Внешний вид → Меню». */
.rk-hh__menu > .rk-hh-cta {
	margin-left: auto;
}

.rk-hh__menu > .rk-hh-cta > a {
	padding: 9px 16px;
	border-radius: 12px;
	background: var(--rk-cta-gradient);
	box-shadow: var(--rk-shadow-cta);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
}

.rk-hh__menu > .rk-hh-cta > a:hover {
	background: var(--rk-cta-gradient-hover);
	color: #fff;
}

.rk-hh a:focus-visible {
	outline: none;
	box-shadow: var(--rk-focus-ring);
}

/* .rk-hh .rk-hh__bar: специфичность выше, чем у body[data-btn-shape] button:not(…) родительской темы.
   Рамка — box-shadow: border-style none гасит родительский border-width с !important. */
.rk-hh .rk-hh__bar .rk-hh__toggle {
	display: none;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--rk-border-soft);
	color: var(--rk-text-primary);
	line-height: 1;
	text-shadow: none;
	cursor: pointer;
	transition: background-color 180ms var(--rk-ease), box-shadow 180ms var(--rk-ease), color 180ms var(--rk-ease);
}

.rk-hh .rk-hh__bar .rk-hh__toggle:hover,
.rk-hh .rk-hh__bar .rk-hh__toggle[aria-expanded="true"] {
	background: var(--rk-blue-50);
	box-shadow: inset 0 0 0 1px var(--rk-blue-500);
	color: var(--rk-blue-600);
}

.rk-hh .rk-hh__bar .rk-hh__toggle:focus-visible {
	outline: none;
	box-shadow: inset 0 0 0 1px var(--rk-blue-500), var(--rk-focus-ring);
}

.rk-hh__toggle-icon--close,
.rk-hh__toggle[aria-expanded="true"] .rk-hh__toggle-icon--open {
	display: none;
}

.rk-hh__toggle[aria-expanded="true"] .rk-hh__toggle-icon--close {
	display: block;
}

@media (min-width: 1080px) {
	.rk-hh__menu .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 10;
		min-width: 220px;
		margin-top: 6px;
		visibility: hidden;
		opacity: 0;
		transform: translateY(-4px);
		transition: opacity 180ms var(--rk-ease), transform 180ms var(--rk-ease), visibility 0s linear 180ms;
	}

	/* Мост через зазор, чтобы подменю не закрывалось при переводе курсора. */
	.rk-hh__menu .sub-menu::before {
		content: "";
		position: absolute;
		right: 0;
		bottom: 100%;
		left: 0;
		height: 8px;
	}

	.rk-hh__menu .menu-item-has-children:hover > .sub-menu,
	.rk-hh__menu .menu-item-has-children:focus-within > .sub-menu {
		visibility: visible;
		opacity: 1;
		transform: none;
		transition-delay: 0s;
	}

	.rk-hh__menu .menu-item-has-children:hover > a::after,
	.rk-hh__menu .menu-item-has-children:focus-within > a::after {
		transform: rotate(-135deg);
		margin-top: 3px;
	}
}

@media (max-width: 1079px) {
	.rk-hh__bar {
		flex-wrap: wrap;
		gap: 0 12px;
		min-height: 60px;
		padding: 8px 16px;
	}

	.rk-hh__logo {
		width: 126px;
		height: auto;
	}

	.rk-hh .rk-hh__bar .rk-hh__toggle {
		display: inline-flex;
	}

	.rk-hh__nav {
		flex-basis: 100%;
	}

	/* Без JS меню остаётся раскрытым и доступным. */
	.rk-hh.has-js:not(.is-open) .rk-hh__nav {
		display: none;
	}

	.rk-hh.is-open .rk-hh__nav {
		max-height: calc(100vh - 76px);
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.rk-hh__menu {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
		padding: 8px 0 12px;
	}

	.rk-hh__menu > li > a,
	.rk-hh__menu .sub-menu a {
		min-height: 44px;
		padding: 11px 12px;
		font-size: 16px;
	}

	.rk-hh__menu > li > a {
		color: var(--rk-text-primary);
		font-weight: 600;
	}

	.rk-hh__menu .menu-item-has-children > a::after {
		display: none;
	}

	.rk-hh__menu .sub-menu {
		padding: 0 0 4px 12px;
		border: 0;
		border-radius: 0;
		background: none;
		box-shadow: none;
	}

	.rk-hh__menu .sub-menu a {
		color: var(--rk-text-secondary);
		font-weight: 500;
	}

	.rk-hh__menu > .rk-hh-cta {
		margin: 10px 0 0;
		padding-top: 12px;
		border-top: 1px solid var(--rk-border-soft);
	}

	.rk-hh__menu > .rk-hh-cta > a {
		justify-content: center;
	}
}

/* ---- Hero (главная) ---- */
.rk-hh-hero {
	padding: 64px 24px 72px;
	border-bottom: 1px solid var(--rk-border-soft);
	background:
		radial-gradient(900px 420px at 12% -20%, #fff0e0 0%, transparent 60%),
		radial-gradient(700px 420px at 92% 0%, var(--rk-blue-50) 0%, transparent 60%),
		var(--rk-surface-soft-warm);
	text-align: center;
}

.rk-hh-hero__inner {
	max-width: 760px;
	margin: 0 auto;
}

.rk-hh-hero .rk-hh-hero__title {
	margin: 0 0 12px;
	color: var(--rk-text-primary);
	font-family: inherit;
	font-size: clamp(30px, 4vw, 42px);
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-transform: none;
}

.rk-hh-hero .rk-hh-hero__lead {
	max-width: 640px;
	margin: 0 auto 32px;
	color: var(--rk-text-secondary);
	font-size: 18px;
	line-height: 28px;
}

/* Поле занимает всю плашку: jquery.livesearch выравнивает список результатов по полю. */
.rk-hh-search-host .rk-hh-search {
	position: relative;
	max-width: 720px;
	margin: 0 auto;
	text-align: left;
}

.rk-hh-search__icon {
	position: absolute;
	top: 50%;
	left: 18px;
	color: var(--rk-text-secondary);
	transform: translateY(-50%);
	pointer-events: none;
}

.rk-hh-search-host .rk-hh-search .rk-hh-search__input[type="search"] {
	display: block;
	width: 100%;
	height: 60px;
	margin: 0;
	padding: 0 120px 0 50px;
	border: 1px solid var(--rk-border-medium);
	border-radius: 16px;
	outline: none;
	background: #fff;
	box-shadow: var(--rk-shadow-md);
	color: var(--rk-text-primary);
	font: inherit;
	font-size: 17px;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 180ms var(--rk-ease), box-shadow 180ms var(--rk-ease);
}

.rk-hh-search-host .rk-hh-search .rk-hh-search__input[type="search"]:focus {
	border-color: var(--rk-blue-500);
	box-shadow: var(--rk-shadow-md), var(--rk-focus-ring);
}

.rk-hh-search-host .rk-hh-search .rk-hh-search__input[type="search"]::placeholder {
	color: #8494a6;
	opacity: 1;
}

.rk-hh-search-host .rk-hh-search .rk-hh-search__submit {
	position: absolute;
	top: 8px;
	right: 8px;
	height: 44px;
	margin: 0;
	padding: 0 22px;
	border: 0;
	border-radius: 12px;
	background: var(--rk-blue-600);
	box-shadow: none;
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	line-height: 1;
	font-weight: 600;
	text-transform: none;
	text-shadow: none;
	cursor: pointer;
	transition: background-color 180ms var(--rk-ease);
}

.rk-hh-search__submit-label {
	/* Родительская тема ставит кнопкам font-weight: bold !important; подпись задаёт вес сама. */
	font-weight: 600;
}

.rk-hh-search-host .rk-hh-search .rk-hh-search__submit:hover {
	background: var(--rk-blue-700);
}

.rk-hh-search-host .rk-hh-search .rk-hh-search__submit:focus-visible {
	outline: none;
	box-shadow: var(--rk-focus-ring);
}

/* Поиск на странице 404: по левому краю контента. */
.rk-404-search .rk-hh-search {
	margin: 24px 0 0;
}

/* Выпадающий список живого поиска (jquery.livesearch добавляет его в body). */
#jquery-live-search #search-result {
	position: static;
	width: auto;
	margin-top: 8px;
	padding: 6px;
	border: 1px solid #dde7f0;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(35, 56, 79, 0.08), 0 2px 6px rgba(35, 56, 79, 0.04);
	overflow-y: auto;
	max-height: 60vh;
}

#jquery-live-search #search-result a {
	border-radius: 8px;
	color: #23384f;
}

#jquery-live-search #search-result a:hover {
	background: #f5f8fc;
	color: #245bdb;
}

@media (max-width: 600px) {
	.rk-hh-hero {
		padding: 36px 16px 44px;
	}

	.rk-hh-hero .rk-hh-hero__lead {
		margin-bottom: 24px;
		font-size: 16px;
		line-height: 24px;
	}

	.rk-hh-search__icon {
		left: 14px;
	}

	.rk-hh-search-host .rk-hh-search .rk-hh-search__input[type="search"] {
		padding: 0 96px 0 44px;
		font-size: 16px;
	}

	.rk-hh-search-host .rk-hh-search .rk-hh-search__submit {
		padding: 0 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rk-hh *,
	.rk-hh-hero *,
	.rk-hh-search-host * {
		transition: none !important;
	}
}
