/* =============================================================================
   VETUS — layout globalny: kontener, nagłówek, stopka
   ============================================================================= */

.wl-site-main {
  min-height: 60vh;
}

/* ===== Kontener =====
   Design: 160px gutter przy 1920px, pełna szerokość 1600px. */
.wl-container {
  padding-inline: max(var(--space-page-fluid), calc((100% - var(--container-max)) / 2));
}

.wl-container--narrow {
  padding-inline: max(var(--space-page-fluid), calc((100% - var(--container-narrow)) / 2));
}

.wl-container--wide {
  padding-inline: var(--space-page);
}

/* ===== Nagłówek strony ===== */
.wl-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: transparent;
  color: var(--color-text-invert);
  transition: background 0.25s ease, transform 0.3s ease, color 0.25s ease;
}

.wl-header.is-sticky {
  position: fixed;
}

.wl-header.is-hidden {
  transform: translateY(-100%);
}

.wl-header.is-scrolled,
.wl-header.is-open,
.has-entry-header .wl-header {
  background: var(--color-cream);
  color: var(--color-text);
}

.wl-header__inner {
  display: flex;
  align-items: center;
  min-height: var(--header-height);
  padding-inline: var(--space-page-fluid);
  gap: var(--space-7xl);
}

.wl-header__brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.wl-header__brand img {
  width: auto;
  height: calc(var(--fs-base) * 1.8889); /* 34px @1920 — logotyp z Figmy 117×34 */
}

/* Logo w kolorze białym na ciemnym hero. */
.wl-header__brand img {
  filter: brightness(0) invert(1);
  transition: filter 0.25s ease;
}

.wl-header.is-scrolled .wl-header__brand img,
.wl-header.is-open .wl-header__brand img,
.has-entry-header .wl-header .wl-header__brand img,
.wl-header:not(.is-transparent) .wl-header__brand img {
  filter: none;
}

.wl-header__nav {
  display: flex;
  align-items: center;
}

.wl-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6xl); /* 36px — odstęp z Figmy */
  list-style: none;
  margin: 0;
  padding: 0;
}

.wl-menu a {
  display: inline-block;
  font-size: var(--fs-button);
  font-weight: var(--fw-medium);
  line-height: var(--lh-label);
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  color: inherit;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.wl-menu a:hover,
.wl-menu .current-menu-item > a {
  opacity: 1;
  color: var(--color-accent);
}

.wl-header:not(.is-scrolled):not(.is-open) .wl-menu a:hover {
  color: var(--color-brass-light);
}

.wl-header__meta {
  display: flex;
  align-items: center;
  gap: var(--space-6xl);
  margin-left: auto;
}

.wl-header__cta {
  flex: 0 0 auto;
}

/* Drawer — na desktop dzieci są w jednym flexie */
.wl-header__drawer {
  display: contents;
}

.wl-header__toggle,
.wl-header__close,
.wl-header__backdrop {
  display: none;
}

.wl-header__email,
.wl-header__lang {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-small);
  color: inherit;
  text-decoration: none;
}

.wl-header__email-icon img {
  width: 20px;
  height: 20px;
}

.wl-header__lang-arrow {
  width: 12px;
  height: 7px;
  transition: transform 0.2s ease;
}

.wl-lang-switcher {
  position: relative;
}

.wl-lang-switcher__current {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0;
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: inherit;
}

.wl-lang-switcher__list {
  position: absolute;
  top: calc(100% + var(--space-sm));
  left: 50%;
  transform: translateX(-50%);
  min-width: 130px;
  margin: 0;
  padding: var(--space-sm);
  list-style: none;
  background: var(--color-cream);
  border: 1px solid var(--color-line);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 20;
}

.wl-lang-switcher.is-open .wl-lang-switcher__list {
  opacity: 1;
  visibility: visible;
}

.wl-lang-switcher.is-open .wl-header__lang-arrow {
  transform: rotate(180deg);
}

.wl-lang-switcher__item a {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--fs-small);
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.wl-lang-switcher__item a:hover {
  color: var(--color-accent);
}

/* ===== Stopka ===== */
.wl-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-invert);
  padding: var(--space-11xl) var(--space-page-fluid) var(--space-6xl);
}

.wl-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 0.875fr) minmax(0, 0.875fr) minmax(0, 1.125fr);
  gap: 0;
  align-items: start;
  padding-bottom: var(--space-9xl);
}

