/* Opt-in presentation: customer names, logos and phone numbers stay in blocks. */
.agency-adaptive-header .agency-adaptive-header__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 1rem 2rem;
	align-items: center;
}
.agency-adaptive-header__inner > * { margin-block: 0; }
.agency-adaptive-header__brand { grid-area: 1 / 1; gap: 1rem; min-width: 0; }
.agency-adaptive-header__contact { grid-area: 1 / 2; }
.agency-adaptive-header__navigation {
	grid-area: 2 / 1 / 3 / -1;
	border-top: 1px solid color-mix(in oklch, currentColor 20%, transparent);
	padding-top: .5rem;
}
.agency-adaptive-header__brand .wp-block-site-title {
	font-size: clamp(1.625rem, 2.6vw, 2.25rem);
	font-weight: 800;
	line-height: 1.3;
	margin: 0;
	white-space: nowrap;
}
.agency-adaptive-header__brand .wp-block-site-title a { text-decoration: none; }
.agency-adaptive-header__words { gap: .2rem; }
.agency-adaptive-header__sub { font-size: .65rem; letter-spacing: .18em; margin: 0; }
.agency-adaptive-header .agency-adaptive-header__mark,
.agency-adaptive-header .agency-adaptive-header__phone { display: none; }
.agency-adaptive-header__appointment .wp-block-button__link {
	padding: .7rem 1.2rem;
	border-radius: 2px;
	white-space: nowrap;
}
.agency-adaptive-header :where(a, button) { touch-action: manipulation; }
/* Balanced masthead: keep brand and contact information in two clear groups. */
@media (min-width: 782px) {
	.agency-adaptive-header--balanced.agency-site-header { padding-block: 20px 0 !important; }
	.agency-adaptive-header--balanced .agency-adaptive-header__inner { gap: 16px 24px; }
	.agency-adaptive-header--balanced .agency-adaptive-header__brand { gap: clamp(18px, 2vw, 28px); }
	.agency-adaptive-header--balanced .wp-block-site-logo { width: clamp(90px, 9vw, 116px); flex-shrink: 0; }
	.agency-adaptive-header--balanced .wp-block-site-logo img { display: block; width: 100%; height: auto; }
	.agency-adaptive-header--balanced .agency-adaptive-header__contact {
		gap: clamp(18px, 2vw, 28px);
		padding-left: clamp(18px, 2vw, 28px);
		border-left: 1px solid color-mix(in oklch, currentColor 18%, transparent);
		align-items: center;
	}
	.agency-adaptive-header--balanced .agency-adaptive-header__hotline { gap: 0; text-align: left; }
	.agency-adaptive-header--balanced .agency-adaptive-header__hotline .agency-company-field--phone {
		font-size: clamp(24px, 2.1vw, 30px);
		line-height: 1.2;
		color: var(--wp--preset--color--accent-light);
		font-variant-numeric: tabular-nums;
	}
	.agency-adaptive-header--balanced .agency-adaptive-header__appointment .wp-block-button__link {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		box-sizing: border-box;
		min-height: 48px;
		padding: 12px 22px;
		font-size: 16px;
		line-height: 1.5;
	}
	.agency-adaptive-header--balanced .agency-adaptive-header__navigation { padding-block: 6px; }
}
@media (max-width: 781px) {
	html.agency-has-adaptive-header { scroll-padding-top: 100px; }
	.agency-adaptive-header.agency-site-header {
		box-sizing: border-box;
		padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)) !important;
		margin: 0;
	}
	.agency-adaptive-header .agency-adaptive-header__inner {
		grid-template-columns: 44px minmax(0, 1fr) auto;
		gap: 10px;
		min-height: 80px;
		margin: 0 !important;
		max-width: none;
	}
	.agency-adaptive-header__navigation {
		grid-area: 1 / 1;
		border: 0;
		padding: 0;
		margin: 0;
	}
	.agency-adaptive-header__brand { grid-area: 1 / 2; gap: 9px; flex-wrap: nowrap; }
	.agency-adaptive-header__brand .wp-block-site-logo { width: 62px; flex: 0 0 62px; }
	.agency-adaptive-header__brand .wp-block-site-logo img { display: block; width: 100%; height: auto; }
	.agency-adaptive-header__brand .wp-block-site-title { font-size: 17px; letter-spacing: 0; }
	.agency-adaptive-header__sub { font-size: 8px; letter-spacing: .12em; white-space: nowrap; }
	.agency-adaptive-header__contact { grid-area: 1 / 3; margin: 0; gap: 0; }
	.agency-adaptive-header__contact > :not(.agency-adaptive-header__appointment) { display: none; }
	.agency-adaptive-header__appointment .wp-block-button__link { font-size: 12px; padding: 12px 10px; }
	.agency-adaptive-header .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
	.agency-adaptive-header .wp-block-navigation__responsive-container-open {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border-radius: 2px;
		background: color-mix(in oklch, currentColor 8%, transparent);
	}
	.agency-adaptive-header .wp-block-navigation__responsive-container-open svg { display: none; }
	.agency-adaptive-header .wp-block-navigation__responsive-container-open::before {
		content: "";
		box-sizing: border-box;
		width: 22px;
		height: 18px;
		border-block: 2px solid currentColor;
		background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
	}
	.agency-adaptive-header .wp-block-navigation__responsive-container.is-menu-open { z-index: 100002; }
	.agency-adaptive-header .wp-block-navigation__responsive-container-close { min-width: 44px; min-height: 44px; }
	.agency-adaptive-header.is-compact {
		position: fixed;
		top: var(--agency-header-top, 0px);
		inset-inline: 0;
		z-index: 99990;
		width: 100%;
		box-shadow: 0 4px 18px rgb(0 0 0 / 18%);
	}
	.agency-adaptive-header.is-compact .agency-adaptive-header__inner { min-height: 60px; }
	.agency-adaptive-header.is-compact .wp-block-site-logo,
	.agency-adaptive-header.is-compact .agency-adaptive-header__sub,
	.agency-adaptive-header.is-compact .agency-adaptive-header__contact { display: none; }
	.agency-adaptive-header.is-compact .agency-adaptive-header__mark {
		display: block;
		position: relative;
		width: 52px;
		height: 24px;
		flex: 0 0 52px;
		margin: 0;
		overflow: hidden;
	}
	.agency-adaptive-header__mark img {
		position: absolute;
		top: 50%;
		width: 100%;
		height: auto;
		transform: translateY(-53%);
		filter: brightness(0) invert(1);
	}
	.agency-adaptive-header.is-compact .agency-adaptive-header__phone { display: block; grid-area: 1 / 3; margin: 0; }
	.agency-adaptive-header__phone a {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		font-size: 0;
		border-radius: 2px;
		background: color-mix(in oklch, currentColor 8%, transparent);
	}
	.agency-adaptive-header__phone a::before {
		content: "";
		width: 22px;
		height: 22px;
		background: currentColor;
		mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.79 19.79 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.96.36 1.91.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.9.34 1.85.58 2.81.7A2 2 0 0 1 22 16.92z' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	}
}
@media (max-width: 380px) {
	.agency-adaptive-header .agency-adaptive-header__inner { gap: 6px; }
	.agency-adaptive-header__brand { gap: 7px; }
	.agency-adaptive-header__brand .wp-block-site-logo { width: 44px; flex-basis: 44px; }
	.agency-adaptive-header__brand .wp-block-site-title { font-size: 15px; }
	.agency-adaptive-header__sub { font-size: 7px; }
	.agency-adaptive-header__appointment .wp-block-button__link { padding-inline: 8px; }
}
@media (max-width: 781px) {
	.agency-adaptive-header--balanced .agency-adaptive-header__inner { gap: 12px; }
	.agency-adaptive-header--balanced:not(.is-compact) .agency-adaptive-header__inner { min-height: 72px; }
	.agency-adaptive-header--balanced .wp-block-site-logo { display: none; }
	.agency-adaptive-header--balanced .agency-adaptive-header__brand .wp-block-site-title { font-size: 18px; }
	.agency-adaptive-header--balanced .agency-adaptive-header__appointment .wp-block-button__link { font-size: 14px; line-height: 20px; padding: 12px; }
}

