/* Global site header (header.php) — loaded on every front-end page.
   Self-contained, like footer.css: the theme's old main.css (which used to
   style .header/.menu-toggle/etc.) is gone, so this is a functional rebuild
   rather than a recovery of the exact original design. */

:root {
	--color-accent: #a61c24;
	--color-accent-dark: #8a161d;
	--color-ink: #101f2e;
	--font-heading: 'Poppins', 'Segoe UI', sans-serif;
	--transition: 200ms ease;
	--header-height: 84px;
}

/* Fixed header needs the page content pushed down by its own height,
   since position: fixed takes it out of normal document flow. */


.header {
	background: #fff;
	box-shadow: 0 2px 8px rgba(8, 28, 48, 0.06);
	position: sticky;
	top: 0;
	inset-inline: 0;
	z-index: 50;
}
.header-box {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-block: 14px;
}
.header .logo img {
	display: block;
	height: 66px;
	width: auto;
}

.header-box nav {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
}
.main-nav {
	display: flex;
	align-items: center;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.main-nav a {
	color: var(--color-ink);
	text-decoration: none;
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 15px;
	transition: color var(--transition);
}
.main-nav a:hover,
.main-nav a.current-ref {
	color: var(--color-accent);
}

.header__right {
	display: flex;
	align-items: center;
	gap: 16px;
}
.header__phone {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--color-accent);
	text-decoration: none;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 15px;
	white-space: nowrap;
}
.header__phone svg {
	width: 18px;
	height: 18px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 22px;
	border-radius: 8px;
	background: var(--color-accent);
	color: #fff;
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--transition);
}
.btn:hover {
	background: var(--color-accent-dark);
}

/* Mobile nav toggle — assets/js/main.js already toggles `.is-active` on
   .header .menu-toggle / .header nav on click; this is the missing CSS
   half of that behavior. */
.menu-toggle-box {
	display: none;
	cursor: pointer;
}
.menu-toggle {
	position: relative;
	display: block;
	width: 26px;
	height: 2px;
	background: var(--color-ink);
	transition: background-color var(--transition);
}
.menu-toggle::before,
.menu-toggle::after {
	content: '';
	position: absolute;
	left: 0;
	width: 26px;
	height: 2px;
	background: var(--color-ink);
	transition: transform var(--transition);
}
.menu-toggle::before {
	top: -8px;
}
.menu-toggle::after {
	top: 8px;
}
.menu-toggle small {
	display: block;
	width: 26px;
	height: 2px;
	background: var(--color-ink);
	transition: opacity var(--transition);
}
.header .menu-toggle.is-active,
.header .menu-toggle-box.is-active .menu-toggle {
	background: transparent;
}
.header .menu-toggle.is-active::before,
.header .menu-toggle-box.is-active .menu-toggle::before {
	top: 0;
	transform: rotate(45deg);
}
.header .menu-toggle.is-active::after,
.header .menu-toggle-box.is-active .menu-toggle::after {
	top: 0;
	transform: rotate(-45deg);
}
.header .menu-toggle.is-active small,
.header .menu-toggle-box.is-active .menu-toggle small {
	opacity: 0;
}

@media (max-width: 900px) {
	.menu-toggle-box {
		display: flex;
		align-items: center;
	}
	.header-box nav {
		position: absolute;
		inset-inline: 0;
		top: 100%;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		background: #fff;
		box-shadow: 0 12px 24px rgba(8, 28, 48, 0.12);
		padding: 16px 24px;
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		transition:
			opacity var(--transition),
			transform var(--transition),
			visibility var(--transition);
	}
	.header-box nav.is-active {
		opacity: 1;
		transform: translateY(0);
		visibility: visible;
	}
	.main-nav {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		width: 100%;
	}
	.main-nav a {
		display: block;
		width: 100%;
		padding-block: 10px;
	}
	/* header__right is a sibling of nav, not part of its dropdown, so it
	   stays visible in the header row on mobile — just tightened up. The
	   CTA button is dropped on mobile; the phone number (with its digits)
	   stays as the one visible contact action. */
	.header__right {
		gap: 10px;
	}
	.header__right .btn {
		display: none;
	}
}
