/**
 * WowZone header — WoW-style nav bar, centered logo crest, spike dividers.
 */

.wz-header {
	--wz-nav-h: 76px;
	--wz-text: #e8ddc8;
	--wz-text-hover: #fffcf0;
	--wz-gold: #c8a84b;
	--wz-gold-light: #f0d882;
	--wz-bronze: #8a7045;
	--wz-bronze-dark: #3e3020;
	position: relative;
	width: 100%;
	height: var(--wz-nav-h);
	z-index: 10000;
	margin: 0;
	padding: 0;
	overflow: visible;
	background: transparent;
}

/* ─── Main bar ─────────────────────────────────────── */
.wz-header__bar {
	position: relative;
	width: 100%;
	height: var(--wz-nav-h);
	overflow: visible;
	/* stone/leather texture from the site's own sprite */
	background-image:
		url("images/misc/header.png"),
		linear-gradient(
			180deg,
			#2b2018 0%,
			#1a1208 50%,
			#120d06 100%
		);
	background-repeat: repeat-x, no-repeat;
	background-position: center -121px, center center;
	background-size: auto 121px, 100% 100%;
	/* top gold line — like the reference */
	border-top: 2px solid;
	border-top-color: var(--wz-gold);
	border-bottom: 1px solid #0a0704;
	box-shadow:
		0 2px 0 var(--wz-bronze-dark),
		0 4px 18px rgba(0, 0, 0, 0.7),
		inset 0 1px 0 rgba(255, 230, 140, 0.06);
}

/* subtle inner vignette */
.wz-header__bar::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg,
			rgba(0,0,0,0.35) 0%,
			transparent 12%,
			transparent 88%,
			rgba(0,0,0,0.35) 100%),
		linear-gradient(180deg,
			rgba(255,220,100,0.04) 0%,
			transparent 40%,
			rgba(0,0,0,0.18) 100%);
	pointer-events: none;
}

/* ─── Grid rail ─────────────────────────────────────── */
.wz-header__rail {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	/* stretch so side columns fill full bar height */
	align-items: stretch;
	max-width: 1160px;
	height: 100%;
	margin: 0 auto;
	padding: 0 16px;
	gap: 0;
}

/* ─── Side navs ─────────────────────────────────────── */
.wz-header__side {
	display: flex;
	align-items: stretch;
	min-width: 0;
}

.wz-header__side--end   { justify-content: flex-end; }
.wz-header__side--start { justify-content: flex-start; }

html[dir="ltr"] .wz-header__side--end   { justify-content: flex-start; }
html[dir="ltr"] .wz-header__side--start { justify-content: flex-end; }

/* ─── Nav list ──────────────────────────────────────── */
.wz-header__nav {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	list-style: none;
	margin: 0;
	padding: 0;
	direction: rtl;
}

html[dir="ltr"] .wz-header__nav { direction: ltr; }

