/**
 * Mobile drawer styles (custom — Divi native mobile menu is hidden).
 * Driven by assets/js/mobile-nav.js
 *
 * Responsive menu breakpoint: ≤1024px. Keep in sync with menu.css and the
 * `BP` constant in mobile-nav.js.
 */

/* Dedicated host on the header row — not inside a Divi column that can be
   "disabled on phone" (that hid the burger in Visual Builder). */
.iti-mnav-slot {
	display: none;
	align-items: center;
	justify-content: flex-end;
	flex: 0 0 auto;
	margin-left: auto;
	z-index: 6;
}

.iti-mnav-burger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 10px;
	background: transparent;
	color: var(--iti-navy, #0a1f3d);
	cursor: pointer;
	flex: none;
}

.iti-mnav-burger:hover {
	background: rgba(10, 31, 61, 0.06);
}

.iti-mnav-burger .bars {
	position: relative;
	display: block;
	width: 22px;
	height: 16px;
}

.iti-mnav-burger .bars span {
	position: absolute;
	left: 0;
	width: 22px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.28s ease, opacity 0.2s ease, top 0.28s ease;
}

.iti-mnav-burger .bars span:nth-child(1) {
	top: 0;
}

.iti-mnav-burger .bars span:nth-child(2) {
	top: 7px;
}

.iti-mnav-burger .bars span:nth-child(3) {
	top: 14px;
}

.iti-mnav-burger.is-open .bars span:nth-child(1) {
	top: 7px;
	transform: rotate(45deg);
}

.iti-mnav-burger.is-open .bars span:nth-child(2) {
	opacity: 0;
}

.iti-mnav-burger.is-open .bars span:nth-child(3) {
	top: 7px;
	transform: rotate(-45deg);
}

@media (max-width: 1024px) {
	.iti-mnav-slot {
		display: flex !important;
	}
}

.iti-mnav-backdrop {
	position: fixed;
	inset: 0;
	/*
	 * Must sit above the Theme Builder header row (Divi sets
	 * .et_pb_row--with-menu z-index: 999). Otherwise the header logo and the
	 * burger-as-X paint on top of the drawer → double logo / double close.
	 */
	z-index: 10000;
	background: rgba(6, 16, 32, 0.5);
	backdrop-filter: blur(2px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.iti-mnav-backdrop.is-open {
	opacity: 1;
	pointer-events: auto;
}

.iti-mnav-drawer {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 100011;
	display: flex;
	flex-direction: column;
	width: min(380px, 88vw);
	height: 100%;
	height: 100dvh;
	overflow: hidden;
	background: #fff;
	box-shadow: -24px 0 60px rgba(10, 31, 61, 0.22);
	transform: translateX(100%);
	transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}

/*
 * Logged-in: WordPress admin bar sits above the page (fixed).
 * Push drawer + backdrop below it so logo / close are not covered.
 * WP uses 32px (desktop) and 46px (≤782px).
 */
body.admin-bar .iti-mnav-drawer {
	top: 32px;
	height: calc(100% - 32px);
	height: calc(100dvh - 32px);
}

body.admin-bar .iti-mnav-backdrop {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .iti-mnav-drawer {
		top: 46px;
		height: calc(100% - 46px);
		height: calc(100dvh - 46px);
	}

	body.admin-bar .iti-mnav-backdrop {
		top: 46px;
	}
}

.iti-mnav-drawer.is-open {
	transform: translateX(0);
}

.iti-mnav-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--iti-rule, rgba(10, 31, 61, 0.1));
}

.iti-mnav-top img {
	display: block;
	height: 34px;
	width: auto;
}

.iti-mnav-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: none;
	border-radius: 10px;
	background: transparent;
	color: var(--iti-navy, #0a1f3d);
	cursor: pointer;
}

.iti-mnav-close:hover {
	background: rgba(10, 31, 61, 0.06);
}

.iti-mnav-close svg {
	width: 22px;
	height: 22px;
}

.iti-mnav-search-wrap {
	margin: 14px 18px 4px;
}

.iti-mnav-search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 6px 0 16px;
	border: 1px solid var(--iti-rule, rgba(10, 31, 61, 0.1));
	border-radius: 999px;
	background: var(--iti-mist-2, #f6f9fd);
}

