/**
 * FocalX header — white glass, AI Vehicle Inspection
 */

.fx-header {
	--fx-blue: #163b6b;
	--fx-blue-hover: #0f2d54;
	--fx-text: #1a1d21;
	--fx-text-muted: #5c6370;
	--fx-glass: rgba(255, 255, 255, 0.65);
	--fx-glass-border: rgba(255, 255, 255, 0.85);
	--fx-shadow: 0 8px 32px rgba(22, 59, 107, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
	--fx-radius: 16px;
	--fx-max: 1320px;

	position: sticky;
	top: 0;
	z-index: 10050;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.fx-header__glass {
	padding: 12px 20px;
	background: transparent;
}

@media (min-width: 1101px) {
	.fx-header__glass {
		padding: 16px 24px;
	}
}

.fx-header__inner {
	max-width: var(--fx-max);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

/* ----- Logo ----- */
.fx-header__brand {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: var(--fx-text);
	z-index: 2;
	line-height: 0;
}

.fx-header__logo-img {
	display: block;
	height: auto;
	max-height: 28px;
	width: auto;
	max-width: min(118px, 34vw);
	object-fit: contain;
}

/* Glass bar wraps nav + actions on desktop */
.fx-header__panel {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px 16px;
	min-width: 0;

	padding: 10px 16px;
	border-radius: var(--fx-radius);
	background: var(--fx-glass);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	backdrop-filter: blur(20px) saturate(180%);
	border: 1px solid var(--fx-glass-border);
	box-shadow: var(--fx-shadow);
}

.fx-header__nav {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 2px;
}

.fx-header__aside {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin-left: auto;
	padding-left: 8px;
	border-left: 1px solid rgba(22, 59, 107, 0.12);
}

/* Nav triggers & links */
.fx-header__link {
	padding: 10px 14px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--fx-text);
	text-decoration: none;
	border-radius: 10px;
	transition: background 0.15s ease, color 0.15s ease;
}

.fx-header__link:hover,
.fx-header__link:focus-visible {
	background: rgba(22, 59, 107, 0.08);
	color: var(--fx-blue);
	outline: none;
}

.fx-header__nav-item {
	position: relative;
}

/* Usynlig bro mellem trigger og dropdown — undgår at hover mistes i mellemrummet */
@media (min-width: 1101px) {
	.fx-header__nav-item--dropdown::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		height: 14px;
		z-index: 29;
		pointer-events: auto;
	}

	.fx-header__lang-wrap::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		height: 14px;
		z-index: 29;
		pointer-events: auto;
	}
}

.fx-header__trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--fx-text);
	background: transparent;
	border: none;
	border-radius: 10px;
	box-shadow: none;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.fx-header__trigger:hover,
.fx-header__trigger:focus-visible,
.fx-header__nav-item.is-open .fx-header__trigger {
	background: rgba(22, 59, 107, 0.08);
	color: var(--fx-blue);
	box-shadow: none;
	outline: none;
}

.fx-header__chev {
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.2s ease;
	opacity: 0.75;
}

.fx-header__nav-item.is-open .fx-header__chev {
	transform: rotate(225deg) translateY(2px);
}

/* Dropdown menus (desktop: hover) — centreret under menupunkt; bro (::after) dækker hover */
.fx-header__menu {
	position: absolute;
	left: 50%;
	right: auto;
	top: calc(100% + 4px);
	min-width: 280px;
	max-width: min(420px, 92vw);
	padding: 10px 0;
	background: #fff;
	border: 1px solid rgba(22, 59, 107, 0.1);
	border-radius: 14px;
	box-shadow: 0 16px 48px rgba(22, 59, 107, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
	z-index: 30;
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 6px);
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.fx-header__nav-item--dropdown:hover .fx-header__menu,
.fx-header__nav-item--dropdown:focus-within .fx-header__menu {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
	pointer-events: auto;
}

.fx-header__menu--cols {
	min-width: 520px;
	max-width: min(720px, calc(100vw - 32px));
	padding: 12px 0;
}

.fx-header__menu--cols .fx-header__menu-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(240px, 1fr));
	gap: 4px 12px;
	align-items: stretch;
}

.fx-header__menu--cols .fx-header__menu-list > li {
	min-width: 0;
}

.fx-header__menu-list {
	list-style: none;
	margin: 0;
	padding: 6px 8px;
}

.fx-header__menu-list > li {
	margin: 3px 0;
}

.fx-header__menu-list a {
	display: block;
	padding: 10px 14px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--fx-text);
	text-decoration: none;
	border-radius: 12px;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.fx-header__menu-list a:hover,
.fx-header__menu-list a:focus-visible {
	background: rgba(22, 59, 107, 0.09);
	color: var(--fx-blue);
	box-shadow: 0 2px 10px rgba(22, 59, 107, 0.08);
	outline: none;
}

