/* ═══════════════════════════════════════════════════════════════
   NAV — shared navigation, mobile menu, breadcrumbs
   Canonical defaults = index.html. Niektóre strony nadpisują
   konkretne wartości (padding, animacje, rozmiar logo) inline
   — patrz nagłówek każdego HTML.
═══════════════════════════════════════════════════════════════ */

/* ─── Top nav ─────────────────────────────────────────────── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22px 52px 16px;
    gap: 14px;
    transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
}
nav.scrolled {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 6px 52px 0;
    min-height: 80px;
    gap: 0;
}

.nav-wave {
    position: absolute;
    top: 0; left: 0; right: 0;
    width: 100%;
    height: 120px;
    pointer-events: none;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.4s cubic-bezier(0.22,1,0.36,1);
}
nav.scrolled .nav-wave { opacity: 1; }

nav::after {
    content: '';
    position: absolute;
    bottom: -40px; left: 0; right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.30), rgba(0,0,0,0.08) 50%, transparent);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.22,1,0.36,1);
    pointer-events: none;
    z-index: -1;
}
nav.scrolled::after { opacity: 1; }

/* ─── Logo ────────────────────────────────────────────────── */
.nav-logo-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s;
}
nav.scrolled .nav-logo-row { justify-content: flex-start; }
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo img {
    height: 80px;
    transition: height 0.4s cubic-bezier(0.22,1,0.36,1);
}
nav.scrolled .nav-logo img { height: 53px; }

/* ─── Links ───────────────────────────────────────────────── */
.nav-links-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}
.nav-links a {
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 100px;
    border: 1px solid transparent;
    transition: color 0.2s, border-color 0.25s;
}
.nav-links a:hover {
    color: white;
    border-color: rgba(255,255,255,0.40);
}

/* ─── Breadcrumbs (używane na stronach z flow, np. porzadek/spokoj) ── */
.nav-links a.nav-parent {
    color: rgba(255,255,255,0.90);
    border-color: rgba(255,255,255,0.25);
}
.nav-links a.nav-active {
    color: white;
    border-color: rgba(255,255,255,0.30);
    background: rgba(255,255,255,0.08);
}
.nav-arrow {
    display: flex; align-items: center;
    margin: 0 -6px;
    pointer-events: none;
}
.nav-arrow svg {
    width: 22px; height: 22px;
    stroke: rgba(255,255,255,0.40);
    fill: none; stroke-width: 2.2;
    stroke-linecap: round; stroke-linejoin: round;
}

/* ─── CTA button ──────────────────────────────────────────── */
.nav-cta {
    background: var(--sun) !important;
    color: var(--green-900) !important;
    padding: 9px 24px !important;
    border-radius: 100px;
    border: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s !important;
}
.nav-cta:hover {
    background: var(--sun-light) !important;
    transform: translateY(-1px);
}

/* ─── Hamburger ───────────────────────────────────────────── */
.nav-hamburger {
    display: none;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 110;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: rgba(255,255,255,0.9);
    border-radius: 2px;
    transition: all 0.3s ease;
    margin: 6px 0;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 6px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -6px); }

/* ─── Mobile menu overlay ────────────────────────────────── */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 210;
    background: linear-gradient(160deg, #0a2e1a 0%, #125030 28%, #1e7a46 52%, #3a9c64 78%, #7dc8a0 100%);
    background-size: 200% 200%;
    animation: hero-gradient 14s ease-in-out infinite;
    flex-direction: column;
    align-items: center;
    padding: 82px 24px 28px;
    gap: 0;
    opacity: 0;
    transform: translateY(-100%) scaleY(0.3);
    transform-origin: top center;
    transition: opacity 0.25s var(--ease-out-expo), transform 0.3s var(--ease-out-expo);
    overflow: hidden;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 32px 80px rgba(5,46,22,0.45), 0 12px 32px rgba(0,0,0,0.15), 0 0 120px rgba(5,46,22,0.12);
}
.mobile-menu.open { display: flex; opacity: 1; transform: translateY(0) scaleY(1); }

.mobile-menu.open .mobile-menu-link {
    animation: menuItemDrop 0.25s var(--ease-out-expo) both;
}
.mobile-menu.open .mobile-menu-link:nth-of-type(1) { animation-delay: 0.05s; }
.mobile-menu.open .mobile-menu-link:nth-of-type(2) { animation-delay: 0.10s; }
.mobile-menu.open .mobile-menu-link:nth-of-type(3) { animation-delay: 0.15s; }
.mobile-menu.open .mobile-menu-link:nth-of-type(4) { animation-delay: 0.20s; }
.mobile-menu.open .mobile-menu-link:nth-of-type(5) { animation-delay: 0.25s; }
.mobile-menu.open .mobile-menu-link:nth-of-type(6) { animation-delay: 0.30s; }
.mobile-menu.open .mobile-menu-link:nth-of-type(7) { animation-delay: 0.35s; }

.mobile-menu::before {
    content: '';
    position: absolute;
    top: -40px; right: -30px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(251,191,36,0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: sun-breathe 12s ease-in-out infinite;
    pointer-events: none;
}
.mobile-menu::after {
    content: '';
    position: absolute;
    bottom: -20px; left: -30px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(74,222,128,0.10) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow2-drift 16s ease-in-out infinite;
    pointer-events: none;
}

.mobile-menu-logo {
    position: absolute;
    top: 4px; left: 50%;
    transform: translateX(-50%);
}
.mobile-menu-logo img { height: 56px; }

.mobile-menu-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none; cursor: pointer; padding: 8px; z-index: 106;
}
.mobile-menu-close svg { width: 28px; height: 28px; stroke: rgba(255,255,255,0.8); stroke-width: 2; }
.mobile-menu-close:hover svg { stroke: white; }

.mobile-menu a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    padding: 12px 0;
    transition: color 0.2s;
}
.mobile-menu a:hover { color: white; }
.mobile-menu .nav-cta { margin-top: 16px; font-size: 16px !important; }

/* Mobile menu breadcrumb variants */
.mobile-menu a.nav-active { color: white; }
.mobile-nav-arrow {
    display: flex; align-items: center; justify-content: center;
    margin: -6px 0 -2px;
    pointer-events: none;
}
.mobile-nav-arrow svg {
    width: 22px; height: 22px;
    stroke: rgba(255,255,255,0.35);
    fill: none; stroke-width: 2.2;
    stroke-linecap: round; stroke-linejoin: round;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    nav { padding: 16px 24px 12px; }
    nav.scrolled { padding: 12px 24px 6px; }
}

/* Default hamburger collapse przy 600px (index ma 3 linki — mieści się do 600).
   Strony z breadcrumb flow (porzadek/spokoj — 5-6 linków) mają
   WCZEŚNIEJSZY collapse @ 768px przez inline override. */
@media (max-width: 600px) {
    .nav-logo img { height: 56px; }
    .nav-links-row { display: none; }
    .nav-hamburger { display: block; }
    nav.scrolled { min-height: 60px; padding: 4px 20px; }
    nav.scrolled .nav-logo img { height: 46px; }
    nav.scrolled .nav-wave { height: 87px; }
}
