/* FT-HEADER-MENU-V8 2026-09-29 — маркер доставки: сверь первую строку на сервере. */
/* =========================================================
   Forex Tools — премиальная шапка: quiet luxury + mega menu.
   Шапка: диагональный градиент #0A1F41 → #17808B + карбон.
   Мега-панель «Каталог»: трёхточечный градиент с radial-свечением.
   Баннер форума: картинка .page-hero-image справа от заголовка
   (flex row-reverse через :has), на мобильных — сверху по центру.
   ========================================================= */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	isolation: isolate;
	background: #0A1F41;
	background: linear-gradient(135deg, #0A1F41 0%, #17808B 100%);
	border-bottom: 1px solid rgba(255,255,255,.1);
	transition: transform .35s cubic-bezier(.4,0,.2,1), background .35s cubic-bezier(.4,0,.2,1), border-color .35s cubic-bezier(.4,0,.2,1), box-shadow .35s cubic-bezier(.4,0,.2,1);
}

.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: var(--ft-header-texture, none);
	background-repeat: repeat;
	background-size: auto;
	opacity: .045;
	pointer-events: none;
}

.site-header.scrolled {
	background: #081831;
	background: linear-gradient(135deg, #081831 0%, #126772 100%);
	border-bottom-color: rgba(255,255,255,.12);
	box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.site-header.ft-header-hidden {
	transform: translateY(calc(-100% - 1px));
}

.header-inner {
	position: static;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: clamp(16px, 2vw, 32px);
	min-height: var(--header-height, 68px);
	padding: 0 clamp(20px, 4vw, 72px);
}

.reading-progress {
	display: none;
}

.site-branding {
	display: flex;
	align-items: center;
	min-width: 0;
}

.custom-logo-link {
	display: inline-flex;
	align-items: center;
}

.site-logo {
	max-height: calc(var(--header-height, 68px) - 4px);
	width: auto;
	display: block;
}

.site-title {
	margin: 0;
	font-family: var(--font-heading, sans-serif);
	font-size: 21px;
	font-weight: 700;
	letter-spacing: -.01em;
	color: #ffffff;
	color: var(--color-p9, #ffffff);
	white-space: nowrap;
}

.main-navigation {
	display: flex;
	justify-content: flex-end;
	min-width: 0;
}

.ft-primary-menu {
	display: flex;
	align-items: center;
	gap: clamp(20px, 2.2vw, 38px);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ft-primary-menu > li {
	position: relative;
}

.ft-primary-menu > li > a {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 24px 0;
	color: rgba(255,255,255,.78);
	font-family: var(--font-heading, sans-serif);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: .01em;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	transition: color .25s cubic-bezier(.4,0,.2,1);
}

.ft-primary-menu > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 18px;
	height: 1px;
	background: #ffffff;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .35s cubic-bezier(.4,0,.2,1);
}

.ft-primary-menu > li > a:hover,
.ft-primary-menu > li > a:focus-visible,
.ft-primary-menu > li.is-active > a,
.ft-has-mega.open > .ft-mega-toggle {
	color: #ffffff;
	color: var(--color-p9, #ffffff);
}

.ft-primary-menu > li > a:hover::after,
.ft-primary-menu > li > a:focus-visible::after,
.ft-primary-menu > li.is-active > a::after,
.ft-has-mega.open > .ft-mega-toggle::after {
	transform: scaleX(1);
}

.ft-primary-menu > li > a:focus-visible {
	outline: 2px solid rgba(255,255,255,.45);
	outline-offset: 6px;
	border-radius: 4px;
}

@media (min-width: 1025px) {
	.ft-drawer-forum {
		display: none !important;
	}
}

.ft-chevron {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	opacity: .78;
	transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .25s cubic-bezier(.4,0,.2,1);
}

.ft-has-mega.open .ft-chevron {
	transform: rotate(180deg);
	opacity: 1;
}

/* ---------- Мега-панель «Каталог»: выразительный градиент + свечение ---------- */
.ft-has-mega {
	position: static;
}

.ft-mega {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	width: auto;
	max-width: none;
	box-sizing: border-box;
	z-index: 200;
	background:
		radial-gradient(ellipse at 92% 8%, rgba(71, 186, 198, .28) 0%, transparent 55%),
		radial-gradient(ellipse at 8% 92%, rgba(10, 31, 65, .45) 0%, transparent 60%),
		linear-gradient(135deg, #0B2850 0%, #145E8A 50%, #1D949F 100%);
	border-top: 1px solid rgba(255,255,255,.16);
	border-bottom: 1px solid rgba(71, 186, 198, .35);
	box-shadow:
		0 28px 70px rgba(0,0,0,.5),
		0 0 0 1px rgba(255,255,255,.04) inset;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: opacity .25s cubic-bezier(.4,0,.2,1), transform .3s cubic-bezier(.4,0,.2,1), visibility .25s cubic-bezier(.4,0,.2,1);
}

.ft-has-mega.open .ft-mega {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.ft-mega-inner {
	display: grid;
	grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
	gap: clamp(32px, 5vw, 80px);
	padding: clamp(32px, 4.5vw, 64px) clamp(20px, 4vw, 72px);
}

.ft-mega-label {
	margin-bottom: 14px;
	color: rgba(255,255,255,.62);
	font-family: var(--font-heading, sans-serif);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.ft-mega-text {
	margin: 0;
	max-width: 34ch;
	color: rgba(255,255,255,.8);
	font-size: 15px;
	line-height: 1.6;
}

.ft-mega-cats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 0 clamp(28px, 4vw, 64px);
	align-content: start;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ft-mega-cat {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 16px;
	padding: 17px 0;
	border-bottom: 1px solid rgba(255,255,255,.12);
	color: rgba(255,255,255,.92);
	font-family: var(--font-heading, sans-serif);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -.005em;
	text-decoration: none;
	transition: color .25s cubic-bezier(.4,0,.2,1), border-color .25s cubic-bezier(.4,0,.2,1), padding-left .25s cubic-bezier(.4,0,.2,1);
}

.ft-mega-cat-item:last-child .ft-mega-cat {
	border-bottom: 0;
}

.ft-mega-cat:hover,
.ft-mega-cat:focus-visible {
	color: #ffffff;
	border-bottom-color: rgba(255,255,255,.6);
	padding-left: 4px;
}

.ft-mega-cat:focus-visible {
	outline: 2px solid rgba(255,255,255,.45);
	outline-offset: 4px;
	border-radius: 4px;
}

.ft-mega-cat-name {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ft-mega-cat-count {
	min-width: 38px;
	justify-self: end;
	padding: 4px 10px;
	border: 1px solid rgba(255,255,255,.22);
	border-radius: 999px;
	color: rgba(255,255,255,.7);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	transition: color .25s cubic-bezier(.4,0,.2,1), border-color .25s cubic-bezier(.4,0,.2,1), background-color .25s cubic-bezier(.4,0,.2,1);
}

.ft-mega-cat:hover .ft-mega-cat-count,
.ft-mega-cat:focus-visible .ft-mega-cat-count {
	border-color: rgba(255,255,255,.55);
	background: rgba(255,255,255,.14);
	color: #ffffff;
}

.ft-mega-cat-arrow {
	color: #ffffff;
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity .25s cubic-bezier(.4,0,.2,1), transform .25s cubic-bezier(.4,0,.2,1);
}

.ft-mega-cat:hover .ft-mega-cat-arrow,
.ft-mega-cat:focus-visible .ft-mega-cat-arrow {
	opacity: 1;
	transform: translateX(0);
}

.ft-mega-empty {
	padding: 16px 0;
	color: rgba(255,255,255,.65);
	font-size: 15px;
}

/* ---------- Header actions ---------- */
.header-actions {
	display: flex;
	align-items: center;
	gap: clamp(10px, 1.2vw, 18px);
	flex-shrink: 0;
}

.header-bell {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: rgba(255,255,255,.78);
	transition: color .25s cubic-bezier(.4,0,.2,1), background-color .25s cubic-bezier(.4,0,.2,1);
}

.header-bell:hover,
.header-bell:focus-visible {
	color: #ffffff;
	background: rgba(255,255,255,.12);
}

.header-bell:focus-visible {
	outline: 2px solid rgba(255,255,255,.45);
	outline-offset: 3px;
}

.header-bell svg {
	width: 20px;
	height: 20px;
}

.bell-counter {
	position: absolute;
	top: -2px;
	right: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: #FF7F00;
	color: #ffffff;
	font-family: var(--font-heading, sans-serif);
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.header-cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: rgba(255,255,255,.78);
	transition: color .25s cubic-bezier(.4,0,.2,1), background-color .25s cubic-bezier(.4,0,.2,1);
}

.header-cart:hover,
.header-cart:focus-visible {
	color: #ffffff;
	background: rgba(255,255,255,.12);
}

.header-cart:focus-visible {
	outline: 2px solid rgba(255,255,255,.45);
	outline-offset: 3px;
}

.header-cart svg {
	width: 21px;
	height: 21px;
}

.cart-counter {
	position: absolute;
	top: -2px;
	right: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: #ffffff;
	color: #0A1F41;
	font-family: var(--font-heading, sans-serif);
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.header-actions .btn {
	padding: 10px 18px;
	border: 1px solid rgba(255,255,255,.22);
	border-radius: var(--radius-sm, 8px);
	background: transparent;
	color: rgba(255,255,255,.9);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	box-shadow: none;
	transition: color .25s cubic-bezier(.4,0,.2,1), border-color .25s cubic-bezier(.4,0,.2,1), background-color .25s cubic-bezier(.4,0,.2,1);
}

.header-actions .btn:hover,
.header-actions .btn:focus-visible {
	border-color: rgba(255,255,255,.5);
	background: rgba(255,255,255,.12);
	color: #ffffff;
	transform: none;
	box-shadow: none;
}

.header-actions .btn-light {
	background: rgba(255,255,255,.1);
	border-color: rgba(255,255,255,.3);
	color: #ffffff;
}

.header-actions .btn-light:hover,
.header-actions .btn-light:focus-visible {
	background: rgba(255,255,255,.18);
	border-color: rgba(255,255,255,.55);
	color: #ffffff;
}

/* ---------- Mobile toggle ---------- */
.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.menu-toggle:focus-visible {
	outline: 2px solid rgba(255,255,255,.45);
	outline-offset: 4px;
	border-radius: 6px;
}

.menu-toggle-bar {
	display: block;
	width: 22px;
	height: 1.5px;
	margin: 5px auto;
	border-radius: 2px;
	background: #ffffff;
	transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .2s cubic-bezier(.4,0,.2,1);
}

body.ft-nav-open .menu-toggle-bar:nth-child(1) {
	transform: translateY(6.5px) rotate(45deg);
}

body.ft-nav-open .menu-toggle-bar:nth-child(2) {
	opacity: 0;
}

body.ft-nav-open .menu-toggle-bar:nth-child(3) {
	transform: translateY(-6.5px) rotate(-45deg);
}

.ft-nav-overlay {
	position: fixed;
	inset: 0;
	z-index: 94;
	background: rgba(4,12,26,.58);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s cubic-bezier(.4,0,.2,1), visibility .3s cubic-bezier(.4,0,.2,1);
}

body.ft-nav-open .ft-nav-overlay {
	opacity: 1;
	visibility: visible;
}

body.ft-nav-open {
	overflow: hidden;
}

/* ---------- Tablet / mobile drawer ---------- */
@media (max-width: 1024px) {
	.header-inner {
		padding: 0 clamp(16px, 4vw, 40px);
	}

	.menu-toggle {
		display: inline-flex;
	}

	.ft-bar-forum {
		display: none !important;
	}

	.main-navigation {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		width: min(420px, 88vw);
		z-index: 95;
		display: block;
		padding: calc(var(--header-height, 68px) + 28px) 24px 32px;
		background: #0A1F41;
		background: linear-gradient(180deg, #0A1F41 0%, #17808B 100%);
		border-left: 1px solid rgba(255,255,255,.1);
		box-shadow: -24px 0 60px rgba(0,0,0,.45);
		overflow-y: auto;
		overscroll-behavior: contain;
		transform: translateX(100%);
		transition: transform .35s cubic-bezier(.4,0,.2,1);
	}

	.main-navigation.open,
	body.ft-nav-open .main-navigation {
		transform: translateX(0);
	}

	.ft-primary-menu {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.ft-primary-menu > li > a {
		justify-content: space-between;
		padding: 18px 0;
		border-bottom: 1px solid rgba(255,255,255,.12);
		color: rgba(255,255,255,.88);
		font-size: 20px;
		font-weight: 600;
	}

	.ft-primary-menu > li > a::after {
		display: none;
	}

	.ft-has-mega {
		position: static;
	}

	/* Мега-панель в drawer = прозрачный аккордеон, без градиента. */
	.ft-mega {
		position: static;
		display: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		border: 0;
		background: transparent;
		box-shadow: none;
		padding: 0 0 10px;
	}

	.ft-has-mega.open .ft-mega {
		display: block;
	}

	.ft-mega-inner {
		display: grid;
		grid-template-columns: 1fr;
		gap: 12px;
		padding: 6px 0 0;
	}

	.ft-mega-intro {
		display: none;
	}

	.ft-mega-cats {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.ft-mega-cat {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 12px;
		padding: 14px 0 14px 12px;
		font-size: 17px;
	}

	.ft-mega-cat-arrow {
		display: none;
	}

	.header-actions {
		gap: 8px;
	}

	.header-actions .btn {
		padding: 9px 14px;
		font-size: 13px;
	}
}

@media (max-width: 600px) {
	.site-logo {
		max-height: 46px;
	}

	.header-actions .btn {
		padding: 8px 12px;
		font-size: 12px;
	}

	.header-bell,
	.header-cart {
		width: 36px;
		height: 36px;
	}

	.main-navigation {
		width: min(360px, 92vw);
		padding-left: 20px;
		padding-right: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header,
	.ft-mega,
	.ft-primary-menu > li > a,
	.ft-primary-menu > li > a::after,
	.ft-chevron,
	.ft-mega-cat,
	.ft-mega-cat-count,
	.ft-mega-cat-arrow,
	.menu-toggle-bar,
	.main-navigation,
	.ft-nav-overlay {
		transition: none !important;
	}
}

/* ---------- FT-HEADER-IMG-V2: картинка форума справа в баннере ---------- */
/* Базовая компоновка (и fallback для браузеров без :has):
   картинка по центру над заголовком. */
.page-hero-image {
	display: block;
	margin: 0 auto 14px;
	max-width: min(340px, 70%);
	height: auto;
}

/* Когда в баннере есть картинка (страницы форума), ставим её в правую
   часть: row-reverse кладёт первый дочерний элемент (img) справа,
   заголовок уходит влево и выравнивается по левому краю. */
.page-hero .container:has(> .page-hero-image) {
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	justify-content: space-between;
	gap: clamp(20px, 4vw, 64px);
}

.page-hero .container:has(> .page-hero-image) .page-hero-image {
	flex: 0 0 auto;
	margin: 0;
	max-width: min(320px, 38%);
}

.page-hero .container:has(> .page-hero-image) .page-hero-title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	text-align: left;
}

@media (max-width: 600px) {
	.page-hero .container:has(> .page-hero-image) {
		flex-direction: column;
		align-items: center;
		gap: 12px;
	}

	.page-hero .container:has(> .page-hero-image) .page-hero-image {
		max-width: min(220px, 60%);
		margin: 0 auto;
	}

	.page-hero .container:has(> .page-hero-image) .page-hero-title {
		text-align: center;
	}
}
/* ---------- /FT-HEADER-IMG-V2 ---------- */