/**
 * Futemax-style shell header: row1 (menu | logo | auth), row2 (site search), lime rule,
 * desktop multi-row nav, mobile drawer.
 */

:root {
	--fmx-lime: #dfff3a;
	--fmx-topbar-bg: #0a0a0c;
	--fmx-drawer-bg: #1a1a1f;
	--fmx-drawer-head: var(--fmx-lime);
	/* Custom logo: max square box (keeps aspect ratio via object-fit) */
	--fmx-logo-max: 100px;
}

.fmx-shell-header {
	--fmx-logo-scrolled: 50px;
	position: relative;
	z-index: 120;
	background: var(--fmx-topbar-bg);
	border-bottom: 2px solid var(--fmx-lime);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

/* Top bar: in flow by default; becomes fixed when scrolled (avoids broken sticky) */
.fmx-topbar {
	position: relative;
	z-index: 125;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	background-image:
		radial-gradient(ellipse 120% 100% at 50% 0%, rgba(255, 255, 255, 0.04), transparent 55%),
		linear-gradient(180deg, #12121a 0%, #060608 100%);
	background-color: #050508;
}

.fmx-shell-header.is-scrolled .fmx-topbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	max-width: none;
	z-index: 125;
	border-bottom: 2px solid var(--fmx-lime);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}

.fmx-shell-header.is-scrolled {
	--fmx-logo-max: var(--fmx-logo-scrolled);
}

.fmx-shell-header.is-scrolled .fmx-wordmark {
	font-size: 0.92rem;
	padding: 0.15rem 0.65rem 0.28rem;
}

/* 1fr | auto | 1fr: equal side columns, centered logo column */
.fmx-topbar__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.55rem 0.85rem;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	column-gap: 0.35rem;
	row-gap: 0.35rem;
	min-height: calc(var(--fmx-logo-max) + 1.1rem);
}

.fmx-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #fff;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.fmx-icon-btn:hover,
.fmx-icon-btn:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	outline: none;
}

.fmx-burger {
	justify-self: start;
}

.fmx-topbar__end {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	justify-self: end;
	gap: 0.2rem;
	flex-wrap: nowrap;
	min-width: 0;
}

.fmx-head-auth__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.32rem 0.45rem;
	border-radius: 8px;
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-decoration: none !important;
	color: #fff !important;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.06);
	white-space: nowrap;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fmx-head-auth__btn:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.5);
}

.fmx-head-auth__btn--primary {
	border-color: var(--fmx-lime);
	color: #0a0a0a !important;
	background: var(--fmx-lime);
}

.fmx-head-auth__btn--primary:hover {
	filter: brightness(1.06);
}

@media (min-width: 400px) {
	.fmx-head-auth__btn {
		padding: 0.38rem 0.65rem;
		font-size: 0.78rem;
	}
}

.fmx-brand-center {
	justify-self: center;
	text-align: center;
	min-width: 0;
}

.fmx-brand-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none !important;
	color: #fff !important;
}

.fmx-brand-link:hover {
	filter: brightness(1.06);
}

.fmx-brand-logo .custom-logo-link,
.fmx-brand-logo a {
	display: inline-flex;
	align-items: center;
	text-decoration: none !important;
}

.fmx-brand-logo .custom-logo,
.fmx-brand-logo img {
	max-height: var(--fmx-logo-max);
	max-width: var(--fmx-logo-max);
	width: auto;
	height: auto;
	display: block;
	object-fit: contain;
	transition: max-height 0.22s ease, max-width 0.22s ease;
}

/* Wordmark (no custom logo) — trapezoid frame */
.fmx-wordmark {
	display: inline-block;
	font-weight: 900;
	font-size: 1.12rem;
	letter-spacing: 0.06em;
	font-style: italic;
	transform: skewX(-8deg);
	padding: 0.2rem 0.85rem 0.35rem;
	line-height: 1;
	color: #fff;
	border-left: 3px solid var(--fmx-lime);
	border-right: 3px solid var(--fmx-lime);
	background: #000;
	box-shadow: 0 6px 0 -2px var(--fmx-lime);
}

/* Second row: full-width search (same on mobile and desktop) */
.fmx-search-row {
	background: #050508;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fmx-search-row__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.55rem 0.85rem 0.65rem;
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.fmx-search-form {
	display: flex;
	width: 100%;
	gap: 0.5rem;
	align-items: center;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.fmx-search-row input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 0.55rem 0.75rem;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: #12121a;
	color: #fff;
	font-size: 1rem;
}

.fmx-search-row button[type="submit"] {
	padding: 0.55rem 1rem;
	border-radius: 10px;
	border: 1px solid var(--fmx-lime);
	background: rgba(223, 255, 58, 0.12);
	color: var(--fmx-lime);
	font-weight: 800;
	cursor: pointer;
}

.fmx-search-row button[type="submit"]:hover {
	filter: brightness(1.08);
}

/* Overlay + drawer (mobile / tablet) */
.fmx-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s;
	z-index: 180;
}

.fmx-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

.fmx-drawer {
	position: fixed;
	top: 0;
	left: 0;
	width: min(22rem, 88vw);
	max-width: 100%;
	height: 100%;
	background: var(--fmx-drawer-bg);
	transform: translateX(-105%);
	transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 200;
	display: flex;
	flex-direction: column;
	box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
}

.fmx-drawer.is-open {
	transform: translateX(0);
}

.fmx-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.65rem 0.85rem;
	background: var(--fmx-drawer-head);
	color: #0a0a0a;
	font-weight: 900;
	font-size: 1rem;
	letter-spacing: 0.04em;
}

.fmx-drawer__close {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 2px solid #0a0a0a;
	background: transparent;
	color: #0a0a0a;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-weight: 700;
}

.fmx-drawer__close:hover {
	background: rgba(0, 0, 0, 0.08);
}

.fmx-drawer__nav {
	flex: 1;
	overflow-y: auto;
	padding: 0.5rem 0 1.5rem;
	-webkit-overflow-scrolling: touch;
}

.fmx-menu--drawer {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fmx-menu--drawer li {
	margin: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fmx-menu--drawer > li > a {
	display: block;
	padding: 0.75rem 1rem;
	color: #f1f5f9 !important;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none !important;
}

.fmx-menu--drawer > li > a:hover {
	background: rgba(255, 255, 255, 0.05);
	color: #fff !important;
}

.fmx-menu--drawer .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0 0 0.35rem 0.75rem;
	background: rgba(0, 0, 0, 0.2);
}

.fmx-menu--drawer .sub-menu a {
	display: block;
	padding: 0.5rem 0.75rem 0.5rem 1rem;
	font-size: 0.88rem;
	color: rgba(226, 232, 240, 0.85) !important;
	text-decoration: none !important;
}

.fmx-menu--drawer .sub-menu a:hover {
	color: #fff !important;
}

body.fmx-drawer-open {
	overflow: hidden;
}

/* Head layout identical on all widths: burger + logo + search; menu only in drawer. */
