/* ==========================================================================
   Embrey Realty — Header & Footer (2026 redesign)
   Source of truth: Embrey_Website_2026_Final_DevPassoff.xd
   Brand tokens: navy #33485d (bars/dividers), ink #1f2b38 (text), gold #f4e95f (hover accent)
   ========================================================================== */

:root {
	--embrey-navy: #33485d;
	--embrey-ink: #1f2b38;
	--embrey-gold: #f4e95f;
	--embrey-header-height: 87px;
}

/* -----------------------------------------------------------------------
   Header
   ----------------------------------------------------------------------- */

header.site-header {
	/* Default: in normal document flow, solid navy bar. <main> simply
	   starts right after it — no fixed positioning, no padding-top hacks.
	   !important here matches legacy style.css `header{...!important}` /
	   grt-responsive-menu.css `header{...}` rules that would otherwise win. */
	position: relative !important;
	width: 100%;
	height: var(--embrey-header-height) !important;
	background-color: var(--embrey-navy) !important;
	color: #fff !important;
	z-index: 999;
	border-bottom: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	transition: background-color .3s ease, box-shadow .3s ease;
}

header.site-header.scrolled {
	box-shadow: 0 0 20px rgba(0, 0, 0, .2);
}

header.site-header.site-header--transparent {
	/* Homepage only: float over the hero, transparent until scrolled. */
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	background-color: transparent !important;
	box-shadow: none;
}

header.site-header.site-header--transparent.scrolled {
	background-color: var(--embrey-navy) !important;
	box-shadow: 0 0 20px rgba(0, 0, 0, .2);
}

.site-header__inner {
	max-width: 1366px;
	height: 100%;
	margin: 0 auto;
	padding: 0 28px 0 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.site-header__logo {
	display: flex;
	align-items: center;
	height: 100%;
}

.site-header__logo img {
	display: block;
	height: 86px;
	width: auto;
	max-width: 344px;
}

.site-header__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	padding: 10px;
	margin: 0;
	cursor: pointer;
	line-height: 0;
}

.site-header__toggle:focus {
	outline: none;
}

.site-header__toggle-icon {
	width: 36px;
	height: auto;
	display: block;
}

/* -----------------------------------------------------------------------
   Off-canvas navigation panel
   ----------------------------------------------------------------------- */

body.site-nav-open {
	overflow: hidden;
}

.site-nav-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(31, 43, 56, .55);
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease, visibility .35s ease;
	z-index: 1000;
}

body.site-nav-open .site-nav-overlay {
	opacity: 1;
	visibility: visible;
}

.site-nav-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 344px;
	max-width: 90vw;
	background-color: #ffffff;
	z-index: 1001;
	transform: translateX(100%);
	transition: transform .35s ease;
	overflow-y: auto;
	box-shadow: -12px 0 30px rgba(0, 0, 0, .18);
}

body.site-nav-open .site-nav-panel {
	transform: translateX(0);
}

.site-nav-panel__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 28px 24px 12px;
}

.site-nav-panel__logo img {
	width: auto;
	height: 44px;
	display: block;
}

.site-nav-panel__close {
	background: none;
	border: 0;
	padding: 8px;
	margin: -8px -8px 0 0;
	cursor: pointer;
	line-height: 0;
}

.site-nav-panel__close img {
	width: 15px;
	height: 15px;
	display: block;
}

.site-nav-menu {
	list-style: none;
	margin: 0;
	padding: 12px 24px 24px;
}

.site-nav-menu li {
	border-bottom: 1px solid rgba(31, 43, 56, .12);
}

.site-nav-menu > li > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 2px;
	font-family: 'Libre Caslon Text', 'Playfair Display', serif;
	font-size: 21px;
	line-height: 28px;
	color: var(--embrey-ink) !important;
	text-decoration: none;
}

.site-nav-menu > li > a:hover,
.site-nav-menu > li > a:focus {
	color: var(--embrey-navy) !important;
	text-decoration: none;
}

.site-nav-menu .menu-item-has-children > a::after {
	content: "";
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	border-right: 1.5px solid var(--embrey-ink);
	border-bottom: 1.5px solid var(--embrey-ink);
	transform: rotate(-45deg);
	transition: transform .25s ease;
}

.site-nav-menu .menu-item-has-children.is-open > a::after {
	transform: rotate(45deg);
}

.site-nav-menu .sub-menu {
	display: block;
	position: static;
	right: auto;
	z-index: auto;
	min-width: 0;
	width: 100%;
	background-color: transparent !important;
	list-style: none;
	margin: 0;
	padding: 0 0 0 12px;
	max-height: 0;
	overflow: hidden;
	transition: max-height .3s ease;
}

.site-nav-menu .menu-item-has-children.is-open > .sub-menu {
	max-height: 600px;
	padding-bottom: 12px;
}

.site-nav-menu .sub-menu li,
.site-nav-menu .sub-menu li:hover {
	border-bottom: 0;
	background-color: transparent !important;
}

.site-nav-menu .sub-menu a {
	display: block;
	padding: 8px 2px;
	font-family: 'DM Sans', sans-serif;
	font-size: 16px;
	color: var(--embrey-ink) !important;
	text-decoration: none;
}