/* Native two-level navigation: dropdowns on desktop, a compact mobile drawer. */
.agency-adaptive-header .agency-menu-toggle,
.agency-adaptive-header .agency-menu-heading { display: none; }
@media (min-width: 782px) {
	.agency-adaptive-header .wp-block-navigation__submenu-container {
		min-width: 260px !important;
		padding: 10px !important;
		border: 0 !important;
		border-top: 2px solid var(--wp--preset--color--accent-light) !important;
		background: var(--wp--preset--color--ink) !important;
		color: var(--wp--preset--color--canvas) !important;
		box-shadow: 0 12px 30px rgb(0 0 0 / 20%);
	}
	.agency-adaptive-header .wp-block-navigation__submenu-container a { box-sizing: border-box; min-height: 44px; padding: 10px 14px; font-size: 15px; }
	.agency-adaptive-header .wp-block-navigation-submenu__toggle { min-width: 32px; min-height: 44px; margin-left: 0; }
	.agency-adaptive-header .wp-block-navigation__container > li:nth-last-child(-n+2) > .wp-block-navigation__submenu-container { left: auto; right: 0; }
}
@media (max-width: 781px) {
	.agency-adaptive-header .wp-block-navigation__responsive-container.is-menu-open {
		padding: 0 !important;
		background: rgb(6 15 24 / 48%) !important;
		animation: none;
		overscroll-behavior: contain;
	}
	.agency-adaptive-header .is-menu-open .wp-block-navigation__responsive-close {
		box-sizing: border-box;
		width: min(360px, calc(100% - 48px));
		max-width: none;
		min-height: 100%;
		margin: 0;
		padding: max(20px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
		background: var(--wp--preset--color--ink);
		box-shadow: 12px 0 36px rgb(0 0 0 / 18%);
	}
	.agency-adaptive-header .is-menu-open .wp-block-navigation__responsive-dialog { margin: 0; }
	.agency-adaptive-header .is-menu-open .wp-block-navigation__responsive-container-close {
		top: 0;
		right: 0;
		background: rgb(255 255 255 / 7%);
		border-radius: 2px;
	}
	.agency-adaptive-header .is-menu-open .agency-menu-heading {
		display: flex;
		align-items: center;
		min-height: 44px;
		margin: 0 50px 0 0;
		font-size: 18px;
		font-weight: 700;
		line-height: 1.5;
	}
	.agency-adaptive-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 22px; align-items: stretch; }
	.agency-adaptive-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { width: 100%; gap: 0; align-items: stretch; }
	.agency-adaptive-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 44px;
		gap: 0;
		width: 100%;
		border-top: 1px solid rgb(255 255 255 / 13%);
	}
	.agency-adaptive-header .is-menu-open .wp-block-navigation__container > li > a {
		min-height: 54px;
		padding: 0 8px;
		font-size: 18px;
		font-weight: 650;
	}
	.agency-adaptive-header .is-menu-open .wp-block-navigation-item__content::after { display: none; }
	.agency-adaptive-header .is-menu-open a[aria-current="page"] { color: var(--wp--preset--color--accent-light); }
	.agency-adaptive-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
		grid-column: 1 / -1;
		box-sizing: border-box;
		width: 100%;
		padding: 4px 10px 8px !important;
		margin-bottom: 12px;
		gap: 0;
		background: rgb(255 255 255 / 5%) !important;
		align-items: stretch;
		border: 0;
	}
	.agency-adaptive-header .is-menu-open .wp-block-navigation__submenu-container li { width: 100%; }
	.agency-adaptive-header .is-menu-open .wp-block-navigation__submenu-container a { padding: 10px 8px; min-height: 44px; box-sizing: border-box; font-size: 15px; line-height: 1.6; }
	.agency-adaptive-header .is-menu-open.agency-menu-enhanced .wp-block-navigation-submenu__toggle { display: none; }
	.agency-adaptive-header .is-menu-open.agency-menu-enhanced .agency-menu-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		align-self: center;
		width: 44px;
		height: 44px;
		padding: 0;
		background: transparent;
		color: inherit;
		border: 0;
		cursor: pointer;
	}
	.agency-adaptive-header .agency-menu-toggle::before { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 160ms ease; }
	.agency-adaptive-header .is-menu-open.agency-menu-enhanced .agency-menu-toggle[aria-expanded="true"] { color: var(--wp--preset--color--accent-light); }
	.agency-adaptive-header .agency-menu-toggle[aria-expanded="true"]::before { transform: rotate(225deg); }
	.agency-adaptive-header .is-menu-open.agency-menu-enhanced li:not(.agency-submenu-expanded) > .wp-block-navigation__submenu-container { display: none; }
	.agency-adaptive-header .is-menu-open.agency-menu-enhanced li.agency-submenu-expanded > a { color: var(--wp--preset--color--accent-light); }
	@media (prefers-reduced-motion: no-preference) {
		.agency-adaptive-header .is-menu-open .wp-block-navigation__responsive-close { animation: agency-menu-enter 180ms ease-out; }
	}
}
@keyframes agency-menu-enter { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .agency-adaptive-header .agency-menu-toggle::before { transition: none; } }

