/**
 * Полноэкранное меню в хэдере
 * Кнопка «Меню» + overlay на весь экран (навигация слева, инфо о компании справа)
 */

/* Кнопка «Меню» в верхней полосе (между логотипом и поиском) */
.header__menu-trigger-wrap {
	flex-shrink: 0;
	margin-right: 0.5rem;
}

/* --- Кнопка-триггер в хэдере --- */
.header__nav--fsm {
	display: flex;
	align-items: center;
}

.fsm-trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0;
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--color-primary, #096285);
	transition: color 0.25s ease, transform 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.fsm-trigger:hover {
	color: var(--color-primary-dark, #064d66);
}

.fsm-trigger:focus-visible {
	outline: 2px solid var(--color-primary, #096285);
	outline-offset: 4px;
}

.fsm-trigger__icon {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 28px;
	height: 22px;
}

.fsm-trigger__line {
	display: block;
	width: 100%;
	height: 3px;
	background: currentColor;
	border-radius: 2px;
	transform-origin: center;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
	            opacity 0.25s ease;
}

.fsm-overlay.is-open .fsm-trigger__line--1,
body.fsm-open .fsm-trigger__line--1 {
	transform: translateY(8px) rotate(45deg);
}

.fsm-overlay.is-open .fsm-trigger__line--2,
body.fsm-open .fsm-trigger__line--2 {
	opacity: 0;
	transform: scaleX(0);
}

.fsm-overlay.is-open .fsm-trigger__line--3,
body.fsm-open .fsm-trigger__line--3 {
	transform: translateY(-8px) rotate(-45deg);
}

/* Состояние открытого триггера (когда overlay открыт) */
body.fsm-open .fsm-trigger {
	color: #fff;
}

/* --- Overlay на весь экран --- */
/* Выше .site-notice (z-index 10002), иначе плашка перекрывает крестик и меню на мобильных */
.fsm-overlay {
	position: fixed;
	inset: 0;
	z-index: 10050;
	visibility: hidden;
	opacity: 0;
	transition: visibility 0.4s ease, opacity 0.4s ease;
	pointer-events: none;
	overflow: hidden;
}

.fsm-overlay.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.fsm-overlay__backdrop {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(9, 98, 133, 0.97) 0%, rgba(6, 77, 102, 0.98) 50%, rgba(0, 160, 227, 0.95) 100%);
	opacity: 0;
	transform: scale(1.05);
	transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
	            transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fsm-overlay.is-open .fsm-overlay__backdrop {
	opacity: 1;
	transform: scale(1);
}

.fsm-overlay__panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	height: 100vh;
	max-height: 100%;
	max-width: 1600px;
	margin: 0 auto;
	padding: 1.5rem 2rem;
	overflow-y: auto;
	overflow-x: hidden;
	transform: translateY(-20px);
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
}

.fsm-overlay.is-open .fsm-overlay__panel {
	transform: translateY(0);
}

.fsm-overlay__close {
	position: absolute;
	top: 1.5rem;
	right: 1.5rem;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.15);
	border: none;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background 0.25s ease, transform 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.fsm-overlay__close:hover {
	background: rgba(255, 255, 255, 0.25);
}

.fsm-overlay__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.fsm-overlay__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: stretch;
	flex: 1;
	min-height: 0;
	margin-top: 3rem;
	padding-right: 56px;
	overflow: visible;
}

@media (max-width: 1024px) {
	.fsm-overlay__grid {
		grid-template-columns: 1fr;
		gap: 3rem;
		margin-top: 3rem;
	}
}

/* --- Левая колонка: навигация --- */
.fsm-overlay__nav {
	animation: fsmNavIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
	min-height: auto;
	overflow: visible;
}

