/**
 * Header — Elementor Theme Builder + shared hooks
 * Orange brand · clean toolbar · full-screen mobile menu
 */

.elementor-location-header,
.american-mutual-header {
	--amf-header-bg: #ffffff;
	--amf-header-text: #1f2937;
	--amf-header-active: #d89216;
	--amf-header-hover: #c97b00;
	--amf-header-max: 80rem;
	--amf-header-pad-y: 1rem;
	--amf-header-pad-x: clamp(1.25rem, 5vw, 2rem);
	--amf-header-logo-width: 11.25rem;
	--amf-header-nav-gap: 1.75rem;
}

.elementor-location-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--amf-header-bg);
	border-block-end: 1px solid #e5e7eb;
	box-shadow: 0 1px 0 rgba(31, 41, 55, 0.06);
}

.elementor-location-header > .elementor {
	max-width: var(--amf-header-max);
	margin-inline: auto;
	padding-block: var(--amf-header-pad-y);
	padding-inline: var(--amf-header-pad-x);
}

.elementor-location-header .elementor-widget-theme-site-logo img {
	max-width: var(--amf-header-logo-width);
	max-height: 3.75rem;
	width: auto;
	height: auto;
	object-fit: contain;
}

.elementor-location-header .elementor-nav-menu--main .elementor-item {
	font-family: var(--american-mutual-font-primary, "Cairo", sans-serif) !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	color: var(--amf-header-text) !important;
	padding-inline: 0.25rem !important;
	transition: color 0.2s ease;
}

.elementor-location-header .elementor-nav-menu--main .elementor-item:hover,
.elementor-location-header .elementor-nav-menu--main .elementor-item:focus-visible,
.elementor-location-header .elementor-nav-menu--main .elementor-item.elementor-item-active,
.elementor-location-header .elementor-nav-menu--main .current-menu-item > .elementor-item {
	color: var(--amf-header-active) !important;
}

.elementor-location-header .elementor-nav-menu--main .elementor-nav-menu {
	gap: var(--amf-header-nav-gap) !important;
}

.elementor-location-header .elementor-widget-button,
.elementor-location-header .elementor-button-wrapper,
.american-mutual-header__cta {
	display: none !important;
}

.elementor-location-header .american-mutual-header__search,
.american-mutual-header__search {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	color: var(--amf-header-text);
	border: 1px solid #e5e7eb;
	border-radius: 50%;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.elementor-location-header .american-mutual-header__search:hover,
.american-mutual-header__search:hover,
.american-mutual-header__search:focus-visible {
	color: var(--amf-header-active);
	border-color: var(--amf-header-active);
	background: #fff4e0;
	text-decoration: none;
}

.elementor-location-header .american-mutual-header__lang,
.american-mutual-header__lang {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--amf-header-text);
	padding: 0.375rem 0.625rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.375rem;
	white-space: nowrap;
}

.elementor-location-header .american-mutual-header__lang:hover,
.american-mutual-header__lang:hover,
.american-mutual-header__lang:focus-visible {
	color: var(--amf-header-active);
	border-color: var(--amf-header-active);
	text-decoration: none;
}

