/* ═══════════════════════════════════════════════════════
   NAGŁÓWEK I NAWIGACJA – czyste, ręczne CSS
   ═══════════════════════════════════════════════════════ */

/* ── Pasek górny ──────────────────────────────────────── */
.topbar {
  background: #0d1a2b;
  color: #b8c9df;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 38px;
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar-inner p { margin: 0; }

.topbar-inner a {
  color: #6ee45a;
  font-weight: 600;
  text-decoration: none;
}

.topbar-inner a:hover { text-decoration: underline; }

/* ── Główna belka nagłówka ────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
  border-bottom: 2px solid #e8eef6;
  box-shadow: 0 2px 20px rgba(10, 20, 40, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}

/* ── Logo ─────────────────────────────────────────────── */
.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo img {
  display: block;
  height: 52px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

/* ── Nawigacja desktop ────────────────────────────────── */
.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

/* lista główna */
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* każdy element główny */
.nav-list > li {
  position: relative;
}

/* link główny */
.nav-list > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 72px;
  padding: 0 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #1a2b40;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-list > li > a:hover,
.nav-list > li:focus-within > a {
  color: #0e6b20;
  border-bottom-color: #1da000;
}

/* strzałka ▾ przy pozycjach z podmenu */
.nav-list > li.has-sub > a::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 5px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%231a2b40'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform 0.2s;
}

.nav-list > li.has-sub:hover > a::after,
.nav-list > li.has-sub:focus-within > a::after {
  transform: rotate(180deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%230e6b20'/%3E%3C/svg%3E");
}

/* ── Przycisk Aktualności ─────────────────────────────── */
.nav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  margin-left: 8px;
  background: linear-gradient(135deg, #1da000, #14780a);
  color: #fff !important;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(20, 140, 10, 0.32);
  transition: transform 0.15s, box-shadow 0.15s;
  border-bottom: none !important;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(20, 140, 10, 0.42);
  border-bottom-color: transparent !important;
}

/* ── Podmenu dropdown ─────────────────────────────────── */
.dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #dce8f5;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(10, 24, 46, 0.14);
  padding: 8px;
  list-style: none;
  margin: 0;

  /* animacja */
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 300;
}

.nav-list > li:hover > .dropdown,
.nav-list > li:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1e2e44;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s;
}

.dropdown li a:hover {
  background: #eef5ff;
  color: #0e5c1b;
}

/* ── Zagnieżdżone podmenu (flyout w prawo) ────────────── */
.dropdown li {
  position: relative;
}

/* strzałka › przy elementach z podmenu */
.dropdown li.has-sub > a::after {
  content: '›';
  font-size: 16px;
  line-height: 1;
  opacity: 0.45;
  flex-shrink: 0;
}

/* zagnieżdżony dropdown – pozycjonowany z prawej strony */
.dropdown .dropdown {
  top: -8px;
  left: calc(100% + 4px);
  transform: translateX(4px);
  min-width: 220px;
  border-radius: 12px;
}

.dropdown li.has-sub:hover > .dropdown,
.dropdown li.has-sub:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* ── Hamburger mobilny ────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: #1a2b40;
  border-radius: 99px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8.75px) rotate(-45deg);
}

/* ── Overlay mobilny ──────────────────────────────────── */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(5, 12, 24, 0.45);
  backdrop-filter: blur(3px);
}

.nav-backdrop.open { display: block; }

/* ══════════════════════════════════════
   MOBILE  ≤ 900px
   ══════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 88vw);
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 80px 0 24px;
    overflow-y: auto;
    z-index: 195;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 40px rgba(5, 12, 24, 0.18);
  }

  .main-nav.open {
    transform: translateX(0);
  }

  /* lista pionowa */
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 12px;
  }

  .nav-list > li > a {
    height: auto;
    padding: 13px 14px;
    border-bottom: 1px solid #edf2f9 !important;
    border-right: none;
    font-size: 14px;
    justify-content: space-between;
    border-bottom-color: #edf2f9;
  }

  .nav-list > li > a::after {
    width: 10px;
    height: 6px;
    flex-shrink: 0;
  }

  /* podmenu rozwijane w mobile */
  .dropdown {
    position: static;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 4px 12px;
    display: none;
  }

  .nav-list > li.mob-open > .dropdown {
    display: block;
  }

  /* drugi poziom accordion (podmenu podmenu) */
  .dropdown li.mob-open > .dropdown {
    display: block;
    padding-left: 10px;
  }

  .dropdown li a {
    font-size: 13px;
    padding: 9px 10px;
    color: #2e4460;
    border-bottom: 1px solid #f2f6fb;
    border-radius: 0;
    white-space: normal;
  }

  /* strzałka w prawo dla mob submenu */
  .dropdown li.has-sub > a::after {
    content: '+';
    font-size: 14px;
  }

  .dropdown li.mob-open > a::after {
    content: '−';
  }

  .nav-cta {
    margin: 16px 12px 0;
    height: 48px;
    font-size: 14px;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .topbar { display: none; }
  .header-inner { height: 62px; }
  .site-logo img { height: 44px; }
}
