/**
 * Beta Wheatland — global layout, header/footer shell, block content on inner pages.
 */

/* Brand tokens — aligned with official Wheatland Mortgage logo colors */
:root {
	--wm-navy: #3d311b;
	--wm-navy-deep: #2a2112;
	--wm-gold: #c5a359;
	--wm-gold-soft: #dcc585;
	--wm-cream: #f2f2f2;
	--wm-white: #ffffff;
	--wm-muted: #736555;
	--wm-stone: #a69e94;
	--wm-line: rgba(61, 49, 27, 0.14);
	--wm-font: "DM Sans", system-ui, -apple-system, sans-serif;
	--wm-serif: "Source Serif 4", Georgia, serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--wm-font);
	color: var(--wm-navy);
	background: var(--wm-cream);
	line-height: 1.6;
}

a {
	color: var(--wm-navy-deep);
}

a:hover,
a:focus-visible {
	color: var(--wm-gold);
}

/* Mobile menu overlay (below header, above page) */
.beta-nav-overlay {
	position: fixed;
	inset: 0;
	z-index: 999;
	background: rgba(26, 18, 12, 0.45);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
	cursor: pointer;
}

.beta-nav-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

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

/* Header shell — top bar + main bar (sticky together) */
.beta-site-header-shell {
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 4px 24px rgba(47, 33, 18, 0.06);
}

