/* ==========================================================================
   CarPoint — header proposals (propozycje/naglowek-1…5.html)
   --------------------------------------------------------------------------
   Loaded AFTER assets/css/carpoint.css. Uses only the site's own tokens
   (--bg*, --text*, --brand*, --radius-*, --sp-*, --fs-*, --dur*, --ease) so
   every variant follows the light / dark / high-contrast themes for free.
   Sections:
     0. Shared (proposal label, hidden hours source, status pill tweaks)
     1. V1 — two-station utility strip
     2. V2 — "Twoja stacja" segmented switcher
     3. V3 — "Gdzie bliżej?" finder panel
     4. V4 — service mega panel + split call button
     5. V5 — centred desktop masthead + mobile bottom action bar
   Breakpoints match the site: 30rem (small phone), 40rem, 62rem (desktop
   nav), 75rem (wide desktop).
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Shared
   -------------------------------------------------------------------------- */

/* Fixed corner label telling the client which proposal he is looking at.
   Bottom-left so it never covers the site's own "back to top" button. */
.proposal-tag {
  position: fixed;
  left: var(--sp-3);
  bottom: var(--sp-3);
  z-index: 400;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: calc(100vw - 6rem);
  padding: var(--sp-2) var(--sp-4);
  background: var(--bg-deep);
  color: #ffffff;
  border: 2px solid var(--brand);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.proposal-tag:hover {
  background: var(--brand-strong);
  color: var(--on-brand);
}

[data-theme="dark"] .proposal-tag {
  background: #f4f4f3;
  color: #2f2f2e;
}

[data-theme="hc"] .proposal-tag {
  background: #000000;
  color: #ffd400;
  border-color: #ffd400;
}

/* Phones/tablets: no desktop nav to push the actions right, so do it here. */
@media (max-width: 61.99rem) {
  .hdr .site-header__bar > .header-actions {
    margin-inline-start: auto;
  }

  .proposal-tag {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 26px;
  }
}

/* 44px targets everywhere in the header: EU flag link (grant requirement),
   logo link and the site's 40px .btn--sm. */
.hdr .brand__flag-link {
  min-width: 44px;
  min-height: 44px;
}

.hdr .brand {
  min-height: 44px;
}

.hdr .btn--sm {
  min-height: 44px;
}

/* Hidden copy of the opening hours, read by carpoint.js (initHours). */
.hdr-hours {
  display: none;
}

/* Header status pills reuse .station__status; inside the header they must
   not wrap mid-label. */
.hdr .station__status {
  white-space: nowrap;
}

/* All disclosure chevrons rotate when their button is expanded. */
[aria-expanded] .hdr3__chev svg,
[aria-expanded] .mega__chev svg {
  transition: transform var(--dur) var(--ease);
}

[aria-expanded="true"] .hdr3__chev svg,
[aria-expanded="true"] .mega__chev svg {
  transform: rotate(180deg);
}

/* Panels that drop below the sticky header (V3 finder, V4 mega). The sticky
   header is their containing block, so left/right:0 = full page width. */
.finder,
.mega__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 205;
  max-height: calc(100vh - var(--header-h) - var(--sp-4));
  max-height: calc(100dvh - var(--header-h) - var(--sp-4));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}

[data-theme="hc"] .finder,
[data-theme="hc"] .mega__panel {
  border-bottom: 2px solid #ffffff;
}

/* Gentle drop-in only for people who did not ask for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .finder:not([hidden]),
  .mega__panel:not([hidden]),
  .call-pop__panel:not([hidden]) {
    animation: hdr-drop var(--dur) var(--ease-out);
  }

  .sheet:not([hidden]) {
    animation: hdr-rise var(--dur) var(--ease-out);
  }
}

@keyframes hdr-drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes hdr-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* --------------------------------------------------------------------------
   1. V1 — two-station utility strip above the main bar
   -------------------------------------------------------------------------- */
.hdr-strip {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
}

[data-theme="hc"] .hdr-strip {
  border-bottom-color: #ffffff;
}

.hdr-strip__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: 48px;
}

.hdr-strip__status {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-inline-end: auto;
  color: var(--text-muted);
}

.hdr-strip__note {
  font-size: var(--fs-xs);
}

.hdr-strip__list {
  display: flex;
  align-items: center;
  margin: 0;
}

.hdr-strip__item {
  display: flex;
  align-items: center;
}

.hdr-strip__item + .hdr-strip__item {
  margin-inline-start: var(--sp-2);
  padding-inline-start: var(--sp-2);
  border-inline-start: 1px solid var(--border);
}

