/**
 * GM Theme – modern header / navigation.
 *
 * Works on top of the core Navigation block (menu #527 stays editable in the
 * Site Editor). Breakpoint 768px matches Blog Pack's mobile menu (frontend.css).
 *
 * Structure (parts/header.html):
 * header.wp-block-template-part > .gm-header > .gm-header__inner > logo + nav
 */

:root {
	--gm-header-bg: rgba(255, 255, 255, 0.78);
	--gm-header-fg: #1d1d1f;
	--gm-header-muted: #6e6e73;
	--gm-header-hover: #f5f5f7;
	--gm-header-line: rgba(0, 0, 0, 0.08);
	/* All header sizes follow the site's body text size (fluid preset "medium",
	   14–16px), so menu and logo stay in proportion on every screen. */
	/* Header type is deliberately small and quiet (3.1.0). */
	--gm-text: 0.875rem;
	/* Logo image height = 1.45 x body text. The wordmark's capitals fill 70 %
	   of the image, so the logo text reads like ~1.4x the body text size
	   (between body text and sub headings). */
	--gm-logo-scale: 1.45;
	--gm-header-pad: calc(var(--gm-text) * 1.1);
	/* Logo and menu sit at the outer edges of the window, as on the original
	   site (36 px there): 24 px on phones, up to 36 px on large screens. */
	--gm-header-edge: clamp(1.5rem, 2.5vw, 2.25rem);
	--gm-header-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Sticky bar ---------- */

header.wp-block-template-part:has(.gm-header) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}

/* Make anchor links land below the sticky bar. */
html {
	scroll-padding-top: calc(var(--gm-header-h, 80px) + var(--wp-admin--admin-bar--height, 0px) + 12px);
}

.gm-header {
	/* Global styles give every Group block padding (spacing 50) – not wanted here. */
	padding: 0 !important;
	background: var(--gm-header-bg);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid transparent;
	transition: box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

/* backdrop-filter makes the header the containing block of position:fixed
   children, which would trap the full-screen mobile menu inside the bar.
   Turn it off while the menu is open. */
.has-modal-open .gm-header,
.gm-header:has(.is-menu-open) {
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	background: #fff;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.gm-header {
		background: #fff;
	}
}

.gm-header-scrolled .gm-header {
	border-bottom-color: var(--gm-header-line);
	box-shadow: 0 6px 24px rgba(17, 17, 17, 0.06);
}

.gm-header .gm-header__inner {
	box-sizing: border-box;
	max-width: none;
	margin-inline: 0;
	padding: var(--gm-header-pad) var(--gm-header-edge);
	gap: 2rem;
	transition: padding 0.25s var(--gm-header-ease);
}

.gm-header-scrolled .gm-header .gm-header__inner {
	--gm-header-pad: calc(var(--gm-text) * 0.6);
}

/* Logo shrinks a little when scrolled. */
.gm-header .gm-header__logo {
	flex: 0 0 auto;
	margin: 0;
	line-height: 0;
}

.gm-header .gm-header__logo img {
	width: auto !important;
	max-width: none;
	height: calc(var(--gm-text) * var(--gm-logo-scale)) !important;
	/* The logo file is a JPEG with a white background: multiply makes the
	   white transparent, so no white box shows on the translucent bar. */
	mix-blend-mode: multiply;
	transition: height 0.25s var(--gm-header-ease);
}

.gm-header-scrolled .gm-header .gm-header__logo img {
	--gm-logo-scale: 1.25;
}

/* ---------- Desktop navigation ---------- */

.gm-header .gm-header__nav {
	--gm-nav-gap: 1.75rem;
	gap: var(--gm-nav-gap);
	color: var(--gm-header-fg);
	font-size: var(--gm-text);
	font-weight: 400;
	letter-spacing: 0.01em;
	line-height: 1.4;
}

.gm-header .gm-header__nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	opacity: 0.8;
	transition: opacity 0.2s ease;
}

.gm-header .gm-header__nav .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
.gm-header .gm-header__nav .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content,
.gm-header .gm-header__nav .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content {
	opacity: 1;
}

.gm-header .gm-header__nav .wp-block-navigation__container {
	gap: var(--gm-nav-gap);
}

.gm-header .gm-header__nav .wp-block-navigation-item__content {
	color: inherit;
	font-weight: inherit;
	text-decoration: none;
	padding: 0.5em 0;
}

.gm-header .gm-header__nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	white-space: nowrap;
}

