/* Compact header: one quiet desktop row and focused mobile navigation. */
.merade-header *, .merade-header *::before, .merade-header *::after { box-sizing: border-box; }
.merade-header { position: sticky; top: var(--merade-header-offset, 0px); z-index: 50; background: var(--merade-navy); color: var(--merade-ivory); border-bottom: 1px solid var(--merade-border-on-dark); font-family: var(--merade-font-body); }
.merade-header-inner { display: flex; align-items: center; gap: clamp(28px, 3vw, 48px); max-width: 1440px; min-height: 80px; padding: 12px clamp(20px, 4vw, 56px); margin-inline: auto; }
.merade-header a, .merade-header a:visited { color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .merade-header a:hover { color: var(--merade-gold); } }
.merade-header :is(a, summary, button, input):focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.merade-header-brand { flex-shrink: 0; line-height: 1; }
.merade-wordmark { font-family: var(--merade-font-heading); font-size: 32px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.merade-header .custom-logo-link { display: block; }
.merade-header .custom-logo { display: block; width: auto; max-width: 168px; height: auto; max-height: 42px; }
.merade-header-navigation { flex: 1; min-width: 0; }
.merade-header-panel { display: flex; align-items: center; gap: 28px; }
.merade-header-cities { flex: 1; min-width: 0; }
.merade-header-mobile-tools:empty { display: none; }
.merade-header-utilities { display: contents; }
.merade-header-mobile-tools { margin-inline-start: auto; }
.merade-header-mobile-tools > .merade-header-utilities { display: flex; align-items: center; gap: 12px; }
.merade-header summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; }
.merade-header summary::-webkit-details-marker { display: none; }
.merade-header :is(a, summary, button) { touch-action: manipulation; }
.merade-header summary { user-select: none; -webkit-user-select: none; }
.merade-header-navigation > summary { display: none; }
.merade-header .merade-city-navigation { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 28px; list-style: none; padding: 0; margin: 0; }
.merade-city-navigation a { display: block; padding: 12px 0; font-size: 14px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; border-bottom: 1px solid transparent; }
.merade-header .merade-city-navigation :is(.current-menu-item, .current-menu-ancestor) > a,
.merade-header .merade-city-navigation a[aria-current="page"] { color: var(--merade-gold); border-bottom-color: currentColor; }
.merade-city-navigation .menu-item-has-children { position: relative; }
.merade-city-navigation .sub-menu { position: absolute; inset-block-start: 100%; inset-inline-start: 0; min-width: 200px; margin: 0; padding: 10px 16px; list-style: none; background: var(--merade-navy); border: 1px solid rgb(245 243 238 / 24%); display: none; }
.merade-city-navigation li:focus-within > .sub-menu { display: block; }
@media (hover: hover) and (pointer: fine) { .merade-city-navigation li:hover > .sub-menu { display: block; } }
.merade-city-navigation .sub-menu .sub-menu { position: static; padding-inline: 12px 0; border: 0; }
.merade-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.merade-header-language { order: 1; }
.merade-header-search { order: 2; }
.merade-header-call { order: 3; }
.merade-header-call { gap: 8px; }
.merade-header-language, .merade-header-search { position: relative; flex-shrink: 0; }
.merade-header-language summary { box-sizing: border-box; min-width: 60px; padding-inline: 12px; font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.merade-header-language summary svg { color: inherit; }
.merade-header-language ul { position: absolute; inset-inline-end: 0; top: calc(100% + 16px); min-width: 168px; margin: 0; padding: 8px; list-style: none; background: var(--merade-white); color: var(--merade-navy); border: 1px solid var(--merade-surface); border-radius: 8px; box-shadow: 0 16px 40px #101b2c26; }
.merade-header-language a { display: block; padding: 12px; border-radius: 4px; font-size: 14px; }
.merade-header .merade-header-language a { color: var(--merade-navy); }
@media (hover: hover) and (pointer: fine) { .merade-header .merade-header-language a:hover, .merade-header .merade-header-language a[aria-current] { color: var(--merade-navy); background: var(--merade-ivory); } }
.merade-header-language a[aria-current] { font-weight: 700; }
.merade-header-search summary { width: 44px; }
/* One compact search surface, with equal input and button heights. */
.merade-header-search-form { display: flex; align-items: center; gap: 8px; position: absolute; top: calc(100% + 14px); inset-inline-end: 0; width: min(360px, calc(100vw - 40px)); padding: 8px; border: 1px solid var(--merade-surface); border-radius: 12px; background: var(--merade-white); color: var(--merade-navy); box-shadow: 0 12px 32px #101b2c1f; }
.merade-header-search-form:focus-within { border-color: var(--merade-input-border); box-shadow: 0 12px 32px #101b2c1f, 0 0 0 3px #101b2c0d; }
.merade-header-search-form input[type="search"] { box-sizing: border-box; flex: 1; min-width: 0; width: 100%; height: 44px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--merade-navy); font: 400 16px var(--merade-font-body); }
.merade-header-search-form input[type="search"]:focus-visible { outline: none; }
.merade-header-search-form input[type="search"]::placeholder { color: var(--merade-muted); opacity: 1; }
.merade-header-search-form button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; box-sizing: border-box; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: var(--merade-navy); color: var(--merade-ivory); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .merade-header-search-form button:hover { background: var(--merade-hover-dark); } }
.merade-header .merade-header-call, .merade-header .merade-header-call:visited { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 44px; margin-inline-start: 8px; padding: 0 20px; border: 1px solid var(--merade-gold); border-radius: 8px; background: var(--merade-gold); color: var(--merade-navy); box-shadow: none; transition: background-color 160ms ease, border-color 160ms ease, transform 120ms var(--ease-out, cubic-bezier(.23, 1, .32, 1)); font-size: 13px; font-weight: 600; }
.merade-header-call .merade-symbol { width: 18px; height: 18px; font-size: 18px; }
@media (hover: hover) and (pointer: fine) { .merade-header .merade-header-call:hover { background: #edca87; border-color: #edca87; color: var(--merade-navy); } }
.merade-header .merade-header-call:focus-visible { outline-color: var(--merade-ivory); }
@media (hover: hover) and (pointer: fine) { .merade-header summary:hover { color: var(--merade-gold); } }
.merade-header :is(.merade-header-language, .merade-header-search)[open] > summary { color: var(--merade-ivory); background: rgb(245 243 238 / 8%); border-radius: 8px; }
/* Press feedback stays immediate; keyboard focus has no motion. */
.merade-header :is(summary, .merade-header-call, button):active { opacity: .78; }
.merade-header .merade-header-call:active:not(:focus-visible) { opacity: 1; transform: scale(.98); }
@media (hover: hover) and (pointer: fine) {
 .merade-header :is(summary, button) { transition: background-color 240ms ease, color 240ms ease; }
}
@media (max-width: 900px) {
 .merade-header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; min-height: 76px; padding: 12px 24px; }
 .merade-header-brand { min-width: 0; }
 .merade-header .custom-logo { max-width: min(152px, 100%); max-height: 40px; }
 .merade-wordmark { font-size: clamp(22px, 5vw, 30px); letter-spacing: .08em; overflow-wrap: anywhere; }
 .merade-header-navigation { grid-column: 3; grid-row: 1; }
 .merade-header-navigation > summary { display: flex; width: 44px; height: 44px; border-radius: 8px; }
 .merade-header-navigation > summary > span:last-child { display: none; }
 .merade-menu-icon { display: block; position: relative; width: 20px; height: 14px; border-block: 1.5px solid currentColor; }
 .merade-menu-icon::after { content: ''; position: absolute; inset-inline: 0; top: 50%; border-top: 1.5px solid currentColor; transform: translateY(-50%); }
 .merade-header-navigation[open] .merade-menu-icon { border-color: transparent; }
 .merade-header-navigation[open] .merade-menu-icon::before,
 .merade-header-navigation[open] .merade-menu-icon::after { content: ''; position: absolute; inset-inline: 0; top: 50%; border-top: 1.5px solid currentColor; transform: rotate(45deg); }
 .merade-header-navigation[open] .merade-menu-icon::after { transform: rotate(-45deg); }
 .merade-header-panel { display: block; position: absolute; inset-inline: 0; top: 100%; max-height: calc(100vh - 76px - var(--merade-header-offset, 0px)); max-height: calc(100svh - 76px - var(--merade-header-offset, 0px)); overflow-y: auto; overscroll-behavior: contain; padding: 8px 24px 24px; background: var(--merade-navy); border-bottom: 1px solid var(--merade-border-on-dark); }
 .merade-header .merade-city-navigation { flex-direction: column; align-items: stretch; gap: 0; }
 .merade-city-navigation a { min-height: 48px; padding: 14px 0; font-size: 15px; }
 .merade-header .merade-city-navigation :is(.current-menu-item, .current-menu-ancestor) > a,
 .merade-header .merade-city-navigation a[aria-current="page"] { border-bottom-color: transparent; text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 1px; }
 .merade-city-navigation .sub-menu { display: block; position: static; min-width: 0; padding-block: 0; border: 0; border-inline-start: 1px solid rgb(245 243 238 / 24%); }
 .merade-header-mobile-tools > .merade-header-utilities { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding-top: 16px; margin-top: 12px; border-top: 1px solid var(--merade-border-on-dark); }
 .merade-header .merade-header-call { margin-inline-start: 0; padding-inline: 22px; min-height: 48px; }
 .merade-header-actions { grid-column: 2; grid-row: 1; }
 .merade-header-search { position: static; }
 .merade-header-search-form { inset-inline: 24px; top: calc(100% + 8px); width: auto; }
 /* Languages expand within the menu, so they cannot be clipped by its scroll area. */
 .merade-header-language ul { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; margin-top: 8px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
 .merade-header .merade-header-language a { min-height: 48px; padding: 12px; border: 1px solid var(--merade-border-on-dark); border-radius: 7px; color: var(--merade-ivory); text-align: center; }
 .merade-header .merade-header-language a[aria-current] { border-color: var(--merade-gold); background: rgb(230 182 92 / 8%); color: var(--merade-gold); }
 .merade-header-language summary { justify-content: space-between; padding-inline: 12px; border-radius: 7px; background: rgb(245 243 238 / 5%); }
 .merade-header-navigation[open] > summary { background: rgb(245 243 238 / 8%); }
}
@media (max-width: 400px) {
 .merade-header-inner { min-height: 72px; padding: 10px 20px; gap: 4px; }
 .merade-header .custom-logo { max-width: min(136px, 100%); max-height: 36px; }
 .merade-header-panel { padding-inline: 20px; max-height: calc(100vh - 72px - var(--merade-header-offset, 0px)); max-height: calc(100svh - 72px - var(--merade-header-offset, 0px)); }
 .merade-header-search-form { inset-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
 .merade-header :is(summary, .merade-header-call, button) { transition: none; }
 .merade-header .merade-header-call:active:not(:focus-visible) { transform: none; }
}

/* Keep the sticky header below WordPress's fixed admin toolbar. Below 600 px
   that toolbar scrolls with the document, so the header can reach the top. */
body.admin-bar { --merade-header-offset: 32px; }
@media (max-width: 782px) { body.admin-bar { --merade-header-offset: 46px; } }
@media (max-width: 600px) { body.admin-bar { --merade-header-offset: 0px; } }
html { scroll-padding-top: 100px; }