.wz-header__item {
	position: relative;
	display: flex;
	align-items: stretch;
	/* explicit height = bar height so top:100% on dropdown is reliable */
	height: var(--wz-nav-h, 76px);
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* ─── WoW spike dividers ─────────────────────────────── */
.wz-header__item + .wz-header__item::before {
	content: "";
	/* keep spike centered vertically regardless of stretch */
	align-self: center;
	flex: 0 0 14px;
	width: 14px;
	height: 38px;
	margin: 0;
	background: linear-gradient(
		90deg,
		transparent           0%,
		var(--wz-bronze-dark) 20%,
		var(--wz-bronze)      50%,
		var(--wz-bronze-dark) 80%,
		transparent           100%
	);
	clip-path: polygon(
		50%  0%,
		72%  8%,
		62% 24%,
		78% 38%,
		62% 50%,
		78% 62%,
		62% 76%,
		72% 92%,
		50% 100%,
		28% 92%,
		38% 76%,
		22% 62%,
		38% 50%,
		22% 38%,
		38% 24%,
		28%  8%
	);
	opacity: 0.88;
}

/* ─── Nav links ─────────────────────────────────────── */
.wz-header__link,
.wz-header__trigger {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	/* fill the full bar height — no empty space top/bottom */
	align-self: stretch;
	padding: 0 22px;
	border: none;
	background: transparent;
	color: var(--wz-text);
	font-family: Vazirmatn, Tahoma, Arial, sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.02em;
	text-decoration: none;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
	cursor: pointer;
	white-space: nowrap;
	-webkit-font-smoothing: antialiased;
	transition: color 0.14s ease, text-shadow 0.14s ease;
	box-sizing: border-box;
}

.wz-header__link:hover,
.wz-header__trigger:hover,
.wz-header__item--has-sub:hover > .wz-header__trigger {
	color: var(--wz-gold-light);
	text-shadow: 0 0 10px rgba(240, 200, 60, 0.35), 0 1px 2px rgba(0,0,0,0.9);
}

.wz-header__chevron {
	display: inline-block;
	width: 0;
	height: 0;
	margin-top: 2px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	opacity: 0.65;
	transition: transform 0.12s ease;
}

.wz-header__item--has-sub:hover .wz-header__chevron {
	transform: rotate(180deg);
}

/* ─── Logo center column ────────────────────────────── */
.wz-header__logo-wrap {
	position: relative;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	overflow: visible;
	padding: 0 16px;
}

.wz-header__logo {
	display: block;
	text-decoration: none;
	line-height: 0;
	position: relative;
}

.wz-header__logo-img {
	display: block;
	max-width: min(320px, 36vw);
	max-height: var(--wz-logo-max-height, 120px);
	width: auto;
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
}

.wz-header__logo-text {
	display: inline-block;
	padding: 8px 16px;
	font-family: Vazirmatn, Tahoma, Arial, sans-serif;
	font-size: 24px;
	font-weight: 700;
	color: var(--wz-gold-light);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

/* ─── Dropdown ──────────────────────────────────────── */
.wz-header__sub {
	position: absolute;
	/* flush to bar bottom — use same variable the bar height uses */
	top: var(--wz-nav-h, 76px);
	right: 0;
	left: auto;
	min-width: 200px;
	margin: 0;
	padding: 4px 0;
	list-style: none;
	direction: rtl;
	text-align: right;
	background: linear-gradient(180deg, #241c12 0%, #18110a 100%);
	border: 1px solid var(--wz-bronze-dark);
	border-top: 1px solid var(--wz-bronze);
	box-shadow:
		0 8px 24px rgba(0, 0, 0, 0.65),
		inset 0 1px 0 rgba(200, 160, 75, 0.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-3px);
	transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
	z-index: 120;
}

html[dir="ltr"] .wz-header__sub {
	right: auto;
	left: 0;
	text-align: left;
	direction: ltr;
}

/* hover bridge — matches the new dropdown anchor */
.wz-header__item--has-sub::after {
	content: "";
	position: absolute;
	top: var(--wz-nav-h, 76px);
	right: 0;
	left: 0;
	height: 8px;
}

.wz-header__item--has-sub:hover > .wz-header__sub {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.wz-header__sub li {
	margin: 0;
	padding: 0;
}

.wz-header__sub a {
	display: block;
	padding: 10px 18px;
	color: #c8b890;
	font-family: Vazirmatn, Tahoma, Arial, sans-serif;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.1s ease, background 0.1s ease;
}

.wz-header__sub li + li a {
	border-top: 1px solid rgba(200, 160, 75, 0.1);
}

.wz-header__sub a:hover {
	color: var(--wz-gold-light);
	background: rgba(200, 160, 75, 0.07);
}

/* ─── Mobile ────────────────────────────────────────── */
@media (max-width: 900px) {
	.wz-header {
		height: auto;
	}

	.wz-header__bar {
		height: auto;
		padding: 8px 0 10px;
	}

	.wz-header__rail {
		display: flex;
		flex-direction: column;
		align-items: center;
		height: auto;
		padding: 0 8px;
		gap: 4px;
	}

	.wz-header__logo-wrap {
		order: -1;
		padding: 6px 0;
	}

	.wz-header__side {
		justify-content: center !important;
		height: auto;
	}

	.wz-header__nav {
		flex-wrap: wrap;
		justify-content: center;
		height: auto;
	}

	.wz-header__item {
		height: auto;
	}

	.wz-header__link,
	.wz-header__trigger {
		height: auto;
		min-height: 42px;
		padding: 0 14px;
		font-size: 15px;
	}

	.wz-header__item + .wz-header__item::before {
		height: 28px;
		flex: 0 0 12px;
		width: 12px;
	}

	.wz-header__logo-img {
		max-width: min(260px, 76vw);
	}
}

/* ─── WowZone layout overrides ──────────────────────── */
body.wz-layout-active .wc-nav {
	display: none !important;
}

body.wz-layout-active #header {
	position: absolute !important;
	top: 0;
	left: 0;
	right: 0;
	height: var(--wz-nav-h, 76px) !important;
	min-height: 0 !important;
	background: transparent !important;
	overflow: visible !important;
	pointer-events: none;
}

body.wz-layout-active #header .wc-header-bar {
	display: block !important;
	background: transparent !important;
	height: var(--wz-nav-h, 76px) !important;
	min-height: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow: visible !important;
	pointer-events: none;
}

body.wz-layout-active .wz-header,
body.wz-layout-active .wz-header__bar,
body.wz-layout-active .wz-header__link,
body.wz-layout-active .wz-header__trigger,
body.wz-layout-active .wz-header__logo,
body.wz-layout-active .wz-header__sub,
body.wz-layout-active .wz-header__sub a {
	pointer-events: auto;
}

body.wz-layout-active .slider,
body.wz-layout-active .sub_head_image {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

body.wz-layout-active #warcry-slider.slider {
	position: relative;
	display: block !important;
	width: 100%;
	height: clamp(340px, 44vw, 420px) !important;
	overflow: hidden;
	background: #0a0908;
}

body.wz-layout-active #warcry-slider .warcry-bg-slide {
	height: 100% !important;
	background-position: center 22% !important;
	background-size: cover;
}

body.wz-layout-active #IndexTextFader {
	top: clamp(130px, 30vw, 175px) !important;
}

body.wz-layout-active .sub_head_image {
	height: clamp(200px, 32vw, 260px) !important;
}

body.wz-layout-active .sub_head_image > div {
	background-position: center 22% !important;
}
