/* Header 1.6.1: clean rebuild, no single-page exceptions. */
.site-header {
  position: relative;
  z-index: 30;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff;
  background-color: var(--header-bg-color, #4f7f5d);
  background-image:
    linear-gradient(rgba(var(--header-overlay-color, 255, 255, 255), var(--header-overlay-opacity, 0)), rgba(var(--header-overlay-color, 255, 255, 255), var(--header-overlay-opacity, 0))),
    linear-gradient(90deg, rgba(18, 52, 35, .08), rgba(18, 52, 35, .22)),
    var(--header-bg-image, none),
    linear-gradient(135deg, var(--header-bg-color, #4f7f5d), #315f45);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--header-bg-position, center center);
  box-shadow: 0 18px 40px rgba(28, 61, 45, .14);
  isolation: isolate;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .20), transparent);
  opacity: 1;
  pointer-events: none;
}

.site-header.is-sticky {
  position: sticky;
  top: 0;
}

body.admin-bar .site-header.is-sticky {
  top: 32px;
}

.site-header__inner {
  width: min(1480px, calc(100% - 44px));
  max-width: 1480px;
  margin-inline: auto;
  padding: 28px 0 18px;
}

.site-header__top {
  display: grid;
  grid-template-columns: minmax(480px, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 3vw, 52px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
  gap: 24px;
  color: #fff;
  text-align: left;
  text-decoration: none;
}

.site-brand__logo,
.custom-logo-link {
  display: block;
  flex: 0 0 auto;
}

.custom-logo {
  width: var(--logo-width, 130px);
  max-width: var(--logo-width, 130px);
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .22));
}

.site-brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.site-title-line {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  text-wrap: balance;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .20);
}

.site-title-line--1,
.site-title-line--2,
.site-title-line--3 {
  font-size: clamp(1.25rem, 1.85vw, 1.85rem);
}

.header-actions {
  display: grid;
  grid-template-columns: repeat(4, 96px);
  justify-content: end;
  align-items: start;
  gap: 18px;
}

.header-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 96px;
  min-height: 116px;
  gap: 9px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  line-height: 1.15;
}

.header-action:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .78);
  outline-offset: 4px;
  border-radius: 20px;
}

