/* ==========================================================================
   PLYXIO — Header / Mega-Menu CSS
   Append this block to style.css (assumes :root tokens --bg, --surface,
   --cream, --muted, --orange, --teal, --border, --display, --sans already
   exist from the design system). Self-contained otherwise.

   Mega-panel treatment is scoped to menu items with the ".has-mega-menu"
   class, which is added automatically (via functions.php) when the
   "Enable Mega Menu" checkbox is checked on a top-level menu item in
   Appearance > Menus. Items without that class (e.g. "Our Products")
   render as a compact standard dropdown instead.
   ========================================================================== */

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--orange);
	color: #0A0A0A;
	padding: 10px 16px;
	border-radius: 8px;
	font-weight: 600;
}
.skip-link:focus {
	left: 16px;
	top: 16px;
}

/* ---- Glow background (same as reference) ---- */
.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.bg-fx::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at top, rgba(229,129,62,.18), transparent 60%);
}

/* ---- Nav shell ---- */
.nav {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 50;
	transition: background .3s, border-color .3s;
	border-bottom: 1px solid transparent;
}
.nav.scrolled {
	background: rgba(10,10,10,.75);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-bottom-color: var(--border);
}
.nav-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 18px 20px !important;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 130px; height: auto; display: block; }
.brand-dot {
	width: 10px; height: 10px; border-radius: 99px;
	background: var(--orange); box-shadow: 0 0 24px var(--orange);
}
.brand-name {
	font-family: var(--display); font-size: 24px;
	letter-spacing: .18em; color: var(--cream);
}

/* ---- Desktop nav links ---- */
.nav-links { display: none; }
@media (min-width: 900px) { .nav-links { display: block; } }

.nav-links-list {
	display: flex;
	align-items: center;
	gap: 32px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.nav-links-list > li { position: relative; }
.nav-links-list > li > a {
	display: inline-block;
	padding: 8px 0;
	font-size: 14px;
	color: var(--muted);
	transition: color .2s;
}
.nav-links-list > li > a:hover,
.nav-links-list > li.current-menu-item > a,
.nav-links-list > li.current-menu-ancestor > a {
	color: var(--orange) !important;
}

/* ==========================================================================
   MEGA PANEL — only for top-level items with .has-mega-menu
   (currently: Services)
   ==========================================================================

   position:fixed anchors to the VIEWPORT, not the trigger <li>. This
   matters because .nav-links-list > li has position:relative (needed
   for other things), which would otherwise make position:absolute
   here center the panel on wherever the trigger item sits in the nav
   bar rather than on the screen, and since "Services" sits near the
   left edge, a wide panel centered on it ran off both sides. */
.nav-links-list > .menu-item.has-mega-menu > .sub-menu {
	position: fixed;
	top: 100px;
	left: 50%;
	transform: translateX(-50%) translateY(8px);
	width: min(1120px, 94vw);
	background: rgba(10,10,10,.92);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--border);
	border-radius: 18px;
	padding: 40px 44px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px 40px;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .2s, transform .2s, visibility .2s;
}
.nav-links-list > .menu-item.has-mega-menu.mega-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

/* Each mega-panel column = one services_group category */
.nav-links-list > .menu-item.has-mega-menu > .sub-menu > li { list-style: none; }
.nav-links-list > .menu-item.has-mega-menu > .sub-menu > li > a {
	display: block;
	font-family: var(--display);
	font-size: 16px;
	letter-spacing: .04em;
	color: var(--cream);
	text-transform: uppercase;
	padding-bottom: 14px;
	margin-bottom: 16px;
	border-bottom: 1px solid var(--border);
	transition: color .2s;
}
.nav-links-list > .menu-item.has-mega-menu > .sub-menu > li > a:hover {
	color: var(--orange);
}
.nav-links-list > .menu-item.has-mega-menu > .sub-menu > li.current-menu-item > a,
.nav-links-list > .menu-item.has-mega-menu > .sub-menu > li.current-menu-ancestor > a {
	color: var(--orange) !important;
}

/* "View All Services" is always the last direct child of the Services
   panel, added specifically so the mega-menu can show a short, curated
   list per category instead of every service. Style it as a footer
   link spanning the full panel width, not another category header. */