/* One station = one tel: link (name, street, number) + a "Dojazd" link. */
.hdr-station {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0 var(--sp-3);
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color var(--dur-fast) var(--ease);
}

.hdr-station:hover {
  background: var(--bg-inset);
}

.hdr-station__icon {
  display: inline-flex;
  color: var(--brand-deep);
}

.hdr-station__text {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-2);
}

.hdr-station__name {
  font-weight: 700;
}

.hdr-station__addr {
  color: var(--text-subtle);
}

.hdr-station__tel {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-deep);
  letter-spacing: 0.01em;
}

.hdr-station,
.hdr-strip__map,
.hdr-strip__status {
  white-space: nowrap;
}

.hdr-strip__map {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: 44px;
  padding: 0 var(--sp-2);
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hdr-strip__map:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

.hdr-strip__map svg {
  color: var(--brand-deep);
}

/* Narrower desktops shed detail in order: hours note, workshop line, streets. */
@media (max-width: 99.99rem) {
  .hdr-strip__note {
    display: none;
  }
}

@media (max-width: 79.99rem) {
  .hdr-strip__map {
    display: none;
  }
}

@media (max-width: 71.99rem) {
  .hdr-strip__item--service {
    display: none;
  }
}

/* Phones & tablets: the strip becomes two equal call buttons and scrolls
   away (negative sticky top = strip height), leaving the usual bar. */
@media (max-width: 61.99rem) {
  .hdr--v1 {
    top: -64px;
  }

  .hdr-strip {
    height: 64px;
  }

  .hdr-strip__inner {
    height: 100%;
    min-height: 0;
  }

  .hdr-strip__status {
    /* kept for screen readers, visually replaced by the dots below */
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .hdr-strip__list {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-2);
  }

  .hdr-strip__item + .hdr-strip__item {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .hdr-strip__map {
    display: none;
  }

  .hdr-station {
    width: 100%;
    min-height: 48px;
    padding: var(--sp-1) var(--sp-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
  }

  [data-theme="hc"] .hdr-station {
    border-width: 2px;
  }

  .hdr-station__text {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    line-height: 1.2;
  }

  .hdr-station__name {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-muted);
  }

  .hdr-station__tel {
    font-size: var(--fs-md);
  }
}

/* --------------------------------------------------------------------------
   2. V2 — "Twoja stacja" segmented switcher + nav on its own row
   -------------------------------------------------------------------------- */
.hdr2__bar {
  gap: var(--sp-4);
}

.seg {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-inline-start: auto;
}

.seg__label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--text-subtle);
  white-space: nowrap;
}

.seg__opts {
  display: inline-flex;
  padding: 2px;
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius-sm) + 2px);
}

[data-theme="hc"] .seg__opts {
  border-width: 2px;
}

/* The real radio covers the whole segment (invisible) so clicks, touch and
   arrow keys all hit a native control; the span is the visual. */
.seg__opt {
  position: relative;
  display: flex;
}

.seg__opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.seg__opt span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  min-height: 44px;
  padding: 0 var(--sp-4);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}

.seg__opt input:hover + span {
  color: var(--text);
  background: var(--bg-elevated);
}

/* Selected = filled brand segment + a dot, so it never relies on colour alone. */
.seg__opt input:checked + span {
  background: var(--brand-strong);
  color: var(--on-brand);
  box-shadow: var(--shadow-sm);
}

.seg__opt input:checked + span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: currentColor;
}

.seg__opt input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.hdr2__info {
  display: none;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
}

