/* =========================================================
   ZG8 LAB Custom Header
   Scoped entirely under .zg8lh / .zg8lh-drawer / .zg8lh-overlay
   ========================================================= */

/* Scoped reset — guarantees no theme box-sizing default can break our layout math */
.zg8lh,
.zg8lh *,
.zg8lh-drawer,
.zg8lh-drawer *,
.zg8lh-overlay {
	box-sizing: border-box;
}

.zg8lh {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	width: 100%;
	padding: clamp(12px, 1.4vw, 18px) clamp(10px, 1.8vw, 22px) 0;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.zg8lh__frame {
	position: relative;
	max-width: 1240px;
	margin: 0 auto;
	padding: clamp(6px, 1.2vw, 12px);
}

/* Reserves space at the top of the page so fixed header never overlaps content */
.zg8lh-spacer {
	width: 100%;
}

/* ---------------- Corner brackets ---------------- */

.zg8lh__corner {
	position: absolute;
	width: clamp(20px, 2.6vw, 30px);
	height: clamp(20px, 2.6vw, 30px);
	border: 2.5px solid rgba(255, 255, 255, 0.8);
	pointer-events: none;
}

.zg8lh__corner--tl {
	top: 0;
	left: 0;
	border-right: none;
	border-bottom: none;
}
.zg8lh__corner--tr {
	top: 0;
	right: 0;
	border-left: none;
	border-bottom: none;
}
.zg8lh__corner--bl {
	bottom: 0;
	left: 0;
	border-right: none;
	border-top: none;
}
.zg8lh__corner--br {
	bottom: 0;
	right: 0;
	border-left: none;
	border-top: none;
}

/* ---------------- Glass bar ---------------- */

.zg8lh__bar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(10px, 2vw, 28px);
	padding: 10px clamp(14px, 2.4vw, 26px);
	border-radius: 14px;
	background: rgba(11, 13, 11, 0.46);
	border: 1px solid rgba(255, 255, 255, 0.09);
	backdrop-filter: blur(22px) saturate(140%);
	-webkit-backdrop-filter: blur(22px) saturate(140%);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
}

/* ---------------- Logo ---------------- */

.zg8lh__logo-link {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	flex-shrink: 0;
}

.zg8lh__logo-img {
	display: block;
	width: var(--zg8lh-logo-w, 120px);
	height: var(--zg8lh-logo-h, 40px);
	object-fit: contain;
}

.zg8lh__logo-fallback {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #fff;
	line-height: 1;
}

.zg8lh__logo-bracket {
	font-size: 20px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.55);
}

.zg8lh__logo-text {
	display: flex;
	flex-direction: column;
}

.zg8lh__logo-line {
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.5px;
	color: #fff;
}

.zg8lh__logo-line--sub {
	font-size: 10px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.6);
	letter-spacing: 2px;
	margin-top: 1px;
}

/* ---------------- Desktop nav ---------------- */

.zg8lh__nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	min-width: 0;
}

.zg8lh__menu {
	display: flex;
	align-items: center;
	gap: clamp(14px, 2vw, 30px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.zg8lh__menu li {
	margin: 0;
}

.zg8lh__menu a,
#zg8lh-menu-desktop a {
	position: relative;
	display: inline-block;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	color: #9a9f98 !important;
	white-space: nowrap;
	padding-bottom: 5px;
	transition: color 0.2s ease;
}

.zg8lh__menu a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background: #AFF502;
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.zg8lh__menu a:hover,
#zg8lh-menu-desktop a:hover {
	color: #AFF502 !important;
}

.zg8lh__menu a:hover::after {
	transform: scaleX(1);
}

.zg8lh__menu li.current-menu-item > a,
.zg8lh__menu li.current_page_item > a,
#zg8lh-menu-desktop li.current-menu-item > a,
#zg8lh-menu-desktop li.current_page_item > a {
	color: #AFF502 !important;
	font-weight: 700;
}

.zg8lh__menu li.current-menu-item > a::after,
.zg8lh__menu li.current_page_item > a::after {
	transform: scaleX(1);
}

/* ---------------- Actions / CTA ---------------- */

.zg8lh__actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
}

.zg8lh__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #AFF502 !important;
	color: #10130d !important;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	padding: 10px 18px;
	border-radius: 8px !important;
	border: none;
	white-space: nowrap;
	transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}

.zg8lh__cta svg {
	flex-shrink: 0;
}

