/* Header — sticky cream bar, mega-panel nav, mobile slide-down panel.
   Values measured from the reference compiled CSS; written fresh. */

:root { --wp-admin-bar-height: 0px; }
body.admin-bar { --wp-admin-bar-height: 32px; }
@media screen and (max-width: 782px) {
	body.admin-bar { --wp-admin-bar-height: 46px; }
}

/* ------------------------------------------------------------------ Bar */

.header {
	align-items: center;
	background: var(--color-brass-3);
	color: var(--color-soft-white);
	display: flex;
	height: var(--header-height);
	justify-content: space-between;
	padding: 0 var(--grid-col-gutter);
	position: sticky;
	top: var(--wp-admin-bar-height, 0px);
	width: 100%;
	z-index: 99;
}
.header--scrolled { box-shadow: 0 1px 0 0 var(--color-gray-300); }

.header a {
	text-decoration: none;
	transition-property: background-color, border-color, color;
	transition-duration: var(--transition-time);
	transition-timing-function: var(--transition-easing);
}
.header a:hover { color: var(--color-gray-600); }

.header ul { list-style: none; margin: 0; padding: 0; }

.header__logo { display: inline-flex; overflow: hidden; }

.header__right {
	align-items: center;
	display: flex;
	justify-content: flex-end;
}

/* --------------------------------------------------- Mobile panel shell */

.header__middle {
	background: var(--color-soft-black);
	border-top: 1px solid var(--color-gray-900);
	height: calc(100vh - var(--header-height) - var(--wp-admin-bar-height, 0px));
	left: 0;
	opacity: 0;
	overflow: auto;
	padding: 0 10px 30px;
	position: absolute;
	top: 100%;
	visibility: hidden;
	width: 100vw;
	z-index: 5;
}
.has-mobile-navigation-open .header__middle { opacity: 1; visibility: visible; }
.has-mobile-navigation-open { overflow: hidden; }

@media screen and (min-width: 1280px) {
	.header__middle {
		align-items: center;
		background: transparent;
		border-top: 0;
		display: flex;
		height: auto;
		margin: 0 auto;
		opacity: 1;
		overflow: initial;
		padding: 0;
		position: static;
		visibility: visible;
		width: auto;
	}
}

/* ------------------------------------------------------------ Hamburger */

.header__hamburger {
	align-items: center;
	cursor: pointer;
	display: flex;
	height: var(--header-height);
	justify-content: center;
	margin-left: var(--grid-col-gutter);
	position: relative;
	width: 24px;
}
@media screen and (min-width: 1280px) {
	.header__hamburger { display: none; }
}
.header__hamburger span,
.header__hamburger span::before,
.header__hamburger span::after {
	background-color: var(--color-soft-black);
	content: "";
	cursor: pointer;
	display: inline-block;
	height: 2px;
	position: absolute;
	transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
	width: 24px;
}
.header__hamburger span::before { top: -7px; }
.header__hamburger span::after { bottom: -7px; }
.header__hamburger[active] span { background-color: transparent; }
.header__hamburger[active] span::before,
.header__hamburger[active] span::after { top: 0; bottom: auto; }
.header__hamburger[active] span::before { transform: rotate(45deg); }
.header__hamburger[active] span::after { top: 8px; transform: translateY(-8px) rotate(-45deg); }

/* ----------------------------------------------------------- Contact CTA */

.header__contact-button {
	display: none;
	margin-left: 12px;
	text-transform: none;
}
@media screen and (min-width: 768px) {
	.header__contact-button { display: inline-block; }
}

/* ------------------------------------------------------ Avatar text badge
   (original text-initials medallion replacing the consultant photo) */

.header__avatar-badge {
	align-items: center;
	background: var(--color-brass-1);
	border-radius: 50%;
	color: var(--color-soft-black);
	display: inline-flex;
	font-family: var(--heading-font-family);
	font-size: 0.9em;
	height: 100%;
	justify-content: center;
	letter-spacing: 0.05em;
	width: 100%;
}

/* ------------------------------------------------- Mobile contact block */

