/* Site-wide header/nav polish — applies on every page, not just the homepage. */

/* Utility bar: consistent link hover feedback */
.header_1 .elm_icon_text {
	transition: opacity 0.15s ease;
}
.header_1 .elm_icon_text:hover,
.header_1 .elm_icon_text:focus-visible {
	opacity: 0.75;
}
.header_1 a:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Primary nav: refined active/hover state with an underline instead of color alone */
.header_3 .menu-item > a {
	position: relative;
	letter-spacing: 0.02em;
	transition: color 0.15s ease;
}
.header_3 .menu-item > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -6px;
	height: 2px;
	background: var(--color-red, #c92127);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.15s ease;
}
.header_3 .menu-item:hover > a::after,
.header_3 .menu-item.current-menu-item > a::after,
.header_3 .menu-item.current_page_item > a::after {
	transform: scaleX(1);
}

/* Mega-menu: the .sub-menu's own show/hide (display:none/block) and open
   animation stay exactly as the theme controls them (see core.css
   .sf-menu .sub-menu) — this only restyles the box once shown and lays out
   the content mega-menu.js builds inside it. */
.header_3 .sub-menu.ah-mega-menu {
	width: 640px;
	max-width: min(640px, 90vw);
	left: 0;
	padding: var(--space-5);
	border-radius: 16px;
	border: 1px solid var(--color-grey-200, #e4e1de);
	box-shadow: 0 24px 48px rgba(23,24,26,0.16), 0 4px 12px rgba(23,24,26,0.08);
}
.ah-mega {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-5);
	animation: ah-mega-in 0.18s ease-out;
}
@keyframes ah-mega-in {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}
.ah-mega__col-title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-grey-600, #6b6b6b);
	padding: 0 var(--space-3) var(--space-2);
	margin-bottom: var(--space-1);
	border-bottom: 1px solid var(--color-grey-100, #f0eeec);
}
.ah-mega__item {
	display: flex;
	align-items: flex-start;
	gap: var(--space-3);
	padding: var(--space-2) var(--space-3);
	border-radius: 10px;
	color: inherit;
	text-decoration: none;
	transition: background-color 0.15s ease;
}
.ah-mega__item:hover,
.ah-mega__item:focus-visible {
	background: rgba(201,33,39,0.06);
}
.ah-mega__item i {
	flex-shrink: 0;
	width: 18px;
	margin-top: 2px;
	text-align: center;
	color: var(--color-grey-300, #adadad);
	font-size: 0.85rem;
}
.ah-mega__item:hover i,
.ah-mega__item:focus-visible i {
	color: var(--color-red, #c92127);
}
.ah-mega__item-title {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--color-ink, #17181a);
	line-height: 1.3;
}
.ah-mega__item-desc {
	display: block;
	font-size: 12px;
	color: var(--color-grey-600, #6b6b6b);
	line-height: 1.3;
	margin-top: 1px;
}

@media (max-width: 900px) {
	.header_3 .sub-menu.ah-mega-menu { width: 100%; }
	.ah-mega { grid-template-columns: 1fr; }
}

/* Mobile fullscreen menu (#menu_header_4 / .fullscreen_menu). The theme
   drives open/close via jQuery .fadeIn()/.fadeToggle() with inline styles
   (see custom.js), not CSS classes — that mechanism is untouched here. This
   only restyles the panel and, via mega-menu.js's small additive listener,
   adds a chevron-rotate + hamburger-to-X animation on top of it. */

/* Hamburger: strip the inline red box, ghost-button style, vertically
   centered on the logo row. */
i.icon_fullscreen_menu,
i.icon_mobile_fullscreen_menu {
	background-color: transparent !important;
	color: var(--color-white, #fff) !important;
	padding: 10px !important;
	margin: 0 !important;
	box-sizing: border-box;
	width: 44px;
	height: 44px;
	/* no !important on display: must lose to the theme's own
	   `.hide { display: none !important }` when that class is present */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	transition: background-color 0.15s ease, transform 0.2s ease;
}
i.icon_fullscreen_menu:hover,
i.icon_mobile_fullscreen_menu:hover {
	background-color: rgba(255,255,255,0.1) !important;
}
i.icon_fullscreen_menu.ah-menu-open,
i.icon_mobile_fullscreen_menu.ah-menu-open {
	transform: rotate(90deg);
}

/* Panel: dark overlay instead of plain white, consistent with the rest of
   the site's dark sections rather than a flat white dump. Solid, not
   translucent: a near-opaque rgba() here visibly let the hero content
   bleed through (a compositing quirk of position:fixed + alpha on this
   panel), confirmed by A/B testing solid vs. rgba — solid renders cleanly
   and is visually indistinguishable from 97% black anyway. */
.fullscreen_menu {
	background: rgb(15,16,18) !important;
}
.fullscreen_menu > .cz {
	text-align: left !important;
	margin: 0 !important;
	display: block !important;
	width: 100%;
	max-width: 420px;
	padding: 0 var(--space-6);
}
.fullscreen_menu a {
	color: var(--color-white, #fff) !important;
}
.fullscreen_menu > .cz > a,
.fullscreen_menu .menu-item > a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: var(--space-3) 0;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.03em;
	border-bottom: 1px solid rgba(255,255,255,0.08);
	text-decoration: none !important;
	border-left: 3px solid transparent;
	padding-left: var(--space-3);
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.fullscreen_menu .current-menu-item > a,
.fullscreen_menu .current_page_item > a {
	color: var(--color-red, #c92127) !important;
	border-left-color: var(--color-red, #c92127);
	background: rgba(201,33,39,0.08);
}
/* The theme's own active-item indicator is a ::before bar defaulting to
   its brand blue (#4e71fe, core.css) — redundant with, and clashing
   against, the red left-border indicator above. */
.fullscreen_menu .current-menu-item > a::before,
.fullscreen_menu .current_page_item > a::before {
	display: none;
}
.fullscreen_menu .sub-menu .menu-item > a {
	font-size: 14px;
	font-weight: 400;
	padding-left: var(--space-6);
	color: var(--color-grey-200, #e4e1de) !important;
	border-left-color: transparent;
}
.fullscreen_menu .cz_indicator {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin-left: auto;
	transition: transform 0.2s ease;
}
.fullscreen_menu .cz.ah-submenu-open > a > .cz_indicator {
	transform: rotate(90deg);
}
.fullscreen_menu .sub-menu {
	animation: ah-mega-in 0.2s ease-out;
}

/* Mobile header: the logo's flex zone (.elms_center) and its inner wrapper
   are both centered by the parent theme's own .have_center/.elms_center
   rules (core.css ~L402-425) — by design for a "centered logo" header
   layout. On mobile that reads as misaligned against the left-aligned hero
   content below it, so here the logo is pinned to the same left edge
   (--space-4) as .ah-hero__inner instead. Scoped to .header_4.have_center
   (this specific header instance) so header_2/header_3 and the footer's
   own .elms_center rows are untouched. */
@media (max-width: 640px) {
	/* !important required: the parent theme's own responsive customizer CSS
	   (#codevz-inline-css, generated from theme options) ships
	   `.row{width:90% !important}` inside its own max-width:1360px block —
	   a plain non-important override can never beat that regardless of
	   selector specificity. */
	.header_4.have_center .row.elms_row {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
		padding-left: var(--space-4);
		padding-right: var(--space-4);
	}
	.header_4.have_center .elms_center {
		margin: 0;
	}
	.header_4.have_center .elms_center > div {
		margin: 0;
	}
	/* Balanced vertical rhythm + true vertical centering between the logo
	   and the hamburger, which no longer rely on the theme's own
	   margin-bottom logo hack (now zeroed via the header_4_center theme
	   option) to roughly line up. */
	.header_4.have_center {
		padding-top: var(--space-4);
		padding-bottom: var(--space-4);
	}
	.header_4.have_center .clr {
		align-items: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.header_1 .elm_icon_text,
	.header_3 .menu-item > a,
	.header_3 .menu-item > a::after,
	.ah-mega__item,
	i.icon_fullscreen_menu,
	i.icon_mobile_fullscreen_menu,
	.fullscreen_menu .cz_indicator,
	.fullscreen_menu > .cz > a,
	.fullscreen_menu .menu-item > a {
		transition: none;
	}
	.ah-mega,
	.fullscreen_menu .sub-menu {
		animation: none;
	}
}
