/* Site header & navigation — clean semantic classes replacing the old
   GeneratePress markup (.main-navigation, .menu-item, .sf-menu, …). */

/* Visually-hidden text for screen readers (replaces WordPress' .screen-reader-text). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip-path: none;
  white-space: normal;
}

.site-header {
  background-color: var(--base-3);
  box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.2);
}

.site-header__inner {
  max-width: 1288px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Brand */
.site-brand {
  font-family: 'Livvic', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 60px;
  color: var(--contrast-s);
  text-decoration: none;
  margin-left: 10px;
}

/* Toggle (hamburger) — hidden on desktop */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0 20px 0 0;
  line-height: 42px;
  font-size: 15px;
  font-weight: 700;
  color: var(--contrast-s);
}
.nav-toggle__icon svg {
  height: 1em;
  width: 1em;
  position: relative;
  top: 0.125em;
  fill: currentColor;
}
.nav-toggle__icon--close { display: none; }
.site-header.is-open .nav-toggle__icon--bars { display: none; }
.site-header.is-open .nav-toggle__icon--close { display: inline; }

/* Menu list (desktop: horizontal) */
.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__item { position: relative; }
.site-nav__link {
  display: block;
  padding: 0 20px;
  line-height: 60px;
  font-size: 15px;
  font-weight: 700;
  color: var(--contrast-s);
  text-decoration: none;
}
.site-nav__item:hover > .site-nav__link,
.site-nav__item:focus-within > .site-nav__link {
  color: var(--accent-s);
}
.site-nav__caret {
  display: inline-block;
  padding-left: 10px;
}
.site-nav__caret svg {
  height: 1em;
  width: 1em;
  position: relative;
  top: 0.125em;
  fill: currentColor;
}

/* Dropdown submenu (desktop: hover) — right-aligned so the "Usługi"
   submenu opens inward instead of spilling off-screen. */
.site-nav__submenu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 200px;
  margin: 0;
  padding: 0;
  list-style: none;
  background-color: var(--base-3);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 80ms linear;
  z-index: 99999;
}
.site-nav__item:hover > .site-nav__submenu,
.site-nav__item:focus-within > .site-nav__submenu {
  opacity: 1;
  visibility: visible;
}
.site-nav__subitem a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--contrast-s);
  text-decoration: none;
}
.site-nav__subitem a:hover,
.site-nav__subitem a:focus {
  color: var(--accent-s);
  background-color: var(--base-3);
}

/* Mobile (≤768px): hamburger + collapsible full-width panel */
@media (max-width: 768px) {
  /* Override the leftover GeneratePress rule that hid its old .site-header. */
  .site-header { display: block !important; opacity: 1 !important; }

  .site-brand { line-height: 42px; }
  .nav-toggle { display: block; }

  .site-nav__list {
    display: none;
  }
  .site-header.is-open .site-nav__list {
    display: block;
    position: absolute;
    top: 42px;
    left: 0;
    right: 0;
    background-color: var(--base-3);
    z-index: 999;
  }
  .site-nav__link {
    line-height: 42px;
  }
  .site-nav__item {
    text-align: left;
  }
  /* Submenus stay closed on mobile (top-level item already links to the
     landing page, e.g. "Wiedza" → /blog/). */
  .site-nav__submenu {
    position: static;
    width: 100%;
    display: none;
  }
}