.hdr2__addr {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: 44px;
  color: var(--link);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.hdr2__addr:hover {
  color: var(--link-hover);
}

.hdr2__call-text {
  display: none;
}

.hdr2__navrow {
  display: none;
}

@media (min-width: 40rem) {
  .hdr2__call-text {
    display: inline;
  }
}

@media (min-width: 62rem) {
  .hdr2__navrow {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    min-height: 48px;
    border-top: 1px solid var(--border);
  }

  .hdr2__navrow .nav {
    margin-inline-start: calc(var(--sp-3) * -1);
  }

  .hdr2__service {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    min-height: 44px;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    text-decoration: none;
  }

  .hdr2__status {
    margin-inline-start: auto;
  }

  .hdr2__service svg {
    color: var(--brand-deep);
  }

  .hdr2__service strong {
    color: var(--text);
  }

  .hdr2__service:hover strong {
    color: var(--brand-deep);
    text-decoration: underline;
  }

  .hdr--v2 .theme-btn__label {
    display: none;
  }
}

@media (min-width: 75rem) {
  .hdr2__info {
    display: inline-flex;
  }
}

/* Phones & tablets: the switcher gets its own full-width row ABOVE the bar
   (order:-1) and scrolls away; the call button in the bar keeps the choice. */
@media (max-width: 61.99rem) {
  .hdr--v2 {
    top: -60px;
  }

  .hdr2__bar {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .seg {
    order: -1;
    flex: 1 0 100%;
    height: 60px;
    margin: 0;
    border-bottom: 1px solid var(--border);
  }

  .seg__opts {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .seg__opt span {
    padding: 0 var(--sp-2);
  }

  .hdr2__bar .header-actions {
    margin-inline-start: auto;
  }

  .hdr2__bar > .brand,
  .hdr2__bar > .header-actions {
    min-height: calc(var(--header-h) - 4px);
  }
}

@media (max-width: 30rem) {
  .seg__label {
    letter-spacing: 0.02em;
  }

  .seg__opt span {
    font-size: var(--fs-xs);
  }
}

/* --------------------------------------------------------------------------
   3. V3 — "Gdzie bliżej?" finder
   -------------------------------------------------------------------------- */
/* Without JS the finder cannot work, so its button only appears with JS. */
.hdr3__btn {
  display: none;
  gap: var(--sp-2);
  white-space: nowrap;
}

.js .hdr3__btn {
  display: inline-flex;
}

/* Live header (V3): main nav links +15% (0.875rem → ~1.006rem) and bold. */
.hdr--v3 .nav__link {
  font-size: calc(var(--fs-sm) * 1.15);
  font-weight: 700;
}

.hdr3__btn-icon,
.hdr3__chev {
  display: inline-flex;
}

.finder__inner {
  padding-block: var(--sp-5) var(--sp-6);
}

.finder__head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.finder__title {
  font-size: var(--fs-xl);
  margin-inline-end: auto;
}

.finder__grid {
  display: grid;
  gap: var(--sp-5);
}

@media (min-width: 56rem) {
  .finder__grid {
    grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
    gap: var(--sp-7);
  }
}

.finder__ask {
  display: grid;
  gap: var(--sp-3);
  align-content: start;
}

.finder__or {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text-subtle);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
}

.finder__or::before,
.finder__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.finder__hint {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.finder__msg {
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: var(--sp-4);
}

.finder__cards {
  display: grid;
  gap: var(--sp-3);
}

@media (min-width: 40rem) {
  .finder__cards {
    grid-template-columns: 1fr 1fr;
  }
}

.finder-card {
  display: grid;
  gap: var(--sp-2);
  align-content: start;
  padding: var(--sp-4);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease);
}

/* Recommended station: brand border + tint + "Bliżej Ciebie" badge (text, not
   only colour). The other card simply stays neutral. */
.finder-card.is-recommended {
  border-color: var(--brand-strong);
  background: var(--brand-tint);
}

[data-theme="hc"] .finder-card {
  border-color: #ffffff;
}

[data-theme="hc"] .finder-card.is-recommended {
  border: 3px solid #ffd400;
}

.finder-card__badge {
  justify-self: start;
}

.finder-card__name {
  font-size: var(--fs-lg);
}

.finder-card__addr {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.finder-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.finder-card__actions .btn {
  min-height: 44px;
}

.finder__service {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
}

.finder__service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  margin-top: var(--sp-2);
}

.finder__service-actions .link-arrow {
  min-height: 44px;
}

@media (max-width: 30rem) {
  /* Narrow phones: keep "Gdzie bliżej?" readable — drop its icons. */
  .hdr3__btn-icon,
  .hdr3__chev {
    display: none;
  }

  .hdr3__btn {
    padding-inline: var(--sp-3);
  }

  .hdr--v3 .brand__logo {
    height: 20px;
  }
}

/* --------------------------------------------------------------------------
   4. V4 — "Usługi" mega panel + split call button
   -------------------------------------------------------------------------- */
.mega__btn {
  gap: var(--sp-1);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.mega__btn[aria-expanded="true"] {
  color: var(--brand-deep);
  background-color: var(--bg-subtle);
}

.mega__chev {
  display: inline-flex;
}

.mega__inner {
  display: grid;
  gap: var(--sp-5);
  padding-block: var(--sp-5) var(--sp-6);
}

@media (min-width: 62rem) {
  .mega__inner {
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: var(--sp-6);
  }
}

.mega__grid {
  display: grid;
  gap: var(--sp-2);
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  margin: 0;
}

.mega__item {
  display: grid;
  gap: var(--sp-1);
  height: 100%;
  padding: var(--sp-3) var(--sp-4);
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease);
}

.mega__item:hover {
  border-color: var(--brand-strong);
  background: var(--brand-tint);
}

[data-theme="hc"] .mega__item {
  border: 2px solid #ffffff;
}

.mega__name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tr-tight);
}

