/*
 * Lokarta — unified subpage header
 * Benchmark: the stable header spacing used on /licencja/.
 * This layer is loaded last and intentionally affects public subpages only.
 */

/* One visual header on every subpage, independent of the hero artwork below it. */
body:not(.home) .site-header {
  height: 84px;
  background: rgba(13, 15, 18, .94);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
}

body:not(.home) .site-header.is-scrolled {
  height: 72px;
  background: rgba(13, 15, 18, .96);
  border-color: rgba(255, 255, 255, .08);
}

body:not(.home) .site-header .header-inner {
  height: 100%;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

body:not(.home) .site-header .brand,
body:not(.home) .site-header .lokarta-logo-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

body:not(.home) .site-header .lokarta-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 44px;
}

body:not(.home) .site-header .primary-nav {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-self: center;
}

body:not(.home) .site-header .primary-nav .menu {
  align-items: center;
}

body:not(.home) .site-header .header-cta {
  align-self: center;
}

/*
 * The header PHP was already shared by every template. The visible mismatch came
 * from different first-section offsets (32px, 34px, 145px, 150px, clamp(), etc.).
 * Give every subpage the same top start as the Licencja page without changing
 * the individual hero content or its bottom spacing.
 */
body:not(.home) #main-content > section:first-child.section-dark,
body:not(.home) #main-content > header:first-child.section-dark {
  padding-top: 150px !important;
}

/* Generic pages that do not use a dedicated dark hero still need the same clearance. */
body:not(.home) #main-content.standard-page {
  padding-top: 150px;
}

@media (max-width: 980px) {
  body:not(.home) .site-header,
  body:not(.home) .site-header.is-scrolled {
    height: 74px;
  }

  body:not(.home) .site-header .primary-nav {
    position: fixed;
    inset: 74px 0 0 0;
    display: none;
    align-items: initial;
    justify-self: auto;
  }

  body:not(.home) .site-header .primary-nav.is-open {
    display: block;
  }

  body:not(.home) #main-content > section:first-child.section-dark,
  body:not(.home) #main-content > header:first-child.section-dark {
    padding-top: 120px !important;
  }

  body:not(.home) #main-content.standard-page {
    padding-top: 120px;
  }
}

@media (max-width: 720px) {
  body:not(.home) .site-header .lokarta-logo {
    max-height: 38px;
  }

  body:not(.home) .site-header .header-inner {
    gap: 18px;
  }
}

@media (max-width: 420px) {
  body:not(.home) .site-header .lokarta-logo {
    max-height: 34px;
  }
}
