/* Essential Circuit header */
.ec-skip-link {
	position: fixed;
	top: -100px;
	left: 16px;
	z-index: 10000;
	padding: 12px 18px;
	border-radius: 0 0 8px 8px;
	background: var(--ec-orange);
	color: var(--ec-dark);
	font-weight: 700;
}

.ec-skip-link:focus {
	top: 0;
}

.ec-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--ec-white);
	box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.admin-bar .ec-header {
	top: 32px;
}

.ec-header__utility {
	border-bottom: 1px solid var(--ec-border);
}

.ec-header__inner,
.ec-nav__inner {
	width: min(100% - var(--ec-content-gutter), var(--ec-content-width));
	margin-inline: auto;
}

.ec-header__inner {
	display: grid;
	grid-template-columns: 180px minmax(280px, 1fr) auto;
	align-items: center;
	gap: clamp(18px, 2.5vw, 40px);
	min-height: 86px;
}

.ec-brand,
.ec-brand__link,
.custom-logo-link {
	display: flex;
	align-items: center;
}

.ec-brand__image,
.custom-logo {
	display: block;
	width: auto;
	max-width: 180px;
	height: 58px;
	object-fit: contain;
}

.ec-search {
	position: relative;
	display: flex;
	align-items: center;
	height: 50px;
	border: 1px solid var(--ec-border);
	border-radius: var(--ec-control-radius);
	background: var(--ec-light-gray);
	transition: border-color var(--ec-transition-fast), box-shadow var(--ec-transition-fast);
}

.ec-search:focus-within {
	border-color: var(--ec-orange);
	box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15);
}

.ec-icon {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ec-search__icon {
	flex: 0 0 auto;
	margin-left: 17px;
	color: var(--ec-text-muted);
}

.ec-search input {
	min-width: 0;
	flex: 1;
	align-self: stretch;
	padding: 0 12px;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--ec-text);
}

.ec-search input::placeholder {
	color: var(--ec-text-muted);
}

.ec-search button {
	align-self: stretch;
	padding: 0 20px;
	border: 0;
	border-radius: 0 13px 13px 0;
	background: var(--ec-dark);
	color: var(--ec-white);
	font-weight: 600;
	cursor: pointer;
}

.ec-header__actions,
.ec-weather,
.ec-account {
	display: flex;
	align-items: center;
}

.ec-header__actions {
	gap: 10px;
}

.ec-weather {
	gap: 8px;
	padding-right: 14px;
	border-right: 1px solid var(--ec-border);
}

.ec-weather > span {
	display: grid;
	line-height: 1.15;
}

.ec-weather small {
	color: var(--ec-text-muted);
	font-size: 11px;
}

.ec-icon-button,
.ec-account,
.ec-menu-toggle {
	justify-content: center;
	min-width: var(--ec-control-height);
	height: var(--ec-control-height);
	border: 1px solid var(--ec-border);
	border-radius: var(--ec-control-radius);
	background: var(--ec-white);
	color: var(--ec-text);
}

.ec-icon-button,
.ec-menu-toggle {
	cursor: pointer;
}

.ec-account {
	gap: 7px;
	padding: 0 12px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}

.ec-brief-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--ec-control-height);
	padding: 0 19px;
	border-radius: var(--ec-control-radius);
	background: var(--ec-orange);
	color: var(--ec-dark);
	text-decoration: none;
	white-space: nowrap;
	font-weight: 700;
	box-shadow: 0 6px 16px rgba(255, 122, 0, 0.22);
}

.ec-icon-button:hover,
.ec-account:hover,
.ec-menu-toggle:hover {
	border-color: var(--ec-orange);
}

.ec-icon-button:disabled {
	cursor: not-allowed;
	opacity: 0.58;
}

.ec-icon-button:disabled:hover {
	border-color: var(--ec-border);
}

.ec-brief-button:hover {
	background: var(--ec-orange-hover);
}

.ec-header a:focus-visible,
.ec-header button:focus-visible {
	outline: 3px solid rgba(255, 122, 0, 0.45);
	outline-offset: 3px;
}

.ec-nav {
	background: var(--ec-dark);
	color: var(--ec-white);
}

.ec-nav__list {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(18px, 2.2vw, 34px);
	min-height: 50px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ec-nav__list a {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 50px;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
	font-size: 14px;
	font-weight: 600;
}

.ec-nav__list a::after {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 3px;
	background: var(--ec-orange);
	content: "";
	transform: scaleX(0);
	transition: transform 160ms ease;
}

.ec-nav__list a:hover::after,
.ec-nav__list a:focus-visible::after,
.ec-nav__list .current-menu-item > a::after,
.ec-nav__list .current_page_item > a::after {
	transform: scaleX(1);
}

.ec-menu-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
	padding: 0 10px;
}

.ec-menu-toggle span[aria-hidden="true"] {
	display: block;
	width: 20px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 160ms ease, opacity 160ms ease;
}

@media (max-width: 1180px) {
	.ec-header__inner {
		grid-template-columns: 150px minmax(240px, 1fr) auto;
	}

	.ec-brand__image,
	.custom-logo {
		max-width: 150px;
		height: 52px;
	}

	.ec-weather,
	.ec-account span {
		display: none;
	}

	.ec-weather {
		padding: 0;
		border: 0;
	}

	.ec-nav__list {
		justify-content: flex-start;
		overflow-x: auto;
		overscroll-behavior-inline: contain;
		scrollbar-width: thin;
	}
}

@media (max-width: 782px) {
	.admin-bar .ec-header {
		top: 46px;
	}

	.ec-header__inner,
	.ec-nav__inner {
		width: min(100% - var(--ec-content-gutter-mobile), var(--ec-content-width));
	}

	.ec-header__inner {
		grid-template-columns: 1fr auto;
		gap: 12px;
		padding: 12px 0;
	}

	.ec-brand__image,
	.custom-logo {
		height: 46px;
	}

	.ec-search {
		grid-column: 1 / -1;
		grid-row: 2;
		height: 46px;
	}

	.ec-search button {
		padding: 0 16px;
	}

	.ec-weather,
	.ec-icon-button,
	.ec-account {
		display: none;
	}

	.ec-brief-button {
		min-height: var(--ec-control-height);
		padding: 0 13px;
		font-size: 13px;
	}

	.ec-menu-toggle {
		display: flex;
	}

	.ec-menu-toggle[aria-expanded="true"] span[aria-hidden="true"]:nth-of-type(1) {
		transform: translateY(6px) rotate(45deg);
	}

	.ec-menu-toggle[aria-expanded="true"] span[aria-hidden="true"]:nth-of-type(2) {
		opacity: 0;
	}

	.ec-menu-toggle[aria-expanded="true"] span[aria-hidden="true"]:nth-of-type(3) {
		transform: translateY(-6px) rotate(-45deg);
	}

	.ec-nav {
		display: none;
		max-height: calc(100vh - 140px);
		overflow-y: auto;
	}

	.ec-nav.is-open {
		display: block;
	}

	.ec-nav__list {
		display: grid;
		gap: 0;
		padding: 10px 0 16px;
		overflow: visible;
	}

	.ec-nav__list a {
		min-height: 44px;
		padding: 0 4px;
		font-size: 15px;
	}

	.ec-nav__list a::after {
		right: auto;
		width: 34px;
	}
}

@media (max-width: 420px) {
	.ec-brief-button {
		display: none;
	}

	.ec-search input {
		font-size: 14px;
	}
}

@media (max-width: 360px) {
	.ec-search button {
		padding-inline: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ec-header *,
	.ec-header *::before,
	.ec-header *::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