/* Tablet: logo, menu, search and language must fit in one row. */
@media (min-width: 768px) and (max-width: 1023.5px) {

	.gm-header .gm-header__inner {
		gap: 1rem;
	}

	.gm-header .gm-header__nav {
		--gm-nav-gap: 1rem;
	}
}

/* Blog Pack faded links on hover – replaced by an underline. */
.gm-header .wp-block-navigation-item__content:hover {
	opacity: 1;
}

.gm-header .gm-header__nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content .wp-block-navigation-item__label {
	background: linear-gradient(currentColor, currentColor) no-repeat left bottom / 0 1px;
	padding-bottom: 3px;
	transition: background-size 0.25s var(--gm-header-ease);
}

.gm-header .gm-header__nav .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content .wp-block-navigation-item__label,
.gm-header .gm-header__nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:focus-visible .wp-block-navigation-item__label,
.gm-header .gm-header__nav .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content .wp-block-navigation-item__label,
.gm-header .gm-header__nav .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content .wp-block-navigation-item__label {
	background-size: 100% 1px;
}

/* Chevron */
.gm-header .wp-block-navigation__submenu-icon {
	width: 0.7em;
	height: 0.7em;
	margin-left: 0.3em;
	transition: transform 0.2s ease;
}

.gm-header .wp-block-navigation__submenu-icon svg {
	stroke-width: 2px;
}

/* Keyboard focus */
.gm-header a:focus-visible,
.gm-header button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
	border-radius: 4px;
}

@media (min-width: 768px) {

	/* Top level chevron flips when its menu is open. Nested chevrons are
	   rotated by core (they point towards the flyout). */
	.gm-header .wp-block-navigation__container > .has-child:hover > .wp-block-navigation__submenu-icon,
	.gm-header .wp-block-navigation__container > .has-child:focus-within > .wp-block-navigation__submenu-icon,
	.gm-header .wp-block-navigation__container > .has-child > .wp-block-navigation-submenu__toggle[aria-expanded="true"] {
		transform: rotate(180deg);
	}

	/* ---------- Dropdown cards ---------- */

	.gm-header .wp-block-navigation .wp-block-navigation__submenu-container {
		padding: 8px;
		border: 1px solid var(--gm-header-line) !important;
		border-radius: 14px;
		background: #fff;
		color: var(--gm-header-fg);
		box-shadow: 0 16px 40px rgba(17, 17, 17, 0.12), 0 2px 6px rgba(17, 17, 17, 0.05);
		font-size: var(--gm-text);
		font-weight: 400;
		transform: translateY(6px);
		transition: opacity 0.18s ease, transform 0.18s var(--gm-header-ease), visibility 0s linear 0.18s;
	}

	/* Hover bridge so the menu does not close between link and card. */
	.gm-header .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-container::before {
		content: "";
		position: absolute;
		inset: -12px 0 auto 0;
		height: 12px;
	}

	.gm-header .wp-block-navigation .has-child:hover > .wp-block-navigation__submenu-container,
	.gm-header .wp-block-navigation .has-child:focus-within > .wp-block-navigation__submenu-container,
	.gm-header .wp-block-navigation .wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
		transform: translateY(0);
		transition-delay: 0s;
	}

	/* The menu sits at the right edge (justify right), so cards align to the
	   right edge of their item and nested flyouts open to the left – as core
	   does it, plus a small offset. */
	.gm-header .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-container {
		top: calc(100% + 8px);
		right: -14px;
		left: auto;
	}

	.gm-header .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
		top: -9px;
		right: calc(100% + 8px);
		left: auto;
	}

	/* Hover bridge between a row and its flyout. */
	.gm-header .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container::before {
		content: "";
		position: absolute;
		inset: 0 -12px 0 auto;
		width: 12px;
	}

	.gm-header .wp-block-navigation-submenu ul li {
		border-bottom: 0;
	}

	.gm-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item {
		display: flex;
		align-items: center;
		border-radius: 9px;
	}

	.gm-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item:hover,
	.gm-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item:focus-within {
		background: var(--gm-header-hover);
	}

	.gm-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		flex: 1 1 auto;
		padding: 0.6em 0.85em;
		border-radius: 9px;
	}

	.gm-header .wp-block-navigation .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content {
		font-weight: 500;
	}

	/* Nested rows: chevron (pointing left, towards the flyout) before the label. */
	.gm-header .wp-block-navigation .wp-block-navigation__submenu-container .has-child {
		flex-direction: row-reverse;
	}

	.gm-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation__submenu-icon {
		margin: 0 0 0 0.6em;
		color: var(--gm-header-muted);
		transform: rotate(180deg);
	}
}