.nav-links-list > .menu-item.has-mega-menu > .sub-menu > li:last-child {
	grid-column: 1 / -1;
	border-top: 1px solid var(--border);
	margin-top: 8px;
	padding-top: 22px;
	text-align: right;
}
.nav-links-list > .menu-item.has-mega-menu > .sub-menu > li:last-child > a {
	display: inline-flex;
	font-family: 'Onest', sans-serif;
	text-transform: none;
	letter-spacing: normal;
	font-size: 15px;
	font-weight: 600;
	color: var(--cream);
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: 0;
	transition: color .2s;
}
.nav-links-list > .menu-item.has-mega-menu > .sub-menu > li:last-child > a:hover {
	color: var(--orange);
}

/* Depth-2 sub-menu = individual services inside a mega-panel column */
.nav-links-list .has-mega-menu .sub-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 13px;
}
.nav-links-list .has-mega-menu .sub-menu .sub-menu li a {
	display: inline-block;
	position: relative;
	font-size: 13px;
	line-height: 1.4;
	color: var(--muted);
	padding-bottom: 2px;
	transition: color .2s, padding-left .2s;
}
.nav-links-list .has-mega-menu .sub-menu .sub-menu li a::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 1px;
	background: var(--teal);
	transition: width .25s ease;
}
.nav-links-list .has-mega-menu .sub-menu .sub-menu li a:hover {
	color: var(--teal);
	padding-left: 6px;
}
.nav-links-list .has-mega-menu .sub-menu .sub-menu li a:hover::after {
	width: 100%;
}
/* Current page: stays highlighted even without hovering */
.nav-links-list .has-mega-menu .sub-menu .sub-menu li.current-menu-item > a {
	color: var(--orange) !important;
	padding-left: 6px;
}
.nav-links-list .has-mega-menu .sub-menu .sub-menu li.current-menu-item > a::after {
	width: 100%;
	background: var(--orange);
}

/* ==========================================================================
   PLAIN DROPDOWN — top-level items WITHOUT .has-mega-menu
   (currently: Our Products, and any future single-column item)
   ========================================================================== */
.nav-links-list > .menu-item-has-children:not(.has-mega-menu) > .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 8px;
	min-width: 220px;
	background: rgba(10,10,10,.92);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 10px;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(8px);
	transition: opacity .2s, transform .2s, visibility .2s;
}
.nav-links-list > .menu-item-has-children:not(.has-mega-menu).mega-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}
.nav-links-list > .menu-item-has-children:not(.has-mega-menu) > .sub-menu > li {
	list-style: none;
}
.nav-links-list > .menu-item-has-children:not(.has-mega-menu) > .sub-menu > li > a {
	display: block;
	padding: 10px 14px;
	border-radius: 8px;
	font-family: 'Onest', sans-serif;
	font-size: 14px;
	color: var(--cream);
	text-transform: none;
	letter-spacing: normal;
	border-bottom: none;
	margin-bottom: 0;
	transition: background .2s, color .2s;
}
.nav-links-list > .menu-item-has-children:not(.has-mega-menu) > .sub-menu > li > a:hover {
	background: rgba(229,129,62,.08);
	color: var(--orange);
}
.nav-links-list > .menu-item-has-children:not(.has-mega-menu) > .sub-menu > li.current-menu-item > a,
.nav-links-list > .menu-item-has-children:not(.has-mega-menu) > .sub-menu > li.current-menu-ancestor > a {
	background: rgba(229,129,62,.08);
	color: var(--orange) !important;
}
/* Any deeper nesting inside a plain dropdown (not expected today, but
   safe fallback if a product ever gets its own sub-items) collapses to
   the same compact link style rather than inheriting mega-panel rules. */