/* Industries: ikon og tekst på samme række (aldrig stablet) */
.fx-header__menu-list a.fx-header__menu-link--industry {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap;
	align-items: center;
	gap: 12px;
	padding: 10px 12px 10px 10px;
	border-radius: 14px;
}

.fx-header__icon-cell {
	flex-shrink: 0;
	flex-grow: 0;
	align-self: center;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: linear-gradient(180deg, rgba(22, 59, 107, 0.07) 0%, rgba(22, 59, 107, 0.11) 100%);
	color: var(--fx-blue);
	transition: background 0.18s ease, transform 0.18s ease;
	/* ingen inset “hvid kant” — den gav hvid glans øverst/til venstre ved hover */
	box-shadow: none;
}

.fx-header__icon-cell svg {
	display: block;
	width: 18px;
	height: 18px;
	opacity: 0.95;
}

.fx-header__link-text {
	flex: 1 1 auto;
	min-width: 0;
	line-height: 1.35;
	text-align: left;
}

.fx-header__menu-link--industry:hover .fx-header__icon-cell,
.fx-header__menu-link--industry:focus-visible .fx-header__icon-cell {
	background: linear-gradient(180deg, rgba(22, 59, 107, 0.12) 0%, rgba(22, 59, 107, 0.18) 100%);
	box-shadow: none;
	transform: scale(1.02);
}

@media (min-width: 1101px) {
	.fx-header__nav-item--dropdown:hover [data-fx-dropdown-trigger],
	.fx-header__nav-item--dropdown:focus-within [data-fx-dropdown-trigger] {
		background: rgba(22, 59, 107, 0.08);
		color: var(--fx-blue);
		box-shadow: none;
	}
}

/* Language */
.fx-header__lang-wrap {
	position: relative;
}

.fx-header__lang-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--fx-text);
	background: rgba(255, 255, 255, 0.5);
	border: 1px solid rgba(22, 59, 107, 0.15);
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fx-header__lang-btn:hover,
.fx-header__lang-wrap.is-open .fx-header__lang-btn {
	background: rgba(22, 59, 107, 0.06);
	border-color: rgba(22, 59, 107, 0.22);
	color: var(--fx-text) !important;
}

.fx-header__lang-btn .fx-header__lang-current,
.fx-header__lang-btn .fx-header__chev {
	color: inherit;
}

.fx-header__lang-flag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.125rem;
	line-height: 1;
	flex-shrink: 0;
	font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

.fx-header__lang-flag--btn {
	font-size: 1rem;
	margin-right: 2px;
}

.fx-header__lang-menu {
	position: absolute;
	left: 50%;
	right: auto;
	top: calc(100% + 4px);
	min-width: 200px;
	padding: 8px 0;
	background: #fff;
	border: 1px solid rgba(22, 59, 107, 0.1);
	border-radius: 14px;
	box-shadow: 0 16px 48px rgba(22, 59, 107, 0.12);
	z-index: 30;
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 6px);
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.fx-header__lang-wrap:hover .fx-header__lang-menu,
.fx-header__lang-wrap:focus-within .fx-header__lang-menu {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
	pointer-events: auto;
}

.fx-header__lang-list {
	list-style: none;
	margin: 0;
	padding: 6px 8px;
}

.fx-header__lang-list > li {
	margin: 3px 0;
}

.fx-header__lang-list a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--fx-text);
	text-decoration: none;
	border-radius: 12px;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.fx-header__lang-label {
	flex: 1;
	min-width: 0;
}

.fx-header__lang-list a:hover,
.fx-header__lang-list a:focus-visible {
	background: rgba(22, 59, 107, 0.09);
	color: var(--fx-blue);
	box-shadow: 0 2px 10px rgba(22, 59, 107, 0.08);
	outline: none;
}

.fx-header__lang-list a.is-active {
	font-weight: 700;
	color: var(--fx-blue);
}

/* Log in */
.fx-header__login {
	padding: 10px 14px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--fx-blue);
	text-decoration: none;
	border-radius: 10px;
	transition: background 0.15s ease;
	white-space: nowrap;
}

.fx-header__login:hover,
.fx-header__login:focus-visible {
	background: rgba(22, 59, 107, 0.08);
	outline: none;
}

/* CTA */
.fx-header__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 20px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #ffffff !important;
	background: var(--fx-blue);
	text-decoration: none;
	border-radius: 999px;
	box-shadow: 0 4px 14px rgba(22, 59, 107, 0.35);
	transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
	white-space: nowrap;
}

.fx-header__cta:hover,
.fx-header__cta:focus-visible {
	background: var(--fx-blue-hover);
	box-shadow: 0 6px 20px rgba(22, 59, 107, 0.45);
	transform: translateY(-1px);
	outline: none;
}