.iti-mnav-search:focus-within {
	border-color: var(--iti-coral, #ff6b4a);
	background: var(--iti-paper, #fff);
}

.iti-mnav-search-input {
	flex: 1;
	min-width: 0;
	height: 44px;
	padding: 0;
	border: none;
	background: none;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	color: var(--iti-navy, #0a1f3d);
}

.iti-mnav-search-input::placeholder {
	font-weight: 500;
	color: var(--iti-muted, #6b7793);
}

.iti-mnav-search-input:focus {
	outline: none;
}

/* Hide the UA clear affordance — the drawer ships its own button. */
.iti-mnav-search-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

.iti-mnav-search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	flex: none;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--iti-muted, #6b7793);
	cursor: pointer;
}

.iti-mnav-search-submit:hover {
	background: rgba(10, 31, 61, 0.06);
	color: var(--iti-coral, #ff6b4a);
}

.iti-mnav-search-submit svg {
	width: 18px;
	height: 18px;
}

.iti-mnav-search.has-error {
	border-color: var(--iti-coral, #ff6b4a);
}

.iti-mnav-search-error {
	margin: 8px 4px 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--iti-coral-3, #e9472b);
}

.iti-mnav-search-error:empty {
	display: none;
}

.iti-mnav-list {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 8px 0 4px;
}

.iti-mnav-link,
.iti-mnav-acc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 15px 22px;
	border: none;
	background: none;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-align: left;
	color: var(--iti-navy, #0a1f3d);
	cursor: pointer;
}

.iti-mnav-link:hover,
.iti-mnav-acc-head:hover,
.iti-mnav-acc.is-open > .iti-mnav-acc-head {
	color: var(--iti-coral, #ff6b4a);
}

/* Centered chevron (not top-aligned) */
.iti-mnav-chev {
	flex: none;
	width: 9px;
	height: 9px;
	margin: 0;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	opacity: 0.55;
	transition: transform 0.28s ease;
}

.iti-mnav-acc.is-open > .iti-mnav-acc-head .iti-mnav-chev {
	transform: rotate(-135deg);
	opacity: 0.9;
}

.iti-mnav-acc-panel {
	max-height: 0;
	overflow: hidden;
	background: var(--iti-mist-2, #f6f9fd);
	transition: max-height 0.34s ease;
}

.iti-mnav-acc.is-open > .iti-mnav-acc-panel {
	max-height: 1600px;
}

.iti-mnav-sub-city {
	padding: 14px 22px 6px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--iti-muted, #6b7793);
}

.iti-mnav-sub-city:first-child {
	padding-top: 8px;
}

.iti-mnav-acc-panel a {
	display: block;
	padding: 12px 22px 12px 30px;
	font-size: 15px;
	font-weight: 600;
	color: var(--iti-navy, #0a1f3d);
	text-decoration: none;
}

.iti-mnav-acc-panel a:hover {
	color: var(--iti-coral, #ff6b4a);
}

.iti-mnav-acc-panel a.iti-mnav-reg {
	margin: 8px 22px 14px;
	padding: 11px 16px;
	border-radius: 999px;
	background: var(--iti-coral, #ff6b4a);
	color: #fff;
	font-weight: 700;
	text-align: center;
}

.iti-mnav-acc-panel a.iti-mnav-reg:hover {
	background: var(--iti-coral-3, #e9472b);
	color: #fff;
}

.iti-mnav-foot {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 18px 22px 24px;
	border-top: 1px solid var(--iti-rule, rgba(10, 31, 61, 0.1));
}

/* Cloned Divi Social Follow module — keep network order/icons from Builder */
.iti-mnav-foot .et_pb_social_media_follow.iti-mnav-social,
.iti-mnav-social {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: center;
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
}

.iti-mnav-foot .et_pb_social_media_follow_network {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

.iti-mnav-foot .et_pb_social_media_follow_network a.icon,
.iti-mnav-social a {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	height: 40px !important;
	padding: 0 !important;
	border-radius: 10px !important;
	background: var(--iti-mist, #eef4fb) !important;
	background-color: var(--iti-mist, #eef4fb) !important;
	color: var(--iti-navy, #0a1f3d) !important;
	box-sizing: border-box !important;
}

.iti-mnav-foot .et_pb_social_media_follow_network a.icon:before {
	color: var(--iti-navy, #0a1f3d) !important;
	width: 40px !important;
	height: 40px !important;
	line-height: 40px !important;
	font-size: 18px !important;
	display: block !important;
}

.iti-mnav-foot .et_pb_social_media_follow_network a.icon:hover,
.iti-mnav-social a:hover {
	background: var(--iti-mist, #eef4fb) !important;
	background-color: var(--iti-mist, #eef4fb) !important;
}

.iti-mnav-foot .et_pb_social_media_follow_network a.icon:hover:before,
.iti-mnav-social a:hover {
	color: var(--iti-coral, #ff6b4a) !important;
}

.iti-mnav-foot .et_pb_social_media_follow_network_name {
	display: none !important;
}

body.iti-mnav-lock {
	overflow: hidden;
}

@media (min-width: 1025px) {
	.iti-mnav-burger,
	.iti-mnav-backdrop,
	.iti-mnav-drawer {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.iti-mnav-drawer,
	.iti-mnav-backdrop,
	.iti-mnav-acc-panel,
	.iti-mnav-burger .bars span {
		transition: none;
	}
}
