/**
 * Header mega menu — current (orange) header, CSS-only hover reveal.
 *
 * Panel markup (.tj-nav__mega) is injected into the mega item's <li> by
 * inc/modul/mega-menu.php. Selectors are scoped under `#main-header .main-menu`
 * so they beat the id-level header rules (`#navbar > .navbar-nav > li a`).
 * Literal colors only — the page-2026 CSS custom properties aren't loaded on
 * every page.
 */

#main-header .main-menu .tj-has-mega {
	position: relative;
}

/* Panel — right-aligned to the trigger so it stays inside the container. */
#main-header .main-menu .tj-has-mega > .tj-nav__mega {
	position: absolute;
	top: 100%;
	right: 0;
	left: auto;
	width: 760px;
	max-width: calc(100vw - 40px);
	padding: 26px 30px;
	margin-top: 10px;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 12px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	z-index: 1000;
	text-align: left;
}

/* Invisible bridge over the gap so hover doesn't drop between trigger + panel. */
#main-header .main-menu .tj-has-mega > .tj-nav__mega::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -16px;
	height: 16px;
}

#main-header .main-menu .tj-has-mega:hover > .tj-nav__mega,
#main-header .main-menu .tj-has-mega:focus-within > .tj-nav__mega {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

/* Columns */
#main-header .main-menu .tj-nav__mega-grid {
	display: flex;
	gap: 34px;
}

#main-header .main-menu .tj-nav__mega-col {
	flex: 1 1 0;
	min-width: 0;
}

/* Column heading / eyebrow */
#main-header .main-menu .tj-nav__mega-col .tj-nav__eyebrow {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	padding: 0 0 10px;
	border-bottom: 1px solid #e4e4e4;
	color: #757575;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

#main-header .main-menu .tj-nav__mega-accent {
	display: inline-block;
	flex-shrink: 0;
	width: 9px;
	height: 9px;
	border-radius: 2px;
	background: #cccccc;
}

/* Link list */
#main-header .main-menu .tj-nav__mega ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

#main-header .main-menu .tj-nav__mega li {
	padding: 0;
	margin: 0;
}

/* Reset the header's `#navbar > .navbar-nav > li a` rules inside the panel. */
#main-header .main-menu .tj-has-mega .tj-nav__mega a {
	display: block;
	overflow: visible;
	padding: 9px 10px;
	margin: 0;
	color: #191919;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none;
	border-radius: 8px;
	transition: background 0.15s ease, color 0.15s ease;
}

/* Kill the animated underline the header adds to every link. */
#main-header .main-menu .tj-has-mega .tj-nav__mega a::after {
	display: none;
	content: none;
}

#main-header .main-menu .tj-has-mega .tj-nav__mega a:hover {
	background: #f6f6f6;
	color: #f05638;
}

/* Sub description under each link */
#main-header .main-menu .tj-nav__mega-sub {
	display: block;
	margin-top: 2px;
	color: #757575;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none;
}

/* ------------------------------------------------------------------ *
 * Mobile: the header menu becomes a stacked panel, so render the mega
 * inline (always open) instead of an absolute hover flyout.
 * ------------------------------------------------------------------ */
@media (max-width: 990px) {
	#main-header .main-menu .tj-has-mega > .tj-nav__mega {
		position: static;
		width: auto;
		max-width: none;
		margin: 6px 0 4px;
		padding: 8px 0 0;
		background: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: none;
	}

	#main-header .main-menu .tj-nav__mega-grid {
		flex-direction: column;
		gap: 18px;
	}

	#main-header .main-menu .tj-nav__mega-col .tj-nav__eyebrow {
		color: rgba(255, 255, 255, 0.85);
		border-bottom-color: rgba(255, 255, 255, 0.25);
	}

	#main-header .main-menu .tj-has-mega .tj-nav__mega a {
		color: #ffffff;
	}

	#main-header .main-menu .tj-has-mega .tj-nav__mega a:hover {
		background: rgba(255, 255, 255, 0.1);
		color: #ffffff;
	}

	#main-header .main-menu .tj-nav__mega-sub {
		color: rgba(255, 255, 255, 0.7);
	}
}
