/* ===== Header ===== */
.site-header {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 50;
}
.site-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: min(var(--wrap-hero), 100% - 64px);
	height: 143px;
	margin-inline: auto;
	translate: var(--hero-shift, 0) 0;
}
@media (min-width: 1300px) {
	/* در طرح، هدر و Hero حدود ۳۴px چپ‌تر از مرکز فریم هستند */
	:root { --hero-shift: -34.5px; }
}

.nav { display: flex; align-items: center; }
.nav__list { display: flex; align-items: center; }
.nav--start .nav__list { gap: 38px; }
.nav--start .nav__item:first-child { margin-left: 13.6px; }
.nav--end { gap: 46px; }
.nav--end .nav__list { gap: 48px; }

.nav__item { position: relative; }
.nav__link {
	display: inline-flex;
	align-items: center;
	gap: 3.3px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1;
	color: var(--white);
	white-space: nowrap;
	transition: color .2s;
}
.nav__link:hover,
.nav__item.is-open > .nav__link { color: var(--gold); }
.nav__chev {
	width: 12.7px;
	height: 7.8px;
	margin-top: 2px;
	background: var(--gold);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12.72 7.76'%3E%3Cpath d='M6.36 4.94L11.3 0l1.42 1.4-6.36 6.36L0 1.4 1.42 0z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12.72 7.76'%3E%3Cpath d='M6.36 4.94L11.3 0l1.42 1.4-6.36 6.36L0 1.4 1.42 0z'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .2s;
}
.nav__item.is-open .nav__chev { transform: rotate(180deg); }

/* Dropdown */
.nav__sub {
	position: absolute;
	top: calc(100% + 18px);
	right: -16px;
	min-width: 190px;
	padding: 8px;
	border-radius: 15px;
	background: var(--cream);
	box-shadow: 0 12px 30px rgba(0, 16, 13, .25);
	opacity: 0;
	visibility: hidden;
	translate: 0 6px;
	transition: opacity .2s, translate .2s, visibility .2s;
}
.nav__sub::before { content: ""; position: absolute; inset: -18px 0 auto; height: 18px; }
.nav__sub a {
	display: block;
	padding: 9px 14px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 500;
	color: var(--green-800);
	transition: background .2s;
}
.nav__sub a:hover,
.nav__sub a:focus-visible { background: var(--cream-200); }
.nav__item.has-sub:hover > .nav__sub,
.nav__item.has-sub:focus-within > .nav__sub,
.nav__item.is-open > .nav__sub { opacity: 1; visibility: visible; translate: 0 0; }

/* Brand (logo badge) */
.brand {
	position: absolute;
	top: 0;
	left: calc(50% - 39px);
	width: 117px;
	height: 104px;
	border: 3px solid var(--gold);
	border-top: 0;
	border-radius: 0 0 58.5px 58.5px;
	background: var(--white);
}
.brand__mark {
	position: absolute;
	top: -2px;
	left: 24px; /* 27px از لبه بیرونی منهای بوردر */
	width: 63px;
	height: 92px;
	background: url("../images/logo-mark.png") 50% 0 / 120.34% auto no-repeat;
}

/* CTA */
.header-cta {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	width: 126px;
	height: 39px;
	padding: 0 12.8px 2px 0;
	border-radius: 19.5px;
	background: var(--gold);
	color: var(--white);
	font-size: 19px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	transition: background .2s;
}
.header-cta:hover { background: var(--gold-deep); }
.header-cta__icon {
	position: absolute;
	left: 3px;
	top: 7px;
	width: 30.8px;
	height: 30.8px;
	rotate: -77.52deg;
	background: url("../images/icons/phone.png") center / contain no-repeat;
}

/* Mobile bar */
.mbar { display: none; }

@media (max-width: 1199.98px) {
	.nav--start .nav__list,
	.nav--end .nav__list { gap: 24px; }
	.nav--end { gap: 24px; }
	.nav--start .nav__item:first-child { margin-left: 0; }
	.nav__link { font-size: 16px; }
}