.header-action__icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background: var(--quick-color, #267fc3);
  color: #fff;
  font-size: 2.35rem;
  font-weight: 900;
  letter-spacing: -.04em;
  text-transform: lowercase;
  box-shadow: 0 10px 24px rgba(9, 38, 26, .18), inset 0 1px 0 rgba(255, 255, 255, .20);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.header-action__icon.has-image {
  padding: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.header-action__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-action:hover .header-action__icon,
.header-action:focus-visible .header-action__icon {
  transform: translateY(-2px);
  filter: saturate(1.04);
}

.header-action__label {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .22);
}

.site-header__navrow {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 18px;
  padding-top: 18px;
}

.site-header__navrow::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .20), transparent);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 18px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.menu-toggle__icon > span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.menu-toggle__icon {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle__label {
  margin-left: 4px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li {
  position: relative;
  margin: 0;
}

.site-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  gap: 11px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 999px;
  background: var(--menu-pill-active, #fff0bd);
  color: var(--menu-pill-text, #244b3a);
  font-family: var(--font-heading);
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(17, 53, 37, .14);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  transform: translateY(-2px);
  background: var(--menu-pill-active, #fff0bd);
  border-color: rgba(255, 255, 255, .90);
  box-shadow: 0 11px 24px rgba(17, 53, 37, .18);
}

.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .current-menu-ancestor > a {
  background: #f2c84b;
  border-color: rgba(255, 255, 255, .92);
  color: #173f2e;
  box-shadow: 0 11px 24px rgba(17, 53, 37, .20), inset 0 -2px 0 rgba(154, 122, 0, .22);
}

.menu-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: currentColor;
  font-size: 1.08em;
  line-height: 1;
}

.menu-item-icon.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-nav .menu-item-has-children > a::after {
  content: "▾";
  margin-left: 3px;
  font-size: .72em;
  opacity: .82;
}

.site-nav .menu-item-has-children::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
}

.site-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 999;
  display: none;
  min-width: 238px;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 14px 10px 10px;
  border: 1px solid rgba(36, 75, 58, .10);
  border-radius: 16px;
  background: var(--menu-dropdown-bg, #fff8e8);
  box-shadow: 0 13px 28px rgba(18, 55, 38, .18);
}

.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu {
  display: flex;
}

.site-nav .sub-menu a {
  width: 100%;
  min-height: 38px;
  justify-content: flex-start;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--menu-pill-active, #fff0bd);
  box-shadow: none;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.site-nav .sub-menu a:hover,
.site-nav .sub-menu a:focus-visible {
  transform: none;
  background: var(--menu-pill-active, #fff0bd);
}

@media (max-width: 1180px) {
  .site-header__top {
    grid-template-columns: 1fr;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .site-header__navrow {
    justify-content: flex-start;
  }

  .site-nav ul {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .site-header__inner {
    width: min(100% - 28px, 1320px);
    padding: 14px 0;
  }

  .site-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }

  .custom-logo {
    width: 78px;
    max-width: 78px;
  }

  .site-brand {
    gap: 11px;
  }

  .site-title-line--1,
  .site-title-line--2,
  .site-title-line--3 {
    font-size: clamp(1rem, 4vw, 1.26rem);
  }

  .header-actions {
    grid-template-columns: repeat(2, 62px);
    gap: 7px;
  }

  .header-action {
    width: 62px;
    min-height: 70px;
    gap: 4px;
  }

  .header-action__icon,
  .header-action__icon.has-image {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .header-action__label {
    font-size: .68rem;
  }

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

  .site-header__navrow {
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 1000;
    padding: 12px;
    border: 1px solid var(--pc-border);
    border-radius: 22px;
    background: #fff;
    color: var(--pc-text);
    box-shadow: var(--pc-shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .site-nav a {
    width: 100%;
    justify-content: flex-start;
    min-height: 44px;
    padding: 10px 13px;
  }

  .site-nav .sub-menu {
    position: static;
    display: flex;
    width: 100%;
    min-width: 0;
    margin-top: 6px;
    padding: 6px 0 0 14px;
    border: 0;
    background: rgba(36, 49, 47, .06);
    box-shadow: none;
  }
}

@media (max-width: 782px) {
  body.admin-bar .site-header.is-sticky {
    top: 46px;
  }
}

@media (max-width: 640px) {
  .site-header__top {
    align-items: flex-start;
  }

  .header-actions {
    grid-template-columns: repeat(2, 56px);
  }

  .header-action {
    width: 56px;
  }

  .header-action__label {
    display: none;
  }
}

/* 1.6.30: lekkie zagęszczenie górnego nagłówka jak w nowym podglądzie. */
.site-header__inner { padding-top: 24px; padding-bottom: 14px; }
.site-header__navrow { margin-top: 12px; padding-top: 14px; }
.header-action__icon { border-radius: 50%; }


/* 1.6.75: pojedynczy wpis — nagłówek pełnej szerokości jak na stronie głównej.
   Zabezpiecza header przed zamknięciem w węższym wrapperze/boxie widoku single. */
body.single .site-header,
body.single-post .site-header {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
}

body.single .site-header__inner,
body.single-post .site-header__inner {
  width: min(1480px, calc(100% - 44px));
  max-width: 1480px;
  margin-left: auto;
  margin-right: auto;
}

body.single .site-main,
body.single-post .site-main {
  overflow-x: clip;
}


/* 1.6.79: korzystamy ze standardowego odstępu WordPressa dla paska administratora.
   Sticky header pozostaje poniżej paska zarówno na desktopie, jak i mobile. */

/* 1.6.78: wyraźny fokus przycisku menu mobilnego. */
.menu-toggle:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}


/* v1.6.87 centered single title */
.single-post .entry-header{
    text-align:center;
}
.single-post .entry-title{
    margin-left:auto;
    margin-right:auto;
    text-align:center;
    max-width:24ch;
}
.single-post .entry-meta{
    justify-content:center;
    text-align:center;
}