.mega__item:hover .mega__name {
  color: var(--brand-deep);
  text-decoration: underline;
}

.mega__desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-snug);
}

.mega__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
  font-size: var(--fs-xs);
}

.mega__price {
  font-weight: 700;
  color: var(--text);
  margin-inline-end: var(--sp-1);
}

.mega__tag {
  display: inline-flex;
  align-items: center;
  padding: 1px var(--sp-2);
  border-radius: var(--radius-full);
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint-2);
  color: var(--brand-deep);
  font-weight: 700;
}

.mega__tag--soft {
  background: var(--bg-inset);
  border-color: var(--border);
  color: var(--text-muted);
  font-weight: 600;
}

[data-theme="hc"] .mega__tag {
  border-color: #ffd400;
}

.mega__aside {
  padding: var(--sp-4);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
}

[data-theme="hc"] .mega__aside {
  border: 2px solid #ffffff;
}

.mega__aside-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--sp-3);
}

.mega__where {
  display: grid;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-4);
}

.mega__where dt {
  font-weight: 700;
}

.mega__where dd {
  margin: 0;
  color: var(--text-muted);
  line-height: var(--lh-snug);
}

.mega__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
}

.mega__links .link-arrow {
  min-height: 44px;
}

/* Split call: one brand-coloured block, two tel: halves. No overflow:hidden
   so the focus ring of each half is never clipped. */
.split-call {
  display: none;
  align-items: stretch;
  background: var(--brand-strong);
  color: var(--on-brand);
  border-radius: var(--radius-sm);
}

.split-call__icon {
  display: inline-flex;
  align-items: center;
  padding-inline: var(--sp-3) var(--sp-1);
}

.split-call__part {
  display: grid;
  align-content: center;
  min-height: 48px;
  padding: var(--sp-1) var(--sp-3);
  color: inherit;
  text-decoration: none;
  line-height: 1.15;
  transition: background-color var(--dur-fast) var(--ease);
}

.split-call__part + .split-call__part {
  border-inline-start: 1px solid color-mix(in srgb, var(--on-brand) 45%, transparent);
}

.split-call__part:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.split-call__part:hover {
  background: var(--link-hover);
}

[data-theme="hc"] .split-call__part:hover {
  background: #ffffff;
  color: #000000;
}

.split-call__st {
  font-size: var(--fs-xs);
  font-weight: 600;
  opacity: 0.92;
}

.split-call__no {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
}

/* Phones: "Zadzwoń" disclosure with all three numbers. */
/* Static on purpose: the panel is positioned against the sticky header, so
   it can span the page width instead of overflowing the left edge. */
.call-pop {
  position: static;
}

.call-pop__btn {
  min-height: 44px;
  white-space: nowrap;
}

.call-pop__panel {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: calc(100% + var(--sp-1));
  z-index: 210;
  padding: var(--sp-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.call-pop__panel .cta-lines {
  margin: 0;
}

@media (min-width: 48rem) {
  .split-call {
    display: flex;
  }

  .call-pop {
    display: none;
  }
}

/* V4 shows its (longer) nav only from 75rem; below that the menu button
   takes over, exactly like the live site does below 62rem. */
@media (min-width: 62rem) and (max-width: 74.99rem) {
  .hdr--v4 .nav--desktop {
    display: none;
  }

  .hdr--v4 .menu-toggle {
    display: inline-flex;
  }

  .hdr--v4 .header-actions {
    margin-inline-start: auto;
  }
}

@media (max-width: 61.99rem) {
  .hdr--v4 .header-actions {
    margin-inline-start: auto;
  }
}

.hdr--v4 .theme-btn__label {
  display: none;
}

@media (max-width: 30rem) {
  .hdr--v4 .brand__logo {
    height: 20px;
  }
}

/* Visually hidden, still read (keeps accessible names intact). */
.hdr3__lbl-short {
  display: none;
}

/* 320px phones (WCAG 1.4.10 reflow): shortest labels, smallest logo. */
@media (max-width: 24rem) {
  .hdr--v2 .seg__label,
  .hdr3__lbl-long,
  .call-pop__lbl {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .hdr3__lbl-short {
    display: inline;
  }

  .hdr--v2 .brand__logo,
  .hdr--v3 .brand__logo,
  .hdr--v4 .brand__logo {
    height: 18px;
  }

  .call-pop__btn {
    padding-inline: var(--sp-3);
  }
}

/* V4 mobile menu: services first. */
.mobile-menu__services {
  margin-bottom: var(--sp-5);
}

.m-services {
  display: grid;
  gap: var(--sp-2);
  margin: 0;
}

.m-services__link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-1) var(--sp-3);
  min-height: 52px;
  padding: var(--sp-3) var(--sp-4);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.m-services__link:hover {
  background: var(--brand-tint);
  border-color: var(--brand-strong);
}

[data-theme="hc"] .m-services__link {
  border-width: 2px;
}

.m-services__meta {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-subtle);
}

/* --------------------------------------------------------------------------
   5. V5 — centred desktop masthead + mobile bottom action bar
   -------------------------------------------------------------------------- */
.hdr5__top {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--header-h);
}

