/* Game Overdrive header + offcanvas redesign (2026-07-01). Replaces the old go-v24/v166/v197/v198/v199
   header system. Uses the site's existing --go-* custom properties so light/dark mode is automatic. */

.go-hdr2 {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 9999;
	background: var(--go-bg-secondary, #fff);
	border-bottom: 1px solid var(--go-border-primary, rgba(8, 10, 16, .14));
	transition: box-shadow .18s ease;
}

.go-hdr2.is-scrolled {
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.go-hdr2-inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	height: 56px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 16px;
}

.go-hdr2-menu-btn {
	justify-self: start;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
}

.go-hdr2-menu-btn span {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--go-text-primary, #080a10);
	border-radius: 2px;
	transition: transform .2s ease, opacity .2s ease;
}

.go-hdr2-menu-btn span:last-child {
	width: 68%;
}

.go-hdr2-logo {
	justify-self: center;
	display: flex;
	align-items: center;
}

.go-hdr2-logo-img {
	height: 26px;
	width: auto;
	display: block;
}

.go-hdr2-actions {
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 6px;
}

.go-hdr2-icon-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: var(--go-text-primary, #080a10);
	border-radius: 8px;
	transition: background-color .18s ease, color .18s ease;
}

.go-hdr2-icon-btn:hover,
.go-hdr2-icon-btn:focus-visible {
	background: var(--go-hover-soft, rgba(40, 0, 240, .08));
	color: var(--go-accent, #2817f1);
	outline: none;
}

.go-hdr2-icon-btn svg {
	width: 19px;
	height: 19px;
}

.go-hdr2-actions .newsx-dark-mode-switcher {
	margin-left: 4px;
}

/* Logo / brand mark swap between light and dark mode. */
html body:not(.wp-admin):not(.dark-mode):not(.newsx-dark-mode):not(.is-dark-theme) .go-hdr2-logo-img--dark,
html body:not(.wp-admin):not(.dark-mode):not(.newsx-dark-mode):not(.is-dark-theme) .go-hdr2-offcanvas-brand-img--dark {
	display: none;
}

html body.dark-mode:not(.wp-admin) .go-hdr2-logo-img--light,
html body.newsx-dark-mode:not(.wp-admin) .go-hdr2-logo-img--light,
html body.is-dark-theme:not(.wp-admin) .go-hdr2-logo-img--light,
html.go-root-dark-mode body:not(.wp-admin) .go-hdr2-logo-img--light,
html[data-theme="dark"] body:not(.wp-admin) .go-hdr2-logo-img--light,
html body.dark-mode:not(.wp-admin) .go-hdr2-offcanvas-brand-img--light,
html body.newsx-dark-mode:not(.wp-admin) .go-hdr2-offcanvas-brand-img--light,
html body.is-dark-theme:not(.wp-admin) .go-hdr2-offcanvas-brand-img--light,
html.go-root-dark-mode body:not(.wp-admin) .go-hdr2-offcanvas-brand-img--light,
html[data-theme="dark"] body:not(.wp-admin) .go-hdr2-offcanvas-brand-img--light {
	display: none;
}

/* Offcanvas */

.go-hdr2-offcanvas-layer {
	position: fixed;
	inset: 0;
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition: opacity .24s ease, visibility 0s linear .24s;
}

body.go-hdr2-open .go-hdr2-offcanvas-layer {
	opacity: 1;
	visibility: visible;
	transition: opacity .24s ease, visibility 0s;
}

.go-hdr2-offcanvas-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 6, 10, .56);
}

.go-hdr2-offcanvas-panel {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: min(420px, 86vw);
	background: var(--go-bg-secondary, #fff);
	color: var(--go-text-primary, #080a10);
	display: flex;
	flex-direction: column;
	padding: 18px 22px 28px;
	box-sizing: border-box;
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}

body.go-hdr2-open .go-hdr2-offcanvas-panel {
	transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
	.go-hdr2-offcanvas-layer,
	.go-hdr2-offcanvas-panel {
		transition-duration: 1ms !important;
	}
}

.go-hdr2-offcanvas-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.go-hdr2-offcanvas-brand-img {
	height: 22px;
	width: auto;
	display: block;
}

.go-hdr2-offcanvas-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	background: transparent;
	color: var(--go-text-primary, #080a10);
	cursor: pointer;
	border-radius: 8px;
}

.go-hdr2-offcanvas-close:hover,
.go-hdr2-offcanvas-close:focus-visible {
	background: var(--go-hover-soft, rgba(40, 0, 240, .08));
	outline: none;
}

.go-hdr2-offcanvas-close svg {
	width: 20px;
	height: 20px;
}

.go-hdr2-offcanvas-nav {
	display: flex;
	flex-direction: column;
}

.go-hdr2-offcanvas-nav a {
	font-size: clamp(22px, 5.4vw, 28px);
	font-weight: 500;
	letter-spacing: -.02em;
	line-height: 1.25;
	color: var(--go-text-primary, #080a10);
	text-decoration: none;
	padding: 10px 0;
	border-bottom: 1px solid var(--go-border-primary, rgba(8, 10, 16, .14));
	transition: color .18s ease;
}

.go-hdr2-offcanvas-nav a:last-child {
	border-bottom: none;
}

.go-hdr2-offcanvas-nav a:hover,
.go-hdr2-offcanvas-nav a:focus-visible {
	color: var(--go-accent, #2817f1);
	outline: none;
}

.go-hdr2-offcanvas-extra {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	margin-top: 22px;
}

.go-hdr2-offcanvas-extra a {
	font-size: 13px;
	font-weight: 500;
	color: var(--go-text-secondary, var(--go-text-primary));
	opacity: .72;
	text-decoration: none;
}

.go-hdr2-offcanvas-extra a:hover,
.go-hdr2-offcanvas-extra a:focus-visible {
	opacity: 1;
	color: var(--go-accent, #2817f1);
	outline: none;
}

@media (min-width: 782px) {
	.go-hdr2-inner {
		height: 60px;
		padding: 0 24px;
	}

	.go-hdr2-logo-img {
		height: 28px;
	}

	.go-hdr2-offcanvas-panel {
		width: min(460px, 40vw);
	}
}