/* Burger */
.fx-header__burger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(22, 59, 107, 0.2);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.7);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	cursor: pointer;
	z-index: 2;
}

.fx-header__burger-lines,
.fx-header__burger-lines::before,
.fx-header__burger-lines::after {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--fx-text);
	border-radius: 1px;
	transition: transform 0.25s ease, opacity 0.2s ease;
}

.fx-header__burger-lines {
	position: relative;
}

.fx-header__burger-lines::before,
.fx-header__burger-lines::after {
	content: "";
	position: absolute;
	left: 0;
}

.fx-header__burger-lines::before {
	top: -7px;
}

.fx-header__burger-lines::after {
	top: 7px;
}

.fx-header.is-menu-open .fx-header__burger-lines {
	background: transparent;
}

.fx-header.is-menu-open .fx-header__burger-lines::before {
	top: 0;
	transform: rotate(45deg);
}

.fx-header.is-menu-open .fx-header__burger-lines::after {
	top: 0;
	transform: rotate(-45deg);
}

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

/* ----- Mobile / tablet: logo venstre, hamburger højre på samme række ----- */
@media (max-width: 1100px) {
	.fx-header__inner {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-rows: auto auto;
		align-items: center;
		column-gap: 12px;
		row-gap: 0;
	}

	.fx-header__brand {
		grid-column: 1;
		grid-row: 1;
		justify-self: start;
		min-width: 0;
	}

	.fx-header__burger {
		display: inline-flex;
		grid-column: 2;
		grid-row: 1;
		justify-self: end;
	}

	.fx-header__panel {
		grid-column: 1 / -1;
		grid-row: 2;
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		order: unset;
		max-height: 0;
		overflow: hidden;
		opacity: 0;
		padding-top: 0;
		padding-bottom: 0;
		margin-top: 0;
		transition: max-height 0.4s ease, opacity 0.25s ease, padding 0.3s ease;
	}

	.fx-header.is-menu-open .fx-header__panel {
		max-height: min(90vh, 900px);
		opacity: 1;
		padding: 16px;
		margin-top: 8px;
		overflow-y: auto;
	}

	.fx-header__nav {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.fx-header__link {
		padding: 14px 12px;
		border-radius: 10px;
	}

	.fx-header__nav-item--dropdown {
		border-bottom: 1px solid rgba(22, 59, 107, 0.08);
	}

	.fx-header__trigger {
		width: 100%;
		justify-content: space-between;
		padding: 14px 12px;
		border-radius: 0;
		box-shadow: none;
	}

	.fx-header__menu {
		position: static;
		min-width: 0;
		max-width: none;
		box-shadow: none;
		border: none;
		background: #fff;
		border-radius: 10px;
		margin: 0 0 8px 0;
		padding: 0;
		opacity: 1;
		visibility: hidden;
		max-height: 0;
		overflow: hidden;
		transform: none;
		pointer-events: none;
		transition: max-height 0.35s ease, visibility 0.25s ease, padding 0.25s ease;
	}

	.fx-header__nav-item.is-open .fx-header__menu {
		visibility: visible;
		max-height: 1200px;
		padding: 4px 0;
		pointer-events: auto;
	}

	.fx-header__menu--cols .fx-header__menu-list {
		grid-template-columns: 1fr;
	}

	.fx-header__aside {
		margin-left: 0;
		padding-left: 0;
		border-left: none;
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding-top: 12px;
		border-top: 1px solid rgba(22, 59, 107, 0.1);
	}

	.fx-header__lang-wrap {
		width: 100%;
	}

	.fx-header__lang-btn {
		width: 100%;
		justify-content: space-between;
	}

	.fx-header__lang-menu {
		position: static;
		width: 100%;
		margin-top: 8px;
		box-shadow: none;
		background: #fff;
		border: 1px solid rgba(22, 59, 107, 0.1);
		opacity: 1;
		visibility: hidden;
		max-height: 0;
		overflow: hidden;
		transform: none;
		pointer-events: none;
		transition: max-height 0.35s ease, visibility 0.25s ease;
	}

	.fx-header__lang-wrap:hover .fx-header__lang-menu,
	.fx-header__lang-wrap:focus-within .fx-header__lang-menu {
		max-height: 0;
		visibility: hidden;
	}

	.fx-header__lang-wrap.is-open .fx-header__lang-menu {
		visibility: visible;
		max-height: 400px;
		pointer-events: auto;
	}

	.fx-header__login {
		text-align: center;
		padding: 14px;
	}

	.fx-header__cta {
		width: 100%;
		padding: 14px 20px;
	}
}

body.fx-header-no-scroll {
	overflow: hidden;
}