.nav-links-list > .menu-item-has-children:not(.has-mega-menu) .sub-menu .sub-menu {
	list-style: none;
	margin: 4px 0 4px 14px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* ---- CTA button (reuses .btn / .btn-primary from design system) ---- */
.nav-cta { white-space: nowrap; }
/* Mobile header = logo + hamburger only. The CTA pill crowded against
   the hamburger on narrow screens; it's redundant anyway since the
   mobile menu has its own CTA at the bottom (see .mobile-inner). */
@media (max-width: 899px) {
	.nav-cta { display: none; }
}

/* ---- Hamburger ---- */
.menu-btn, .menu-btn:hover, .menu-btn:focus {
	display: grid;
	place-items: center;
	width: 40px; height: 40px;
	background: transparent !important;
	border: none;
	cursor: pointer;
}
.menu-btn span {
	display: block; width: 18px; height: 1px;
	background: var(--cream); position: relative;
}
.menu-btn span::before, .menu-btn span::after {
	content: ""; position: absolute; left: 0; width: 18px; height: 1px;
	background: var(--cream);
}
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
@media (min-width: 900px) { .menu-btn { display: none; } }

/* ---- Mobile full-screen overlay ---- */
.mobile {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 60;
	background: rgba(10,10,10,.97);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	overflow-y: auto;
}
.mobile.open { display: block; }
body.nav-open { overflow: hidden; }
body.nav-open .menu-btn { visibility: hidden; }

/* Own logo + close button row, since this overlay visually covers the
   header bar underneath it — relying on that header peeking through
   doesn't work once the overlay is opaque. */
.mobile-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--border);
}
.mobile-brand { gap: 8px; }

.mobile-close-btn, .mobile-close-btn:hover, .mobile-close-btn:focus {
	display: grid;
	place-items: center;
	width: 40px; height: 40px;
	background: transparent !important;
	border: none;
	cursor: pointer;
	position: relative;
}
.mobile-close-btn span,
.mobile-close-btn span::after {
	content: "";
	position: absolute;
	top: 50%; left: 50%;
	width: 18px; height: 1px;
	background: var(--cream);
	transform-origin: center;
}
.mobile-close-btn span { transform: translate(-50%, -50%) rotate(45deg); }
.mobile-close-btn span::after { transform: translate(-50%, -50%) rotate(-45deg); }

.mobile-inner { padding: 24px 20px 48px; display: flex; flex-direction: column; gap: 4px; }

.mobile-menu-list { list-style: none; margin: 0; padding: 0; }
.mobile-menu-list > li { border-bottom: 1px solid var(--border); }
.mobile-menu-list > li > a {
	display: block;
	padding: 16px 0;
	font-size: 18px;
	color: var(--cream);
}
.mobile-menu-list .menu-item-has-children { position: relative; }
.mobile-accordion-toggle {
	position: absolute;
	right: 0;
	top: 8px;
	width: 32px; height: 32px;
	border-radius: 99px;
	border: 1px solid var(--border) !important;
	background: transparent !important;
	color: var(--cream) !important;
	font-size: 18px;
	cursor: pointer;
	outline: none !important;
	box-shadow: none !important;
	transition: border-color .2s, color .2s, background .2s;
}
.mobile-accordion-toggle:hover,
.mobile-accordion-toggle:focus,
.mobile-accordion-toggle:focus-visible,
.mobile-accordion-toggle:active {
	border-color: var(--orange) !important;
	color: var(--orange) !important;
	background: rgba(229,129,62,.08) !important;
	outline: none !important;
	box-shadow: none !important;
}
.mobile-menu-list .sub-menu {
	list-style: none;
	margin: 4px 0 12px;
	padding: 4px 0 4px 16px;
	border-left: 1px solid var(--border);
	display: none;
	flex-direction: column;
	gap: 14px;
}
.mobile-menu-list .accordion-open > .sub-menu {
	display: flex;
}
.mobile-menu-list .sub-menu .sub-menu {
	padding-left: 16px;
	margin: 8px 0 0;
	gap: 12px;
}
.mobile-menu-list .sub-menu a {
	display: block;
	font-size: 15px;
	color: var(--muted);
	transition: color .2s;
}
.mobile-menu-list .sub-menu a:hover,
.mobile-menu-list .sub-menu a:active {
	color: var(--teal);
}
/* Depth-1 category headers only (direct child of the top-level list's
   own sub-menu), not the nested depth-2 individual service links,
   which should stay the smaller muted style above. On mobile this
   header treatment applies to ALL parent items regardless of
   has-mega-menu, since mobile always renders as an accordion list —
   the mega-panel/dropdown distinction is desktop-only. */
.mobile-menu-list > li > .sub-menu > li > a {
	font-size: 16px;
	color: var(--cream);
	font-weight: 600;
}

main { padding-top: 96px; }
