/**
 * Orion Products mega menu — full-width professional panel (dark + cyan).
 */

/* No list bullets / dropdown dots inside Products panel */
#mega-menu-wrap-menu-1 li.orion-products-mega-panel ul.mega-sub-menu,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel ul.mega-sub-menu ul,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel ul.mega-sub-menu li,
body > ul.mega-sub-menu.orion-products-mega--fullwidth,
body > ul.mega-sub-menu.orion-products-mega--fullwidth ul,
body > ul.mega-sub-menu.orion-products-mega--fullwidth li {
	list-style: none !important;
	list-style-type: none !important;
	margin-left: 0 !important;
	padding-left: 0 !important;
	padding-inline-start: 0 !important;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card,
body > ul.orion-products-mega--fullwidth li.orion-series-card {
	display: block !important;
	list-style: none !important;
	list-style-type: none !important;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card::before,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card::after,
body > ul.orion-products-mega--fullwidth li.orion-series-card::before,
body > ul.orion-products-mega--fullwidth li.orion-series-card::after {
	content: none !important;
	display: none !important;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel ul.mega-sub-menu li::marker,
body > ul.mega-sub-menu.orion-products-mega--fullwidth li::marker {
	content: none !important;
	display: none !important;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel .mega-indicator,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card .mega-indicator,
body > ul.orion-products-mega--fullwidth .mega-indicator {
	display: none !important;
	visibility: hidden !important;
	width: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
}

:root {
	--orion-mega-bg: #070b0f;
	--orion-mega-bg-elevated: #0e1620;
	--orion-mega-accent: #00d4ff;
	--orion-mega-brand: #44bce3;
	--orion-mega-text: #ddeef5;
	--orion-mega-muted: #607a8a;
	--orion-mega-border: rgba(255, 255, 255, 0.08);
	--orion-mega-border-accent: rgba(0, 212, 255, 0.22);
	--orion-mega-inner: min(1280px, calc(100vw - 48px));
	--orion-mega-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Invisible bridge between nav link and panel (filled by JS) */
.orion-mega-hover-bridge {
	display: none;
	background: transparent !important;
	border: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Extend clickable/hover area above panel */
body > ul.mega-sub-menu.orion-products-mega--fullwidth,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel > ul.mega-sub-menu {
	pointer-events: auto !important;
}

/* Backdrop */
@media only screen and (min-width: 769px) {
	body.orion-products-mega-open::before {
		content: "";
		position: fixed;
		inset: 0;
		top: var(--orion-mega-panel-top, 0);
		background: rgba(0, 0, 0, 0.55);
		backdrop-filter: blur(2px);
		-webkit-backdrop-filter: blur(2px);
		z-index: 99998;
		pointer-events: none;
	}

	header.elementor-location-header,
	header.elementor-location-header .e-con,
	header.elementor-location-header .e-con-inner,
	header.elementor-location-header .elementor-element,
	.header-res,
	.header-res .elementor-container,
	.header-res .e-con,
	.header-res .e-con-inner,
	#mega-menu-wrap-menu-1,
	#mega-menu-wrap-menu-1 #mega-menu-menu-1 {
		overflow: visible !important;
	}

	#mega-menu-wrap-menu-1 li.orion-products-mega-panel {
		position: static !important;
	}
}

/* Full-width panel (fixed, portaled to body via JS) */
body > ul.mega-sub-menu.orion-products-mega--fullwidth,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel > ul.mega-sub-menu.orion-products-mega--fullwidth,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel.mega-toggle-on > ul.mega-sub-menu,
#mega-menu-wrap-menu-1 #mega-menu-menu-1 > li.orion-products-mega-panel.mega-toggle-on > ul.mega-sub-menu {
	position: fixed !important;
	left: 0 !important;
	right: 0 !important;
	width: 100vw !important;
	max-width: none !important;
	min-width: 100vw !important;
	margin: 0 !important;
	transform: none !important;
	z-index: 100000 !important;
	box-sizing: border-box !important;
}

/* Panel shell */
body > ul.mega-sub-menu.orion-products-mega--fullwidth,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel > ul.mega-sub-menu {
	background: var(--orion-mega-bg) !important;
	border: none !important;
	border-top: 1px solid var(--orion-mega-border-accent) !important;
	border-bottom: 1px solid var(--orion-mega-border) !important;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55) !important;
	padding: 0 !important;
	overflow: hidden !important;
}

/* Subtle grid + glow */
body > ul.mega-sub-menu.orion-products-mega--fullwidth::before,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel > ul.mega-sub-menu::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
	pointer-events: none;
	z-index: 0;
}

body > ul.mega-sub-menu.orion-products-mega--fullwidth::after,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel > ul.mega-sub-menu::after {
	content: "";
	position: absolute;
	width: 50%;
	height: 120px;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	background: radial-gradient(ellipse at center top, rgba(0, 212, 255, 0.12), transparent 70%);
	pointer-events: none;
	z-index: 0;
}

/* Inner content wrapper via rows (works in-menu and when portaled to body) */
#mega-menu-wrap-menu-1 li.orion-products-mega-panel > ul.mega-sub-menu,
body > ul.mega-sub-menu.orion-products-mega--fullwidth {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	padding: 28px 24px 36px !important;
	gap: 12px !important;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.mega-menu-row,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.mega-menu-row.orion-products-mega-row,
body > ul.orion-products-mega--fullwidth li.mega-menu-row,
body > ul.orion-products-mega--fullwidth li.mega-menu-row.orion-products-mega-row {
	width: 100% !important;
	max-width: var(--orion-mega-inner) !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	margin: 0 !important;
	padding: 0 !important;
	position: relative;
	z-index: 1;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.mega-menu-row > ul.mega-sub-menu,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel .mega-menu-row > ul.mega-sub-menu,
body > ul.orion-products-mega--fullwidth li.mega-menu-row > ul.mega-sub-menu {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 16px !important;
	width: 100% !important;
	max-width: var(--orion-mega-inner) !important;
	margin: 0 auto !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.mega-menu-column,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.mega-menu-column.orion-products-mega-col,
body > ul.orion-products-mega--fullwidth li.mega-menu-column {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	width: auto !important;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.mega-menu-column > ul.mega-sub-menu,
body > ul.orion-products-mega--fullwidth li.mega-menu-column > ul.mega-sub-menu {
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.mega-menu-column > ul.mega-sub-menu > li.mega-menu-item,
body > ul.orion-products-mega--fullwidth li.mega-menu-column > ul.mega-sub-menu > li.mega-menu-item {
	padding: 0 !important;
	width: 100% !important;
}

/* Series cards */
#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card > a.mega-menu-link,
body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link {
	display: grid !important;
	grid-template-columns: 1fr !important;
	grid-template-rows: 148px auto !important;
	align-content: start !important;
	align-items: stretch !important;
	gap: 0;
	background: var(--orion-mega-bg-elevated) !important;
	border: 1px solid var(--orion-mega-border) !important;
	border-radius: 10px;
	padding: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	text-align: center;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
	transition:
		transform 0.35s var(--orion-mega-ease),
		border-color 0.35s var(--orion-mega-ease),
		box-shadow 0.35s var(--orion-mega-ease);
	color: var(--orion-mega-text) !important;
	font-family: "Barlow Condensed", "Segoe UI", sans-serif !important;
	font-weight: 700 !important;
	font-size: inherit !important;
	line-height: inherit !important;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none !important;
	list-style: none !important;
}

/* Ensure the Max Mega Menu custom icon always renders as a top image area.
   MMM applies the image via background-image on a:before. */
#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card > a.mega-menu-link:before,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card > a.mega-menu-link::before,
body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link:before,
body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link::before {
	display: block !important;
	position: relative !important;
	grid-row: 1;
	grid-column: 1;
	width: 100% !important;
	max-width: none !important;
	height: 148px !important;
	min-height: 148px !important;
	margin: 0 !important;
	background-color: #0a121a !important;
	background-size: contain !important;
	background-position: center center !important;
	background-repeat: no-repeat !important;
	content: "" !important;
	border-bottom: 1px solid var(--orion-mega-border);
}

/* When the panel is portaled to body, MMM's scoped icon CSS no longer matches.
   Use the captured CSS variable (set by JS on each link). */
body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link:before,
body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link::before {
	background-image: var(--orion-mega-icon) !important;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card > a.mega-menu-link:hover,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card.mega-toggle-on > a.mega-menu-link,
body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link:hover {
	transform: translateY(-4px);
	border-color: var(--orion-mega-border-accent) !important;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 212, 255, 0.08);
	color: var(--orion-mega-text) !important;
	background: linear-gradient(165deg, #111c28 0%, var(--orion-mega-bg-elevated) 100%) !important;
}

/* Text footer — fixed height, vertically centered */
#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card > a.mega-menu-link .mega-description-group,
body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link .mega-description-group {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	grid-row: 2 !important;
	grid-column: 1 !important;
	width: 100%;
	height: auto !important;
	min-height: 64px !important;
	max-height: none !important;
	flex: 0 0 auto !important;
	margin: 0 !important;
	padding: 14px 16px !important;
	box-sizing: border-box;
	border-top: 1px solid var(--orion-mega-border);
	background: rgba(0, 0, 0, 0.2);
	list-style: none !important;
	align-self: stretch !important;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card > a.mega-menu-link .mega-menu-title,
body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link .mega-menu-title {
	display: block !important;
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	font-family: "Barlow Condensed", "Segoe UI", sans-serif !important;
	font-size: clamp(13px, 1.15vw, 15px) !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	letter-spacing: 0.1em !important;
	text-transform: uppercase !important;
	text-align: center !important;
	color: var(--orion-mega-text) !important;
	white-space: normal;
	word-break: break-word;
	list-style: none !important;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card .mega-description-group .mega-menu-title,
#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card .mega-description-group .mega-menu-description {
	line-height: 1.35 !important;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card > a.mega-menu-link .mega-menu-description,
body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link .mega-menu-description {
	display: none !important;
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card > a.mega-menu-link .mega-menu-title::after,
body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link .mega-menu-title::after {
	content: "View series →";
	display: block;
	margin-top: 6px;
	font-family: "Barlow", "Segoe UI", sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
	text-align: center;
	color: var(--orion-mega-muted);
	transition: color 0.25s var(--orion-mega-ease);
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card > a.mega-menu-link:hover .mega-menu-title::after,
body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link:hover .mega-menu-title::after {
	color: var(--orion-mega-accent);
}

#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card.mega-menu-item-has-children > a.mega-menu-link::after,
body > ul.orion-products-mega--fullwidth li.orion-series-card.mega-menu-item-has-children > a.mega-menu-link::after {
	display: none !important;
}

/* Products nav item active state */
#mega-menu-wrap-menu-1 #mega-menu-menu-1 > li.orion-products-mega-panel.mega-toggle-on > a.mega-menu-link {
	color: var(--orion-mega-accent) !important;
}

@media (max-width: 1100px) and (min-width: 769px) {
	#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.mega-menu-row > ul.mega-sub-menu,
	body > ul.orion-products-mega--fullwidth li.mega-menu-row > ul.mega-sub-menu {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 12px !important;
	}

	#mega-menu-wrap-menu-1 li.orion-products-mega-panel li.orion-series-card.mega-icon-top > a.mega-menu-link::before,
	body > ul.orion-products-mega--fullwidth li.orion-series-card.mega-icon-top > a.mega-menu-link::before {
		height: 120px !important;
		min-height: 120px;
	}
}

@media (max-width: 768px) {
	body.orion-products-mega-open::before {
		display: none;
	}

	body > ul.mega-sub-menu.orion-products-mega--fullwidth,
	#mega-menu-wrap-menu-1 #mega-menu-menu-1 li.orion-products-mega-panel > ul.mega-sub-menu {
		position: static !important;
		width: 100% !important;
		min-width: 0 !important;
		padding: 16px !important;
		height: auto !important; /* Allow the sub-menu to expand naturally */
	}

	#mega-menu-wrap-menu-1 #mega-menu-menu-1 li.mega-menu-row.orion-products-mega-row > ul.mega-sub-menu,
	body > ul.orion-products-mega--fullwidth li.mega-menu-row.orion-products-mega-row > ul.mega-sub-menu {
		display: grid !important; /* Force grid layout on mobile */
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important; /* 2 columns on mobile */
		gap: 12px !important;
	}

	#mega-menu-wrap-menu-1 #mega-menu-menu-1 li.mega-menu-column.orion-products-mega-col,
	body > ul.orion-products-mega--fullwidth li.mega-menu-column.orion-products-mega-col {
		width: 100% !important;
		min-width: 0 !important;
		max-width: none !important;
		display: block !important;
		float: none !important;
		clear: none !important;
		padding: 0 !important;
		margin: 0 !important;
	}

	/* Shrink cards for 2-column mobile layout */
	#mega-menu-wrap-menu-1 #mega-menu-menu-1 li.orion-series-card > a.mega-menu-link,
	body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link {
		grid-template-rows: 70px auto !important;
		border-radius: 6px;
	}

	#mega-menu-wrap-menu-1 #mega-menu-menu-1 li.orion-series-card > a.mega-menu-link:before,
	#mega-menu-wrap-menu-1 #mega-menu-menu-1 li.orion-series-card > a.mega-menu-link::before,
	body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link:before,
	body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link::before {
		height: 70px !important;
		min-height: 70px !important;
		min-width: 100px !important;
		float: none !important;
		position: relative !important;
		display: block !important;
		margin: 0 auto !important;
		width: 100% !important;
		max-width: none !important;
		left: 0 !important;
		right: 0 !important;
		top: 0 !important;
		box-sizing: border-box !important;
	}

	#mega-menu-wrap-menu-1 #mega-menu-menu-1 li.orion-series-card > a.mega-menu-link .mega-description-group,
	body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link .mega-description-group {
		padding: 6px 4px !important;
		min-height: 38px !important;
	}

	#mega-menu-wrap-menu-1 #mega-menu-menu-1 li.orion-series-card > a.mega-menu-link .mega-menu-title,
	#mega-menu-wrap-menu-1 #mega-menu-menu-1 li.orion-series-card > a.mega-menu-link .mega-title-below,
	#mega-menu-wrap-menu-1 #mega-menu-menu-1 li.orion-series-card > a.mega-menu-link .mega-menu-title span,
	#mega-menu-wrap-menu-1 #mega-menu-menu-1 li.orion-series-card > a.mega-menu-link .mega-title-below span,
	body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link .mega-menu-title,
	body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link .mega-title-below,
	body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link .mega-menu-title span,
	body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link .mega-title-below span {
		font-size: 14px !important;
		letter-spacing: 0.05em !important;
	}

	#mega-menu-wrap-menu-1 #mega-menu-menu-1 li.orion-series-card > a.mega-menu-link .mega-menu-title::after,
	#mega-menu-wrap-menu-1 #mega-menu-menu-1 li.orion-series-card > a.mega-menu-link .mega-title-below::after,
	body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link .mega-menu-title::after,
	body > ul.orion-products-mega--fullwidth li.orion-series-card > a.mega-menu-link .mega-title-below::after {
		margin-top: 1px;
		font-size: 9px;
	}
}
