/* Wspólne menu Graffo (strona główna + podstrony).
   Przezroczysty pasek z rozmyciem tła. Blur siedzi na ::before, żeby rozwijana lista
   (dziecko paska) mogła mieć własny backdrop-filter widzący stronę pod spodem. */
:root { --bar: 80px; --shade: 8, 12, 32; --accent: #9fb6ff; --muted: #d6dcf5; }
.topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--bar); z-index: 10;
          display: flex; align-items: center; justify-content: space-between; padding: 0 6.5vw; }
.topbar::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(var(--shade), .28); border-bottom: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
.brand { display: block; line-height: 0; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav > li { position: relative; }
.nav a, .nav button { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px;
  font: 700 clamp(15px, 1vw, 18px) Montserrat, sans-serif; color: #fff; text-decoration: none;
  background: none; border: 0; cursor: pointer; transition: background .2s, color .2s; }
.nav > li > a:hover, .nav > li > button:hover, .nav > li.open > button { background: rgba(255, 255, 255, .12); }
.nav a[aria-current="page"], .has-sub.active > button { color: var(--accent); }
.sub a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .1); }
.caret { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
         transform: translateY(-3px) rotate(45deg); transition: transform .25s; }
li.open .caret { transform: translateY(2px) rotate(-135deg); }
.sub { position: absolute; top: calc(100% + 12px); left: 50%; min-width: 360px; list-style: none; margin: 0; padding: 10px;
  border-radius: 18px; background: rgba(var(--shade), .55); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  opacity: 0; visibility: hidden; transform: translate(-50%, -8px); transition: opacity .22s, transform .22s, visibility .22s; }
.sub::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; } /* mostek dla hovera */
li.open > .sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.sub a { border-radius: 12px; padding: 13px 16px; font-weight: 500; font-size: clamp(14px, .95vw, 17px); color: var(--muted); }
.sub a:hover, .sub a:focus-visible { background: rgba(255, 255, 255, .1); color: #fff; }
.burger { display: none; width: 52px; height: 52px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .25);
          background: rgba(255, 255, 255, .08); cursor: pointer; position: relative; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 14px; width: 22px; height: 2px; background: #fff;
          content: ""; transition: transform .25s, opacity .25s; }
.burger span { top: 25px; } .burger span::before { left: 0; top: -7px; } .burger span::after { left: 0; top: 7px; }
.topbar.menu-open .burger span { background: transparent; }
.topbar.menu-open .burger span::before { transform: translateY(7px) rotate(45deg); }
.topbar.menu-open .burger span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) {
  :root { --bar: 64px; }
  .topbar { padding: 0 16px; }
  .brand img { height: 40px; }
  .burger { display: block; width: 44px; height: 44px; border-radius: 12px; }
  .burger span { left: 11px; top: 21px; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 16px 20px; max-height: calc(100vh - var(--bar)); overflow-y: auto;
    background: rgba(var(--shade), .6); border-bottom: 1px solid rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity .25s, transform .25s, visibility .25s; }
  .topbar.menu-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav a, .nav button { width: 100%; justify-content: space-between; border-radius: 12px; font-size: 17px; }
  .sub { position: static; min-width: 0; transform: none; box-shadow: none; border: 0; background: none; padding: 0 0 0 12px;
         -webkit-backdrop-filter: none; backdrop-filter: none; display: none; opacity: 1; visibility: visible; }
  .sub::before { display: none; }
  li.open > .sub { display: block; transform: none; }
}
