/* Wspólna nawigacja STWT. Zastępuje assets/stwt-navigation.css. */
body .header.wrap {
    box-sizing: border-box;
    width: min(1160px, calc(100% - 64px));
    max-width: none;
    min-height: 96px;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px 28px;
    border-bottom: 1px solid var(--line, #292929);
}

body .header.wrap .logo {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    font-family: Raleway, Arial, sans-serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -2px;
    text-decoration: none;
    color: #fff;
}

body .header.wrap nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    gap: 8px 12px;
}

body .header.wrap nav > a {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: Raleway, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: normal;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    color: #c7c7c7;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

body .header.wrap nav > a:hover,
body .header.wrap nav > a[aria-current="page"] {
    color: #fff;
    background: #1c1717;
    border-color: #5f3533;
}

body .header.wrap nav > a:focus-visible {
    outline: 2px solid #f18a86;
    outline-offset: 3px;
}

body .header.wrap nav > a.nav-contact {
    color: #fff;
    border-color: #663b38;
}

body .header.wrap nav > a.nav-contact span {
    flex: 0 0 auto;
    color: #f18a86;
}

/* Dopasowanie po adresie działa również bez zmian w kodzie PHP. */
body .header.wrap nav > a[href*="komunikaty"] {
    color: #fff;
    font-weight: 800;
    background: #291313;
    border-color: #85413d;
}

body .header.wrap nav > a[href*="komunikaty"]:hover,
body .header.wrap nav > a[href*="komunikaty"][aria-current="page"] {
    background: #361919;
    border-color: #e53935;
}

body .header.wrap nav > a[href*="komunikaty"]::after {
    content: "";
    display: block;
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff514c;
    box-shadow: 0 0 0 0 rgba(255, 81, 76, .42);
    animation: stwtNavigationPulse 1.8s ease-out infinite;
}

@keyframes stwtNavigationPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 81, 76, .42); }
    65% { opacity: .6; box-shadow: 0 0 0 5px rgba(255, 81, 76, 0); }
    80% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 81, 76, 0); }
}

/* Treść komunikatów i nagłówek mają te same boczne odstępy. */
body.stwt-updates-page .updates-wrap,
body.stwt-updates-page .updates-footer {
    box-sizing: border-box;
    width: min(1160px, calc(100% - 64px));
    max-width: none;
    margin-inline: auto;
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 760px) {
    body .header.wrap {
        width: calc(100% - 40px);
        min-height: 0;
        padding: 20px 0;
        gap: 18px;
        align-items: flex-start;
    }

    body .header.wrap nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        justify-content: stretch;
        align-items: stretch;
        gap: 10px;
    }

    body .header.wrap nav > a {
        display: flex;
        width: 100%;
        min-height: 46px;
        margin: 0;
        padding: 11px 10px;
        font-size: 12px;
        gap: 8px;
    }

    body .header.wrap nav > a:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    body.stwt-updates-page .updates-wrap,
    body.stwt-updates-page .updates-footer {
        width: calc(100% - 40px);
    }
}

@media (max-width: 440px) {
    body .header.wrap,
    body.stwt-updates-page .updates-wrap,
    body.stwt-updates-page .updates-footer {
        width: calc(100% - 32px);
    }

    body .header.wrap .logo {
        font-size: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body .header.wrap nav > a {
        transition: none;
    }

    body .header.wrap nav > a[href*="komunikaty"]::after {
        animation: none;
    }
}