.header__contact-mobile {
	align-items: center;
	background-color: var(--color-soft-black);
	display: flex;
	flex-direction: column;
	margin-bottom: 90px;
	margin-top: 60px;
	padding: 32px var(--grid-col-gutter) 20px;
	position: relative;
}
@media screen and (min-width: 1280px) {
	.header__contact-mobile { display: none; }
}
.header__contact-mobile-img-wrap {
	height: 62px;
	margin: 0;
	position: absolute;
	top: -31px;
	width: 62px;
}
.header__contact-mobile-img-wrap .header__avatar-badge { border: 3px solid var(--color-soft-black); font-size: 20px; }
.header__contact-mobile-call { font-size: 16px; margin-top: 5px; text-align: center; }
.header__contact-mobile-call,
.header__contact-mobile-call a { color: var(--color-soft-white); }
.header__contact-mobile-call-text { font-weight: var(--font-weight-bold); }
.header__contact-mobile-button { margin-top: 20px; width: 100%; }

/* -------------------------------------------------------------- Nav shell */

.header__nav {
	margin: 0 calc(var(--grid-col-gutter) * -1);
	z-index: 5;
}
@media screen and (min-width: 1280px) {
	.header__nav { margin: 0; }
}

.header__nav-menu > ul {
	display: flex;
	flex-direction: column;
}
@media screen and (min-width: 1280px) {
	.header__nav-menu > ul { flex-direction: row; }
}

.header__nav-menu > ul > li {
	border-bottom: 1px solid var(--color-gray-900);
	position: relative;
}
@media screen and (min-width: 1280px) {
	.header__nav-menu > ul > li { border-bottom: 0; position: static; }
}

.header__menu-item-link { color: var(--color-soft-white); cursor: pointer; }
@media screen and (min-width: 1280px) {
	.header__menu-item-link { color: var(--color-soft-black); }
}
@media (hover: hover) {
	.header__nav-menu > ul > li:hover > a { color: var(--color-gray-600); }
}
.header__nav-menu > ul > li.current-menu-item > a,
.header__nav-menu > ul > li.current-menu-ancestor > a { color: var(--color-gray-600); }

.header__nav-menu > ul > li > a {
	display: block;
	font-size: 16px;
	font-weight: var(--font-weight-default);
	letter-spacing: 0.8px;
	line-height: 1.25;
	padding: 30px var(--grid-col-gutter);
	text-transform: uppercase;
}
@media screen and (min-width: 1280px) {
	.header__nav-menu > ul > li > a { font-size: 13px; line-height: 1.231; padding: 42px 12px; }
}
@media screen and (min-width: 1400px) {
	.header__nav-menu > ul > li > a { padding: 42px 8px; }
}
@media screen and (min-width: 1440px) {
	.header__nav-menu > ul > li > a { padding: 42px 12px; }
}
@media screen and (min-width: 1600px) {
	.header__nav-menu > ul > li > a { padding: 42px 18px; }
}

/* Mobile expand chevron on parents (drawn fresh as data-uri strokes) */
.header .header__menu-item-has-children > a::after {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none'%3E%3Cpath stroke='%23fff' stroke-width='2' d='M13 1 7 7 1 1'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	content: "";
	display: inline-block;
	height: 9px;
	margin-left: 6px;
	margin-top: 6px;
	position: absolute;
	right: 14px;
	transition: all var(--transition-time) var(--transition-easing);
	width: 15px;
}
@media screen and (min-width: 768px) {
	.header .header__menu-item-has-children > a::after { right: 22px; }
}
@media screen and (min-width: 1280px) {
	.header .header__menu-item-has-children > a::after { display: none; }
}

/* Invisible full-row tap target that toggles the submenu on mobile */
.header .header__submenu-arrow {
	background: transparent;
	cursor: pointer;
	display: block;
	height: 80px;
	position: absolute;
	right: 0;
	top: 0;
	width: 100%;
	z-index: 2;
}
@media screen and (min-width: 1280px) {
	.header .header__submenu-arrow { display: none; }
}

/* ------------------------------------------------------------- Sub-menu */

.header__nav-menu > ul > li > .header__sub-menu {
	background: var(--color-soft-black);
	display: block;
	height: 0;
	left: 0;
	opacity: 0;
	overflow: hidden;
	padding-left: 30px;
	position: relative;
	transition: opacity var(--transition-time) var(--transition-easing);
	visibility: hidden;
	width: 100%;
	z-index: 99;
}