.beta-site-topbar {
	background: linear-gradient(180deg, #231910 0%, #2f2112 100%);
	color: rgba(255, 255, 255, 0.88);
	font-size: 0.8125rem;
	border-bottom: 1px solid rgba(217, 165, 102, 0.2);
}

.beta-site-topbar__inner {
	width: min(1160px, 100% - 2rem);
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.25rem;
	padding: 0.5rem 0;
}

.beta-site-topbar__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.beta-site-topbar__item a {
	color: rgba(255, 255, 255, 0.92);
	text-decoration: none;
	font-weight: 600;
}

.beta-site-topbar__item a:hover,
.beta-site-topbar__item a:focus-visible {
	color: var(--wm-gold, #d9a566);
}

.beta-site-topbar__item--hours {
	color: rgba(255, 255, 255, 0.72);
	font-weight: 500;
}

.beta-site-topbar__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.4rem 1rem;
	font-size: 0.8125rem;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-radius: 4px;
	background: var(--wm-gold, #d9a566);
	color: var(--wm-navy-deep, #2f2112);
	border: 1px solid rgba(255, 255, 255, 0.1);
	transition: background 0.2s ease, transform 0.15s ease;
}

.beta-site-topbar__cta:hover,
.beta-site-topbar__cta:focus-visible {
	background: var(--wm-gold-soft, #e8c896);
	color: var(--wm-navy-deep, #2f2112);
}

@media (max-width: 599px) {
	.beta-site-topbar__item--hours {
		width: 100%;
		order: 3;
		font-size: 0.75rem;
	}

	.beta-site-topbar__meta {
		gap: 0.35rem 1rem;
	}
}

/* Main header row */
.beta-site-header {
	background: var(--wm-white, #fff);
	border-bottom: 1px solid var(--wm-line, rgba(64, 45, 23, 0.14));
	overflow: visible;
}

.beta-site-brand .custom-logo-link {
	display: inline-flex;
	align-items: center;
}

.beta-site-brand--default-logo .beta-site-brand__logo,
.beta-site-brand img {
	max-height: 52px;
	width: auto;
	max-width: min(300px, 72vw);
	height: auto;
	display: block;
}

.beta-site-header__inner {
	position: relative;
	width: min(1160px, 100% - 2rem);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem 1.35rem;
	padding: 1rem 0;
	flex-wrap: nowrap;
	overflow: visible;
}

/* Equal flex columns balance the centered nav (logo left, menu middle, spacer+toggle right). */
.beta-site-header__col--left {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	justify-content: flex-start;
	align-items: center;
}

.beta-site-header__col--right {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

.beta-site-header__brand {
	flex: 0 0 auto;
	min-width: 0;
	max-width: 100%;
}

.beta-site-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: inherit;
	font-weight: 700;
	font-size: 1.125rem;
}

.beta-nav {
	display: none;
	flex: 0 1 auto;
	min-width: 0;
	max-width: 100%;
	overflow: visible;
}

/* Primary menu — no underlines (overrides global / block link styles). */
#site-navigation a,
#site-navigation a:hover,
#site-navigation a:focus,
#site-navigation a:focus-visible,
#site-navigation a:active {
	text-decoration: none;
	text-decoration-line: none;
}

.beta-nav.is-open {
	display: block;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 1001;
	background: var(--wm-white);
	border-bottom: 1px solid var(--wm-line);
	padding: 1rem min(1.5rem, 5vw) 1.5rem;
	box-shadow: 0 16px 40px rgba(47, 33, 18, 0.12);
	max-height: min(70vh, 28rem);
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.beta-nav .beta-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.beta-nav .beta-nav__list > li {
	position: relative;
	z-index: 1;
}

.beta-nav .beta-nav__list > li.menu-item-has-children:hover,
.beta-nav .beta-nav__list > li.menu-item-has-children:focus-within {
	z-index: 1002;
}

.beta-nav .beta-nav__list > li > a {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 2.75rem;
	padding: 0.6rem 0.95rem;
	text-decoration: none;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.3;
	border-radius: 10px;
	color: var(--wm-navy-deep);
}

.beta-nav .beta-nav__list > li > a:hover,
.beta-nav .beta-nav__list > li > a:focus-visible {
	background: var(--wm-cream);
	color: var(--wm-navy-deep);
}

/* Submenus — mobile: hidden until expanded */
.beta-nav .sub-menu {
	list-style: none;
	margin: 0.25rem 0 0;
	padding: 0.35rem 0 0.35rem 1rem;
	display: none;
	border-left: 2px solid rgba(197, 163, 89, 0.45);
}

.beta-nav li.menu-item-has-children.is-expanded > .sub-menu {
	display: block;
}

.beta-nav .sub-menu li + li {
	margin-top: 0.2rem;
}

.beta-nav .sub-menu a {
	display: flex;
	align-items: center;
	min-height: 2.5rem;
	font-size: 0.9375rem;
	font-weight: 600;
	padding: 0.45rem 0.75rem;
	border-radius: 8px;
	line-height: 1.35;
}

.beta-nav .sub-menu a:hover,
.beta-nav .sub-menu a:focus-visible {
	background: var(--wm-cream);
	color: var(--wm-navy-deep);
}

.beta-nav .sub-menu .sub-menu {
	margin-top: 0.35rem;
}

/* -- Nav breakpoint: below = hamburger + overlay; above = horizontal menu always visible -- */
@media (min-width: 900px) {
	.beta-nav {
		display: block;
		position: static;
		width: auto;
		max-height: none;
		overflow: visible;
		background: transparent;
		border: none;
		padding: 0;
		box-shadow: none;
	}

	/* Same specificity as mobile `.beta-nav.is-open` — wins here (later) so drawer styles never leak on desktop. */
	.beta-nav.is-open {
		display: block;
		position: static;
		left: auto;
		right: auto;
		top: auto;
		z-index: auto;
		max-height: none;
		overflow: visible;
		background: transparent;
		border: none;
		padding: 0;
		box-shadow: none;
	}

	.beta-nav .beta-nav__list {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: center;
		gap: 0.35rem 0.5rem;
	}

	.beta-nav .beta-nav__list > li > a {
		text-transform: uppercase;
		font-size: 0.8125rem;
		letter-spacing: 0.05em;
		padding: 0.65rem 0.95rem;
		min-height: 0;
	}

	/* Dropdown — bridge hover gap so menus stay open */
	.beta-nav .sub-menu {
		display: none;
		position: absolute;
		left: 0;
		top: calc(100% - 2px);
		min-width: 260px;
		padding: 0.6rem 0;
		margin: 0;
		border: 1px solid var(--wm-line);
		border-radius: 12px;
		background: var(--wm-white);
		box-shadow: 0 16px 40px rgba(47, 33, 18, 0.14);
		z-index: 1001;
	}

	.beta-nav .sub-menu::before {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		top: -8px;
		height: 8px;
	}

	.beta-nav .sub-menu .sub-menu {
		top: 0;
		left: calc(100% - 4px);
		margin-left: 0;
		padding-top: 0.6rem;
		padding-bottom: 0.6rem;
	}

	.beta-nav .sub-menu .sub-menu::before {
		left: -10px;
		right: auto;
		width: 12px;
		top: 0;
		bottom: 0;
		height: auto;
	}

	.beta-nav li:hover > .sub-menu,
	.beta-nav li:focus-within > .sub-menu {
		display: block;
	}

	.beta-nav .sub-menu li {
		position: relative;
	}

	.beta-nav .sub-menu li + li {
		margin-top: 0;
	}

	.beta-nav .sub-menu a {
		display: block;
		min-height: 0;
		padding: 0.55rem 1.15rem;
		white-space: nowrap;
		text-transform: none;
		letter-spacing: 0;
		font-size: 0.875rem;
		line-height: 1.4;
	}

	.beta-nav .sub-menu a:hover,
	.beta-nav .sub-menu a:focus-visible {
		background: var(--wm-cream);
	}

	.beta-menu-toggle {
		display: none;
	}
}

/* Parent items — chevron on desktop */
.beta-nav .menu-item-has-children > a {
	padding-right: 1.65rem;
}

@media (max-width: 899px) {
	.beta-nav .menu-item-has-children > a {
		padding-right: 0.95rem;
	}

	.beta-nav .menu-item-has-children > a::after {
		display: none;
	}
}

.beta-nav .menu-item-has-children > a::after {
	content: "";
	position: absolute;
	right: 0.55rem;
	top: 50%;
	width: 0.35rem;
	height: 0.35rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-65%) rotate(45deg);
	opacity: 0.5;
}

@media (min-width: 900px) {
	.beta-nav .sub-menu .menu-item-has-children > a::after {
		transform: translateY(-50%) rotate(-45deg);
		right: 0.5rem;
	}
}

/* Hamburger — only below nav breakpoint (see min-width:900px block above for desktop hide). */
@media (max-width: 899px) {
	.beta-menu-toggle {
		display: inline-flex;
		align-items: center;
		gap: 0.5rem;
		border: 2px solid var(--wm-line);
		background: var(--wm-white);
		border-radius: 10px;
		padding: 0.55rem 0.85rem;
		min-height: 2.75rem;
		font: inherit;
		font-weight: 600;
		font-size: 0.875rem;
		cursor: pointer;
		color: var(--wm-navy-deep);
		transition: border-color 0.2s ease, background 0.2s ease;
	}

	.beta-menu-toggle:hover,
	.beta-menu-toggle:focus-visible {
		border-color: var(--wm-gold);
		outline: none;
	}

	.beta-menu-toggle__bars {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		width: 1.35rem;
		height: 1rem;
	}

	.beta-menu-toggle__bar {
		display: block;
		height: 2px;
		background: var(--wm-navy-deep);
		border-radius: 1px;
		transition: transform 0.2s ease, opacity 0.2s ease;
	}

	.beta-menu-toggle.is-active .beta-menu-toggle__bar:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	.beta-menu-toggle.is-active .beta-menu-toggle__bar:nth-child(2) {
		opacity: 0;
	}

	.beta-menu-toggle.is-active .beta-menu-toggle__bar:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}
}


/* Main inner layout */
.beta-inner-main {
	padding: clamp(2rem, 4vw, 3.5rem) 0;
}

.beta-inner-main__wrap {
	width: min(720px, 100% - 2rem);
	margin: 0 auto;
}

.beta-inner-main__wrap--wide {
	width: min(1160px, 100% - 2rem);
}

.beta-inner-main .entry-header {
	margin-bottom: 1.5rem;
}

.beta-inner-main .entry-title {
	font-family: var(--wm-serif, "Source Serif 4", Georgia, serif);
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	font-weight: 600;
	line-height: 1.2;
	margin: 0;
	color: var(--wm-navy-deep, #2f2112);
}

.beta-inner-main .entry-meta {
	margin: 0.35rem 0 0;
	font-size: 0.9375rem;
	color: var(--wm-muted, #736555);
}

/* Block content */
.entry-content {
	font-size: 1.0625rem;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	font-family: var(--wm-serif, "Source Serif 4", Georgia, serif);
	color: var(--wm-navy-deep, #2f2112);
}

.entry-content .alignwide {
	width: min(1160px, 100vw - 2rem);
	max-width: 100vw;
	margin-left: auto;
	margin-right: auto;
}

.entry-content .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.wp-block-image img {
	height: auto;
}

/* Shared width (footer + blocks that reuse marketing class names) */
.wheatland-wrap {
	width: min(1160px, 100% - 2.5rem);
	margin-inline: auto;
}

/* Site footer (global strip) */
.beta-site-footer {
	background: var(--wm-cream, #f2f2f2);
	border-top: 1px solid var(--wm-line, rgba(64, 45, 23, 0.14));
	padding: 2rem 0 2.5rem;
	margin-top: auto;
}

.beta-site-footer .wheatland-contact {
	padding: 0;
	border: none;
	background: transparent;
}

/* Contact strip (matches front-marketing.css; loaded in base for all templates) */
.wheatland-contact__phone {
	margin-bottom: 1rem;
}

.wheatland-contact {
	padding: 2.5rem 0 3rem;
	background: var(--wm-cream, #f2f2f2);
	border-top: 1px solid var(--wm-line, rgba(64, 45, 23, 0.14));
}

.beta-site-footer .wheatland-contact {
	border-top: none;
}

.wheatland-contact__grid {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 768px) {
	.wheatland-contact__grid {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}
}

.wheatland-contact address {
	font-style: normal;
	margin: 0;
	color: var(--wm-muted, #736555);
	font-size: 0.9375rem;
}

.wheatland-contact a[href^='tel'] {
	font-size: 1.25rem;
	font-weight: 700;
	text-decoration: none;
	color: var(--wm-navy-deep, #2f2112);
}

.wheatland-contact a[href^='tel']:hover,
.wheatland-contact a[href^='tel']:focus-visible {
	color: var(--wm-gold, #d9a566);
}

.wheatland-legal {
	font-size: 0.75rem;
	color: var(--wm-stone, #a69e94);
	margin-top: 2rem;
	line-height: 1.5;
}

/* Footer typography (also defined in front-marketing.css when marketing CSS loads) */
.beta-site-footer .wheatland-h2 {
	font-family: var(--wm-serif, 'Source Serif 4', Georgia, serif);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 600;
	line-height: 1.2;
	margin: 0 0 1rem;
	color: var(--wm-navy-deep, #2f2112);
}

.beta-site-footer .wheatland-lead {
	font-size: 1.125rem;
	color: var(--wm-muted, #736555);
	max-width: 52ch;
	margin: 0 0 1rem;
}

/* Full-width licensing band; copy aligned with `.wheatland-wrap` inside */
.wheatland-disclaimer {
	width: 100%;
	max-width: none;
	margin-top: 2rem;
	padding-top: 0;
	border-top: 1px solid var(--wm-line, rgba(64, 45, 23, 0.14));
	font-size: 0.6875rem;
	line-height: 1.55;
	color: var(--wm-muted, #736555);
}

.wheatland-disclaimer > .wheatland-wrap {
	padding-top: 1.5rem;
}

.wheatland-disclaimer p {
	margin: 0 0 0.65rem;
}

.wheatland-disclaimer p:last-child {
	margin-bottom: 0;
}

.wheatland-disclaimer a {
	color: var(--wm-navy-deep, #2f2112);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wheatland-disclaimer a:hover,
.wheatland-disclaimer a:focus-visible {
	color: var(--wm-gold, #d9a566);
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

.skip-link:focus {
	clip: auto !important;
	height: auto;
	width: auto;
	left: 8px;
	top: 8px;
	z-index: 100000;
	padding: 0.5rem 1rem;
	background: var(--wm-navy-deep, #2f2112);
	color: var(--wm-white, #fff);
	text-decoration: none;
	border-radius: 4px;
}