.wl-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.wl-footer__brand img {
  width: auto;
  height: calc(var(--fs-base) * 2.2222); /* 40px @1920 — logotyp 138×40 */
}

.wl-footer__tag {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--color-text-invert-2);
  max-width: 34ch;
}

.wl-footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.wl-footer__col-title {
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  line-height: var(--lh-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--color-brass);
}

.wl-footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  list-style: none;
  margin: 0;
  padding: 0;
}

.wl-footer__links a,
.wl-footer__contact-line {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--color-text-invert-2);
  text-decoration: none;
  transition: color 0.2s ease;
}

.wl-footer__links a:hover {
  color: var(--color-text-invert);
}

.wl-footer__contact-line--strong {
  color: var(--color-text-invert);
}

.wl-footer__bottom {
  display: flex;
  align-items: center;
  gap: var(--space-3xl);
  border-top: 1px solid rgba(220, 211, 198, 0.14);
  padding-top: var(--space-3xl);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--color-ink-inv);
}

.wl-footer__bottom-krs {
  margin-left: auto;
}

/* ===== Strony bez hero — nagłówek na kremie ===== */
.wl-entry-header {
  padding: calc(var(--header-height) + var(--space-sec)) 0 var(--space-sec);
}

.wl-entry-header__inner {
  padding-inline: max(var(--space-page-fluid), calc((100% - var(--container-max)) / 2));
}

.wl-entry-header__breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: 0 0 var(--space-lg);
  padding: 0;
  list-style: none;
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.wl-entry-header__breadcrumbs a {
  color: var(--color-accent-ink);
}

.wl-entry-header__title {
  max-width: 20ch;
}

.wl-entry-header__desc {
  margin-top: var(--space-lg);
  max-width: 62ch;
  color: var(--color-text-soft);
}

.wl-empty-front {
  padding: calc(var(--header-height) + var(--space-sec)) 0 var(--space-sec);
}

/* ===== Responsywność nagłówka i stopki ===== */

@media (max-width: 1200px) {
  .wl-menu {
    gap: var(--space-3xl);
  }

  .wl-header__inner {
    gap: var(--space-3xl);
  }
}

@media (max-width: 1024px) {
  .wl-header__inner {
    justify-content: space-between;
    gap: var(--space-2xl);
  }

  .wl-header__toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 26px;
    height: 26px;
    padding: 0;
    order: 3;
  }

  .wl-header__toggle span {
    display: block;
    width: 26px;
    height: 1px;
    background: currentColor;
  }

  .wl-header__cta {
    display: none;
  }

  .wl-header__drawer {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: var(--z-drawer);
    flex-direction: column;
    gap: var(--space-8xl);
    padding: var(--space-sec-sm) var(--space-page-fluid) var(--space-9xl);
    background: var(--color-ink);
    color: var(--color-cream);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
  }

  .wl-header.is-open .wl-header__drawer {
    transform: translateX(0);
    visibility: visible;
  }

  .wl-header__close {
    display: inline-flex;
    align-self: flex-end;
    padding: 0;
    font-size: var(--fs-h3);
    line-height: var(--lh-flat);
    color: var(--color-cream);
  }

  .wl-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3xl);
  }

  .wl-menu a {
    font-size: var(--fs-h3);
    font-weight: var(--fw-regular);
    line-height: var(--lh-flat);
    letter-spacing: var(--ls-h3);
    text-transform: none;
    color: var(--color-cream);
  }

  .wl-header__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3xl);
    margin-left: 0;
  }

  .wl-header__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-drawer) - 1);
    background: rgba(28, 26, 23, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .wl-header.is-open .wl-header__backdrop {
    opacity: 1;
    visibility: visible;
  }

  .wl-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-9xl) var(--space-5xl);
  }

  .wl-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .wl-footer {
    padding: var(--space-12xl) var(--space-page) var(--space-4xl);
  }

  .wl-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6xl) var(--space-3xl);
    padding-bottom: var(--space-6xl);
  }

  .wl-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
    padding-top: var(--space-2xl);
  }

  .wl-footer__bottom-krs {
    margin-left: 0;
  }

  .wl-entry-header {
    padding-top: calc(var(--header-height-mobile) + var(--space-sec));
  }
}
