:root {
    color-scheme: light;
    --kwp-bg: #fff; --kwp-surface: #f6f6f6; --kwp-surface-2: #ecedef;
    --kwp-text: #555; --kwp-heading: #0d0d0d; --kwp-muted: #8b919d;
    --kwp-border: #d0d2d7; --kwp-accent: #cd162f; --kwp-header: #fff;
}
html[data-theme="dark"] {
    color-scheme: dark;
    --kwp-bg: #11161d; --kwp-surface: #171e27; --kwp-surface-2: #1c2530;
    --kwp-text: #c8d0d8; --kwp-heading: #f0f3f6; --kwp-muted: #aab3bd;
    --kwp-border: #3b4653; --kwp-header: #171e27;
}
.theme-switcher { display:inline-flex; align-items:center; padding:2px; border:1px solid var(--kwp-border); border-radius:999px; background:var(--kwp-surface); vertical-align:middle; }
.theme-switcher button { display:inline-flex; align-items:center; justify-content:center; width:26px; height:22px; padding:0; border:0; border-radius:999px; background:transparent; color:var(--kwp-text); font:600 13px/1 'Figtree',Arial,Helvetica,sans-serif; cursor:pointer; transition:color .2s ease,background-color .2s ease; }
.theme-switcher button:hover,.theme-switcher button:focus-visible { color:var(--kwp-accent); outline:none; }
.theme-switcher button.active { background:#3d424c; color:#fff; }
@media screen and (min-width:992px) {
    .theme-switcher-desktop {
        position:fixed;
        top:50%;
        right:12px;
        z-index:1000;
        flex-direction:column;
        gap:3px;
        padding:4px;
        border-radius:999px;
        transform:translateY(-50%);
        box-shadow:0 8px 24px rgba(0,0,0,.16);
        backdrop-filter:blur(8px);
    }
    .theme-switcher-desktop button {
        position:relative;
        width:32px;
        height:32px;
    }
    .theme-switcher-desktop button::after {
        content:attr(aria-label);
        position:absolute;
        top:50%;
        right:calc(100% + 10px);
        padding:6px 9px;
        border:1px solid var(--kwp-border);
        border-radius:6px;
        background:var(--kwp-surface);
        color:var(--kwp-heading);
        font:500 13px/1.2 'Figtree',Arial,Helvetica,sans-serif;
        white-space:nowrap;
        opacity:0;
        visibility:hidden;
        transform:translate(5px,-50%);
        transition:opacity .18s ease,transform .18s ease,visibility .18s ease;
        pointer-events:none;
        box-shadow:0 6px 18px rgba(0,0,0,.14);
    }
    .theme-switcher-desktop button:hover::after,
    .theme-switcher-desktop button:focus-visible::after {
        opacity:1;
        visibility:visible;
        transform:translate(0,-50%);
    }
}
header { padding-bottom:0; }
header .container { position:relative; }
header .up {
    position:absolute;
    top:7px;
    right:20px;
    z-index:4;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:12px;
}
header .bottom { height:100%; align-items:center; }
header nav ul.menu { margin-top:0; }
.theme-switcher-mobile { display:none; }
header a.logo { display:inline-flex; width:219px; min-width:219px; height:37px; align-items:center; }
header a.logo img { width:219px; height:37px; max-width:100%; object-fit:contain; }
header a.logo img.logo-dark { display:none !important; }
header a.logo img.logo-light { display:block !important; }
html[data-theme="dark"] header a.logo img.logo-light { display:none !important; }
html[data-theme="dark"] header a.logo img.logo-dark { display:block !important; visibility:visible; opacity:1; }
@media screen and (max-width:991px) {
    header .up { display:none; }
    header .bottom { height:100%; }
    .theme-switcher-mobile { display:inline-flex; margin-top:20px; }
}
html[data-theme="dark"] body { background-color:var(--kwp-bg); color:var(--kwp-text); }
html[data-theme="dark"] header {
    background-color:var(--kwp-header);
    box-shadow:0 1px 0 rgba(255,255,255,.10),0 8px 24px rgba(0,0,0,.12);
}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,
html[data-theme="dark"] h4,html[data-theme="dark"] h5,html[data-theme="dark"] h6,
html[data-theme="dark"] strong,html[data-theme="dark"] .post h3 a,
html[data-theme="dark"] section.section-products .product h3,
html[data-theme="dark"] section.section-trainings.all .swiper-slide h3,
html[data-theme="dark"] section.section-branches .content h3 { color:var(--kwp-heading); }
html[data-theme="dark"] body p,html[data-theme="dark"] body li { color:var(--kwp-text); }
html[data-theme="dark"] a:not(.btn) { color:inherit; }
html[data-theme="dark"] hr,html[data-theme="dark"] table,html[data-theme="dark"] th,html[data-theme="dark"] td { border-color:var(--kwp-border); color:var(--kwp-text); }
/* Nagłówek i nawigacja */
html[data-theme="dark"] header nav > ul.menu-main li a,
html[data-theme="dark"] header nav ul.menu ul a,
html[data-theme="dark"] header .wpml-ls a { color:var(--kwp-heading); }
html[data-theme="dark"] header .wpml-ls-sub-menu,
html[data-theme="dark"] header nav ul.menu ul { border-color:var(--kwp-border); }
@media screen and (min-width:992px) {
    html[data-theme="dark"] header nav ul.menu ul {
        background-color:transparent;
    }
    html[data-theme="dark"] header nav ul.menu ul::before {
        border-color:transparent #202a36 transparent transparent;
        filter:none;
    }
    html[data-theme="dark"] header nav ul.menu ul::after {
        background-color:#202a36;
        border:0;
        box-shadow:0 14px 34px rgba(0,0,0,.34);
    }
}
html[data-theme="dark"] #open-menu span { background-color:var(--kwp-heading); }
html[data-theme="dark"] .lines b { background-color:#2a323d; }
@media screen and (max-width:991px) {
    html[data-theme="dark"] header nav { background-color:#202833; }
    html[data-theme="dark"] header nav ul.menu li { border-color:var(--kwp-border); }
    html[data-theme="dark"] header nav ul.menu ul { background-color:#2a333e; }
}
/* Przyciski - zachowana semantyka kolorów oryginalnego szablonu */
html[data-theme="dark"] .btn { background-color:#3d424c; border-color:transparent; }
html[data-theme="dark"] .btn.btn--black { background-color:var(--kwp-accent); }
html[data-theme="dark"] .btn.btn--black::before { background-color:#3d424c; }
html[data-theme="dark"] .btn.btn--red { background-color:#3d424c; }
html[data-theme="dark"] .btn.btn--red::before { background-color:var(--kwp-accent); }
html[data-theme="dark"] .btn.btn--border { background-color:transparent; border-color:var(--kwp-border); color:var(--kwp-accent); }
html[data-theme="dark"] .btn.btn--border::before { background-color:transparent; }
html[data-theme="dark"] .btn span span,
html[data-theme="dark"] .btn span input,
html[data-theme="dark"] .btn > span > span,
html[data-theme="dark"] .btn input { color:#fff !important; }
html[data-theme="dark"] .btn.btn--border span span,
html[data-theme="dark"] .btn.btn--border span input { color:var(--kwp-accent) !important; mix-blend-mode:normal; }
/* Jasne powierzchnie z arkuszy SCSS */
html[data-theme="dark"] footer,
html[data-theme="dark"] section.section-trainings.all .swiper-slide,
html[data-theme="dark"] section.section-trainings.all .none-trainings,
html[data-theme="dark"] section.section-branches .content .content-item .inner,
html[data-theme="dark"] section.section-branches .tabs,
html[data-theme="dark"] body.single-produkt section.section-products,
html[data-theme="dark"] .post,
html[data-theme="dark"] .pagination a,html[data-theme="dark"] .pagination span { background-color:var(--kwp-surface); }
html[data-theme="dark"] section.section-products .row-products::before,
html[data-theme="dark"] section.section-opinions .navigation-swiper.mobile::before,
html[data-theme="dark"] body.single-produkt section.section-products .navigation-swiper.mobile::before,
html[data-theme="dark"] section.section-desc-image.with-triangle .right::before { background-color:var(--kwp-surface-2); }
html[data-theme="dark"] section.section-logos .swiper::before { background:linear-gradient(90deg,var(--kwp-bg) 0%,rgba(17,22,29,0) 100%); }
html[data-theme="dark"] section.section-logos .swiper::after { background:linear-gradient(90deg,rgba(17,22,29,0) 0%,var(--kwp-bg) 100%); }
html[data-theme="dark"] section.section-trainings.all .swiper-slide,
html[data-theme="dark"] section.section-products .product,
html[data-theme="dark"] section.section-branches .tabs a,
html[data-theme="dark"] .post { border-color:var(--kwp-border); }
/* Formularze */
html[data-theme="dark"] input:not([type="submit"]):not([type="button"]),
html[data-theme="dark"] textarea,html[data-theme="dark"] select,
html[data-theme="dark"] form .form-items label input,
html[data-theme="dark"] form .form-items label textarea,
html[data-theme="dark"] form .acceptance span.wpcf7-form-control-wrap label span .checkmark {
    background-color:var(--kwp-surface-2); border-color:var(--kwp-border); color:#e4e9ee;
}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder { color:var(--kwp-muted); opacity:1; }
html[data-theme="dark"] .wpcf7-not-valid-tip { color:#ff8292; }
html[data-theme="dark"] .wpcf7 form .wpcf7-response-output { border-color:var(--kwp-border); color:var(--kwp-text); }
/* Strona kontaktowa ma w bazowym SCSS selektory o podwyższonej specyficzności */
html[data-theme="dark"] section.section-contact .header-contact strong,
html[data-theme="dark"] section.section-contact .left strong,
html[data-theme="dark"] section.section-contact .right .pricing h3,
html[data-theme="dark"] section.section-contact .right .pricing p,
html[data-theme="dark"] section.section-contact label,
html[data-theme="dark"] section.section-contact .wpcf7-list-item-label { color:var(--kwp-heading); }
html[data-theme="dark"] section.section-contact .header-contact p,
html[data-theme="dark"] section.section-contact .left p { color:var(--kwp-text); }
html[data-theme="dark"] body.page-template-contact section.section-contact h1,
html[data-theme="dark"] body.page-template-contact section.section-contact h2,
html[data-theme="dark"] body.page-template-contact section.section-contact h3,
html[data-theme="dark"] body.page-template-contact section.section-contact h4,
html[data-theme="dark"] body.page-template-contact section.section-branches h2,
html[data-theme="dark"] body.page-template-contact section.section-branches h4 {
    color:var(--kwp-heading);
}
html[data-theme="dark"] body.page-template-contact section.section-branches .tabs {
    border-bottom-color:var(--kwp-border);
}
html[data-theme="dark"] body.page-template-contact section.section-branches .tabs h3 {
    color:var(--kwp-text);
}
html[data-theme="dark"] body.page-template-contact section.section-branches .tabs h3:hover,
html[data-theme="dark"] body.page-template-contact section.section-branches .tabs h3.active {
    background-color:#3d424c;
    color:#fff;
}
html[data-theme="dark"] body.page-template-contact section.section-branches .content .content-item .bottom {
    border-top-color:var(--kwp-border);
}
html[data-theme="dark"] body.page-template-contact section.section-branches .content .content-item .right p::before {
    background-color:var(--kwp-muted);
}
html[data-theme="dark"] section.section-contact .medium span.select2 span.select2-selection span.select2-selection__rendered {
    color:#e4e9ee;
}
html[data-theme="dark"] section.section-contact .medium span.select2 span.select2-selection__arrow b {
    border-color:var(--kwp-muted) transparent transparent transparent;
}
/* Select2 i filtry */
html[data-theme="dark"] section.section-products .filters .filter span.select2-selection,
html[data-theme="dark"] section.section-products .filters .filter .result span,
html[data-theme="dark"] section.section-contact .medium span.select2 span.select2-selection,
html[data-theme="dark"] .select2-container--default .select2-selection--single,
html[data-theme="dark"] .select2-container--default .select2-selection--multiple,
html[data-theme="dark"] .select2-dropdown,
html[data-theme="dark"] .select2-search--dropdown .select2-search__field {
    background-color:var(--kwp-surface-2); border-color:var(--kwp-border); color:#e4e9ee;
}
html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered,
html[data-theme="dark"] .select2-results__option { color:var(--kwp-text); }
html[data-theme="dark"] .select2-results__option[aria-selected="true"] { background-color:#293442; }
html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] { background-color:var(--kwp-accent); color:#fff; }
html[data-theme="dark"] section.section-products .filters .filter .options { background-color:var(--kwp-surface); border-color:var(--kwp-border); }
html[data-theme="dark"] section.section-products .filters .filter .options label b,
html[data-theme="dark"] .post .image .categories a { background-color:var(--kwp-surface-2); color:var(--kwp-heading); }
/* noUiSlider */
html[data-theme="dark"] .noUi-target { background:#2a3440; border-color:var(--kwp-border); box-shadow:none; }
html[data-theme="dark"] .noUi-connect { background:var(--kwp-accent); }
html[data-theme="dark"] .noUi-handle { background:var(--kwp-heading); border-color:var(--kwp-border); box-shadow:none; }
html[data-theme="dark"] .noUi-handle::before,html[data-theme="dark"] .noUi-handle::after { background:var(--kwp-muted); }
html[data-theme="dark"] .noUi-tooltip { background:var(--kwp-surface-2); border-color:var(--kwp-border); color:var(--kwp-heading); }
/* Stopka */
html[data-theme="dark"] footer ul.menu { border-bottom-color:var(--kwp-border); }
html[data-theme="dark"] footer ul.menu > li > a,html[data-theme="dark"] footer ul ul a,
html[data-theme="dark"] footer .right-footer a { color:#dce2e8; }
html[data-theme="dark"] footer .left-footer p,html[data-theme="dark"] footer .left-footer p a,
html[data-theme="dark"] footer .right-footer small { color:var(--kwp-muted); }
html[data-theme="dark"] footer .social-media a {
    border-color:var(--kwp-border);
}
html[data-theme="dark"] footer .social-media a img {
    filter:brightness(0) invert(1);
    opacity:.82;
}
html[data-theme="dark"] footer .social-media a:hover {
    background-color:var(--kwp-accent);
    border-color:var(--kwp-accent);
}
html[data-theme="dark"] footer .social-media a:hover img {
    filter:brightness(0) invert(1);
    opacity:1;
}
html[data-theme="dark"] .theme-switcher { background:var(--kwp-bg); border-color:var(--kwp-border); }
html[data-theme="dark"] .theme-switcher button { color:var(--kwp-text); }
html[data-theme="dark"] .theme-switcher button.active { background:var(--kwp-heading); color:var(--kwp-bg); }
@media (prefers-reduced-motion:reduce) { .theme-switcher button { transition:none; } }

/* Dekoracja nagłówka w formacie wektorowym */
h1::before {
    content:url("../img/image-header.svg");
}

h1.white::before {
    content:url("../img/image-header-white.svg");
}
/* Pełna korekta kontrastu stron głównych i pierwszego poziomu */
/* Najbliższe szkolenia i kalendarz */
html[data-theme="dark"] section.section-trainings.newest .header-training strong,
html[data-theme="dark"] section.section-trainings.newest .header-training p,
html[data-theme="dark"] .header-training strong,
html[data-theme="dark"] .header-training p {
    color:var(--kwp-heading);
}
html[data-theme="dark"] section.section-trainings.newest .training > p {
    color:var(--kwp-text);
}
html[data-theme="dark"] section.section-trainings.all .navigation-swiper p {
    color:var(--kwp-heading);
}
html[data-theme="dark"] section.section-trainings.all .navigation-swiper div::before {
    border-color:var(--kwp-border);
}
html[data-theme="dark"] section.section-trainings.all .navigation-swiper div img,
html[data-theme="dark"] section.section-gallery .navigation-swiper > div:not(.number) img,
html[data-theme="dark"] body.single-produkt section.section-products .navigation-swiper img {
    filter:brightness(0) invert(1);
}
html[data-theme="dark"] section.section-trainings.all .training {
    border-bottom-color:var(--kwp-border);
}
html[data-theme="dark"] section.section-trainings.all .training .left h3,
html[data-theme="dark"] section.section-trainings.all .training .left .content h3 {
    color:var(--kwp-heading);
}
html[data-theme="dark"] section.section-trainings.all .training .left small {
    color:var(--kwp-muted);
}
html[data-theme="dark"] section.section-trainings.all .training.inactive .left strong {
    color:var(--kwp-muted);
}
html[data-theme="dark"] section.section-trainings.all .none-trainings a {
    color:var(--kwp-heading);
}

/* Biały kafelek szkoleniowy na stronie głównej */
html[data-theme="dark"] section.section-services .service[kind="training"]::before {
    background-color:var(--kwp-surface-2);
}
html[data-theme="dark"] section.section-services .service[kind="training"] h3.title {
    color:var(--kwp-heading);
    border-bottom-color:var(--kwp-border);
}
html[data-theme="dark"] section.section-services .service[kind="training"] .training-newest .left strong,
html[data-theme="dark"] section.section-services .service[kind="training"] .training-newest .left p,
html[data-theme="dark"] section.section-services .service.none-future p,
html[data-theme="dark"] section.section-services .service.none-future a {
    color:var(--kwp-heading);
}
html[data-theme="dark"] section.section-services .service[kind="training"] b::after {
    border-color:var(--kwp-accent);
}

/* Biało-czerwone kafelki ofert */
@media screen and (min-width:992px) {
    html[data-theme="dark"] section.section-sub-offerts.light-effect .offerts a:nth-child(odd)::before,
    html[data-theme="dark"] section.section-sub-offerts.light-effect .offerts a.white-desktop::before {
        background-color:var(--kwp-surface-2);
    }
    html[data-theme="dark"] section.section-sub-offerts.light-effect .offerts a:nth-child(odd) h3,
    html[data-theme="dark"] section.section-sub-offerts.light-effect .offerts a.white-desktop h3 {
        color:var(--kwp-heading);
    }
}
@media screen and (min-width:576px) and (max-width:991px) {
    html[data-theme="dark"] section.section-sub-offerts.light-effect .offerts a.white::before {
        background-color:var(--kwp-surface-2) !important;
    }
    html[data-theme="dark"] section.section-sub-offerts.light-effect .offerts a.white h3 {
        color:var(--kwp-heading) !important;
    }
}
@media screen and (max-width:575px) {
    html[data-theme="dark"] section.section-sub-offerts.light-effect .offerts a.white-mobile::before {
        background-color:var(--kwp-surface-2) !important;
    }
    html[data-theme="dark"] section.section-sub-offerts.light-effect .offerts a.white-mobile h3 {
        color:var(--kwp-heading) !important;
    }
}
html[data-theme="dark"] section.section-sub-offerts.dark-effect h2 {
    color:var(--kwp-heading);
}
html[data-theme="dark"] section.section-sub-offerts.dark-effect > .container > p {
    color:var(--kwp-text);
}

/* Oddziały i dane kontaktowe */
html[data-theme="dark"] section.section-branches .content .content-item .up .left h4 {
    color:var(--kwp-heading);
}
html[data-theme="dark"] section.section-branches .content .content-item .up .left p,
html[data-theme="dark"] section.section-branches .content .content-item .up .right p {
    color:var(--kwp-text);
}
html[data-theme="dark"] section.section-branches .content .content-item .bottom {
    border-top-color:var(--kwp-border);
}

/* FAQ, galerie, paginacja i treści */
html[data-theme="dark"] section.section-questions .questions .question h3 {
    color:var(--kwp-heading);
    border-bottom-color:var(--kwp-border);
}
html[data-theme="dark"] section.section-questions .questions .question h3 img:not(.active) {
    filter:brightness(0) invert(1);
}
html[data-theme="dark"] section.section-gallery .navigation-swiper > div:not(.number) {
    border-color:var(--kwp-border);
}
html[data-theme="dark"] section.section-gallery .navigation-swiper .number span,
html[data-theme="dark"] body.single-produkt section.section-products .navigation-swiper .number span {
    color:var(--kwp-heading);
}
html[data-theme="dark"] section.section-posts nav.navigation.pagination .nav-links a,
html[data-theme="dark"] section.section-posts nav.navigation.pagination .nav-links span,
html[data-theme="dark"] .pagination .page-numbers {
    border-color:var(--kwp-border);
    color:var(--kwp-muted);
}
html[data-theme="dark"] body.page-template-blog section.section-posts h1 + .categories a.active,
html[data-theme="dark"] body.page-template-blog section.section-posts h1 + .categories a:hover,
html[data-theme="dark"] body.category section.section-posts h1 + .categories a.active,
html[data-theme="dark"] body.category section.section-posts h1 + .categories a:hover {
    color:var(--kwp-heading);
}
html[data-theme="dark"] section.section-content-page,
html[data-theme="dark"] section.section-content-page p,
html[data-theme="dark"] section.section-content-page li {
    color:var(--kwp-text);
}

/* Dekoracyjny szary trójkąt - dopasowanie do ciemnego tła */
img.triangle[src*="grey-triangle.svg"] {
    transition:filter .2s ease;
}
html[data-theme="dark"] img.triangle[src*="grey-triangle.svg"] {
    filter:brightness(0) saturate(100%) invert(14%) sepia(16%) saturate(1022%) hue-rotate(176deg) brightness(91%) contrast(92%);
}