@media screen and (max-width: 1279px) {
	.header .header__menu-item-has-children[active] { padding-bottom: 30px; }
	.header .header__menu-item-has-children[active] > .header__sub-menu {
		height: auto;
		opacity: 1;
		visibility: visible;
	}
	.header .header__menu-item-has-children[active] > a { color: var(--color-gray-600); }
	.header .header__menu-item-has-children[active] > a::after {
		background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none'%3E%3Cpath stroke='%23919191' stroke-width='2' d='M13 1 7 7 1 1'/%3E%3C/svg%3E");
		transform: rotate(180deg);
	}
}

@media screen and (min-width: 1280px) {
	.header__nav-menu > ul > li > .header__sub-menu {
		border-bottom-left-radius: var(--border-radius-small);
		border-bottom-right-radius: var(--border-radius-small);
		display: flex;
		flex-direction: row;
		gap: 15px;
		height: auto;
		justify-content: center;
		margin: 0 auto;
		max-width: 1570px;
		overflow: initial;
		padding: 0 var(--grid-col-gutter);
		position: absolute;
		right: 0;
		transition: none;
	}
	.header__nav-menu > ul > li > .header__sub-menu > * { flex: 1; min-width: 0; }
	.header__nav-menu > ul > li > .header__sub-menu::before {
		background-color: var(--color-soft-black);
		border-top: 1px solid var(--color-gray-900);
		content: "";
		height: 100%;
		left: 0;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		position: absolute;
		top: 0;
		width: 100vw;
		z-index: -1;
	}
	.header .header__menu-item-has-children:hover > .header__sub-menu,
	.header .header__menu-item-has-children:focus-within > .header__sub-menu {
		height: auto;
		min-height: calc(100% + 1px);
		opacity: 1;
		visibility: visible;
		z-index: 101;
	}
}
@media screen and (min-width: 1400px) {
	.header__nav-menu > ul > li > .header__sub-menu { gap: 30px; }
}
@media screen and (min-width: 1600px) {
	.header__nav-menu > ul > li > .header__sub-menu { gap: 50px; }
}

/* Panel content reveal (desktop): fade + drop with .2s delay */
@media screen and (min-width: 1280px) {
	.header__nav-info-content,
	.header__nav-menu-items,
	.header__nav-card,
	.header__nav-card-featured {
		opacity: 0;
		transform: translateY(-10px);
	}
	.header__menu-item-has-children:hover .header__nav-info-content,
	.header__menu-item-has-children:hover .header__nav-menu-items,
	.header__menu-item-has-children:hover .header__nav-card,
	.header__menu-item-has-children:hover .header__nav-card-featured,
	.header__menu-item-has-children:focus-within .header__nav-info-content,
	.header__menu-item-has-children:focus-within .header__nav-menu-items,
	.header__menu-item-has-children:focus-within .header__nav-card,
	.header__menu-item-has-children:focus-within .header__nav-card-featured {
		opacity: 1;
		transform: translateY(0);
		transition: transform var(--transition-time), opacity var(--transition-time) var(--transition-easing);
		transition-delay: 0.2s;
	}
}

/* -------------------------------------------------------- Info column */

.header__nav-info { display: none; }
@media screen and (min-width: 1280px) {
	.header__nav-info {
		background-color: var(--color-soft-black);
		border-top: 1px solid var(--color-gray-900);
		display: block;
		max-width: 300px;
		padding: 60px 0;
	}
	.header__nav-info-heading { color: var(--color-soft-white); margin-bottom: 8px; }
	.header__nav-info-description { color: var(--color-soft-white); line-height: 1.5; }
}

