/* Общий каркас страниц: шапка-тулбар сверху и футер-каталог снизу.
   Подключается на всех страницах после основного стиля страницы.
   Разметка — partials/header.<lang>.html и partials/footer.<lang>.html.

   Шапка перенесена с rtsp.ru (landing/css/mainV2.css) один в один по вёрстке
   и размерам. Отличия от оригинала, продиктованные нашими страницами:
   - `.container` переименован в `.header__container`: у нас класс `.container`
     уже занят обёрткой контента страницы с другими отступами;
   - `position: sticky` вместо `fixed` — не требует компенсирующего отступа
     сверху и не перекрывает hero (фон шапки непрозрачный, разницы не видно). */

:root {
	--shell-accent: #f93822;
	--shell-hover: #c72d1b;
	--shell-black: #171717;
	--shell-white: #fefefe;
	--shell-gray: #aaaaab;
	--shell-stroke: #2f2f2f;
	--shell-surface: #242424;
	--shell-shadow: rgba(112, 119, 154, 0.25);
	--shell-content-width: 1312px;
	--shell-offset: 64px;
}

/* ---------- Шапка ---------- */

.header {
	position: sticky;
	left: 0;
	top: 0;
	z-index: 10;
	width: 100%;
	height: 60px;
	background: var(--shell-black);
	border-bottom: 1px solid var(--shell-stroke);
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 16px;
	line-height: 1.25;
	transition: box-shadow 0.3s ease-in-out;
}

.header.sticky {
	box-shadow: 0 2px 10px 0 var(--shell-shadow);
}

.header *,
.header *::before,
.header *::after {
	box-sizing: border-box;
}

/* Только сброс подчёркивания: цвет задают конкретные элементы шапки.
   Объявлять здесь `color` нельзя — специфичность `.header a` (0,1,1) выше,
   чем у `.header__logo` и `.header__login` (0,1,0), и перебивала бы их. */
.header a {
	text-decoration: none;
	transition: color 0.3s ease-in-out;
}

.header .btn-reset {
	padding: 0;
	color: inherit;
	background-color: transparent;
	border: none;
	outline: 0;
	box-shadow: none;
	font: inherit;
	cursor: pointer;
}

.header .list-reset {
	margin: 0;
	padding: 0;
	list-style: none;
}

.header__container {
	width: 100%;
	height: 100%;
	max-width: calc(var(--shell-content-width) + var(--shell-offset) * 2);
	margin: 0 auto;
	padding: 0 var(--shell-offset);
}

.header__inner {
	display: flex;
	align-items: center;
	height: 100%;
}

.header__left {
	display: flex;
	place-items: center;
	height: 100%;
	padding: 0 36px;
	border-right: 1px solid var(--shell-stroke);
}

.header__logo {
	display: block;
	color: var(--shell-white);
	font-size: 32px;
	font-weight: 700;
	text-transform: uppercase;
}

.header__logo span {
	color: var(--shell-accent);
	transition: color 0.3s ease-in-out;
}

.header__wrap {
	flex: 1;
	height: 100%;
}

.header__nav {
	display: flex;
	align-items: center;
	height: 100%;
}

.nav__list {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 16px;
}

.nav__list li {
	margin: 0;
}

.nav__list a {
	display: block;
	padding: 6px 12px;
	color: var(--shell-white);
	background: none;
	border-radius: 4px;
	white-space: nowrap;
}

.nav__list a:hover,
.nav__list a:focus-visible {
	color: var(--shell-accent);
}

.header__right {
	position: relative;
	display: flex;
	align-items: center;
	height: 100%;
	margin-left: auto;
}

.header__block {
	flex-shrink: 0;
	width: 60px;
	height: 100%;
}

.header__lang {
	position: relative;
	display: flex;
	place-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: none;
	border-left: 1px solid var(--shell-stroke);
	border-right: 1px solid var(--shell-stroke);
	transition: background 0.3s ease-in-out;
}

.header__lang img {
	width: 24px;
	height: 24px;
	transition: opacity 0.3s ease-in-out;
}

.header__lang:hover,
.header__lang.active {
	background: var(--shell-surface);
}

.header__dropdown {
	position: absolute;
	left: 0;
	top: calc(100% + 1px);
	z-index: 1;
	width: 298px;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease-in-out;
}

.header__list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	padding: 16px;
	background: var(--shell-black);
}

.header__item {
	margin: 0;
}

.header__link {
	display: flex;
	align-items: center;
	column-gap: 8px;
	padding: 6px 8px;
	color: var(--shell-white);
	background: none;
	border-radius: 4px;
	transition: background 0.3s ease-in-out;
}

.header__link:hover,
.header__link:focus-visible {
	background: var(--shell-surface);
}

.header__link img {
	width: 24px;
	height: 24px;
}

.header__box {
	padding-left: 16px;
}

.header__login {
	display: flex;
	align-items: center;
	column-gap: 8px;
	padding: 8px 12px;
	color: var(--shell-white);
	white-space: nowrap;
	transition: color 0.3s ease-in-out;
}

.header__login:hover,
.header__login:focus-visible {
	color: var(--shell-accent);
}

.burger {
	position: relative;
	z-index: 10;
	flex-shrink: 0;
	width: 60px;
	height: 100%;
	margin-left: auto;
	background: none;
	border-left: 1px solid var(--shell-stroke);
	border-right: 1px solid var(--shell-stroke);
}

.burger span {
	position: absolute;
	left: 50%;
	display: block;
	width: 20px;
	height: 2px;
	background: var(--shell-white);
	border-radius: 20px;
	transform: translate(-50%, -50%) rotate(0);
	transition: 0.3s ease-in-out;
}

