/* =========================================================
   CHANDEL REALTY — CUSTOM HEADER
   ========================================================= */

.cr-header {
	position: relative;
	z-index: 999;
	width: 100%;
	background: var(--cr-white);
}

.cr-header svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
}

/* ---------- Top Bar ---------- */

.cr-topbar {
	background: var(--cr-navy);
	color: rgba(255, 255, 255, 0.88);
	font-size: 12px;
}

.cr-topbar__inner {
	display: flex;
	min-height: 38px;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.cr-topbar__contact,
.cr-topbar__right,
.cr-topbar__social {
	display: flex;
	align-items: center;
}

.cr-topbar__contact {
	gap: 25px;
}

.cr-topbar__right {
	gap: 22px;
}

.cr-topbar__contact a,
.cr-topbar__location {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: rgba(255, 255, 255, 0.88);
}

.cr-topbar__contact a:hover {
	color: var(--cr-gold-light);
}

.cr-topbar__contact svg,
.cr-topbar__location svg {
	color: var(--cr-gold);
}

.cr-topbar__social {
	gap: 8px;
}

.cr-topbar__social a {
	display: inline-flex;
	width: 25px;
	height: 25px;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 50%;
	color: var(--cr-white);
	font-size: 11px;
	font-weight: 700;
}

.cr-topbar__social a:hover {
	border-color: var(--cr-gold);
	background: var(--cr-gold);
	color: var(--cr-navy);
}

/* ---------- Main Navigation ---------- */

.cr-navbar {
	position: relative;
	border-bottom: 1px solid var(--cr-border);
	background: rgba(255, 255, 255, 0.98);
	box-shadow: 0 5px 20px rgba(16, 36, 62, 0.05);
}

.cr-navbar.is-sticky {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	animation: cr-header-slide 0.3s ease;
}

.admin-bar .cr-navbar.is-sticky {
	top: 32px;
}

@keyframes cr-header-slide {
	from {
		transform: translateY(-100%);
	}

	to {
		transform: translateY(0);
	}
}

.cr-navbar__inner {
	display: flex;
	min-height: 82px;
	align-items: center;
	justify-content: space-between;
	gap: 35px;
}

/* ---------- Logo ---------- */

.cr-brand {
	flex: 0 0 auto;
}

.cr-brand__link {
	display: inline-flex;
	align-items: center;
}

.cr-brand .custom-logo-link {
	display: block;
}

.cr-brand .custom-logo {
	width: auto;
	max-width: 210px;
	height: 64px;
	object-fit: contain;
}

.cr-brand__fallback {
	display: flex;
	flex-direction: column;
}

.cr-brand__name {
	color: var(--cr-navy);
	font-family: var(--cr-font-heading);
	font-size: 25px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.cr-brand__tagline {
	margin-top: 5px;
	color: var(--cr-gold-dark);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* ---------- Navigation Menu ---------- */

.cr-navigation {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: flex-end;
	gap: 25px;
}

.cr-menu {
	display: flex;
	align-items: center;
	gap: 5px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cr-menu > li {
	position: relative;
	margin: 0;
}

.cr-menu > li > a {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 82px;
	padding: 0 13px;
	color: var(--cr-navy);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.cr-menu > li > a::after {
	position: absolute;
	right: 13px;
	bottom: 18px;
	left: 13px;
	height: 2px;
	background: var(--cr-gold);
	content: "";
	transform: scaleX(0);
	transform-origin: center;
	transition: transform var(--cr-transition);
}

.cr-menu > li > a:hover::after,
.cr-menu > .current-menu-item > a::after,
.cr-menu > .current_page_item > a::after {
	transform: scaleX(1);
}

.cr-menu > .current-menu-item > a,
.cr-menu > .current_page_item > a,
.cr-menu > li > a:hover {
	color: var(--cr-gold-dark);
}

/* ---------- Dropdown Menu ---------- */

.cr-menu .sub-menu {
	position: absolute;
	z-index: 30;
	top: calc(100% - 1px);
	left: 0;
	min-width: 230px;
	margin: 0;
	padding: 10px;
	border: 1px solid var(--cr-border);
	border-radius: 0 0 var(--cr-radius) var(--cr-radius);
	opacity: 0;
	visibility: hidden;
	background: var(--cr-white);
	box-shadow: var(--cr-shadow);
	list-style: none;
	transform: translateY(10px);
	transition:
		opacity var(--cr-transition),
		visibility var(--cr-transition),
		transform var(--cr-transition);
}

.cr-menu li:hover > .sub-menu,
.cr-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.cr-menu .sub-menu a {
	display: block;
	padding: 10px 12px;
	border-radius: 5px;
	color: var(--cr-navy);
	font-size: 13px;
	font-weight: 600;
}

.cr-menu .sub-menu a:hover {
	background: var(--cr-sand);
	color: var(--cr-gold-dark);
}

/* ---------- Header CTA ---------- */

.cr-header-cta {
	display: inline-flex;
	min-height: 45px;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 10px 17px;
	border: 1px solid var(--cr-gold);
	border-radius: var(--cr-radius-small);
	color: var(--cr-navy);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

.cr-header-cta svg {
	color: var(--cr-gold-dark);
}

.cr-header-cta:hover {
	background: var(--cr-gold);
	color: var(--cr-navy-dark);
	transform: translateY(-2px);
}

/* ---------- Mobile Button ---------- */

.cr-menu-toggle {
	display: none;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 5px;
	padding: 0;
	border: 1px solid var(--cr-border);
	border-radius: 6px;
	background: var(--cr-white);
}

.cr-menu-toggle span {
	display: block;
	width: 21px;
	height: 2px;
	background: var(--cr-navy);
	transition: var(--cr-transition);
}

.cr-menu-toggle.is-active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.cr-menu-toggle.is-active span:nth-child(2) {
	opacity: 0;
}

.cr-menu-toggle.is-active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.cr-mobile-overlay {
	display: none;
}

/* ---------- Responsive Header ---------- */

@media (max-width: 1100px) {
	.cr-menu > li > a {
		padding-right: 9px;
		padding-left: 9px;
		font-size: 13px;
	}

	.cr-navigation {
		gap: 15px;
	}

	.cr-brand .custom-logo {
		max-width: 175px;
	}
}

@media (max-width: 921px) {
	.admin-bar .cr-navbar.is-sticky {
		top: 46px;
	}

	.cr-topbar__location,
	.cr-topbar__social {
		display: none;
	}

	.cr-navbar__inner {
		min-height: 72px;
	}

	.cr-brand .custom-logo {
		max-width: 170px;
		height: 55px;
	}

	.cr-menu-toggle {
		display: flex;
	}

	.cr-navigation {
		position: fixed;
		z-index: 1001;
		top: 0;
		right: -330px;
		display: flex;
		width: min(330px, 88vw);
		height: 100vh;
		align-items: stretch;
		justify-content: flex-start;
		flex-direction: column;
		gap: 20px;
		padding: 85px 25px 30px;
		overflow-y: auto;
		background: var(--cr-white);
		box-shadow: -10px 0 35px rgba(16, 36, 62, 0.16);
		transition: right var(--cr-transition);
	}

	.cr-navigation.is-open {
		right: 0;
	}

	.cr-menu {
		align-items: stretch;
		flex-direction: column;
		gap: 0;
	}

	.cr-menu > li {
		width: 100%;
		border-bottom: 1px solid var(--cr-border);
	}

	.cr-menu > li > a {
		min-height: 50px;
		padding: 12px 0;
		font-size: 15px;
	}

	.cr-menu > li > a::after {
		display: none;
	}

	.cr-menu .sub-menu {
		position: static;
		display: block;
		min-width: 100%;
		padding: 0 0 10px 15px;
		border: 0;
		opacity: 1;
		visibility: visible;
		box-shadow: none;
		transform: none;
	}

	.cr-header-cta {
		width: 100%;
		min-height: 49px;
		background: var(--cr-gold);
	}

	.cr-mobile-overlay {
		position: fixed;
		z-index: 1000;
		inset: 0;
		display: block;
		opacity: 0;
		visibility: hidden;
		background: rgba(7, 24, 44, 0.65);
		transition:
			opacity var(--cr-transition),
			visibility var(--cr-transition);
	}

	.cr-mobile-overlay.is-visible {
		opacity: 1;
		visibility: visible;
	}

	body.cr-menu-open {
		overflow: hidden;
	}
}

@media (max-width: 600px) {
	.cr-topbar__inner {
		min-height: 34px;
		justify-content: center;
	}

	.cr-topbar__contact {
		gap: 12px;
	}

	.cr-topbar__contact a {
		font-size: 11px;
	}

	.cr-topbar__contact a:nth-child(2) {
		display: none;
	}

	.cr-navbar__inner {
		min-height: 66px;
	}

	.cr-brand .custom-logo {
		max-width: 145px;
		height: 50px;
	}
}