/* Agate Bay Resort header refresh: logo left, menu centered, existing contact area retained on the right. */
#imHeader {
	position: relative;
	overflow: visible;
	background-color: #05243b !important;
	background-image:
		linear-gradient(90deg, rgba(1, 20, 36, 0.88) 0%, rgba(0, 100, 150, 0.64) 50%, rgba(1, 27, 45, 0.86) 100%),
		url('../images/agate-bay-harbor-header.png') !important;
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
}

#imHeaderObjects { overflow: visible; }

/* Hide only the generated name/tagline/menu objects. The existing contact details remain unchanged. */
#imHeader_imObjectTitle_10_wrapper,
#imHeader_imObjectTitle_11_wrapper,
#imHeader_imObjectTitle_12_wrapper,
#imHeader_imObjectTitle_13_wrapper,
#imHeader_imObjectTitle_16_wrapper,
#imHeader_imObjectTitle_17_wrapper,
#imHeader_imObjectTitle_19_wrapper,
#imHeader_imMenuObject_09_wrapper {
	display: none !important;
}

/* Avoid showing the old generated sticky header after scrolling. */
#imStickyBarContainer { display: none !important; }

#agateHeader {
	position: absolute;
	inset: 0;
	z-index: 1000;
	pointer-events: none;
}

#agateHeader > * { pointer-events: auto; }

.agate-brand {
	position: absolute;
	top: 11px;
	inset-inline-start: 22px;
	display: block;
	width: min(220px, 22%);
	line-height: 0;
}

.agate-brand img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 158px;
	object-fit: contain;
	filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.55));
}

#agatePrimaryNav {
	position: absolute;
	inset-inline-start: 255px;
	inset-inline-end: 18px;
	bottom: 21px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(12px, 2vw, 31px);
	margin: 0;
	padding: 0;
	font-family: Arial, Helvetica, sans-serif;
	white-space: nowrap;
}

#agatePrimaryNav > a,
.agate-nav-parent {
	position: relative;
	display: inline-block;
	padding: 8px 0 10px;
	border: 0;
	background: transparent;
	color: #ffffff !important;
	font-size: clamp(13px, 1.45vw, 17px);
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	text-shadow: 0 2px 3px rgba(0, 0, 0, 0.45);
	cursor: pointer;
}

#agatePrimaryNav > a::after,
.agate-nav-parent::after {
	position: absolute;
	bottom: 2px;
	inset-inline-start: 50%;
	width: 0;
	height: 3px;
	content: '';
	background: #f6c765;
	border-radius: 2px;
	transition: width 0.2s ease, inset-inline-start 0.2s ease;
}

#agatePrimaryNav > a:hover::after,
#agatePrimaryNav > a:focus-visible::after,
#agatePrimaryNav > a.is-active::after,
.agate-nav-parent:hover::after,
.agate-nav-parent:focus-visible::after,
.agate-nav-parent.is-active::after {
	inset-inline-start: 0;
	width: 100%;
}

#agatePrimaryNav > a:focus-visible,
.agate-nav-parent:focus-visible,
#agateMenuButton:focus-visible {
	outline: 3px solid #f6c765;
	outline-offset: 4px;
}

.agate-nav-group {
	position: relative;
	display: block;
}

.agate-chevron {
	display: inline-block;
	width: 7px;
	height: 7px;
	margin: 0 0 3px 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	vertical-align: middle;
	transform: rotate(45deg);
	transition: transform 0.18s ease;
}

.agate-nav-parent[aria-expanded="true"] .agate-chevron {
	margin-bottom: -1px;
	transform: rotate(225deg);
}

.agate-submenu {
	position: absolute;
	top: calc(100% - 1px);
	left: 50%;
	z-index: 1004;
	display: none;
	min-width: 190px;
	padding: 7px;
	border: 1px solid rgba(246, 199, 101, 0.58);
	border-radius: 7px;
	background: rgba(2, 35, 59, 0.98);
	box-shadow: 0 12px 25px rgba(0, 0, 0, 0.44);
	transform: translateX(-50%);
}

.agate-nav-group:hover .agate-submenu,
.agate-nav-group:focus-within .agate-submenu,
.agate-nav-group.is-open .agate-submenu {
	display: block;
}

.agate-submenu a {
	display: block;
	padding: 10px 12px;
	border-radius: 4px;
	color: #ffffff !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-align: left;
	text-decoration: none;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.agate-submenu a:hover,
.agate-submenu a:focus-visible {
	background: rgba(246, 199, 101, 0.18);
	color: #f6d47d !important;
	outline: none;
}

.agate-submenu a:focus-visible {
	box-shadow: inset 0 0 0 2px #f6c765;
}

#agateMenuButton { display: none; }

@media (max-width: 899.9px) {
	.agate-brand {
		top: 8px;
		inset-inline-start: 16px;
		width: clamp(112px, 22vw, 150px);
	}

	.agate-brand img { max-height: 98px; }

	#agateMenuButton {
		position: absolute;
		inset-inline-start: clamp(142px, 24vw, 190px);
		inset-inline-end: auto;
		bottom: 13px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 40px;
		padding: 0;
		border: 2px solid rgba(255, 255, 255, 0.92);
		border-radius: 6px;
		background: rgba(0, 36, 64, 0.78);
		color: #fff;
		cursor: pointer;
	}

	#agateMenuButton span,
	#agateMenuButton::before,
	#agateMenuButton::after {
		display: block;
		width: 21px;
		height: 2px;
		content: '';
		background: currentColor;
		border-radius: 2px;
		transition: transform 0.2s ease;
	}

	#agateMenuButton span { margin: 5px 0; }

	#agateMenuButton[aria-expanded="true"] span { opacity: 0; }
	#agateMenuButton[aria-expanded="true"]::before { transform: translateY(7px) rotate(45deg); }
	#agateMenuButton[aria-expanded="true"]::after { transform: translateY(-7px) rotate(-45deg); }

	#agatePrimaryNav {
		position: absolute;
		top: calc(100% + 8px);
		inset-inline: 10px;
		bottom: auto;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 10px;
		border: 1px solid rgba(255, 255, 255, 0.35);
		border-radius: 8px;
		background: rgba(1, 29, 50, 0.97);
		box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
		white-space: normal;
	}

	#agatePrimaryNav.is-open { display: flex; }

	#agatePrimaryNav > a,
	.agate-nav-parent {
		width: 100%;
		padding: 13px 14px;
		font-size: 16px;
		text-align: center;
	}

	#agatePrimaryNav > a::after,
	.agate-nav-parent::after { bottom: 5px; }

	.agate-nav-group {
		width: 100%;
	}

	.agate-submenu {
		position: static;
		display: none;
		min-width: 0;
		margin: 0 5px 8px;
		padding: 5px;
		border-color: rgba(255, 255, 255, 0.23);
		background: rgba(0, 19, 35, 0.5);
		box-shadow: none;
		transform: none;
	}

	#agatePrimaryNav .agate-nav-group:hover .agate-submenu,
	#agatePrimaryNav .agate-nav-group:focus-within .agate-submenu {
		display: none;
	}

	#agatePrimaryNav .agate-nav-group.is-open .agate-submenu {
		display: block;
	}

	.agate-submenu a {
		padding: 10px 12px;
		font-size: 15px;
		text-align: center;
	}
}

@media (max-width: 459.9px) {
	.agate-brand { width: 106px; }
	.agate-brand img { max-height: 76px; }
	#agateMenuButton { inset-inline-start: 128px; bottom: 10px; }
}