/* Consultant CTA pill (desktop panels only) */
.header { --cta-border-color: var(--color-gray-900); }
.header__consultant-cta { display: none; }
@media screen and (min-width: 1280px) {
	.header__consultant-cta {
		align-items: center;
		border: 1px solid var(--cta-border-color);
		border-radius: 50px;
		display: flex;
		margin-top: 24px;
		padding: 8px 22px 8px 13px;
		transition: border var(--transition-time) var(--transition-easing);
	}
	.header__consultant-cta:hover { --cta-border-color: var(--color-soft-white); }
	.header__consultant-cta svg {
		color: var(--cta-border-color);
		transition: color var(--transition-time) var(--transition-easing);
	}
	.header__consultant-cta-img-wrap {
		display: inline-block;
		height: 46px;
		margin-bottom: 0;
		margin-right: 20px;
		max-width: 46px;
		width: 46px;
	}
	.header__consultant-cta-img {
		border-radius: 50%;
		height: 100%;
		object-fit: cover;
		width: 100%;
	}
	.header__consultant-cta-call { color: var(--color-soft-white); display: block; flex: 1; min-width: 0; }
	.header__consultant-cta-title { display: block; font-weight: var(--font-weight-bold); }
	.header__consultant-cta-number { display: inline-block; margin-top: 3px; }
}

/* -------------------------------------------------------- List columns */

@media screen and (max-width: 1279px) {
	.header__nav-menu-items { background: var(--color-soft-black); }
}
@media screen and (min-width: 1280px) {
	.header__nav-menu-items { padding: 60px 0 60px 15px; position: relative; }
}
@media screen and (min-width: 1400px) {
	.header__nav-menu-items { padding: 60px 0 60px 30px; }
}
.header__nav-menu-items--list-view { padding-left: 14px; }

.header__nav-list-container { margin-bottom: 0; padding: 0; }
@media screen and (min-width: 1280px) {
	.header__nav-list-container {
		display: grid;
		gap: 30px;
		grid-template-columns: repeat(3, minmax(200px, 1fr));
	}
	.header__nav-list-container > li { min-width: 0; }
}
@media screen and (min-width: 1600px) {
	.header__nav-list-container { gap: 50px; }
}

.header__nav-item--bold { font-weight: var(--font-weight-bold); }

.header__nav-item-link {
	color: var(--color-soft-white);
	display: inline-block;
	font-size: 19px;
	margin: 7px 0;
}
@media screen and (min-width: 1280px) {
	.header__nav-item-link {
		align-items: center;
		display: flex;
		justify-content: space-between;
		line-height: 1.47;
		margin: 0;
		padding: 10px 16px;
	}
	.header__nav-item-link:hover {
		background: var(--color-soft-black);
		box-shadow: 0 4px 20px 0 #00000040;
		color: var(--color-soft-white) !important;
	}
	.header__nav-item-link:hover svg { opacity: 1; pointer-events: all; transform: translateX(0); }
}
.header__nav-item-link svg {
	display: inline-block;
	opacity: 0;
	pointer-events: none;
	transform: translateX(-4px);
	transition: all var(--transition-time) var(--transition-easing);
	transition-delay: 50ms;
}

/* Decorative curved corner at panel bottom-left (desktop) */
.header__nav-curve-icon { display: none; }
@media screen and (min-width: 1280px) {
	.header__nav-curve-icon {
		bottom: 0;
		display: inline-block;
		height: 40px;
		left: 0;
		position: absolute;
	}
}

/* ------------------------------------------------------------ Nav cards */