.burger span:nth-child(1) { top: 40%; }
.burger span:nth-child(2),
.burger span:nth-child(3) { top: 50%; }
.burger span:nth-child(4) { top: 61%; }

.burger.active span {
	background: var(--shell-accent);
}

.burger.active span:nth-child(1),
.burger.active span:nth-child(4) {
	width: 0%;
}

.burger.active span:nth-child(2) {
	transform: translate(-50%, -50%) rotate(45deg);
}

.burger.active span:nth-child(3) {
	transform: translate(-50%, -50%) rotate(-45deg);
}

/* Блокировка прокрутки страницы при открытом мобильном меню */
body.lock {
	overflow: hidden;
}

/* Якоря не должны уезжать под липкую шапку */
:target {
	scroll-margin-top: 76px;
}

/* ---------- Футер ---------- */

.solutions-footer {
	--footer-accent: var(--shell-accent);
	--footer-text: var(--shell-white);
	--footer-muted: var(--shell-gray);
	margin: 0;
	padding: 64px max(24px, calc((100vw - 1264px) / 2)) 28px;
	color: var(--footer-text);
	background: var(--shell-black);
	font-family: "IBM Plex Sans", sans-serif;
}

.solutions-footer * {
	box-sizing: border-box;
}

.solutions-footer__header {
	display: grid;
	grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.45fr);
	gap: 72px;
	padding-bottom: 36px;
	border-bottom: 1px solid #3a3a3a;
}

.solutions-footer__title {
	margin: 0;
	color: var(--footer-text);
	font-size: clamp(28px, 3vw, 42px);
	line-height: 1.08;
	font-weight: 500;
	text-transform: uppercase;
}

.solutions-footer__title::before {
	content: "RTSP /";
	display: block;
	margin-bottom: 18px;
	color: var(--footer-accent);
	font-size: 12px;
	font-weight: 700;
}

.solutions-footer__intro {
	max-width: 720px;
	margin: 0;
	align-self: end;
	color: var(--footer-muted);
	font-size: 17px;
	line-height: 1.6;
}

.solutions-footer__groups {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 36px;
	padding: 42px 0 48px;
}

.solutions-footer__group-title {
	margin: 0 0 18px;
	color: var(--footer-muted);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.solutions-footer__links {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.solutions-footer__links li {
	margin: 0;
}

.solutions-footer__links li::marker {
	content: none;
}

.solutions-footer__faq {
	display: grid;
	grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.45fr);
	gap: 72px;
	padding: 32px 0;
	border-top: 1px solid #3a3a3a;
}

.solutions-footer__faq .solutions-footer__group-title {
	margin: 4px 0 0;
}

.solutions-footer__link {
	display: inline-flex;
	align-items: baseline;
	gap: 9px;
	width: fit-content;
	color: var(--footer-text);
	font-size: 16px;
	line-height: 1.35;
	text-decoration: none;
}

.solutions-footer__link::before {
	content: "↗";
	color: var(--footer-accent);
	font-size: 13px;
}

.solutions-footer__link:hover,
.solutions-footer__link:focus-visible {
	color: var(--footer-accent);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.solutions-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 24px;
	border-top: 1px solid #3a3a3a;
	color: var(--footer-muted);
	font-size: 13px;
}

.solutions-footer__brand,
.solutions-footer__language {
	color: inherit;
	text-decoration-color: var(--footer-accent);
	text-underline-offset: 4px;
}

.solutions-footer__brand:hover,
.solutions-footer__language:hover {
	color: var(--footer-text);
}

/* ---------- Адаптив ---------- */

/* Точки перелома взяты с rtsp.ru, чтобы шапка вела себя так же */

@media (min-width: 1440px) {
	.burger {
		display: none;
	}
}

@media (max-width: 1439.98px) {
	.header__left {
		padding: 0 19px;
	}

	.header__wrap {
		position: fixed;
		top: 60px;
		left: 0;
		z-index: 100;
		width: 100%;
		height: calc(100vh - 60px);
		overflow-y: auto;
		background: rgba(23, 23, 23, 0.8);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
	}

	.header__wrap.active {
		opacity: 1;
		visibility: visible;
	}

	.header__nav {
		flex-direction: column;
		height: auto;
		background: var(--shell-black);
	}

	.nav__list {
		display: grid;
		grid-template-columns: 1fr 1fr;
		width: 100%;
		padding: 16px;
	}

	.nav__list li:nth-child(1),
	.nav__list li:nth-child(6) {
		grid-column: 1 / 3;
	}

	.nav__list a {
		background: var(--shell-surface);
		text-align: center;
	}

	.header__right {
		width: 100%;
		height: 60px;
		margin-left: 0;
		padding: 0 16px;
		border-top: 1px solid var(--shell-stroke);
		border-bottom: 1px solid var(--shell-stroke);
	}

	.header__dropdown {
		width: 100%;
	}

	.header__list {
		border-bottom: 1px solid var(--shell-stroke);
	}

	.header__box {
		flex: 1;
		order: -1;
		padding-left: 0;
	}

	.header__login {
		justify-content: center;
	}
}

@media (max-width: 1279.98px) {
	.header__container {
		--shell-offset: 32px;
	}
}

@media (max-width: 900px) {
	.solutions-footer__header,
	.solutions-footer__faq {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.solutions-footer__groups {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767.98px) {
	.header__container {
		--shell-offset: 16px;
	}
}

@media (max-width: 640px) {
	.solutions-footer {
		padding: 48px 16px 24px;
	}

	.solutions-footer__groups {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.solutions-footer__bottom {
		align-items: flex-start;
		flex-direction: column;
	}
}