/* ---------- Mobile ---------- */

@media (max-width: 767.5px) {

	.gm-header .gm-header__inner {
		--gm-header-pad: 12px;
		gap: 1rem;
	}

	.gm-header-scrolled .gm-header .gm-header__inner {
		--gm-header-pad: 8px;
	}

	/* Round menu button */
	.gm-header .wp-block-navigation__responsive-container-open,
	.gm-header .wp-block-navigation__responsive-container-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 42px;
		height: 42px;
		border-radius: 50%;
		background: var(--gm-header-hover);
		color: var(--gm-header-fg);
	}

	.gm-header .wp-block-navigation__responsive-container-open svg,
	.gm-header .wp-block-navigation__responsive-container-close svg {
		width: 22px;
		height: 22px;
	}

	.gm-header .wp-block-navigation__responsive-container-close {
		top: 14px;
		right: 16px;
	}

	/* Full-screen overlay.
	   O = ".gm-header .wp-block-navigation__responsive-container.is-menu-open
	   .wp-block-navigation__responsive-container-content" – needed to win over
	   core's overlay rules, which centre everything. */
	.gm-header .wp-block-navigation__responsive-container.is-menu-open {
		padding: 72px 20px 40px;
		animation: gm-menu-in 0.22s var(--gm-header-ease);
	}

	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		align-items: stretch;
		padding-top: 0;
		text-align: left;
	}

	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
		align-items: stretch;
		width: 100%;
		gap: 0;
	}

	/* Every row: label left, chevron button right, sub menu below. */
	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		width: 100%;
	}

	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container > .wp-block-navigation-item {
		border-bottom: 1px solid var(--gm-header-line);
	}

	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
		flex: 1 1 0;
		min-width: 0;
		padding: 9px 0;
		font-size: calc(var(--gm-text) * 1.15);
		font-weight: 400;
		color: var(--gm-header-fg);
	}

	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
		padding: 16px 0;
		font-size: calc(var(--gm-text) * 1.55);
		font-weight: 500;
		letter-spacing: -0.01em;
	}

	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		font-size: var(--gm-text);
		font-weight: 400;
		color: var(--gm-header-muted);
	}

	/* Chevron toggle */
	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-icon {
		position: static;
		display: inline-flex;
		flex: 0 0 auto;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		margin: 0 0 0 12px;
		padding: 0;
		border-radius: 50%;
		background: var(--gm-header-hover);
		transition: transform 0.2s ease;
	}

	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-icon {
		width: 34px;
		height: 34px;
	}

	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon svg {
		width: 12px;
		height: 12px;
		transform: none;
	}

	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.gm-sub-open > .wp-block-navigation__submenu-icon {
		transform: rotate(180deg);
	}

	/* Sub menus: indented list with a guide line (shown/hidden by frontend.js). */
	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container {
		flex: 0 0 100%;
		box-sizing: border-box;
		width: 100%;
		margin: 0 0 14px;
		padding: 0 0 0 14px;
		border-left: 2px solid var(--gm-header-line);
		background: transparent;
		gap: 0;
	}

	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container li {
		margin-bottom: 0;
	}

	/* Current page: one line under the name, as on the desktop (4.0.7 –
	   before, the text underline was added to the desktop line: two lines). */
	.gm-header .wp-block-navigation__responsive-container.is-menu-open .current-menu-item > .wp-block-navigation-item__content {
		text-decoration: none;
	}

	.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content .wp-block-navigation-item__label {
		padding-bottom: 3px;
		background: linear-gradient(currentColor, currentColor) no-repeat left bottom / 100% 1px;
	}
}

/* Programmatic focus (e.g. when the menu opens) without the heavy box;
   keyboard users still get the :focus-visible outline above. */
.gm-header a:focus:not(:focus-visible),
.gm-header button:focus:not(:focus-visible) {
	outline: none;
}

@keyframes gm-menu-in {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

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

	.gm-header,
	.gm-header *,
	.gm-header *::before {
		transition: none !important;
		animation: none !important;
	}
}

/* ---------- Reading progress (assets/js/post.js) ----------
   Blog posts and article pages: a line at the bottom of the header that
   fills while reading. 4.0.7: 3 px instead of 1 px, easier to see. */

