/* Nadpisanie pisanej czcionki i układu table-caption ze starszego motywu. */
body .main-navigation > ul > li > a,
body #main-navigation > ul > li > a,
body .main-navigation .sub-menu a,
body #mobile-advanced a,
body #mobile-advanced button {
    font-family: Arial, Helvetica, sans-serif !important;
    font-style: normal !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}
body #main-navigation > ul > li > a {
    display: block;
    font-size: 16px !important;
    font-weight: 600;
    line-height: 1.4;
    padding: 12px 10px;
    white-space: nowrap;
}
body .main-navigation .sub-menu a { font-size: 16px; line-height: 1.5; }
body .main-navigation > ul { gap: 4px 0 !important; }
body .main-navigation .bb-menu-home > a { display: block !important; }
body .main-navigation a:focus-visible,
body #mobile-advanced a:focus-visible,
body #mobile-advanced button:focus-visible,
body #responsive-nav-button:focus-visible,
body #advanced-menu-hide:focus-visible { outline: 3px solid #008bca; outline-offset: -3px; }
body .main-navigation li:focus-within > .sub-menu-wrap { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 1439px) {
    html.bb-menu-open, html.bb-menu-open body { overflow: hidden; }
    body #mobile-advanced {
        position: fixed; inset: 0; width: 100%; height: 100dvh;
        z-index: 10010; overflow-y: auto; overscroll-behavior: contain;
        background: #fff; visibility: hidden;
        transform: translateX(100%); transition: transform .2s ease, visibility .2s;
    }
    body #wrapper.active #mobile-advanced {
        transform: translateX(0); visibility: visible; pointer-events: auto;
    }
    body #mobile-advanced > ul {
        padding: 76px 20px max(24px, env(safe-area-inset-bottom)); margin: 0;
        display: block; width: 100%;
    }
    body #mobile-advanced li { position: relative; margin: 0; display: block; list-style: none; }
    body #mobile-advanced li > a {
        display: block; min-height: 50px; padding: 14px 16px;
        background: #fff !important; color: #082567 !important;
        font-size: 18px !important; line-height: 1.4; font-weight: 600;
        border-bottom: 1px solid #dce3ed; text-decoration: none;
    }
    body #mobile-advanced li.menu-item-has-children > a { padding-right: 64px; }
    body #mobile-advanced li > a:hover,
    body #mobile-advanced li.current-menu-item > a { background: #edf3fa !important; color: #082567 !important; }
    body #mobile-advanced .sub-menu-wrap,
    body #mobile-advanced li > ul.sub-menu {
        display: none !important; width: 100%; position: static; margin: 0; padding: 0;
        border: 0; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    }
    body #mobile-advanced li.bb-expanded > .sub-menu-wrap,
    body #mobile-advanced li.bb-expanded > ul.sub-menu { display: block !important; }
    body #mobile-advanced .sub-menu { margin: 0; padding: 0; }
    body #mobile-advanced .sub-menu li > a {
        background: #f3f7fb !important; font-size: 16px !important; font-weight: 400;
        padding: 13px 18px 13px 28px; min-height: 48px;
    }
    body #mobile-advanced .sub-menu li > a::before { display: none; }
    body #mobile-advanced .arrow { display: none; }
    body #mobile-advanced .bb-submenu-toggle {
        position: absolute; right: 0; top: 0; width: 52px; height: 53px;
        display: grid; place-items: center; padding: 0; border: 0;
        border-left: 1px solid #dce3ed; background: transparent;
        color: #082567; cursor: pointer;
    }
    body #mobile-advanced .bb-submenu-toggle::after {
        content: ''; width: 9px; height: 9px; border-right: 2px solid;
        border-bottom: 2px solid; transform: rotate(45deg) translate(-2px, -2px);
    }
    body #mobile-advanced .bb-submenu-toggle[aria-expanded="true"]::after { transform: rotate(225deg); }
    body #advanced-menu-hide {
        display: none; position: fixed; z-index: 10011; top: 12px; right: 20px;
        width: auto; min-height: 44px; padding: 8px 12px;
        background: #082567; color: #fff !important; border-radius: 3px;
        font: 600 16px/28px Arial, sans-serif;
    }
    body #wrapper.active #advanced-menu-hide { display: block; visibility: visible; pointer-events: auto; transform: none; }
    body #advanced-menu-hide::after { content: ' ×'; font: 24px/28px Arial, sans-serif; }
    body #responsive-nav-button { min-width: 48px; min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) { body #mobile-advanced { transition: none; } }

