/**
 * Site Header widget. Mobile first; the desktop navigation appears from 980px.
 * The header keeps one fixed height: it does not shrink or change while scrolling.
 */

/* The whole header template sticks, not just the widget inside it. */
.elementor-location-header:has(.msd-hdr-sticky-yes) {
	position: sticky;
	z-index: 50;
	top: 0;
}

.admin-bar .elementor-location-header:has(.msd-hdr-sticky-yes) {
	top: var(--wp-admin--admin-bar--height, 32px);
}

/* The admin bar itself is not sticky on small screens. */
@media (max-width: 600px) {

	.admin-bar .elementor-location-header:has(.msd-hdr-sticky-yes) {
		top: 0;
	}
}

/* Open mobile menu: the page behind must not scroll. */
.msd-menu-open,
.msd-menu-open body {
	overflow: hidden;
}

.msd-hdr {
	--msd-hdr-h: 76px;
	--msd-hdr-logo: 52px;
	--msd-hdr-accent: var(--msd-red, #9d2020);
	--msd-hdr-current: var(--msd-pink-soft, #f6dede);

	position: relative;
	border-bottom: 1px solid var(--msd-line, #e6e0d5);
	background-color: rgba(247, 244, 238, 0.88);
	color: var(--msd-ink, #1e2a30);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}

/* A see-through bar would let the page show behind the open menu. */
.msd-hdr.is-menu-open {
	background-color: var(--msd-cream, #f7f4ee);
}

.msd-hdr__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	height: var(--msd-hdr-h);
}

/* Logo */

.msd-hdr__brand {
	display: flex;
	flex: none;
	align-items: center;
	color: var(--msd-ink, #1e2a30);
	font-family: var(--msd-font-heading, "Bricolage Grotesque", system-ui, sans-serif);
	font-weight: 800;
	text-decoration: none;
}

.msd-hdr .msd-hdr__logo {
	display: block;
	width: auto;
	max-width: none;
	height: var(--msd-hdr-logo);
}

/* Desktop navigation (hidden on small screens) */

.msd-hdr__nav {
	display: none;
}

.msd-hdr__list {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.msd-hdr__pill {
	display: flex;
	align-items: center;
	border-radius: 999px;
	transition: background-color 0.2s;
}

.msd-hdr__pill:hover,
.msd-hdr__item.is-open .msd-hdr__pill {
	background-color: #ece6da;
}

.msd-hdr__pill.is-current {
	background-color: var(--msd-hdr-current);
}

.msd-hdr .msd-hdr__link {
	display: block;
	padding: 10px 14px;
	border-radius: 999px;
	color: var(--msd-ink, #1e2a30);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
}

.msd-hdr__pill.is-current .msd-hdr__link {
	font-weight: 700;
}

.msd-hdr__item.has-sub .msd-hdr__link {
	padding-right: 2px;
}

.msd-hdr .msd-hdr__toggle {
	display: grid;
	width: 30px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: none;
	color: var(--msd-ink, #1e2a30);
	font-size: 20px;
	cursor: pointer;
	place-items: center;
}

.msd-hdr__toggle .msd-icon {
	transition: transform 0.2s;
}

.msd-hdr__toggle[aria-expanded="true"] .msd-icon {
	transform: rotate(180deg);
}

/* Mega panel */

.msd-hdr__panel {
	position: absolute;
	z-index: 60;
	top: 100%;
	left: 50%;
	width: min(1120px, calc(100vw - 32px));
	/* The transparent strip above the box keeps the panel open while the pointer crosses it. */
	margin-top: -12px;
	padding-top: 12px;
	transform: translateX(-50%);
}

.msd-hdr__panel-box {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	/* Never taller than the screen: a long list scrolls inside the panel instead. */
	max-height: calc(100vh - var(--msd-hdr-h) - 56px);
	overflow: hidden;
	border: 1px solid var(--msd-line, #e6e0d5);
	border-radius: 22px;
	background-color: var(--msd-white, #fff);
	box-shadow: 0 24px 60px rgba(30, 42, 48, 0.18);
}

.msd-hdr__sub {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px 12px;
	align-content: start;
	margin: 0;
	padding: 24px;
	overflow-y: auto;
	list-style: none;
}

.msd-hdr__sub--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.msd-hdr .msd-hdr__sublink {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 12px;
	border-radius: 14px;
	color: var(--msd-ink, #1e2a30);
	text-decoration: none;
	transition: background-color 0.15s;
}

.msd-hdr .msd-hdr__sublink:hover,
.msd-hdr .msd-hdr__sublink[aria-current="page"] {
	background-color: var(--msd-cream, #f7f4ee);
	color: var(--msd-ink, #1e2a30);
}

.msd-hdr__chip {
	display: grid;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 11px;
	background-color: var(--msd-pink-soft, #f6dede);
	color: var(--msd-hdr-accent);
	font-size: 22px;
	place-items: center;
}

.msd-hdr__subtext {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.msd-hdr__subtitle {
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.25;
}

.msd-hdr__subdesc {
	color: var(--msd-text-soft, #59636a);
	font-size: 13.5px;
	line-height: 1.45;
}

.msd-hdr__aside {
	display: flex;
	position: relative;
	flex-direction: column;
	gap: 14px;
	padding: 28px;
	overflow: hidden;
	background-color: var(--msd-hdr-accent);
	color: var(--msd-white, #fff);
	isolation: isolate;
}

/* Faint key drawing behind the text of the side box. */
.msd-hdr .msd-hdr__aside-key {
	position: absolute;
	z-index: -1;
	top: 44%;
	right: -92px;
	width: 320px;
	max-width: none;
	height: auto;
	transform: rotate(-32deg);
	color: var(--msd-white, #fff);
	opacity: 0.2;
	pointer-events: none;
}

.msd-hdr__aside-title {
	font-family: var(--msd-font-heading, "Bricolage Grotesque", system-ui, sans-serif);
	font-size: 21px;
	font-weight: 800;
	line-height: 1.15;
}

.msd-hdr__aside-text {
	color: var(--msd-pink-faint, #fbeeee);
	font-size: 15px;
	line-height: 1.6;
}

.msd-hdr__aside-actions {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: auto;
	padding-top: 20px;
}

.msd-hdr .msd-hdr__aside-all {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--msd-white, #fff);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.msd-hdr .msd-hdr__aside-all:hover {
	color: #ffd0d0;
}

.msd-hdr__aside-all .msd-icon {
	font-size: 18px;
}

.msd-hdr .msd-hdr__aside-call {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 52px;
	border-radius: 14px;
	background-color: var(--msd-espresso, #281616);
	color: var(--msd-white, #fff);
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
}

.msd-hdr .msd-hdr__aside-call:hover {
	background-color: var(--msd-espresso-hover, #3e2323);
	color: var(--msd-white, #fff);
}

.msd-hdr__aside-call .msd-icon {
	font-size: 20px;
}

/* Contact buttons and burger */

.msd-hdr__actions {
	display: flex;
	flex: none;
	align-items: center;
	gap: 8px;
}

.msd-hdr .msd-hdr__wa {
	display: none;
	width: 46px;
	height: 46px;
	border-radius: 999px;
	background-color: var(--msd-green, #15803d);
	color: var(--msd-white, #fff);
	font-size: 19px;
	transition: transform 0.2s;
	place-items: center;
}

.msd-hdr .msd-hdr__call {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 44px;
	padding: 0 16px;
	border-radius: 999px;
	background-color: var(--msd-espresso, #281616);
	color: var(--msd-white, #fff);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.2s, background-color 0.2s;
}

.msd-hdr .msd-hdr__call:hover {
	background-color: var(--msd-espresso-hover, #3e2323);
	color: var(--msd-white, #fff);
}

.msd-hdr__call .msd-icon {
	font-size: 20px;
}

.msd-hdr__call-long {
	display: none;
}

.msd-hdr .msd-hdr__burger {
	display: grid;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid #ddd6c9;
	border-radius: 999px;
	background-color: var(--msd-white, #fff);
	color: var(--msd-ink, #1e2a30);
	font-size: 24px;
	cursor: pointer;
	place-items: center;
}

.msd-hdr__burger-close,
.msd-hdr__burger[aria-expanded="true"] .msd-hdr__burger-open {
	display: none;
}

.msd-hdr__burger[aria-expanded="true"] .msd-hdr__burger-close {
	display: block;
}

/* Mobile menu */

.msd-hdr__drawer {
	display: flex;
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	flex-direction: column;
	gap: 4px;
	height: calc(100vh - var(--msd-hdr-h));
	height: calc(100dvh - var(--msd-hdr-h));
	padding: 24px var(--msd-gutter, clamp(16px, 4vw, 40px));
	overflow: auto;
	background-color: var(--msd-cream, #f7f4ee);
}

.msd-hdr__drawer[hidden] {
	display: none;
}

.msd-hdr__mlist,
.msd-hdr__msub {
	margin: 0;
	padding: 0;
	list-style: none;
}

.msd-hdr__mitem {
	border-bottom: 1px solid #e3ddd2;
}

.msd-hdr__mrow {
	display: flex;
	align-items: center;
	gap: 8px;
}

.msd-hdr .msd-hdr__mlink {
	flex: 1;
	padding: 16px 4px;
	color: var(--msd-ink, #1e2a30);
	font-family: var(--msd-font-heading, "Bricolage Grotesque", system-ui, sans-serif);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	text-decoration: none;
}

.msd-hdr .msd-hdr__mtoggle {
	display: grid;
	flex: none;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--msd-sand, #efe9df);
	color: var(--msd-ink, #1e2a30);
	font-size: 26px;
	cursor: pointer;
	place-items: center;
}

.msd-hdr__mtoggle .msd-icon {
	transition: transform 0.2s;
}

.msd-hdr__mtoggle[aria-expanded="true"] .msd-icon {
	transform: rotate(180deg);
}

.msd-hdr__msub {
	display: flex;
	flex-direction: column;
	margin: 0 0 4px 4px;
	padding: 0 4px 16px 12px;
	border-left: 2px solid var(--msd-hdr-accent);
}

.msd-hdr__msub[hidden] {
	display: none;
}

.msd-hdr .msd-hdr__msub a {
	display: block;
	padding: 10px 8px;
	color: var(--msd-ink, #1e2a30);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
}

.msd-hdr__mactions {
	display: grid;
	gap: 10px;
	margin-top: 24px;
}

.msd-hdr .msd-hdr__mbutton {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 56px;
	border-radius: 999px;
	color: var(--msd-white, #fff);
	font-size: 17px;
	font-weight: 700;
	text-decoration: none;
}

.msd-hdr .msd-hdr__mbutton--call {
	background-color: var(--msd-espresso, #281616);
}

.msd-hdr .msd-hdr__mbutton--wa {
	background-color: var(--msd-green, #15803d);
}

.msd-hdr__mbutton .msd-icon {
	font-size: 22px;
}

/* Desktop */

@media (min-width: 980px) {

	.msd-hdr__nav {
		display: block;
	}

	.msd-hdr__actions {
		gap: 10px;
	}

	.msd-hdr .msd-hdr__wa {
		display: grid;
	}

	.msd-hdr .msd-hdr__wa:hover,
	.msd-hdr .msd-hdr__call:hover {
		transform: translateY(-2px);
	}

	.msd-hdr .msd-hdr__wa:hover {
		color: var(--msd-white, #fff);
	}

	.msd-hdr .msd-hdr__call {
		gap: 10px;
		height: 46px;
		padding: 0 22px 0 18px;
		font-size: 15px;
	}

	.msd-hdr__call-long {
		display: inline;
	}

	.msd-hdr__call-short,
	.msd-hdr .msd-hdr__burger,
	.msd-hdr__drawer {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {

	.msd-hdr__toggle .msd-icon,
	.msd-hdr__mtoggle .msd-icon,
	.msd-hdr .msd-hdr__wa,
	.msd-hdr .msd-hdr__call {
		transition: none;
	}

	.msd-hdr .msd-hdr__wa:hover,
	.msd-hdr .msd-hdr__call:hover {
		transform: none;
	}
}