/* Opt-in directory CTA: one server-rendered link, including the compact state. */
.agency-adaptive-header--directory .agency-adaptive-header__contact {
	border: 0;
	padding: 0;
}
.agency-adaptive-header--directory .agency-adaptive-header__appointment .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 48px;
	padding: 10px 24px;
	border: 1px solid var(--wp--preset--color--accent-light);
	border-radius: 2px;
	background: transparent;
	color: var(--wp--preset--color--accent-light);
	font-size: 16px;
	font-weight: 650;
	line-height: 1.5;
	text-decoration: none;
}
.agency-adaptive-header--directory .agency-adaptive-header__appointment .wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--canvas);
	outline-offset: 4px;
}
@media (hover: hover) {
	.agency-adaptive-header--directory .agency-adaptive-header__appointment .wp-block-button__link:hover {
		background: var(--wp--preset--color--accent-light);
		color: var(--wp--preset--color--ink);
	}
}
.agency-adaptive-header--directory .agency-adaptive-header__appointment .wp-block-button__link:active {
	background: var(--wp--preset--color--accent-light);
	color: var(--wp--preset--color--ink);
}
@media (max-width: 781px) {
	.agency-adaptive-header--directory.is-compact .agency-adaptive-header__contact { display: flex; }
	.agency-adaptive-header--directory .agency-adaptive-header__appointment .wp-block-button__link {
		min-height: 44px;
		padding: 10px 12px;
		font-size: 14px;
		line-height: 22px;
	}
}
@media (max-width: 380px) {
	.agency-adaptive-header--directory .agency-adaptive-header__inner { gap: 8px; }
	.agency-adaptive-header--directory .agency-adaptive-header__appointment .wp-block-button__link { padding-inline: 9px; }
}