@media (max-width: 991.98px) {
	.site-header__inner {
		width: 100%;
		height: 81px;
		translate: none;
	}
	.nav { display: none; }

	.mbar {
		position: absolute;
		top: 30px;
		left: 15px;
		right: 15px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 43px;
		padding: 0 13px 0 0;
		border-radius: 20px;
		background: color-mix(in srgb, var(--gold) 30%, transparent);
		-webkit-backdrop-filter: blur(2px);
		backdrop-filter: blur(2px);
	}
	.mbar__toggle {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 3px;
		width: 26px;
		height: 36px;
		padding: 0 2px;
	}
	.mbar__toggle span {
		display: block;
		height: 3px;
		border-radius: 3px;
		background: var(--gold);
	}
	.mbar__cta {
		position: relative;
		display: flex;
		align-items: center;
		height: 100%;
		padding: 0 0 0 29.3px;
		margin-left: 0;
		color: var(--gold);
		font-size: 14px;
		font-weight: 700;
		line-height: 1;
	}
	.mbar__cta .header-cta__icon {
		left: 10px;
		top: 10px;
		background-image: url("../images/icons/phone-gold.png");
		width: 24px;
		height: 24px;
		rotate: -48.31deg;
	}

	.brand {
		top: 22.2px;
		left: calc(50% - 44.35px);
		z-index: 2;
		width: 88.7px;
		height: 57.1px;
		border: 2px solid var(--gold);
		border-radius: 20px;
	}
	.brand__mark {
		top: -0.6px;
		left: 25.5px;
		width: 37px;
		height: 54px;
	}
}

/* ===== Mobile drawer ===== */
.mmenu { position: fixed; inset: 0; z-index: 100; }
.mmenu[hidden] { display: none; }
.mmenu__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 16, 13, .6);
	opacity: 0;
	transition: opacity .3s;
}
.mmenu__panel {
	position: absolute;
	inset: 0 0 0 auto;
	display: flex;
	flex-direction: column;
	width: min(300px, 82vw);
	padding: 20px 20px 28px;
	background: var(--green-900);
	color: var(--cream);
	overflow-y: auto;
	translate: 100% 0;
	transition: translate .3s ease;
}
.mmenu.is-open .mmenu__backdrop { opacity: 1; }
.mmenu.is-open .mmenu__panel { translate: 0 0; }

.mmenu__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 16px;
	margin-bottom: 8px;
	border-bottom: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
}
.mmenu__brand {
	display: grid;
	place-items: center;
	width: 64px;
	height: 44px;
	border: 2px solid var(--gold);
	border-radius: 16px;
	background: var(--white);
}
.brand__mark--sm { position: static; width: 28px; height: 40px; }
.mmenu__close {
	position: relative;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--gold) 20%, transparent);
}
.mmenu__close::before,
.mmenu__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: var(--gold);
	translate: -50% -50%;
	rotate: 45deg;
}
.mmenu__close::after { rotate: -45deg; }

.mmenu__list > li { border-bottom: 1px solid rgba(247, 245, 238, .08); }
.mmenu__list a,
.mmenu__group summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 13px 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
}
.mmenu__list a[aria-current="page"] { color: var(--gold); }
.mmenu__group summary { list-style: none; }
.mmenu__group summary::-webkit-details-marker { display: none; }
.mmenu__group summary::after {
	content: "";
	width: 12.7px;
	height: 7.8px;
	background: var(--gold);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12.72 7.76'%3E%3Cpath d='M6.36 4.94L11.3 0l1.42 1.4-6.36 6.36L0 1.4 1.42 0z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12.72 7.76'%3E%3Cpath d='M6.36 4.94L11.3 0l1.42 1.4-6.36 6.36L0 1.4 1.42 0z'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .2s;
}
.mmenu__group[open] summary::after { transform: rotate(180deg); }
.mmenu__group ul { padding: 0 12px 8px 0; }
.mmenu__group ul a { padding: 9px 4px; font-size: 15px; font-weight: 400; opacity: .85; }

.mmenu__cta {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 43px;
	margin-top: 24px;
	border-radius: 20px;
	background: var(--gold);
	color: var(--white);
	font-size: 15px;
	font-weight: 700;
}
.mmenu__cta .header-cta__icon { position: static; width: 24px; height: 24px; rotate: -48.31deg; }

@media (prefers-reduced-motion: reduce) {
	.mmenu__panel, .mmenu__backdrop, .nav__sub { transition: none; }
}