/* Kompaktowy nagłówek: pełne menu mieści się w jednym wierszu. */
body #header .top-header { padding: 14px 24px !important; gap: 20px; }
body #header .logo-wrap { flex: 0 0 100px; }
body #header .logo, body #header .standard-logo { width: 100px !important; max-width: 100px; height: auto; }
body #header .menu-holder { padding: 0 !important; margin: 0 0 0 auto !important; min-width: 0; }
body #main-navigation > ul { flex-wrap: nowrap !important; gap: 0 !important; }
body #main-navigation > ul > li { margin: 0 !important; }
body #main-navigation > ul > li > a { padding: 12px 8px; }
body #mobile-advanced .bb-mobile-brand {
    display: block; position: absolute; top: 12px; left: 20px;
    padding: 0; border: 0; background: transparent;
}
body #mobile-advanced .bb-mobile-brand img { width: 90px; height: auto; display: block; }
@media (max-width: 1439px) {
    body #header .top-header { display: flex; flex-wrap: nowrap; align-items: center; min-height: 74px; }
    body #header .logo-wrap { order: 0; margin: 0; }
    body #header .menu-holder { order: 2; flex: 0 0 48px; }
    body #header .top-header > div:last-child { order: 1; margin-left: auto; }
    body #header .main-navigation { display: none !important; }
    body #header #responsive-nav-button { display: inline-block !important; padding: 10px; color: #082567; }
    body #header #responsive-nav-button::before { content: ''; display: block; width: 24px; height: 2px; background: currentColor; box-shadow: 0 -7px currentColor, 0 7px currentColor; }
    body #header #responsive-nav-button::after { display: none; }
    body #mobile-advanced { display: block !important; }
}
@media (max-width: 480px) {
    body #header .top-header { padding: 10px 14px !important; gap: 10px; }
    body #header .logo-wrap { flex-basis: 90px; }
    body #header .logo, body #header .standard-logo { width: 90px !important; }
}

/* Motyw na telefonie narzuca column i stałe 80 px, co wypycha logo ponad ekran. */
@media (max-width: 1439px) {
    body #header .top-header {
        flex-direction: row !important; justify-content: space-between;
        height: auto !important; min-height: 74px; box-sizing: border-box;
    }
    body #header .top-header > .logo-wrap {
        flex: 0 0 100px; padding: 0; margin: 0; width: 100px;
        display: flex; align-items: center; align-self: center;
    }
    body #header .logo { display: block !important; margin: 0 !important; padding: 0; top: auto !important; }
    body #header .standard-logo { display: block; }
    body #header .top-header > .menu-holder { flex: 0 0 48px; width: 48px; margin: 0 !important; }
    body #header .top-header > div:nth-child(3) { order: 1; margin-left: auto; }
    body #header .top-header > .header-btns { display: none; }
    body #header .phone-btn-desktop { display: none !important; }
    body #header .zadzwon {
        position: static !important; inset: auto !important; transform: none !important;
        display: flex !important; align-items: center; gap: 6px; width: auto; height: auto;
        margin: 0 !important; padding: 0 !important;
    }
    body #header .zadzwon a { width: 32px; height: 32px; min-width: 32px; margin: 0; padding: 0 !important; display: flex; align-items: center; justify-content: center; }
    body #header .zadzwon a span { display: none; }
    body #header .zadzwon img { width: 22px; height: 22px; margin: 0; }
}
@media (max-width: 480px) {
    body #header .top-header > .logo-wrap { flex-basis: 90px; width: 90px; }
}