/* -------------------------------------------------------------------------
   Elementor mobile navigation — full-screen menu (≤767px)
   ------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.elementor-location-header .elementor-widget-theme-site-logo img {
		max-height: 3.25rem;
	}

	.elementor-location-header .elementor-menu-toggle {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 3.75rem !important;
		height: 3.75rem !important;
		min-width: 3.75rem !important;
		min-height: 3.75rem !important;
		padding: 0 !important;
		border-radius: 0.625rem !important;
		border: 1px solid #e5e7eb !important;
		background: #ffffff !important;
		color: #1f2937 !important;
		-webkit-tap-highlight-color: transparent;
	}

	.elementor-location-header .elementor-menu-toggle.elementor-active {
		color: #d89216 !important;
		border-color: #d89216 !important;
	}

	.elementor-location-header .elementor-menu-toggle svg,
	.elementor-location-header .elementor-menu-toggle i,
	.elementor-location-header .elementor-menu-toggle .e-font-icon-svg {
		width: 2.25rem !important;
		height: 2.25rem !important;
		font-size: 2.25rem !important;
	}

	.elementor-location-header .elementor-nav-menu__container,
	.elementor-location-header .elementor-nav-menu--dropdown.elementor-nav-menu__container {
		display: block !important;
		position: fixed !important;
		z-index: 999999 !important;
		top: 0 !important;
		right: 0 !important;
		left: 0 !important;
		width: 100vw !important;
		max-width: 100vw !important;
		height: 100vh !important;
		height: 100dvh !important;
		margin: 0 !important;
		padding: 90px 0 1.75rem !important;
		background: #ffffff !important;
		border: none !important;
		box-shadow: none !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		overscroll-behavior: contain !important;
		-webkit-overflow-scrolling: touch !important;
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
		transform: translateY(1rem) !important;
		transition:
			opacity 280ms ease,
			transform 280ms cubic-bezier(0.4, 0, 0.2, 1),
			visibility 280ms ease !important;
		animation: none !important;
	}

	.elementor-location-header .elementor-menu-toggle.elementor-active + .elementor-nav-menu__container,
	.elementor-location-header .elementor-nav-menu__container.elementor-nav-menu--dropdown[aria-hidden="false"],
	.elementor-location-header .elementor-nav-menu--dropdown.elementor-nav-menu__container:not([aria-hidden="true"]) {
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
		transform: translateY(0) !important;
	}

	.elementor-location-header .amf-mobile-nav-logo {
		position: absolute;
		top: 0;
		right: 0;
		left: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		height: 90px;
		padding-inline: clamp(1.25rem, 5vw, 1.5rem);
		background: #ffffff;
		border-block-end: 1px solid #e5e7eb;
		z-index: 2;
	}

	.elementor-location-header .amf-mobile-nav-logo img {
		display: block;
		width: auto;
		max-width: 100%;
		max-height: 3rem;
		height: auto;
		object-fit: contain;
	}

	.elementor-location-header .elementor-nav-menu--dropdown .elementor-nav-menu {
		width: 100% !important;
		padding: 1rem clamp(1.25rem, 5vw, 1.5rem) 0 !important;
	}

	.elementor-location-header .elementor-nav-menu--dropdown .elementor-item,
	.elementor-location-header .elementor-nav-menu--main .elementor-item.elementor-item-anchor {
		display: flex !important;
		align-items: center !important;
		width: 100% !important;
		min-height: 3.75rem !important;
		padding: 0.75rem clamp(1.25rem, 5vw, 1.5rem) !important;
		font-family: var(--american-mutual-font-primary, "Cairo", sans-serif) !important;
		font-size: 1.5rem !important;
		line-height: 1.6 !important;
		font-weight: 600 !important;
		color: #1f2937 !important;
		white-space: normal !important;
		text-align: start !important;
		-webkit-tap-highlight-color: rgba(216, 146, 22, 0.15);
		transition: color 0.2s ease, background-color 0.2s ease;
	}

	.elementor-location-header .elementor-nav-menu--dropdown .elementor-item:hover,
	.elementor-location-header .elementor-nav-menu--dropdown .elementor-item:focus-visible {
		color: #c97b00 !important;
		background: #fff4e0 !important;
		outline: 2px solid #d89216 !important;
		outline-offset: -2px !important;
	}

	.elementor-location-header .elementor-nav-menu--dropdown .elementor-item-active,
	.elementor-location-header .elementor-nav-menu--dropdown .elementor-item.highlighted,
	.elementor-location-header .elementor-nav-menu--dropdown .current-menu-item > .elementor-item {
		color: #d89216 !important;
		background: #fff4e0 !important;
	}

	.elementor-location-header .elementor-nav-menu--dropdown .sub-menu .elementor-item,
	.elementor-location-header .elementor-nav-menu--dropdown .elementor-sub-item {
		min-height: 3.75rem !important;
		padding: 0.75rem clamp(1.25rem, 5vw, 1.5rem) !important;
		padding-inline-start: calc(clamp(1.25rem, 5vw, 1.5rem) + 0.75rem) !important;
		font-size: 1.3125rem !important;
		line-height: 1.6 !important;
		font-weight: 600 !important;
		color: #1f2937 !important;
		background: #fff4e0 !important;
	}

	.elementor-location-header .elementor-nav-menu--dropdown .sub-menu .elementor-item:hover,
	.elementor-location-header .elementor-nav-menu--dropdown .sub-menu .elementor-item:focus-visible {
		color: #c97b00 !important;
		background: rgba(255, 255, 255, 0.65) !important;
		outline: 2px solid #d89216 !important;
		outline-offset: -2px !important;
	}

	.elementor-location-header .elementor-nav-menu--dropdown li {
		width: 100% !important;
		margin-block-end: 1.125rem !important;
		border: none !important;
	}

	.elementor-location-header .elementor-nav-menu--dropdown li:last-child {
		margin-block-end: 0 !important;
	}

	.elementor-location-header .elementor-nav-menu--dropdown .sub-menu {
		margin-block-start: 0.375rem !important;
		padding-block: 0.375rem 0.5rem !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.elementor-location-header .elementor-nav-menu__container {
		animation: none !important;
		transition: none !important;
	}
}
