body.no-scroll {
    overflow: hidden;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: transparent;
    height: auto;
    transition: transform 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
    background: var(--theme-color-white);
    box-shadow: 0 1px 12px color-mix(in srgb, var(--theme-color-black) 10%, transparent);
}

.site-header.is-hidden {
    transform: translateY(-100%);
}

/* Push interior-page content clear of the fixed header + subnav.
   Home cancels this in hero.css: its hero image sits full-bleed under the
   transparent header, so the clearance lives on .hero instead. */
.site-header + main {
    padding-top: 160px;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: var(--content-max-width);
    margin-inline: auto;
    padding-inline: var(--space-xl);
}

.nav__logo {
    display: flex;
    align-items: center;
}

.nav__logo img {
    height: 51px;
    width: auto;
}

.nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.nav__toggle-bar {
    width: 100%;
    height: 2px;
    background: var(--theme-color-black);
}

.nav__menu {
    position: fixed;
    inset: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    height: 0;
    overflow: hidden;
    background: color-mix(in srgb, var(--theme-color-black) 60%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: height 0.3s ease;
}

.nav__menu.is-open {
    height: 100svh;
}

.nav__close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-xl);
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.nav__close-bar {
    grid-area: 1 / 1;
    width: 100%;
    height: 2px;
    background: var(--theme-color-white);
}

.nav__close-bar:first-child {
    transform: rotate(45deg);
}

.nav__close-bar:last-child {
    transform: rotate(-45deg);
}

.nav__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
}

.nav__list a {
    font-family: var(--font-heading);
    font-size: calc(var(--text-h1) * 0.8);
    color: var(--theme-color-white);
    text-decoration: none;
    text-transform: uppercase;
}

.nav__list a:hover {
    color: var(--theme-color-orange);
}

.nav__lang {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav__lang--bar {
    display: none;
}

.nav__lang-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    overflow: hidden;
    background: none;
    border: 1px solid var(--color-border);
    padding: 0;
    cursor: pointer;
}

.nav__lang-flag {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.subnav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.subnav::before {
    content: "";
    display: block;
    max-width: var(--content-max-width);
    margin-inline: auto;
    border-top: 1px solid color-mix(in srgb, var(--theme-color-black) 12%, transparent);
}

.subnav__list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    max-width: var(--content-max-width);
    margin-inline: auto;
    padding-block: 0.125rem var(--space-xs); /* mniejszy odstęp między linią a napisem, dół bez zmian */
    padding-inline: var(--space-md);
    list-style: none;
    text-align: center;
}

.subnav__link {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--text-lead);
    line-height: 1; /* usuwa leading linii, by napis siedział tuż pod kreską (spójnie mimo różnych body line-height) */
    color: var(--theme-color-black);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
}

.subnav__link:hover {
    color: var(--theme-color-orange);
}

@media (min-width: 48rem) {
    /* Subnav collapses to one line here, so the header is shorter. */
    .site-header + main {
        padding-top: 140px;
    }

    .nav__logo img {
        height: 64px;
    }

    .nav {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        justify-content: normal;
    }

    .nav__logo {
        justify-self: start;
    }

    .nav__menu {
        justify-self: center;
    }

    .nav__lang--bar {
        justify-self: end;
    }

    .nav__toggle {
        display: none;
    }

    .nav__close {
        display: none;
    }

    .nav__menu,
    .nav__menu.is-open {
        position: static;
        height: auto;
        overflow: visible;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .nav__list {
        flex-direction: row;
        gap: var(--space-xl);
    }

    .nav__list a {
        font-size: calc((var(--text-h2) + var(--text-h3)) / 2 * 0.8);
        color: var(--theme-color-black);
    }

    .nav__lang--menu {
        display: none;
    }

    .nav__lang--bar {
        display: flex;
    }

    .subnav__list {
        gap: var(--space-xl);
        padding-inline: var(--space-xl);
        white-space: nowrap;
    }
}
