.site-header__logo {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.site-header__logo-img {
	display: block;
	width: 136px;
	height: 48px;
}

.site-header__logo-tagline {
	color: var(--41485-d, #41485D);
	font-family: Gilroy;
	font-size: 15px;
	font-style: normal;
	font-weight: 400;
	line-height: 17px;
}

.site-header__row--main,
.site-header__row--nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.site-header__row--main {
	padding-top: 16px;
	padding-bottom: 16px;
}

.site-header__top {
	background: var(--ffffff, #FFF);
	border-bottom: 2px solid #f6f7f8;
}

.site-header__bottom {
	padding-top: 15px;
	padding-bottom: 15px;
}

.site-header a,
.site-header__bottom--clone a {
	text-decoration: none;
}

/* ---- Smart-header: шапка в нормальном потоке наверху, при скролле ниже её высоты
       становится fixed и "накатывается" сверху слайд-анимацией. Активируется JS'ом
       только на ≥991px. На мобилке поведение не меняем. ---- */

/* Переопределяем легаси-ограничения: body header { height: 103px } и body { padding-top: 163px }
   из combine.css. Specificity наших селекторов выше, source-order тоже — значит перебивают. */
body header.site-header {
	height: auto;
}

html body {
	padding-top: 0;
}

.site-header {
	position: relative;
}

/* Клон только нижней панели (.site-header__bottom) — её JS добавляет в body,
   прячет/показывает через transform. Оригинал в потоке и не двигается. */
.site-header__bottom--clone {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 200;
	background: #FFF;
	transform: translateY(-100%);
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
	pointer-events: none;
	box-shadow: 0 8px 24px rgba(2, 87, 182, 0.08);
}

.site-header__bottom--clone.site-header__bottom--clone-visible {
	transform: translateY(0);
	pointer-events: auto;
}

.btn--primary,
.mainbtn_2 {
	position: relative;
	isolation: isolate; /* создаёт stacking context для ::before, не ломая родителя */
	overflow: hidden;   /* клипает псевдо-градиент по border-radius */

	display: inline-flex;
	height: 50px;
	padding: 16px 20px;
	justify-content: center;
	align-items: center;
	gap: 8px;
	border-radius: 9px;
	background: linear-gradient(90deg, #0257B6 0%, #4A8EE3 100%);
	color: var(--ffffff, #FFF);
	text-align: right;
	font-family: Gilroy;
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
	line-height: 24px; /* 150% */
	letter-spacing: 0.32px;
	text-transform: uppercase;
	cursor: pointer;
	transition: box-shadow 0.3s ease;
}

/* Второй градиент на псевдо-слое — градиенты не интерполируются, поэтому оверлей
   плавно проявляется через opacity. Цвета немного светлее базовых — мягкая "подсветка",
   а не резкий реверс направления. */
.btn--primary::before,
.mainbtn_2::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, #1268CB 0%, #5A9EE8 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: -1;
}

.btn--primary:hover,
.mainbtn_2:hover {
	box-shadow: 0 6px 18px rgba(2, 87, 182, 0.2);
	background: linear-gradient(90deg, #0257B6 0%, #4A8EE3 100%);
}

.btn--primary:hover::before,
.mainbtn_2:hover::before {
	opacity: 1;
}

/* Лёгкий блик: диагональная полупрозрачная полоска пробегает по кнопке при наведении */
.btn--primary::after,
.mainbtn_2::after {
	content: '';
	position: absolute;
	top: 0;
	left: -80%;
	width: 50%;
	height: 100%;
	background: linear-gradient(
		120deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.28) 50%,
		rgba(255, 255, 255, 0) 100%
	);
	transform: skewX(-20deg);
	transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
}

.btn--primary:hover::after,
.mainbtn_2:hover::after {
	left: 130%;
}

.site-header__phone {
	color: var(--404-b-69, #404B69);
	text-align: right;
	font-family: Gilroy;
	font-size: 23px;
	font-style: normal;
	font-weight: 700;
	line-height: 24px; /* 104.348% */
}

.site-header__mail {
	color: var(--404-b-69, #404B69);
	font-family: Gilroy;
	font-size: 17px;
	font-style: normal;
	font-weight: 600;
	line-height: 20px; /* 105.263% */
}

/* ---- Компоненты, используемые в шапке ---- */

.email {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.email__icon {
	display: block;
	flex-shrink: 0;
}

.city-picker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	transition: color 0.2s ease;
}

.city-picker__icon {
	display: block;
	flex-shrink: 0;
}

.city-picker__value {
	color: var(--404-b-69, #404B69);
	font-family: Gilroy;
	font-size: 17px;
	font-style: normal;
	font-weight: 600;
	line-height: 20px; /* 105.263% */
	transition: color 0.2s ease;
}

.city-picker:hover .city-picker__value {
	color: #0257B6;
}

.city-picker:hover .city-picker__icon {
	/* Перекрашиваем SVG-иконку в фирменный синий через CSS-фильтр.
	   Без transition: интерполяция filter через sepia/hue-rotate проходит
	   через промежуточные оранжево-красные цвета — лучше переключать жёстко. */
	filter: brightness(0) saturate(100%) invert(24%) sepia(86%) saturate(1750%) hue-rotate(195deg) brightness(95%) contrast(101%);
}

.social-links {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.social-links__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s ease;
}

.social-links__link:hover {
	opacity: 0.7;
}

.social-links__icon {
	display: block;
}

.u-mobile-only {
	display: none;
}

@media (max-width: 990px) {
	.u-mobile-only {
		display: block;
	}
}

.nav-menu__list {
	display: flex;
	gap: 26px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav-menu__link {
	color: var(--404-b-69, #404B69);
	text-align: right;
	font-family: Gilroy;
	font-size: 17px;
	font-style: normal;
	font-weight: 500;
	line-height: 24px; /* 141.176% */
	transition: color 0.2s ease;
}

/* Цвет держится, пока курсор над li или над его сабменю (submenu — потомок li, :hover сохраняется) */
.nav-menu__item:hover > .nav-menu__link {
	color: #0257B6;
}

.nav-menu__item {
	position: relative;
}

.nav-menu__item--has-dropdown .nav-menu__link {
	position: relative;
	padding-right: 18px;
}

.nav-menu__item--has-dropdown .nav-menu__link::after {
	content: '';
	display: block;
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%) rotate(0deg);
	width: 10px;
	height: 6px;
	background-image: url('/update22_img/bl_menuardonw.svg');
	background-size: 100% 100%;
	background-repeat: no-repeat;
	transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu__item--has-dropdown:hover .nav-menu__link::after {
	transform: translateY(-50%) rotate(180deg);
}

/* Невидимая "прослойка" под пунктом-родителем — чтобы курсор не выходил из hover'а в зазоре до сабменю */
.nav-menu__item--has-dropdown::before {
	content: '';
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: 14px;
}

.nav-menu .submenu {
	position: absolute;
	top: calc(100% + 14px);
	left: 0;
	min-width: 240px;
	margin: 0;
	padding: 12px 0;
	list-style: none;
	background: #FFF;
	border-radius: 12px;
	box-shadow: 0 20px 50px 15px rgba(2, 87, 182, 0.1);
	z-index: 100;

	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	pointer-events: none;
	transition:
		opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
		visibility 0s linear 0.22s;
}

.nav-menu__item--has-dropdown:hover .submenu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
	transition:
		opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
		visibility 0s linear 0s;
}

.nav-menu .submenu li {
	list-style: none;
}

.nav-menu .submenu a {
	display: block;
	padding: 8px 20px;
	color: #404B69;
	font-family: Gilroy;
	font-size: 15px;
	font-weight: 500;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease;
}

.nav-menu .submenu a:hover {
	background: #f6f7f8;
	color: #0257B6;
}

/* ---- Narrow desktop (991–1299px): легаси-контейнер сжимается до 1040px при ≤1300px,
       поэтому градуируем содержимое шапки, чтобы не ломалось. ---- */

@media (max-width: 1299px) and (min-width: 991px) {
	/* Тэглайн съедает ширину лого-блока — на узких экранах он не критичен. */
	.site-header__logo-tagline {
		display: none;
	}

	/* Плотнее иконки/гэпы в навигации */
	.nav-menu__list {
		gap: 20px;
	}

	.nav-menu__link {
		font-size: 14px;
	}

	/* Чуть уменьшаем крупные элементы верхнего ряда, чтобы помещались без переноса */
	.site-header__phone {
		font-size: 20px;
		line-height: 22px;
	}

	.site-header__mail,
	.city-picker__value {
		font-size: 17px;
	}
}

@media (max-width: 1199px) and (min-width: 991px) {
	.nav-menu__list {
		gap: 16px;
	}
}

@media (max-width: 1099px) and (min-width: 991px) {
	/* На ≤1099 почта + CTA уходят; телефон меньше;
	   пункты меню — в одну строку с переносом в несколько рядов. */
	.site-header__mail {
		display: none;
	}

	.site-header__cta {
		display: none;
	}

	.site-header__phone {
		font-size: 19px;
	}

	.nav-menu__link {
		white-space: nowrap;
		font-size: 14px;
	}

	/* CTA скрыта — растягиваем nav на всю ширину и раздвигаем пункты */
	.site-header__cell--nav,
	.site-header__nav {
		width: 100%;
	}

	.nav-menu__list {
		gap: 10px 14px;
		flex-wrap: wrap;
		justify-content: space-between;
	}
}

/* ---- Mobile (≤990px): оставляем только [бургер | лого | иконка звонка],
       остальное вытесняется в off-canvas (.mobile_menu живёт в update22_header.php).
       Визуал подогнан под cinar.ru: пале-голубой фон, бургер 30×30 с двумя линиями. ---- */

@media (max-width: 990px) {
	.site-header__city-picker,
	.site-header__mail,
	.site-header__phone,
	.site-header__socials,
	.site-header__cta,
	.site-header__bottom,
	.site-header__logo-tagline {
		display: none;
	}

	/* Перекрываем десктоп-дефолты (bg + border), чтобы не перебивать легаси .header_else_1 */
	.site-header__top {
		background: #f5f9fc;
		border-bottom: 0;
	}

	.site-header__row--main {
		padding-top: 0;
		padding-bottom: 0;
		min-height: 60px;
		justify-content: flex-start;
		gap: 20px;
	}

	/* Группа правых иконок (Telegram, Max, звонок) уезжает вправо одним блоком */
	.site-header__mobile-contacts {
		display: flex;
		align-items: center;
		gap: 12px;
		margin-left: auto;
	}

	.site-header__mobile-social {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 30px;
		height: 30px;
	}

	body.menu_active .site-header__mobile-social {
		display: none;
	}

	.site-header__mobile-social img {
		display: block;
		width: 22px;
		height: auto;
		transition: filter 0.2s ease;
	}

	/* При открытом мобильном меню (body.menu_active) — иконки белые */
	body.menu_active .site-header__mobile-social img {
		filter: brightness(0) invert(1);
	}

	/* Бургер — точная копия легаси .menu-toggle2 */
	.site-header__menu-toggle {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 30px;
		height: 30px;
		padding: 0;
		margin: 0;
		background-color: transparent;
		border: 0;
		outline: none;
		position: relative;
		cursor: pointer;
		z-index: 2;
	}

	.site-header__menu-toggle-icon {
		display: block;
		position: relative;
		top: 0;
		width: 100%;
		height: 0;
	}

	.site-header__menu-toggle-icon::before,
	.site-header__menu-toggle-icon::after {
		content: '';
		position: absolute;
		left: 0;
		width: 100%;
		height: 3px;
		border-radius: 1.5px;
		background-color: #1B75BC;
	}

	.site-header__menu-toggle-icon::before {
		margin-top: -6px;
	}

	.site-header__menu-toggle-icon::after {
		margin-top: 3px;
	}

	/* Лого на мобилке как на проде: width:85, height:24.51 (прод растягивает SVG по вертикали) */
	.site-header__logo-img {
		width: 85px;
		height: 24.51px;
	}
}


/* Глобальные оверрайды модалок */
.modal-content {
	border-radius: 20px;
}

.modal-content .btn--primary,
.modal-content .mainbtn_2 {
	height: 60px;
}
