/**
 * Site-wide Theme Builder header / footer chrome.
 *
 * Colours and fonts come from Styles tokens (--cm-*).
 *
 * @package CalumetMedia\ThemeBuilder
 */

/* -------------------------------------------------------------------------
   Header — gradient accent + surface bar
   ------------------------------------------------------------------------- */

.tb-site-header {
	position: relative;
	z-index: 200;
	background: var(--cm-color-header-bg, var(--cm-color-background, #ffffff));
	border-bottom: 1px solid var(--cm-color-border, color-mix(in srgb, var(--cm-color-text, #0f172a) 10%, transparent));
	box-shadow: 0 1px 0 color-mix(in srgb, var(--cm-color-primary, #1e70ea) 8%, transparent),
		0 8px 24px color-mix(in srgb, var(--cm-color-text, #0f172a) 6%, transparent);
	font-family: var(--cm-font-body, "DM Sans", system-ui, sans-serif);
	color: var(--cm-color-header-text, var(--cm-color-text, #0f172a));
}

/* Charter notice + Quick Links utility (municipal / Bristol chrome) */
.tb-site-header__notice {
	background: var(--cm-color-primary, #1e70ea);
	color: #ffffff;
	text-align: center;
	font-size: 0.8125rem;
	line-height: 1.35;
	padding: 0.4rem 1rem;
}

.tb-site-header__notice a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tb-site-header__notice a:hover,
.tb-site-header__notice a:focus {
	opacity: 0.9;
}

.tb-site-header__utility {
	background: color-mix(in srgb, var(--cm-color-primary, #1e70ea) 8%, var(--cm-color-background, #ffffff));
	border-bottom: 1px solid var(--cm-color-border, color-mix(in srgb, var(--cm-color-text, #0f172a) 10%, transparent));
}

.tb-site-header__utility-inner {
	max-width: var(--cm-content-width, 1140px);
	margin: 0 auto;
	padding: 0.35rem 1.5rem;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0.75rem 1.25rem;
	flex-wrap: wrap;
}

.tb-site-header__utility-inner .tb-site-header__lang {
	margin-left: auto;
}

.tb-site-header__utility-inner .tb-social-links {
	margin-left: 0;
}

.tb-site-header__quick-links {
	display: flex;
	align-items: center;
	gap: 0.75rem 1.25rem;
	flex-wrap: wrap;
	min-width: 0;
}

.tb-site-header__quick-links-label {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--cm-color-text, #0f172a);
	margin: 0;
}

.tb-site-header__quick-links-menu {
	display: flex;
	align-items: center;
	gap: 0.35rem 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.tb-site-header__quick-links-menu a {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--cm-color-secondary, #475569);
	text-decoration: none;
}

.tb-site-header__quick-links-menu a:hover,
.tb-site-header__quick-links-menu a:focus {
	color: var(--cm-color-primary, #1e70ea);
}

.tb-site-header__lang {
	flex-shrink: 0;
	margin-left: auto;
}

/* Utility language list — flat native-name links, no dropdown chrome */
.tb-site-header__utility .cal-lang-switcher,
.tb-site-header__utility .cal-lang-switcher--list,
.mmd-header-utility .cal-lang-switcher {
	display: flex;
	align-items: center;
}

.tb-site-header__utility .cal-lang-switcher__list,
.mmd-header-utility .cal-lang-switcher__list {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tb-site-header__utility .cal-lang-switcher__list a,
.mmd-header-utility .cal-lang-switcher__list a {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--cm-color-secondary, #475569);
	text-decoration: none;
}

.tb-site-header__utility .cal-lang-switcher__list a:hover,
.tb-site-header__utility .cal-lang-switcher__list a:focus,
.mmd-header-utility .cal-lang-switcher__list a:hover,
.mmd-header-utility .cal-lang-switcher__list a:focus {
	color: var(--cm-color-primary, #1e70ea);
}

/* Social icons in the light Quick Links utility bar */
.tb-site-header__utility .tb-social-links,
.mmd-header-utility .tb-social-links {
	flex-shrink: 0;
	margin-left: 0;
}

.tb-site-header__utility .tb-social-links__list,
.mmd-header-utility .tb-social-links__list {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tb-site-header__utility .tb-social-links__link,
.mmd-header-utility .tb-social-links__link {
	color: var(--cm-color-secondary, #475569);
	display: inline-flex;
	line-height: 1;
}

.tb-site-header__utility .tb-social-links__link:hover,
.tb-site-header__utility .tb-social-links__link:focus,
.mmd-header-utility .tb-social-links__link:hover,
.mmd-header-utility .tb-social-links__link:focus {
	color: var(--cm-color-primary, #1e70ea);
}

.tb-site-header__utility .tb-social-links__icon,
.mmd-header-utility .tb-social-links__icon {
	width: 18px;
	height: 18px;
}

/* Elementor municipal header — collapse chrome gaps */
.mmd-header.tb-municipal-header,
.elementor-location-header .mmd-header,
.elementor-location-header .tb-municipal-header {
	gap: 0 !important;
	row-gap: 0 !important;
	column-gap: 0 !important;
}

.mmd-header > .e-con,
.mmd-header > .elementor-element,
.tb-municipal-header > .e-con,
.tb-municipal-header > .elementor-element,
.elementor-location-header .mmd-header > .e-con,
.elementor-location-header .tb-municipal-header > .e-con {
	margin: 0 !important;
	--padding-top: 0px;
	--padding-bottom: 0px;
}

.mmd-header .elementor-widget-shortcode,
.tb-municipal-header .elementor-widget-shortcode,
.elementor-location-header .mmd-header .elementor-widget-shortcode {
	margin: 0 !important;
	padding: 0 !important;
}

.mmd-header .elementor-widget-shortcode .elementor-widget-container,
.tb-municipal-header .elementor-widget-shortcode .elementor-widget-container,
.mmd-header .elementor-shortcode,
.tb-municipal-header .elementor-shortcode {
	margin: 0 !important;
	padding: 0 !important;
}

/* Hide empty charter/utility shortcode shells when gated off */
.mmd-header .elementor-widget-shortcode:has(.elementor-shortcode:empty),
.tb-municipal-header .elementor-widget-shortcode:has(.elementor-shortcode:empty),
.mmd-header .elementor-element:has(> .elementor-widget-container .elementor-shortcode:empty) {
	display: none !important;
}

.mmd-header .mmd-charter-notice,
.elementor-location-header .mmd-charter-notice {
	margin: 0;
}

.mmd-header .mmd-header-utility,
.elementor-location-header .mmd-header-utility {
	width: 100%;
	margin: 0;
}

.tb-site-header::before {
	content: "";
	display: block;
	height: 4px;
	background: linear-gradient(
		90deg,
		var(--cm-color-primary, #1e70ea),
		var(--cm-color-accent, #6366f1)
	);
}

.tb-site-header__inner {
	max-width: var(--cm-content-width, 1140px);
	margin: 0 auto;
	padding: 1rem 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.tb-site-header__brand {
	display: flex;
	align-items: center;
	min-width: 0;
}

.tb-site-header__logo {
	padding: var(--cm-header-logo-padding, 0px);
	margin: var(--cm-header-logo-margin, 0px);
}

.tb-site-header__logo a {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.tb-site-header__logo img,
.tb-site-header .cm-theme-brand-logo {
	display: block;
	max-height: var(--cm-header-logo-max-height, 64px) !important;
	max-width: var(--cm-header-logo-max-width, 220px) !important;
	object-fit: contain;
}

.tb-site-header__site-title {
	font-family: var(--cm-font-heading, var(--cm-font-body, "DM Sans", sans-serif));
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--cm-color-text, #0f172a);
	text-decoration: none;
	line-height: 1.2;
	transition: color 0.15s ease;
}

.tb-site-header__site-title:hover,
.tb-site-header__site-title:focus {
	color: var(--cm-color-primary, #1e70ea);
}

.tb-site-header__nav {
	margin-left: auto;
}

.tb-site-header .tb-social-links {
	flex-shrink: 0;
}

.tb-site-header__cta,
.tb-site-header .button,
.elementor-location-header .elementor-button,
.elementor-location-header .elementor-button-link,
.elementor-location-footer .elementor-button,
.elementor-location-footer .elementor-button-link {
	text-transform: var(--cm-button-text-transform, none);
}

.tb-site-header__menu {
	display: flex;
	align-items: center;
	gap: 0.35rem var(--cm-menu-item-gap, 28px);
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.tb-site-header__menu > li {
	position: relative;
	margin: 0;
	padding: 0;
}

.tb-site-header__menu a {
	position: relative;
	display: inline-block;
	font-family: var(--cm-font-menu, var(--cm-font-heading, var(--cm-font-body, "DM Sans", sans-serif)));
	color: var(--cm-color-secondary, #475569);
	text-decoration: none;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.4;
	padding: 0.35rem 0;
	transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-site-header__menu a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--cm-color-primary, #1e70ea);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.2s ease;
}

.tb-site-header__menu a:hover,
.tb-site-header__menu a:focus {
	color: var(--cm-color-primary, #1e70ea);
}

.tb-site-header__menu a:hover::after,
.tb-site-header__menu a:focus::after,
.tb-site-header__menu .current-menu-item > a::after,
.tb-site-header__menu .current_page_item > a::after {
	transform: scaleX(1);
}

.tb-site-header__menu .current-menu-item > a,
.tb-site-header__menu .current_page_item > a {
	color: var(--cm-color-primary, #1e70ea);
}

/* Nav pointer variants (body.tb-nav-pointer-*) — native chrome */
body.tb-nav-pointer-none .tb-site-header__menu a::after,
body.tb-nav-pointer-text .tb-site-header__menu a::after,
body.tb-nav-pointer-background .tb-site-header__menu a::after,
body.tb-nav-pointer-framed .tb-site-header__menu a::after {
	display: none;
}

body.tb-nav-pointer-overline .tb-site-header__menu a::after {
	top: 0;
	bottom: auto;
}

body.tb-nav-pointer-double-line .tb-site-header__menu a::after {
	height: 1px;
	box-shadow: 0 3px 0 var(--cm-color-primary, #1e70ea);
}

body.tb-nav-pointer-background .tb-site-header__menu a {
	padding: 0.4rem 0.75rem;
	border-radius: var(--cm-button-radius, 6px);
}

body.tb-nav-pointer-background .tb-site-header__menu a:hover,
body.tb-nav-pointer-background .tb-site-header__menu a:focus,
body.tb-nav-pointer-background .tb-site-header__menu .current-menu-item > a,
body.tb-nav-pointer-background .tb-site-header__menu .current_page_item > a {
	background: color-mix(in srgb, var(--cm-color-primary, #1e70ea) 14%, transparent);
	color: var(--cm-color-primary, #1e70ea);
}

body.tb-nav-pointer-framed .tb-site-header__menu a {
	padding: 0.35rem 0.7rem;
	border: 1px solid transparent;
	border-radius: var(--cm-button-radius, 6px);
}

body.tb-nav-pointer-framed .tb-site-header__menu a:hover,
body.tb-nav-pointer-framed .tb-site-header__menu a:focus,
body.tb-nav-pointer-framed .tb-site-header__menu .current-menu-item > a,
body.tb-nav-pointer-framed .tb-site-header__menu .current_page_item > a {
	border-color: var(--cm-color-primary, #1e70ea);
	color: var(--cm-color-primary, #1e70ea);
}

body.tb-nav-pointer-text .tb-site-header__menu a:hover,
body.tb-nav-pointer-text .tb-site-header__menu a:focus,
body.tb-nav-pointer-text .tb-site-header__menu .current-menu-item > a,
body.tb-nav-pointer-text .tb-site-header__menu .current_page_item > a {
	font-weight: 600;
}

/* Nav pointer variants — Elementor Theme Builder header (token-driven) */
body.tb-nav-pointer-background .elementor-location-header .elementor-nav-menu--main .elementor-item {
	padding-left: 0.75rem;
	padding-right: 0.75rem;
	border-radius: var(--cm-button-radius, 6px);
}

body.tb-nav-pointer-background .elementor-location-header .elementor-nav-menu--main .elementor-item:hover,
body.tb-nav-pointer-background .elementor-location-header .elementor-nav-menu--main .elementor-item:focus,
body.tb-nav-pointer-background .elementor-location-header .elementor-nav-menu--main .elementor-item.elementor-item-active {
	background-color: var(--cm-color-primary, #1e70ea) !important;
	color: #ffffff !important;
}

body.tb-nav-pointer-framed .elementor-location-header .elementor-nav-menu--main .elementor-item {
	padding-left: 0.7rem;
	padding-right: 0.7rem;
	border: 1px solid transparent;
	border-radius: var(--cm-button-radius, 6px);
}

body.tb-nav-pointer-framed .elementor-location-header .elementor-nav-menu--main .elementor-item:hover,
body.tb-nav-pointer-framed .elementor-location-header .elementor-nav-menu--main .elementor-item:focus,
body.tb-nav-pointer-framed .elementor-location-header .elementor-nav-menu--main .elementor-item.elementor-item-active {
	border-color: var(--cm-color-primary, #1e70ea);
	color: var(--cm-color-primary, #1e70ea) !important;
}

body.tb-nav-pointer-text .elementor-location-header .elementor-nav-menu--main .elementor-item:hover,
body.tb-nav-pointer-text .elementor-location-header .elementor-nav-menu--main .elementor-item:focus,
body.tb-nav-pointer-text .elementor-location-header .elementor-nav-menu--main .elementor-item.elementor-item-active {
	font-weight: 600;
	color: var(--cm-color-primary, #1e70ea) !important;
}

.tb-site-header__menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 220;
	min-width: 14rem;
	margin: 0.25rem 0 0;
	padding: 0.4rem 0;
	list-style: none;
	background: var(--cm-color-background, #ffffff);
	border: 1px solid var(--cm-color-border, color-mix(in srgb, var(--cm-color-text, #0f172a) 12%, transparent));
	border-radius: var(--cm-button-radius, 6px);
	box-shadow: 0 10px 28px color-mix(in srgb, var(--cm-color-text, #0f172a) 12%, transparent);
}

.tb-site-header__menu > li:hover > .sub-menu,
.tb-site-header__menu > li:focus-within > .sub-menu {
	display: block;
}

.tb-site-header__menu .sub-menu li {
	margin: 0;
	padding: 0;
}

.tb-site-header__menu .sub-menu a {
	display: block;
	padding: 0.45rem 0.9rem;
	white-space: nowrap;
}

.tb-site-header__menu .sub-menu a::after {
	display: none;
}

@media (max-width: 767px) {
	.tb-site-header__menu {
		align-items: flex-start;
		flex-direction: column;
		width: 100%;
	}

	.tb-site-header__menu > li {
		width: 100%;
	}

	.tb-site-header__menu .sub-menu {
		position: static;
		display: block;
		min-width: 0;
		margin: 0.15rem 0 0.35rem 0.75rem;
		padding: 0;
		border: none;
		border-radius: 0;
		box-shadow: none;
		background: transparent;
	}

	.tb-site-header__menu .sub-menu a {
		padding: 0.3rem 0;
		white-space: normal;
	}
}

/* -------------------------------------------------------------------------
   Native mega menu (municipal / suite-provided)
   ------------------------------------------------------------------------- */

.tb-site-header__nav {
	position: relative;
}

.tb-site-header__menu--mega {
	align-items: center;
	gap: 0.15rem var(--cm-menu-item-gap, 28px);
}

.tb-mega-item {
	position: static;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.tb-mega-item__link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.tb-mega-item__toggle {
	display: none;
	margin-left: 0.35rem;
	padding: 0.2rem 0.45rem;
	border: 1px solid var(--cm-color-border, #d5ddd8);
	border-radius: var(--cm-button-radius, 4px);
	background: transparent;
	color: inherit;
	cursor: pointer;
	line-height: 1;
}

.tb-mega-item__toggle::before {
	content: "▾";
	font-size: 0.75rem;
}

.tb-mega-panel {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 240;
	padding: 0;
	background: var(--cm-color-primary, #14231c);
	color: var(--cm-color-background, #ffffff);
	box-shadow: 0 16px 40px color-mix(in srgb, var(--cm-color-text, #0f172a) 18%, transparent);
}

.tb-mega-item.is-open > .tb-mega-panel,
.tb-mega-item:hover > .tb-mega-panel,
.tb-mega-item:focus-within > .tb-mega-panel {
	display: block;
}

.tb-mega-panel__inner {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	max-width: 1140px;
	margin: 0 auto;
	padding: 1.5rem 1.5rem 1.75rem;
}

.tb-mega-col {
	min-width: 0;
}

.tb-mega-col--aside,
.tb-mega-col:first-child:nth-last-child(3) {
	background: var(--cm-color-background, #ffffff);
	color: var(--cm-color-text, #14231c);
	border-radius: var(--cm-button-radius, 4px);
	padding: 1rem;
}

.tb-mega-col__heading {
	margin: 0 0 0.75rem;
	font-family: var(--cm-font-menu, var(--cm-font-body, "DM Sans", system-ui, sans-serif));
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.tb-mega-col__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tb-mega-col__menu li {
	margin: 0;
}

.tb-mega-col__menu a {
	display: block;
	padding: 0.35rem 0;
	color: inherit;
	text-decoration: none;
	font-family: var(--cm-font-menu, var(--cm-font-body, "DM Sans", system-ui, sans-serif));
	font-size: 0.95rem;
}

.tb-mega-col__menu a:hover,
.tb-mega-col__menu a:focus {
	text-decoration: underline;
}

.tb-mega-col__button {
	display: inline-block;
	margin-top: 0.75rem;
	padding: 0.55rem 1rem;
	border-radius: var(--cm-button-radius, 4px);
	background: var(--cm-color-button-bg, var(--cm-color-primary, #1e70ea));
	color: var(--cm-color-button-text, #ffffff);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
}

.tb-mega-col__button:hover,
.tb-mega-col__button:focus {
	filter: brightness(1.05);
}

@media (max-width: 767px) {
	.tb-site-header__menu--mega {
		width: 100%;
		align-items: stretch;
		flex-direction: column;
		gap: 0;
	}

	.tb-mega-item {
		width: 100%;
		flex-wrap: nowrap;
		justify-content: space-between;
		border-bottom: 1px solid var(--cm-color-border, #d5ddd8);
	}

	.tb-mega-item__toggle {
		display: inline-flex;
	}

	.tb-mega-panel {
		position: static;
		width: 100%;
		box-shadow: none;
	}

	.tb-mega-item:hover > .tb-mega-panel,
	.tb-mega-item:focus-within > .tb-mega-panel {
		display: none;
	}

	.tb-mega-item.is-open > .tb-mega-panel {
		display: block;
	}

	.tb-mega-panel__inner {
		grid-template-columns: 1fr;
		padding: 0.85rem 0.5rem 1rem;
	}

	.tb-mega-col--aside,
	.tb-mega-col:first-child:nth-last-child(3) {
		padding: 0.75rem;
	}
}

/* -------------------------------------------------------------------------
   Footer — dark modern band
   ------------------------------------------------------------------------- */

.tb-site-footer {
	position: relative;
	background: var(--cm-color-footer-bg, color-mix(in srgb, var(--cm-color-text, #0f172a) 92%, black));
	color: var(--cm-color-footer-text, color-mix(in srgb, var(--cm-color-background, #ffffff) 88%, transparent));
	font-family: var(--cm-font-body, "DM Sans", system-ui, sans-serif);
	margin-top: auto;
}

.tb-site-footer::before {
	content: "";
	display: block;
	height: 4px;
	background: linear-gradient(
		90deg,
		var(--cm-color-primary, #1e70ea),
		var(--cm-color-accent, #6366f1)
	);
}

.tb-site-footer__inner {
	max-width: var(--cm-content-width, 1140px);
	margin: 0 auto;
	padding: 2.75rem 1.5rem 1.5rem;
}

.tb-site-footer__grid {
	display: grid;
	gap: 2.25rem;
	grid-template-columns: 1fr;
	padding-bottom: 2rem;
	border-bottom: 1px solid color-mix(in srgb, var(--cm-color-background, #ffffff) 14%, transparent);
}

.tb-site-footer__brand {
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
	align-items: flex-start;
}

.tb-site-footer__logo {
	line-height: 0;
}

.tb-site-footer__logo a {
	display: inline-block;
	line-height: 0;
}

.tb-site-footer__logo img,
.tb-site-footer__logo .cm-theme-brand-logo {
	display: block;
	width: auto !important;
	height: auto !important;
	max-width: 300px !important;
	max-height: 96px !important;
	object-fit: contain;
	object-position: left center;
}

.tb-site-footer__brand-name {
	margin: 0;
	font-family: var(--cm-font-heading, var(--cm-font-body, "DM Sans", sans-serif));
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--cm-color-background, #ffffff);
	line-height: 1.3;
}

.tb-site-footer__brand-name a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.tb-site-footer__brand-name a:hover,
.tb-site-footer__brand-name a:focus {
	color: inherit;
}

.tb-site-footer__contact {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	max-width: 22rem;
}

.tb-site-footer__contact-line {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: color-mix(in srgb, var(--cm-color-background, #ffffff) 72%, transparent);
}

.tb-site-footer__contact-line a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.tb-site-footer__contact-line a:hover,
.tb-site-footer__contact-line a:focus {
	color: inherit;
}

.tb-site-footer__heading {
	margin: 0 0 0.9rem;
	font-family: var(--cm-font-heading, var(--cm-font-body, "DM Sans", sans-serif));
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cm-color-background, #ffffff);
}

.tb-site-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.tb-site-footer__menu li {
	margin: 0;
	padding: 0;
}

.tb-site-footer__menu a {
	color: color-mix(in srgb, var(--cm-color-background, #ffffff) 72%, transparent);
	text-decoration: none;
	font-size: 0.9375rem;
	line-height: 1.4;
	transition: color 0.15s ease;
}

.tb-site-footer__menu a:hover,
.tb-site-footer__menu a:focus {
	color: color-mix(in srgb, var(--cm-color-background, #ffffff) 72%, transparent);
}

.tb-site-footer__sub {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	align-items: center;
	padding-top: 1.25rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: color-mix(in srgb, var(--cm-color-background, #ffffff) 55%, transparent);
	text-align: center;
}

.tb-site-footer__privacy,
.tb-site-footer__credit {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.tb-site-footer__privacy:hover,
.tb-site-footer__privacy:focus,
.tb-site-footer__credit:hover,
.tb-site-footer__credit:focus {
	color: inherit;
}

/* -------------------------------------------------------------------------
   Elementor Pro location chrome (when source = elementor)
   ------------------------------------------------------------------------- */

.elementor-location-header {
	background: var(--cm-color-header-bg, var(--cm-color-background, #ffffff));
	border-bottom: 1px solid var(--cm-color-border, #e2e8f0);
	font-family: var(--cm-font-body, "DM Sans", system-ui, sans-serif);
}

.elementor-location-header .elementor-widget-theme-site-title .elementor-heading-title,
.elementor-location-header .elementor-widget-heading .elementor-heading-title {
	font-family: var(--cm-font-heading, var(--cm-font-body, "DM Sans", sans-serif));
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--cm-color-header-text, var(--cm-color-text, #0f172a));
}

.elementor-location-header .elementor-nav-menu--main,
.elementor-location-header .elementor-nav-menu--main .elementor-nav-menu,
.elementor-location-header .elementor-nav-menu--layout-horizontal .elementor-nav-menu {
	gap: var(--cm-menu-item-gap, 28px);
	column-gap: var(--cm-menu-item-gap, 28px);
}

.elementor-location-header .elementor-nav-menu--main .elementor-item,
.elementor-location-header .e-n-menu-title,
.elementor-location-header .e-n-menu-title-text,
.tb-site-header__menu--mega .tb-mega-item__link {
	font-family: var(--cm-font-menu, var(--cm-font-heading, var(--cm-font-body, "DM Sans", system-ui, sans-serif)));
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--cm-color-header-text, var(--cm-color-text, #0f172a));
}

.elementor-location-header .elementor-nav-menu--main .elementor-item:hover,
.elementor-location-header .elementor-nav-menu--main .elementor-item:focus,
.elementor-location-header .elementor-nav-menu--main .elementor-item.elementor-item-active {
	color: var(--cm-color-primary, #1e70ea);
}

.elementor-location-header .elementor-widget-image,
.elementor-location-header .elementor-widget-theme-site-logo,
.elementor-element-hdrlogo {
	padding: var(--cm-header-logo-padding, 0px);
	margin: var(--cm-header-logo-margin, 0px);
}

.elementor-location-header .elementor-widget-image img,
.elementor-location-header .elementor-widget-theme-site-logo img,
.elementor-element-hdrlogo img {
	max-height: var(--cm-header-logo-max-height, 64px) !important;
	max-width: var(--cm-header-logo-max-width, 220px) !important;
	object-fit: contain;
}

.elementor-location-footer {
	background: var(--cm-color-footer-bg, #0f172a);
	font-family: var(--cm-font-body, "DM Sans", system-ui, sans-serif);
	color: var(--cm-color-footer-text, #ffffff);
}

.elementor-location-footer .elementor-widget-image img,
.elementor-location-footer .elementor-widget-theme-site-logo img,
.elementor-element-ftrlogo img {
	width: auto !important;
	height: auto !important;
	max-width: 300px !important;
	max-height: 96px !important;
	object-fit: contain;
	object-position: left center;
}

/* Force footer logo left — live markup is flat (no .elementor-image wrap);
   ftrcol1 is a flex column that can center a content-sized image widget. */
.elementor-location-footer .elementor-element-ftrcol1,
.elementor-element-ftrcol1 {
	--align-items: flex-start !important;
	align-items: flex-start !important;
	justify-content: flex-start !important;
}
.elementor-location-footer .elementor-element-ftrlogo,
.elementor-element-ftrlogo,
.elementor-element-ftrlogo .elementor-widget-container,
.elementor-element-ftrlogo .elementor-image,
.elementor-element-ftrlogo a {
	text-align: left !important;
	justify-content: flex-start !important;
	align-self: flex-start !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	width: fit-content !important;
	max-width: 100%;
}
.elementor-location-footer .elementor-element-ftrlogo img,
.elementor-element-ftrlogo img {
	margin: 0 !important;
	display: block !important;
	float: none !important;
	width: auto !important;
	height: auto !important;
	object-position: left center;
}

/* Brand + Quick links: content-sized columns so space-between spans full width. */
.elementor-location-footer .elementor-element-ftrgrid > .e-con,
.elementor-element-ftrgrid > .e-con {
	flex-grow: 0 !important;
	width: auto !important;
	max-width: 100%;
}

.elementor-location-footer .elementor-nav-menu,
.elementor-location-footer .elementor-widget-nav-menu ul,
.elementor-element-ftrnav .elementor-nav-menu,
.elementor-element-ftrnav .elementor-widget-nav-menu ul,
.elementor-element-ftrnav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Remove Quick links item indent (Elementor pads .elementor-item). */
.elementor-location-footer .elementor-nav-menu--main .elementor-item,
.elementor-element-ftrnav .elementor-nav-menu--main .elementor-item {
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
}

.elementor-location-footer .elementor-widget-heading .elementor-heading-title,
.elementor-location-footer .elementor-widget-theme-site-title .elementor-heading-title {
	font-family: var(--cm-font-heading, var(--cm-font-body, "DM Sans", sans-serif));
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--cm-color-footer-text, #ffffff);
}

.elementor-location-footer .elementor-widget-text-editor,
.elementor-location-footer .elementor-nav-menu--main .elementor-item,
.elementor-location-footer .elementor-widget-text-editor a {
	font-family: var(--cm-font-body, "DM Sans", system-ui, sans-serif);
	color: var(--cm-color-footer-text, #ffffff);
	opacity: 0.85;
}

.elementor-location-footer .elementor-widget-text-editor a:hover,
.elementor-location-footer .elementor-widget-text-editor a:focus,
.elementor-location-footer .elementor-nav-menu--main .elementor-item:hover,
.elementor-location-footer .elementor-nav-menu--main .elementor-item:focus {
	color: var(--cm-color-footer-text, #ffffff) !important;
	opacity: 0.85;
}

@media (min-width: 768px) {
	.tb-site-footer__grid {
		grid-template-columns: 1fr auto;
		justify-content: space-between;
		align-items: start;
	}

	.tb-site-footer__sub {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		text-align: left;
	}
}

/* -------------------------------------------------------------------------
   Front page tall hero — transparent overlay header (home only)
   ------------------------------------------------------------------------- */

body.tb-home-tall-hero .tb-site-header,
body.tb-home-tall-hero .elementor-location-header {
	position: absolute;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	z-index: 100;
	width: 100%;
	background: transparent !important;
	border-bottom: none !important;
	box-shadow: none !important;
}

/* Modest top inset over full-bleed hero (admin-bar offset handles toolbar clearance). */
body.tb-home-tall-hero .tb-site-header__inner,
body.tb-home-tall-hero .elementor-location-header {
	padding-top: calc(1rem + env(safe-area-inset-top, 0px));
}

body.tb-home-tall-hero .tb-site-header::before {
	display: none;
}

/* Transparent header chrome only — mega dropdown panels are restored below. */
body.tb-home-tall-hero .elementor-location-header > .elementor-element,
body.tb-home-tall-hero .elementor-location-header .e-con {
	background-color: transparent !important;
	border-color: transparent !important;
	box-shadow: none !important;
}

/* Mega dropdown panels keep a solid surface over the hero (override chrome wipe). */
body.tb-home-tall-hero .elementor-location-header .e-n-menu-content,
body.tb-home-tall-hero .elementor-location-header .e-n-menu-content > .e-con,
body.tb-home-tall-hero .elementor-location-header .elementor-widget-mega-menu .e-n-menu-content,
body.tb-home-tall-hero .elementor-location-header .elementor-widget-n-menu .e-n-menu-content {
	background-color: var(--cm-color-primary, #14231c) !important;
	border-color: transparent !important;
	box-shadow: 0 16px 40px color-mix(in srgb, var(--cm-color-text, #0f172a) 18%, transparent) !important;
	color: var(--cm-color-background, #ffffff);
}

/* Inner mega columns: restore Elementor --background-color (white cards) when set. */
body.tb-home-tall-hero .elementor-location-header .e-n-menu-content .e-con {
	background-color: var(--background-color, transparent) !important;
	border-color: transparent !important;
	box-shadow: none !important;
}

body.tb-home-tall-hero .tb-mega-panel {
	background: var(--cm-color-primary, #14231c);
	color: var(--cm-color-background, #ffffff);
}

body.tb-home-tall-hero .tb-site-header,
body.tb-home-tall-hero .tb-site-header a,
body.tb-home-tall-hero .tb-site-header__site-title,
body.tb-home-tall-hero .tb-site-header__menu > li > a,
body.tb-home-tall-hero .tb-site-header__menu--mega .tb-mega-item__link {
	color: #ffffff;
}

body.tb-home-tall-hero .elementor-location-header .elementor-nav-menu--main .elementor-item,
body.tb-home-tall-hero .elementor-location-header .e-n-menu-title,
body.tb-home-tall-hero .elementor-location-header .e-n-menu-title-text,
body.tb-home-tall-hero .elementor-location-header .elementor-widget-theme-site-title .elementor-heading-title {
	color: #ffffff !important;
	font-family: var(--cm-font-menu, var(--cm-font-heading, var(--cm-font-body, "DM Sans", system-ui, sans-serif)));
}

/* Mega panel inner copy stays readable (white on primary, dark on white cards). */
body.tb-home-tall-hero .elementor-location-header .e-n-menu-content .elementor-heading-title,
body.tb-home-tall-hero .elementor-location-header .e-n-menu-content .elementor-nav-menu--main .elementor-item,
body.tb-home-tall-hero .elementor-location-header .e-n-menu-content a {
	color: inherit;
}

body.tb-home-tall-hero .tb-mega-panel .tb-mega-col__heading,
body.tb-home-tall-hero .tb-mega-panel .tb-mega-col__menu a {
	color: inherit;
}

body.tb-home-tall-hero .tb-mega-panel .tb-mega-col--aside,
body.tb-home-tall-hero .tb-mega-panel .tb-mega-col--aside .tb-mega-col__heading,
body.tb-home-tall-hero .tb-mega-panel .tb-mega-col--aside a {
	color: var(--cm-color-text, #14231c);
}

/* Spacing for mega top items over absolute hero header. */
body.tb-home-tall-hero .elementor-location-header .e-n-menu,
body.tb-home-tall-hero .elementor-location-header .e-n-menu-heading {
	gap: var(--cm-menu-item-gap, 1.25rem);
	column-gap: var(--cm-menu-item-gap, 1.25rem);
}

body.tb-home-tall-hero .tb-site-header__menu--mega {
	gap: 0.15rem 1.25rem;
}

body.tb-home-tall-hero .elementor-location-header .e-n-menu-content {
	width: 100%;
	left: 0;
	right: 0;
}

/* Hover/active colour comes from sitewide Elementor + tb-nav-pointer-* rules. */

body.tb-home-tall-hero .elementor-location-header .elementor-button,
body.tb-home-tall-hero .elementor-location-header .elementor-button-link {
	background-color: transparent !important;
	border: 1px solid rgba(255, 255, 255, 0.85) !important;
	color: #ffffff !important;
}

/* Do not restyle buttons inside the mega dropdown (e.g. Meetings CTA). */
body.tb-home-tall-hero .elementor-location-header .e-n-menu-content .elementor-button,
body.tb-home-tall-hero .elementor-location-header .e-n-menu-content .elementor-button-link {
	background-color: var(--cm-color-button-bg, var(--cm-color-primary, #1e70ea)) !important;
	border: none !important;
	color: var(--cm-color-button-text, #ffffff) !important;
}

body.tb-home-tall-hero .tb-site-header__cta,
body.tb-home-tall-hero .tb-site-header .button {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.85);
	color: #ffffff;
}

/* -------------------------------------------------------------------------
   Social links — header & footer
   ------------------------------------------------------------------------- */

.tb-social-links {
	margin: 0;
	padding: 0;
}

.tb-social-links__list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tb-social-links__item {
	margin: 0;
	padding: 0;
}

.tb-social-links__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	color: inherit;
	text-decoration: none;
	border-radius: 0.25rem;
	transition: color 0.15s ease, opacity 0.15s ease;
}

.tb-social-links__link:hover,
.tb-social-links__link:focus {
	color: var(--cm-color-primary, #1e70ea);
}

.tb-site-footer .tb-social-links__link:hover,
.tb-site-footer .tb-social-links__link:focus {
	color: var(--cm-color-footer-text, color-mix(in srgb, var(--cm-color-background, #ffffff) 88%, transparent));
}

.tb-social-links__icon {
	display: block;
	width: 1.25rem;
	height: 1.25rem;
}

.tb-social-links .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.tb-site-header .tb-social-links {
	color: var(--cm-color-header-text, var(--cm-color-text, #0f172a));
}

.tb-site-footer .tb-social-links {
	color: var(--cm-color-footer-text, color-mix(in srgb, var(--cm-color-background, #ffffff) 88%, transparent));
	margin-top: 0.25rem;
}

body.tb-home-tall-hero .tb-site-header .tb-social-links,
body.tb-home-tall-hero .tb-site-header .tb-social-links__link {
	color: #ffffff;
}

/* -------------------------------------------------------------------------
   Mobile header chrome — social off, smaller CTA, visible hamburger
   ------------------------------------------------------------------------- */

@media (max-width: 767px) {
	/* Hide header social only (footer social stays). */
	.elementor-location-header .elementor-element-hdrsocial,
	.elementor-location-header .tb-social-links--header,
	.tb-site-header__inner > .tb-social-links {
		display: none !important;
	}

	/* Native header: keep brand + nav on one row. */
	.tb-site-header__inner {
		flex-wrap: nowrap;
		padding: 0.5rem 0.75rem;
		gap: 0.75rem;
	}

	.tb-site-header__logo {
		padding: 0;
		margin: 0;
	}

	/*
	 * Single-row mobile bar (DOM order is logo → nav → CTA):
	 * [Logo]                    [Contact Us] [Hamburger]
	 */
	.elementor-location-header .elementor-element-hdrroot,
	.elementor-location-header .elementor-element-mmdhdrmain {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		justify-content: space-between !important;
		column-gap: 0.5rem;
		row-gap: 0;
		padding: 0.5rem 0.75rem !important;
	}

	.elementor-location-header .elementor-element-hdrlogo,
	.elementor-location-header .elementor-element-mmdhdrlogo {
		order: 1;
		flex: 0 1 auto;
		width: auto !important;
		max-width: min(60%, 180px);
		min-width: 0;
		padding: 0 !important;
		margin: 0 !important;
	}

	/* Collapse Elementor image width/space so the logo box hugs the image. */
	.elementor-location-header .elementor-element-hdrlogo .elementor-widget-container,
	.elementor-location-header .elementor-element-mmdhdrlogo .elementor-widget-container,
	.elementor-location-header .elementor-element-hdrlogo img,
	.elementor-location-header .elementor-element-mmdhdrlogo img {
		width: auto !important;
		max-width: 100% !important;
	}

	.elementor-location-header .elementor-element-hdrcta,
	.elementor-location-header .elementor-element-mmdhdrcta {
		order: 2;
		flex: 0 0 auto;
		width: auto !important;
		margin: 0 0 0 auto !important;
	}

	.elementor-location-header .elementor-element-hdrnav,
	.elementor-location-header .elementor-element-mmdhdrmega {
		order: 3;
		flex: 0 0 auto;
		width: auto !important;
		margin: 0 !important;
	}

	/* Shrink Contact Us / header CTA (not buttons inside mega panels). */
	.elementor-location-header .elementor-element-hdrcta .elementor-button,
	.elementor-location-header .elementor-element-hdrcta .elementor-button-link,
	.elementor-location-header .elementor-element-mmdhdrcta .elementor-button,
	.elementor-location-header .elementor-element-mmdhdrcta .elementor-button-link {
		padding: 0.35rem 0.75rem !important;
		font-size: 0.75rem !important;
		line-height: 1.25 !important;
		min-height: 0 !important;
	}

	/* Bigger hamburger on a solid background so it stays visible on dark heroes. */
	.elementor-location-header .elementor-menu-toggle,
	.elementor-location-header .e-n-menu-toggle,
	.elementor-location-header .e-n-menu-toggle-button {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		width: 44px !important;
		height: 44px !important;
		min-width: 44px;
		min-height: 44px;
		padding: 0 !important;
		margin: 0;
		background-color: #ffffff !important;
		border: 1px solid rgba(15, 23, 42, 0.12) !important;
		border-radius: 6px !important;
		color: #0f172a !important;
		box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
	}

	.elementor-location-header .elementor-menu-toggle i,
	.elementor-location-header .elementor-menu-toggle svg,
	.elementor-location-header .e-n-menu-toggle i,
	.elementor-location-header .e-n-menu-toggle svg,
	.elementor-location-header .e-n-menu-toggle-button i,
	.elementor-location-header .e-n-menu-toggle-button svg {
		color: #0f172a !important;
		fill: #0f172a !important;
		font-size: 1.35rem !important;
		width: 1.35rem;
		height: 1.35rem;
	}

	/* Elementor hamburger bars (span-based toggle). */
	.elementor-location-header .elementor-menu-toggle .elementor-menu-toggle__icon--open,
	.elementor-location-header .elementor-menu-toggle .elementor-menu-toggle__icon--close {
		color: #0f172a !important;
	}
}

/* -------------------------------------------------------------------------
   Footer Quick links — always vertical list, never hamburger
   ------------------------------------------------------------------------- */

.elementor-location-footer .elementor-menu-toggle,
.elementor-element-ftrnav .elementor-menu-toggle {
	display: none !important;
}

.elementor-location-footer .elementor-nav-menu--dropdown,
.elementor-element-ftrnav .elementor-nav-menu--dropdown {
	display: none !important;
}

.elementor-location-footer .elementor-nav-menu--main,
.elementor-element-ftrnav .elementor-nav-menu--main {
	display: block !important;
}

.elementor-location-footer .elementor-nav-menu--main .elementor-nav-menu,
.elementor-element-ftrnav .elementor-nav-menu--main .elementor-nav-menu {
	display: flex !important;
	flex-direction: column;
	gap: 0.55rem;
}