@keyframes fsmNavIn {
	from {
		opacity: 0;
		transform: translateX(-30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.fsm-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fsm-menu__item {
	margin-bottom: 0.5rem;
}

.fsm-menu__link {
	display: inline-block;
	padding: 0.5rem 0;
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	text-decoration: none;
	letter-spacing: 0.02em;
	transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.fsm-menu__link:hover {
	color: rgba(255, 255, 255, 0.9);
	opacity: 0.95;
	transform: translateX(6px);
}

.fsm-menu__item--active .fsm-menu__link {
	color: #fff;
	box-shadow: 0 2px 0 currentColor;
}

/* Родительский пункт с подменю - кнопка раскрытия */
.fsm-menu__link--parent {
	cursor: pointer;
	text-align: left;
	width: 100%;
	border: none;
	background: none;
	/* Делаем родительские пункты визуально равными основным пунктам меню */
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.fsm-menu__link--parent::after {
	content: '';
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid currentColor;
	flex-shrink: 0;
	transition: transform 0.25s ease;
}

.fsm-menu__item--parent--open .fsm-menu__link--parent::after {
	transform: rotate(180deg);
}

/* Подменю скрыто по умолчанию, раскрывается по клику */
.fsm-menu__sublist {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 3px solid rgba(255, 255, 255, 0.4);
	padding-left: 1rem;
	margin-left: 0.25rem;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.fsm-menu__item--parent--open .fsm-menu__sublist {
	max-height: 500px;
	margin-top: 0.25rem;
	margin-bottom: 1rem;
}

.fsm-menu__subitem {
	margin-bottom: 0.25rem;
}

.fsm-menu__sublink {
	display: inline-block;
	padding: 0.25rem 0;
	font-size: 1.1rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.9);
	text-decoration: none;
	transition: color 0.2s ease, padding-left 0.2s ease;
}

.fsm-menu__sublink:hover {
	color: #fff;
	padding-left: 6px;
}

.fsm-menu__subitem--active .fsm-menu__sublink {
	color: #fff;
	font-weight: 600;
}

/* --- Правая колонка: информация о компании --- */
.fsm-overlay__info {
	animation: fsmInfoIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.25s both;
	min-height: auto;
	overflow: visible;
}

@keyframes fsmInfoIn {
	from {
		opacity: 0;
		transform: translateX(30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.fsm-info {
	color: #fff;
}

.fsm-info__tagline {
	font-size: 1.125rem;
	line-height: 1.5;
	opacity: 0.95;
	margin-bottom: 1.5rem;
	max-width: 380px;
}

.fsm-info__contacts {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.fsm-info__contact {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.fsm-info__label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	opacity: 0.8;
}

.fsm-info__value {
	font-size: 1.1rem;
	font-weight: 500;
	color: #fff;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

a.fsm-info__value:hover {
	opacity: 0.9;
	text-decoration: underline;
}

.fsm-info__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 2rem;
}

.fsm-info__actions .btn,
.fsm-info__actions a.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.5rem 1.25rem;
	line-height: 1.3;
	vertical-align: middle;
}

.fsm-info__actions .btn {
	background: #fff;
	color: var(--color-primary, #096285);
	border-color: #fff;
}

.fsm-info__actions .btn:hover {
	background: rgba(255, 255, 255, 0.9);
	color: var(--color-primary-dark, #064d66);
}

.fsm-info__actions .btn--secondary {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.6);
}

.fsm-info__actions .btn--secondary:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: #fff;
	color: #fff;
}

.fsm-info__actions .btn--outline {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.5);
}

.fsm-info__actions .btn--outline:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.fsm-info__cta {
	font-weight: 700;
}

.fsm-info__social {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.fsm-info__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	transition: background 0.25s ease, transform 0.2s ease;
}

.fsm-info__social-link:hover {
	background: rgba(255, 255, 255, 0.35);
	transform: scale(1.08);
}

.fsm-info__extra {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	font-size: 0.95rem;
}

.fsm-info__extra a {
	color: rgba(255, 255, 255, 0.9);
	text-decoration: none;
	transition: color 0.2s ease;
}

.fsm-info__extra a:hover {
	color: #fff;
	text-decoration: underline;
}

/* Блокировка скролла body при открытом меню */
body.fsm-open {
	overflow: hidden;
	height: 100%;
}

/* Плавное появление пунктов меню (опционально, по желанию) */
.fsm-menu__item {
	animation: fsmItemIn 0.4s ease both;
}

.fsm-menu__item:nth-child(1) { animation-delay: 0.2s; }
.fsm-menu__item:nth-child(2) { animation-delay: 0.26s; }
.fsm-menu__item:nth-child(3) { animation-delay: 0.32s; }
.fsm-menu__item:nth-child(4) { animation-delay: 0.38s; }
.fsm-menu__item:nth-child(5) { animation-delay: 0.44s; }
.fsm-menu__item:nth-child(6) { animation-delay: 0.5s; }
.fsm-menu__item:nth-child(7) { animation-delay: 0.56s; }
.fsm-menu__item:nth-child(8) { animation-delay: 0.62s; }
.fsm-menu__item:nth-child(9) { animation-delay: 0.68s; }

@keyframes fsmItemIn {
	from {
		opacity: 0;
		transform: translateX(-15px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}