.gm-progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 3px;
	background: var(--gm-header-fg, #1d1d1f);
	transform: scaleX(0);
	transform-origin: 0 50%;
	pointer-events: none;
}

/* Without the sticky header: at the top of the window. */
.gm-progress--fixed {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	bottom: auto;
	z-index: 1000;
}

/* ---------- Language switcher (4.5.3, inc/language-switcher.php) ----------
   "🌐 DE ⌄" after the menu, list as a card like the menu dropdowns; on
   phones a round "DE" button next to the menu button. It replaces
   GTranslate's globe floating at the bottom right. */

body:has(.gm-lang:not([hidden])) .gtranslate_wrapper .gt_switcher_wrapper {
	display: none !important;
}

.gm-header .gm-header__nav {
	margin-left: auto;
}

.gm-header .gm-lang {
	position: relative;
	flex: none;
	color: var(--gm-header-fg);
	font-size: var(--gm-text);
	line-height: 1.4;
}

.gm-header .gm-lang[hidden] {
	display: none;
}

.gm-header .gm-lang__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	margin: 0;
	padding: 0.5em 0;
	border: 0;
	border-radius: 4px;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 500;
	letter-spacing: 0.04em;
	opacity: 0.8;
	cursor: pointer;
	transition: opacity 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.gm-header .gm-lang__toggle:hover,
.gm-header .gm-lang.is-open .gm-lang__toggle {
	opacity: 1;
}

.gm-header .gm-lang__toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.gm-header .gm-lang__globe {
	width: 1.1em;
	height: 1.1em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.4;
}

.gm-header .gm-lang__code {
	font-size: 0.92em;
}

.gm-header .gm-lang__chevron {
	width: 0.75em;
	height: 0.75em;
	margin-left: -0.05em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.2s var(--gm-header-ease);
}

.gm-header .gm-lang.is-open .gm-lang__chevron {
	transform: rotate(180deg);
}

/* The list: a card like the menu dropdowns, right-aligned. */
.gm-header .gm-lang__list {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: -0.6rem;
	z-index: 30;
	min-width: 11.5rem;
	margin: 0;
	padding: 8px;
	list-style: none;
	border: 1px solid var(--gm-header-line);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 16px 40px rgba(17, 17, 17, 0.12), 0 2px 6px rgba(17, 17, 17, 0.05);
	animation: gm-lang-in 0.18s var(--gm-header-ease);
}

.gm-header .gm-lang__list[hidden] {
	display: none;
}

@keyframes gm-lang-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
}

.gm-header .gm-lang__list li {
	margin: 0;
	padding: 0;
}

.gm-header .gm-lang__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	margin: 0;
	padding: 0.6em 0.85em;
	border: 0;
	border-radius: 9px;
	background: none;
	color: var(--gm-header-fg);
	font: inherit;
	font-size: var(--gm-text);
	font-weight: 400;
	letter-spacing: 0.01em;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.gm-header .gm-lang__item:hover,
.gm-header .gm-lang__item:focus-visible {
	background: var(--gm-header-hover);
	outline: none;
}

.gm-header .gm-lang__item[aria-current="true"] {
	font-weight: 500;
}

/* Check mark at the current language. */
.gm-header .gm-lang__item[aria-current="true"]::after {
	content: "";
	flex: none;
	width: 0.7em;
	height: 0.38em;
	margin-top: -0.2em;
	border-bottom: 1.5px solid currentColor;
	border-left: 1.5px solid currentColor;
	transform: rotate(-45deg);
}

/* Phones: round "DE" button left of the menu button. */
@media (max-width: 767.5px) {

	.gm-header .gm-header__inner {
		gap: 0.5rem;
	}

	.gm-header .gm-lang {
		order: 1;
		margin-left: auto;
	}

	.gm-header .gm-header__nav {
		order: 2;
		margin-left: 0;
	}

	.gm-header .gm-lang__toggle {
		justify-content: center;
		width: 42px;
		height: 42px;
		padding: 0;
		border-radius: 50%;
		background: var(--gm-header-hover);
		opacity: 1;
		letter-spacing: 0.02em;
	}

	.gm-header .gm-lang__globe,
	.gm-header .gm-lang__chevron {
		display: none;
	}

	.gm-header .gm-lang__code {
		font-size: 12px;
		font-weight: 600;
	}

	.gm-header .gm-lang__list {
		right: 0;
	}
}

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

	.gm-header .gm-lang__list {
		animation: none;
	}

	.gm-header .gm-lang__chevron,
	.gm-header .gm-lang__item,
	.gm-header .gm-lang__toggle {
		transition: none;
	}
}