.hdr5__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.hdr5__st,
.hdr5__navrow {
  display: none;
}

.hdr5__mobile-actions {
  margin-inline-start: auto;
}

@media (min-width: 62rem) {
  .hdr5__top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--sp-5);
    min-height: 84px;
  }

  .hdr5__st {
    display: grid;
    gap: 2px;
  }

  .hdr5__st--right {
    justify-items: end;
    text-align: end;
  }

  .hdr--v5 .brand__logo {
    height: 32px;
  }

  .hdr5__mobile-actions {
    display: none;
  }

  .hdr5__navrow {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--sp-4);
    min-height: 52px;
    border-top: 1px solid var(--border);
  }

  .hdr5__navrow .nav {
    margin: 0;
  }

  .hdr5__tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sp-2);
  }

  .hdr5__theme-slot {
    display: contents;
  }

  .hdr--v5 .theme-btn__label {
    display: none;
  }

  /* No bottom bar on desktop. */
  .actionbar {
    display: none;
  }
}

.hdr5__st-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  letter-spacing: var(--tr-tight);
}

.hdr5__st-area {
  margin-inline-start: var(--sp-1);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
}

.hdr5__st-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--sp-3);
  font-size: var(--fs-sm);
}

.hdr5__tel {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: 44px;
  color: var(--brand-deep);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  text-decoration: none;
}

.hdr5__tel:hover {
  text-decoration: underline;
}

.hdr5__map {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hdr5__map:hover {
  color: var(--link-hover);
}

/* Bottom action bar — fixed, three equal thumb-sized buttons. */
.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 190;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-strong);
  box-shadow: 0 -6px 18px rgba(30, 30, 29, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="hc"] .actionbar {
  border-top: 2px solid #ffffff;
  box-shadow: none;
}

.actionbar__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
}

.actionbar__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-height: 60px;
  padding: var(--sp-1);
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.actionbar__btn svg {
  color: var(--brand-deep);
}

.actionbar__btn:hover,
.actionbar__btn[aria-expanded="true"] {
  background: var(--brand-tint);
  color: var(--brand-deep);
}

/* The first button (Zadzwoń) is the main conversion: brand-filled. */
.actionbar__item:first-child .actionbar__btn {
  background: var(--brand-strong);
  color: var(--on-brand);
}

.actionbar__item:first-child .actionbar__btn svg {
  color: currentColor;
}

.actionbar__item:first-child .actionbar__btn:hover,
.actionbar__item:first-child .actionbar__btn[aria-expanded="true"] {
  background: var(--link-hover);
  color: var(--on-brand);
}

[data-theme="hc"] .actionbar__item:first-child .actionbar__btn:hover,
[data-theme="hc"] .actionbar__item:first-child .actionbar__btn[aria-expanded="true"] {
  background: #ffffff;
  color: #000000;
}

.actionbar__btn:focus-visible {
  outline-offset: -4px;
}

/* Sheets rise from the bar; full width, above it. */
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
  padding: var(--sp-5) var(--gutter) var(--sp-4);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -18px 40px -12px rgba(30, 30, 29, 0.28);
}

[data-theme="hc"] .sheet {
  border: 2px solid #ffffff;
  box-shadow: none;
}

.sheet__title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--sp-3);
}

.sheet .cta-lines {
  margin-bottom: var(--sp-3);
}

.sheet .cta-line {
  min-height: 56px;
}

.sheet__note {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

@media (max-width: 61.99rem) {
  /* Keep page content, the back-to-top button and the proposal label clear
     of the fixed bar. */
  body.hdr-v5 {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  .hdr-v5 .to-top {
    bottom: calc(60px + var(--sp-4) + env(safe-area-inset-bottom, 0px));
  }

  .hdr-v5 .proposal-tag {
    z-index: 180; /* below the action bar and its sheets */
    bottom: calc(60px + var(--sp-3) + env(safe-area-inset-bottom, 0px));
  }

  .hdr-v5 .consent {
    bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }
}