.zg8lh__cta:hover {
	background: #c3ff3d !important;
	color: black !important;
	transform: translateY(-1px);
}

/* ---------------- Burger (hidden on desktop) ---------------- */

.zg8lh__burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 38px;
	height: 38px;
	padding: 0;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 10px;
	cursor: pointer;
	flex-shrink: 0;
}

button#zg8lh-burger:hover{
    background-color: #AFF502 !important;
    color: black !important;
    border: none;
}

.zg8lh__burger span {
	display: block;
	width: 18px;
	height: 2px;
	background: #ffffff !important;
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.zg8lh__burger[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.zg8lh__burger[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}
.zg8lh__burger[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ---------------- Overlay ---------------- */

.zg8lh-overlay {
	position: fixed;
	inset: 0;
	background: rgba(6, 8, 6, 0.55);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 9998;
}

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

body.zg8lh-noscroll {
	overflow: hidden;
}

/* ---------------- Off-canvas drawer ---------------- */

.zg8lh-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(320px, 86vw);
	max-width: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	background: rgba(12, 14, 11, 0.9);
	backdrop-filter: blur(24px) saturate(160%);
	-webkit-backdrop-filter: blur(24px) saturate(160%);
	border-left: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: -10px 0 40px rgba(0, 0, 0, 0.35);
	z-index: 10000;
	display: flex;
	flex-direction: column;
	padding: max(18px, env(safe-area-inset-top)) 20px 20px;
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.zg8lh-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 30px;
	flex-shrink: 0;
}

.zg8lh-drawer__logo {
	min-width: 0;
}

.zg8lh-drawer__logo img {
	display: block;
	width: 90px;
	max-width: 100%;
	height: auto;
}

.zg8lh-drawer__close {
	position: relative;
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.zg8lh-drawer__close:hover {
	background: rgba(175, 245, 2, 0.12);
	border-color: #AFF502;
}

.zg8lh-drawer__close-bar {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 2px;
	background: #ffffff !important;
	border-radius: 2px;
	pointer-events: none;
}

.zg8lh-drawer__close-bar:nth-child(1) {
	transform: translate(-50%, -50%) rotate(45deg);
}

.zg8lh-drawer__close-bar:nth-child(2) {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.zg8lh-drawer__close:hover .zg8lh-drawer__close-bar {
	background: #AFF502 !important;
}

.zg8lh-drawer__nav {
	flex: 1 1 auto;
}

.zg8lh-drawer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.zg8lh-drawer__menu a,
#zg8lh-menu-mobile a {
	display: block;
	padding: 12px 4px;
	text-decoration: none;
	font-size: 16px;
	font-weight: 600;
	color: #9a9f98 !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	transition: color 0.2s ease, border-color 0.2s ease;
}

.zg8lh-drawer__menu a:hover,
#zg8lh-menu-mobile a:hover {
	color: #AFF502 !important;
	border-bottom-color: #AFF502;
}

.zg8lh-drawer__menu li.current-menu-item > a,
.zg8lh-drawer__menu li.current_page_item > a,
#zg8lh-menu-mobile li.current-menu-item > a,
#zg8lh-menu-mobile li.current_page_item > a {
	color: #AFF502 !important;
	border-bottom-color: #AFF502;
}

.zg8lh-drawer__cta {
	justify-content: center;
	margin-top: 20px;
}

/* ---------------- Responsive breakpoints ---------------- */

/* Tablet: collapse the inline nav into the burger/drawer */
@media (max-width: 900px) {
	.zg8lh__nav {
		display: none;
	}
	.zg8lh__burger {
		display: inline-flex;
	}
	.zg8lh__cta {
		padding: 9px 14px;
		font-size: 12px;
	}
}

/* Small tablet: tighten spacing further while keeping corners intact */
@media (max-width: 600px) {
	.zg8lh {
		padding: 12px 14px 0;
	}
	.zg8lh__frame {
		padding: 5px;
	}
	.zg8lh__bar {
		padding: 8px 12px;
		gap: 10px;
	}
	.zg8lh__cta span,
	.zg8lh__cta {
		font-size: 11px;
		padding: 8px 12px;
	}
}

@media (max-width: 360px) {
	.zg8lh__cta {
		padding: 7px 10px;
		font-size: 10px;
		gap: 5px;
	}
	.zg8lh__cta svg {
		width: 11px;
		height: 11px;
	}
}