/* ---------- Search (4.0.9, inc/search.php) ----------
   A magnifier after the menu opens a white panel below the bar: search
   field, suggestions while typing, the page below dimmed. Phones: the
   field sits at the top of the open menu (no room in the bar). Field and
   suggestions are also used on the search results page (blog.css). */

.gm-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.gm-header .gm-search {
	flex: none;
	color: var(--gm-header-fg);
	font-size: var(--gm-text);
	line-height: 1;
}

/* Button: quiet like the menu items; its click area reaches into the gaps
   (negative margins), so it takes only the icon's width in the row. */
.gm-header .gm-search__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4em;
	height: 2.4em;
	margin: 0 -0.6em;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: inherit;
	opacity: 0.8;
	cursor: pointer;
	transition: opacity 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.gm-header .gm-search__toggle:hover,
.gm-header .gm-search.is-open .gm-search__toggle {
	opacity: 1;
}

.gm-header .gm-search__toggle:focus-visible {
	outline-offset: 0;
	border-radius: 50%;
}

.gm-header .gm-search__icon {
	width: 1.2em;
	height: 1.2em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
}

.gm-header .gm-search__icon--close,
.gm-header .gm-search.is-open .gm-search__icon--find {
	display: none;
}

.gm-header .gm-search.is-open .gm-search__icon--close {
	display: block;
}

/* Panel: full width below the bar (.gm-header is its containing block). */
.gm-header .gm-search__panel {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 40;
	box-sizing: border-box;
	padding: clamp(1.5rem, 3vw, 2.25rem) var(--gm-header-edge) clamp(1.75rem, 3.5vw, 2.5rem);
	border-top: 1px solid var(--gm-header-line);
	background: #fff;
	box-shadow: 0 24px 48px rgba(17, 17, 17, 0.1);
	font-size: 1rem;
	line-height: 1.5;
	animation: gm-search-in 0.22s var(--gm-header-ease);
}

.gm-header .gm-search__inner {
	max-width: 40rem;
	margin: 0 auto;
}

/* The page below the panel is dimmed; a click on it closes the panel. */
.gm-header .gm-search__backdrop {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 39;
	height: 100vh;
	background: rgba(29, 29, 31, 0.18);
	animation: gm-search-fade 0.22s ease;
}

.gm-header .gm-search__panel[hidden],
.gm-header .gm-search__backdrop[hidden] {
	display: none;
}

@keyframes gm-search-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
}

@keyframes gm-search-fade {
	from {
		opacity: 0;
	}
}

/* Field + gold button in the site's one style (components.css). */
.gm-search__form {
	display: flex;
	gap: 0.5rem;
	margin: 0;
}