.header__nav-card {
	background-color: var(--color-bunker);
	display: inline-block;
	margin: 7px 0;
	position: relative;
}
.header__nav-card svg,
.header__nav-card-description,
.header__nav-card-img { display: none; }
@media screen and (min-width: 1280px) {
	.header__nav-card {
		box-shadow: 0 4px 30px 0 #00000040;
		display: block;
		height: 177px;
		margin: 0;
		max-height: 200px;
		max-width: 300px;
		width: 100%;
	}
	.header__nav-card svg,
	.header__nav-card-description,
	.header__nav-card-img { display: inline-block; }
	.header__nav-card-img {
		background-color: var(--color-soft-black);
		height: 100%;
		left: 0;
		object-fit: cover;
		position: absolute;
		top: 0;
		width: 100%;
		z-index: -1;
	}
	.header__nav-card-content {
		display: flex;
		flex-direction: column;
		height: inherit;
		justify-content: space-between;
		max-height: 200px;
		padding: 15px;
		position: relative;
	}
	.header__nav-card-content::before,
	.header__nav-card-content::after {
		content: "";
		height: 100%;
		left: 0;
		position: absolute;
		top: 0;
		transition: opacity var(--transition-time) var(--transition-easing);
		width: 100%;
		z-index: -1;
	}
	.header__nav-card-content::before { background: linear-gradient(180deg, #0000 20%, #000000e6); }
	.header__nav-card-content::after {
		background: linear-gradient(0deg, #0009, #0009), linear-gradient(180deg, #0000 20%, #000000e6);
		opacity: 0;
		visibility: hidden;
	}
	.header__nav-card svg,
	.header__nav-card-description {
		opacity: 0;
		transition: all var(--transition-time) var(--transition-easing);
		visibility: hidden;
	}
	.header__nav-card svg { pointer-events: none; transform: translateX(-4px); }
	.header__nav-card:hover .header__nav-card-content { color: var(--color-soft-white); }
	.header__nav-card:hover .header__nav-card-content::after,
	.header__nav-card:hover .header__nav-card-description,
	.header__nav-card:hover svg { opacity: 1; visibility: visible; }
	.header__nav-card:hover svg { transform: translateX(0); }
}
@media screen and (min-width: 1280px) and (max-width: 1339px) {
	.header__nav-card { height: 192px; }
}

.header__nav-card-title { color: var(--color-soft-white); display: inline-block; font-size: 19px; }
@media screen and (min-width: 1280px) {
	.header__nav-card-title {
		align-items: center;
		display: flex;
		font-size: 16px;
		justify-content: space-between;
	}
}
@media screen and (min-width: 1280px) and (max-width: 1399px) {
	.header__nav-card-title { font-size: calc(0.3vw + 14.8px); }
}
@media screen and (min-width: 1400px) {
	.header__nav-card-title { font-size: 19px; }
}
.header__nav-card-description { color: var(--color-soft-white); }

/* Featured card */
.header__nav-card-container--featured { display: inline-block; }
@media screen and (min-width: 1280px) {
	.header__nav-card-container { max-width: 300px; }
}
.header__nav-card-featured { color: var(--color-soft-white); display: inline-block; margin: 7px 0; }
.header__nav-card-featured-img,
.header__nav-card-featured-tag { display: none; }
@media screen and (min-width: 1280px) {
	.header__nav-card-featured {
		background-color: var(--color-bunker);
		display: block;
		height: 200px;
		margin: 0;
		position: relative;
		width: 100%;
	}
	.header__nav-card-featured-img {
		display: block;
		height: 100%;
		left: 0;
		object-fit: cover;
		position: absolute;
		top: 0;
		width: 100%;
		z-index: -1;
	}
	.header__nav-card-featured-content {
		display: flex;
		flex-direction: column;
		height: 100%;
		justify-content: flex-end;
		padding: 15px;
		position: relative;
		width: 100%;
	}
	.header__nav-card-featured-content::before,
	.header__nav-card-featured-content::after {
		content: "";
		height: 100%;
		left: 0;
		position: absolute;
		top: 0;
		transition: opacity var(--transition-time) var(--transition-easing);
		width: 100%;
		z-index: -1;
	}
	.header__nav-card-featured-content::before { background: linear-gradient(180deg, #0000 20%, #000000e6); }
	.header__nav-card-featured-content::after {
		background: linear-gradient(180deg, #0000, #000000e6 74%);
		opacity: 0;
		visibility: hidden;
	}
	.header__nav-card-featured:hover .header__nav-card-featured-content::after { opacity: 1; visibility: visible; }
	.header__nav-card-featured:hover { color: var(--color-soft-white) !important; }
	.header__nav-card-featured-tag {
		background-color: var(--color-soft-white);
		color: var(--color-soft-black);
		display: inline-block;
		left: 15px;
		line-height: 1;
		padding: 4px 9px;
		position: absolute;
		top: 15px;
	}
}

/* Reference shows no phone module on the homepage header */
.home .header__phone-number-desktop,
.home .header__phone-number { display: none; }

/* .header carries soft-white ink (parity with reference computed value);
   visible currentColor glyphs must stay dark explicitly */
.header__search-button,
.header__phone-number,
.header__phone-number-desktop { color: var(--color-soft-black); }