.site-nav-menu .sub-menu a:hover,
.site-nav-menu .sub-menu a:focus {
	text-decoration: underline;
}

.site-nav-panel__social {
	display: flex;
	gap: 12px;
	padding: 4px 24px 28px;
}

.site-nav-panel__social img {
	width: 32px;
	height: 32px;
	display: block;
}

/* -----------------------------------------------------------------------
   Footer
   ----------------------------------------------------------------------- */

footer.site-footer {
	/* !important matches legacy style.css/responsive.css `footer{...!important}`
	   rules (incl. a mobile-breakpoint `footer{padding:0!important}`) that
	   would otherwise win over these. */
	background-color: #ffffff !important;
	color: var(--embrey-ink);
	padding: 36px 0 0 !important;
	position: relative;
}

.site-footer p {
	/* Counters legacy responsive.css `footer p{display:none}` (mobile). */
	display: block !important;
}

.site-footer__inner {
	max-width: 1366px;
	margin: 0 auto;
	padding: 0 55px;
	display: flex;
	flex-wrap: wrap;
	/* XD measurements: menu-column content starts ~79px below the brand
	   logo's top edge — i.e. the shorter menu columns are vertically
	   centered against the taller brand column, not top-aligned. */
	align-items: flex-start;
	gap: 114px;
}

.site-footer__brand {
	flex: 0 0 210px;
}

.site-footer__logo {
	display: inline-block;
	margin-bottom: 18px;
}

.site-footer__logo img {
	width: 165px;
	height: 189px;
	object-fit: contain;
	object-position: left top;
	display: block;
}

.site-footer__phone {
	display: block;
	font-family: Arial, 'DM Sans', sans-serif;
	font-size: 16px;
	font-weight: bold;
	color: var(--embrey-ink) !important;
	text-decoration: none;
	margin-bottom: 8px;
}

.site-footer__address {
	font-family: Arial, 'DM Sans', sans-serif;
	font-size: 16px;
	line-height: 22px;
	color: var(--embrey-ink);
	margin-bottom: 16px;
}

.site-footer__address ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer__address li {
	line-height: 22px;
}

.site-footer__address p {
	margin: 0;
}

.site-footer__social {
	display: flex;
	align-items: center;
	gap: 10px;
}

.site-footer__social-link {
	position: relative;
	display: block;
	width: 32px;
	height: 32px;
}

.site-footer__social-icon {
	position: absolute;
	top: 0;
	left: 0;
	width: 32px;
	height: 32px;
	display: block;
	transition: opacity .2s ease;
}

.site-footer__social-icon--hover {
	opacity: 0;
}

.site-footer__social-link:hover .site-footer__social-icon--default,
.site-footer__social-link:focus .site-footer__social-icon--default {
	opacity: 0;
}

.site-footer__social-link:hover .site-footer__social-icon--hover,
.site-footer__social-link:focus .site-footer__social-icon--hover {
	opacity: 1;
}

.site-footer__col {
	/* Fixed to the XD's measured column width (from the heading-underline
	   width: ~167px for Resources/About) rather than an even flex-share,
	   so columns match the design instead of splitting space equally. */
	flex: 0 1 167px;
	padding-top: 55px;
}

.site-footer__col--wide {
	/* Properties holds two sub-lists side by side — measured underline
	   width ~302.5px in the XD file. */
	flex: 0 1 302px;
}

.site-footer__heading {
	font-family: 'DM Sans', sans-serif !important;
	font-size: 16px;
	font-weight: bold !important;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: var(--embrey-ink);
	margin: 0 0 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--embrey-navy);
}

.site-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer__menu--split {
	column-count: 2;
	column-gap: 24px;
}

.site-footer__menu li a {
	display: inline-block;
	font-family: 'DM Sans', sans-serif;
	font-size: 16px;
	line-height: 1.9;
	color: var(--embrey-ink) !important;
	text-decoration: none;
}

.site-footer__menu li a:hover,
.site-footer__menu li a:focus {
	text-decoration: underline;
}

.site-footer__bottom {
	max-width: 1366px;
	margin: 40px auto 0;
	padding: 20px 55px;
	border-top: 1px solid rgba(31, 43, 56, .12);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.site-footer__copyright {
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	color: var(--embrey-navy);
}

.site-footer__legal {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 8px;
}

.site-footer__legal li {
	display: inline;
}

.site-footer__legal li:not(:last-child)::after {
	content: "|";
	margin-left: 8px;
	color: var(--embrey-navy);
}

.site-footer__legal a {
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	color: var(--embrey-navy) !important;
	text-decoration: none;
}

.site-footer__legal a:hover,
.site-footer__legal a:focus {
	text-decoration: underline;
}

/* -----------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------- */

@media (max-width: 991px) {
	.site-header__logo img {
		height: 60px;
	}

	.site-footer__inner {
		gap: 32px;
	}

	.site-footer__brand {
		flex: 1 1 100%;
	}
}

@media (max-width: 600px) {
	:root {
		--embrey-header-height: 64px;
	}

	.site-header__logo img {
		height: 44px;
	}

	.site-nav-panel {
		width: 100%;
		max-width: 100%;
	}

	.site-footer__col {
		flex: 1 1 100%;
	}

	.site-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
	}
}
