/* Pasek komunikatu nad belką grupy. Wersja telefonu to klasa .km-m (ustawiana
 * przed pierwszym wyświetleniem), żeby podgląd w panelu mógł ją pokazać obok wersji komputerowej. */
.km-bar {
  --km-ink: #141833;
  --km-text: #353B66;
  --km-accent: #86A0C6;
  --km-bg: #F4F1EB;
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 44px;
  box-sizing: border-box;
  padding: 0 calc(max(0px, (100% - var(--ax-maxw, 1440px)) / 2) + var(--ax-gutter, 52px));
  background: var(--km-bg);
  color: var(--km-text);
  font-family: var(--ax-font, 'Silka', system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  transition: height .35s cubic-bezier(.16, 1, .3, 1);
}

.km-bar[data-km-id]:not(#ax-km) {
  display: none;
}

.km-bar *,
.km-bar *::before,
.km-bar *::after {
  box-sizing: border-box;
}

.km-bar.is-closing {
  height: 0 !important;
}

.km-label {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.km-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--km-accent);
  animation: kmPulse 1.8s ease-out infinite;
}

.km-sep {
  flex: none;
  width: 1px;
  height: 16px;
  background: rgba(53, 59, 102, .25);
}

.km-view {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 44px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}

.km-bar:not(.km-run) .km-view {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}

.km-view[role="button"] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.km-view:focus-visible {
  outline: 2px solid var(--km-accent);
  outline-offset: -2px;
}

.km-track {
  display: flex;
  width: max-content;
  animation: kmMarquee var(--km-dur, 40s) linear infinite;
}

/* Do startu (po zasłonie strony i krótkiej pauzie) widać początek komunikatu. */
.km-bar:not(.km-run) .km-track,
.km-view:hover .km-track,
.km-view:focus-within .km-track {
  animation-play-state: paused;
}

.km-bar .km-item {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0 28px 0 0;
  font: inherit;
  color: inherit;
  white-space: nowrap;
}

.km-item::after {
  content: "";
  flex: none;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--km-accent);
}

.km-bar .km-item a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Krótki tekst mieści się w pasku - stoi w miejscu. */
.km-bar.km-static .km-view {
  -webkit-mask-image: none;
          mask-image: none;
}

.km-bar.km-static .km-track,
.km-bar.km-open .km-track {
  animation: none;
  width: auto;
}

.km-bar.km-static .km-item + .km-item,
.km-bar.km-open .km-item + .km-item {
  display: none;
}

.km-bar.km-static .km-item::after,
.km-bar.km-open .km-item::after {
  display: none;
}

/* Rozwinięty: cała treść bez ruchu. */
.km-bar.km-open {
  height: auto;
  min-height: 44px;
}

.km-bar.km-open .km-view {
  -webkit-mask-image: none;
          mask-image: none;
  line-height: 1.5;
  padding: 11px 0;
}

.km-bar.km-open .km-item {
  padding: 0;
  white-space: normal;
}

/* Kropka, telefon i zamknięcie zostają na wysokości pierwszej linii. */
.km-bar.km-open {
  align-items: flex-start;
}

.km-bar.km-open .km-label {
  margin-top: 16px;
}

.km-bar.km-open .km-sep {
  margin-top: 13px;
}

.km-bar.km-open .km-tel,
.km-bar.km-open .km-close {
  margin-top: 7px;
}

.km-bar.km-m.km-open .km-label {
  margin-top: 18px;
}

.km-bar.km-m.km-open .km-tel,
.km-bar.km-m.km-open .km-close {
  margin-top: 0;
}

.km-bar .km-tel {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--km-ink);
  color: var(--km-bg);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease;
}

.km-tel svg {
  display: none;
}

.km-bar .km-tel:hover {
  background: var(--km-text);
  color: var(--km-bg);
}

.km-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 -8px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: background-color .2s ease;
}

.km-close:hover {
  background: rgba(53, 59, 102, .08);
}

.km-close svg {
  display: block;
}

.km-close:focus-visible,
.km-tel:focus-visible {
  outline: 2px solid var(--km-accent);
  outline-offset: 2px;
}

/* Telefon */
.km-bar.km-m {
  gap: 10px;
  padding: 0 4px 0 18px;
}

.km-bar.km-m .km-label span,
.km-bar.km-m .km-sep {
  display: none;
}

.km-bar.km-m .km-view {
  font-size: 13px;
}

.km-bar.km-m .km-tel {
  width: 36px;
  height: 44px;
  margin-right: -12px;
  padding: 0;
  background: none;
  justify-content: center;
}

.km-bar.km-m .km-tel span {
  display: none;
}

.km-bar.km-m .km-tel svg {
  display: block;
  width: 30px;
  height: 30px;
  padding: 8.5px;
  border-radius: 50%;
  background: var(--km-ink);
  color: var(--km-bg);
}

.km-bar.km-m .km-close {
  width: 40px;
  height: 44px;
  margin: 0;
  border-radius: 0;
}

.km-bar.km-m .km-close:hover {
  background: none;
}

@media (prefers-reduced-motion: reduce) {
  .km-bar {
    transition: none;
  }

  .km-track {
    animation: none;
  }

  .km-view {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .km-view::-webkit-scrollbar {
    display: none;
  }

  .km-item + .km-item {
    display: none;
  }

  .km-dot {
    animation: none;
  }
}

@keyframes kmMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes kmPulse {
  0% { box-shadow: 0 0 0 0 rgba(134, 160, 198, .6); }
  100% { box-shadow: 0 0 0 9px rgba(134, 160, 198, 0); }
}

/* Wyspa nawigacji jest przypięta do ekranu - zjeżdża pod pasek, dopóki go widać.
 * --km-off to dolna krawędź paska na ekranie (0 po przewinięciu). */
html.km-on [data-navhead] {
  top: calc(42px + var(--km-off, 0px));
}

html.km-on body.ax-nav-peek [data-navhead].is-nav-hidden {
  transform: translateY(calc(-100% - 42px - 12px - var(--km-off, 0px)));
}

@media (max-width: 900px) {
  html.km-on [data-navhead] {
    top: var(--km-off, 0px) !important;
  }

  html.km-on body.ax-nav-peek [data-navhead].is-nav-hidden {
    transform: translateY(calc(-100% - 12px - var(--km-off, 0px)));
  }
}
