/* =========================================================
   layout/header.css
   ---------------------------------------------------------
   Nagłówek strony — wersja mobilna.
   - pasek na górze (sticky)
   - logo / brand
   - hamburger menu (działa bez JS przez <details>)
   - rozwijane menu mobilne

   Wersja desktopowa jest w: layout/desktop.css
   HTML: templates/partials/header.html
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  width: 100%;
  margin: 0;

  background: rgba(251, 250, 247, 0.96);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 14px 40px rgba(7, 18, 37, 0.06);
  backdrop-filter: blur(18px);
}

.site-header-shell {
  width: min(var(--container), calc(100% - 32px));
  min-height: 82px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;

  position: relative;
}

.brand {
  min-height: 64px;

  display: inline-flex;
  align-items: center;

  color: var(--color-text);
  text-decoration: none;
}

.brand-text {
  font-family: var(--font-heading);
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.065em;
  white-space: nowrap;
}

/* Nawigacja desktopowa — ukryta na mobile */
.desktop-nav {
  display: none;
}

.header-cta {
  display: none !important;
}

/* -------------------------
   Menu mobilne (bez JS)
   ------------------------- */

.mobile-menu {
  position: relative;
}

.mobile-menu summary {
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

/* Hamburger */
.menu-toggle {
  width: 62px;
  height: 62px;

  display: inline-grid;
  place-items: center;
  gap: 6px;

  padding: 17px;

  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);

  cursor: pointer;
}

.menu-toggle span {
  display: block;

  width: 31px;
  height: 2px;

  background: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animacja hamburgera po otwarciu */
.mobile-menu[open] .menu-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu[open] .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.mobile-menu[open] .menu-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Rozwijane menu mobilne */
.mobile-nav {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);

  width: min(320px, calc(100vw - 32px));

  display: grid;
  gap: 10px;

  padding: 12px;

  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(251, 250, 247, 0.98);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.mobile-nav a {
  min-height: 58px;

  display: flex;
  align-items: center;

  padding: 0 18px;

  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);

  color: var(--color-text);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
}
