/* Audytto — wspólne menu mobile dla statycznego frontu */
.breadcrumbs {
  background: rgba(247, 245, 238, .82);
  border-bottom: 1px solid rgba(222, 218, 201, .72);
  color: var(--ink-soft);
  font-size: .86rem;
}

.breadcrumbs .wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-top: 8px;
  padding-bottom: 8px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.breadcrumbs .wrap::-webkit-scrollbar {
  display: none;
}

.breadcrumbs a {
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span[aria-current="page"] {
  color: var(--ink-soft);
}

.breadcrumbs__sep {
  color: rgba(61, 83, 71, .52);
}

.nav-toggle {
  display: none;
}

.nav > ul {
  align-items: center;
}

.nav-item--dropdown {
  position: relative;
}

.nav-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-dropdown__trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .75;
}

.nav .nav-dropdown {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  z-index: 80;
  display: grid;
  min-width: 270px;
  gap: 4px;
  padding: 10px;
  list-style: none;
  border: 1px solid #D7D0BE;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(19, 42, 31, .18), 0 2px 0 rgba(255,255,255,.9) inset;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.nav .nav-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

.nav-item--dropdown:hover .nav-dropdown,
.nav-item--dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav .nav-dropdown a {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: .94rem;
  font-weight: 600;
}

.nav .nav-dropdown a:hover,
.nav .nav-dropdown a:focus-visible {
  color: var(--ink);
  background: rgba(30, 158, 90, .1);
}

/* Granica menu: hamburger do 1080 px (decyzja Marka 2026-10-08) – wspólna z audytto-shared.css i theme01. */
@media (max-width: 1080px) {
  .nav {
    position: relative;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    color: var(--ink);
    cursor: pointer;
    box-shadow: var(--shadow);
    margin-left: auto;
  }

  .nav-toggle span,
  .nav-toggle::before,
  .nav-toggle::after {
    content: "";
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .16s ease, opacity .16s ease;
    transform-origin: center;
  }

  .nav-toggle span {
    margin: 4px 0;
  }

  .nav.is-open .nav-toggle::before {
    transform: translateY(6px) rotate(45deg);
  }

  .nav.is-open .nav-toggle span {
    opacity: 0;
  }

  .nav.is-open .nav-toggle::after {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav > ul {
    display: none;
    order: 3;
    flex-basis: 100%;
    width: 100%;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow);
  }

  .nav.is-open > ul {
    display: grid;
  }

  .nav ul a {
    display: block;
    padding: 11px 12px;
    border-radius: 10px;
  }

  .nav ul a:hover {
    background: rgba(30, 158, 90, .1);
  }

  .nav .nav-dropdown {
    position: static;
    display: grid;
    min-width: 0;
    padding: 2px 0 2px 12px;
    border: 0;
    border-left: 2px solid rgba(30, 158, 90, .24);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .nav .nav-dropdown::before {
    display: none;
  }

  .nav .nav-dropdown a {
    padding: 9px 12px;
    font-size: .93rem;
  }

  .nav > .btn {
    order: 2;
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .breadcrumbs {
    font-size: .8rem;
  }

  .breadcrumbs .wrap {
    flex-wrap: wrap;
    min-height: 38px;
    padding-left: 16px;
    padding-right: 16px;
    white-space: normal;
  }

  .nav {
    padding: 12px 16px;
  }

  .nav > .btn {
    flex-basis: 100%;
    width: 100%;
  }
}

/* Dolny pasek CTA na telefonie (decyzja Marka 2026-10-08): do 1080 px przycisk z nagłówka przechodzi
   na dół ekranu, także przy otwartym menu; znacznik i atrybut body[data-sticky-cta] wstawia
   finalize_build.py, chowanie przy formularzu – audytto-nav.js. Wysokość paska = padding-bottom body, więc treść nie skacze (CLS 0). */
.sticky-cta {
  display: none;
}

@media (max-width: 1080px) {
  body[data-sticky-cta] {
    padding-bottom: calc(77px + env(safe-area-inset-bottom, 0px));
  }

  body[data-sticky-cta] .nav > .btn {
    display: none;
  }

  /* Otwarte menu (decyzja Marka 2026-10-09): pasek zostaje na dole nad nagłówkiem, lista menu
     przewija się nad nim, więc ostatnia pozycja nie chowa się pod paskiem. */
  body[data-sticky-cta] .nav.is-open > ul {
    max-height: calc(100vh - 96px - 77px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 96px - 77px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body[data-sticky-cta].sticky-cta-menu .sticky-cta {
    z-index: 60;
  }

  .sticky-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    box-sizing: border-box;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--line);
    transition: transform .2s ease, visibility .2s ease;
  }

  .sticky-cta .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    height: 52px;
    margin: 0 auto;
    padding: 0 16px;
    box-shadow: none;
  }

  .sticky-cta .btn:hover {
    transform: none;
  }

  .sticky-cta.is-hidden {
    transform: translateY(100%);
    visibility: hidden;
  }
}

@media (max-width: 1080px) and (prefers-reduced-motion: reduce) {
  .sticky-cta {
    transition: none;
  }
}