.gm-search__field {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.gm-search__field-icon {
	position: absolute;
	top: 50%;
	left: 0.95rem;
	width: 1.125rem;
	height: 1.125rem;
	margin-top: -0.5625rem;
	fill: none;
	stroke: #86868b;
	stroke-width: 1.7;
	stroke-linecap: round;
	pointer-events: none;
}

.gm-search__form .gm-search__input {
	box-sizing: border-box;
	width: 100%;
	height: var(--gm-control-h, 46px);
	margin: 0;
	padding: 0 1rem 0 2.6rem !important;
	border: 1px solid var(--gm-field-line, #d2d2d7) !important;
	border-radius: var(--gm-radius, 15px) !important;
	background: #fff !important;
	color: var(--gm-ink, #1d1d1f) !important;
	font-family: inherit;
	font-size: 1rem !important; /* 16 px: no zoom on the iPhone */
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: normal;
	box-shadow: none !important;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gm-search__form .gm-search__input::placeholder {
	color: #86868b;
	opacity: 1;
}

.gm-search__form .gm-search__input:focus {
	border-color: var(--gm-ink, #1d1d1f) !important;
	box-shadow: 0 0 0 3px rgba(29, 29, 31, 0.08) !important;
	outline: none;
}

.gm-search__form .gm-search__input::-webkit-search-decoration {
	-webkit-appearance: none;
}

/* Clear button (Chrome, Safari): a quiet grey cross instead of the blue one. */
.gm-search__form .gm-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
	width: 0.875rem;
	height: 0.875rem;
	margin: 0 0 0 0.5rem;
	background-color: #86868b;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 3.5l9 9m0-9-9 9' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 3.5l9 9m0-9-9 9' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	cursor: pointer;
}

.gm-search__form .gm-search__submit {
	flex: none;
	margin: 0;
}

/* The header's focus ring uses the text colour – white on the gold button. */
.gm-header .gm-search__form .gm-search__submit:focus-visible {
	outline-color: var(--gm-ink, #1d1d1f);
}

/* Suggestions: rows like the menu dropdown cards, the matching letters bold. */
.gm-search__results {
	margin-top: 0.75rem;
	text-align: left;
}

.gm-search__results[hidden] {
	display: none;
}

.gm-search__heading {
	margin: 0 0 0.25rem;
	padding: 0 0.85rem;
	color: #86868b;
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.6;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.gm-search__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gm-search__list li {
	margin: 0;
	padding: 0;
}

.gm-search__results .gm-search__hit,
.gm-search__results .gm-search__all {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	padding: 0.6rem 0.85rem;
	border-radius: 9px;
	color: var(--gm-ink, #1d1d1f);
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: normal;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.gm-search__results .gm-search__hit:hover,
.gm-search__results .gm-search__all:hover {
	background: #f5f5f7;
	color: var(--gm-ink, #1d1d1f);
	text-decoration: none;
}

.gm-search__results .gm-search__hit:focus-visible,
.gm-search__results .gm-search__all:focus-visible {
	outline: 2px solid var(--gm-ink, #1d1d1f);
	outline-offset: -2px;
	border-radius: 9px;
	background: #f5f5f7;
}

.gm-search__hit-title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gm-search__hit-title mark {
	background: none;
	color: inherit;
	font-weight: 600;
}

.gm-search__hit-type {
	flex: none;
	color: #86868b;
	font-size: 0.8125rem;
}

.gm-search__results .gm-search__all {
	align-items: center;
	gap: 0.4rem;
	margin-top: 0.25rem;
	font-weight: 500;
}

.gm-search__all svg {
	width: 0.9em;
	height: 0.9em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gm-search__empty {
	margin: 0;
	padding: 0.6rem 0.85rem;
	color: #6e6e73;
	font-size: 0.9375rem;
	line-height: 1.4;
}

/* Phones: no button in the bar; the field at the top of the open menu. */
.gm-header .gm-search-menu {
	display: none;
}

@media (max-width: 767.5px) {

	.gm-header .gm-search {
		display: none;
	}

	.gm-header .wp-block-navigation__responsive-container.is-menu-open .gm-search-menu {
		display: block;
		margin: 0 0 1rem;
		font-size: 1rem;
		font-weight: 400;
		line-height: 1.5;
		letter-spacing: normal;
		text-align: left;
	}

	/* First row: field left, the close button right (aligned with the
	   round chevron buttons of the menu rows). The keyboard's search key
	   submits, so no extra button. */
	.gm-header .gm-search-menu .gm-search__form {
		margin-right: calc(42px + 0.75rem);
	}

	.gm-header .gm-search-menu .gm-search__submit {
		display: none;
	}

	.gm-header .wp-block-navigation__responsive-dialog:has(.gm-search-menu) .wp-block-navigation__responsive-container-close {
		top: 26px;
		right: 0;
	}
}

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

	.gm-search__form .gm-search__input,
	.gm-search__results .gm-search__hit,
	.gm-search__results .gm-search__all {
		transition: none;
	}
}

/* ---------- Logo (4.2.0, component styles in brand.css) ----------
   Text logo + vector bird, no background. 4.5.0: a bit larger again
   (25 px wordmark ≈ 243 px wide; was 22 px), slightly smaller when scrolled. */

.gm-header .gm-header__brand {
	--gm-brand-size: 1.5625rem;
	color: var(--gm-header-fg);
	transition: font-size 0.25s var(--gm-header-ease);
}

.gm-header-scrolled .gm-header .gm-header__brand {
	--gm-brand-size: 1.3125rem;
}

@media (min-width: 768px) and (max-width: 1023.5px) {

	.gm-header .gm-header__brand {
		--gm-brand-size: 1.375rem;
	}
}

@media (max-width: 767.5px) {

	.gm-header .gm-header__brand {
		--gm-brand-size: 1.3125rem;
	}

	.gm-header-scrolled .gm-header .gm-header__brand {
		--gm-brand-size: 1.1875rem;
	}
}

@media (max-width: 359.5px) {

	.gm-header .gm-header__brand {
		--gm-brand-size: 1.125rem;
	}
}

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

	.gm-header .gm-header__brand {
		transition: none;
	}
}
