/*
Theme Name: motyw1
Theme URI: https://xdatalab.eu
Author: xDataLab
Description: Pierwszy wygląd xDataLab – dwa wyraźnie rozdzielone działy: informatyka oraz Strzelamy razem (pytania PZSS i WPA). Układ z bocznym panelem nawigacji. Zawiera całą logikę strony: działy, trenery pytań, płynne przejścia, kursor.
Version: 1.18.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: motyw1
*/

/* ---------- Fonts (self-hosted Poppins, SIL OFL) ---------- */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/poppins-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/poppins-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/poppins-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/poppins-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/poppins-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/poppins-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
    --ink: #161518;
    --muted: #6b6b6b;
    --line: #e8e8e8;
    --line-strong: #cdcdcd;
    --paper: #f7f2e8;       /* page background: soft beige */
    --sand: #eee6d4;        /* panels on the page, a shade darker */
    --white: #fff;
    --ps: #d20019;          /* patent strzelecki */
    --it: #0b5cad;          /* informatyka */
    --it-deep: #0a2540;
    --accent: var(--ps);
    --side: 250px;
    --bar: 60px;
    --brand-h: 206px;       /* logo block on top of the side panel (from 1100 px) */
    --gutter: clamp(20px, 4vw, 60px);
}
body.section-it { --accent: var(--it); }
body.section-ps { --accent: var(--ps); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
}
/* faint line drawings of the trade (cameras, server racks, high-bay storage, office work) that stay put while
   the page scrolls - a fixed layer rather than background-attachment: fixed, which phones ignore */
body::before {
    content: ""; position: fixed; z-index: -1; inset: 0; pointer-events: none;
    background: url("assets/img/tlo-it.svg?v=2") 0 0 / 900px repeat;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* headings get focus after a soft page change (soft-nav.js) - that is for screen readers, not a control */
[tabindex="-1"]:focus { outline: none; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(30px, 4vw, 44px); }
h2 { font-size: clamp(24px, 2.6vw, 30px); }
h3 { font-size: 18px; line-height: 1.4; }
p { margin: 0 0 1.1em; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 999; top: 10px; left: 10px; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--ink); color: #fff; }

/* ---------- Side panel (logo + navigation) ---------- */
.site-side {
    position: fixed; z-index: 500; top: 0; left: 0; right: 0;
    height: var(--bar);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.site-brand {
    display: flex; align-items: center; gap: 12px;
    height: var(--bar); padding: 0 20px;
    color: var(--ink); text-decoration: none;
}
.site-brand__mark { width: 53px; height: 53px; flex: none; }
.site-brand__name { font-size: 18px; font-weight: 700; line-height: 1; letter-spacing: -.01em; }
.site-brand__tag { display: none; }
.nav-toggle {
    position: absolute; top: 10px; right: 12px;
    width: 40px; height: 40px; padding: 0;
    border: 0; background: none; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    position: absolute; left: 9px; width: 22px; height: 2px;
    background: var(--ink); content: ""; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span { top: 19px; }
.nav-toggle span::before { left: 0; top: -7px; }
.nav-toggle span::after { left: 0; top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
    position: fixed; z-index: 490; top: var(--bar); bottom: 0; left: 0;
    width: min(320px, 88vw);
    overflow-y: auto;
    background: var(--paper);
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    transition: transform .25s ease;
    padding: 16px 0 30px;
}
.nav-open .site-nav { transform: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
    display: block; padding: 12px 30px;
    font-size: 14px; font-weight: 500; line-height: 1.35;
    color: var(--ink); text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.site-nav a:hover { background: var(--sand); }
/* hovering a menu item makes its label puff up for a moment and settle back */
.nav-label { display: inline-block; transform-origin: left center; }
.site-nav a:hover .nav-label { animation: nav-puff .4s ease-out; }
@keyframes nav-puff { 45% { transform: scale(1.18); } }
.site-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.nav-group { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.nav-group__label {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 6px; padding: 0 30px;
    font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.nav-group__label::before { content: ""; width: 10px; height: 10px; background: currentColor; }
.nav-group--it .nav-group__label { color: var(--it); }
.nav-group--ps .nav-group__label { color: var(--ps); }
/* sub-section: its overview link in bold, its pages below it on a guide line */
.site-nav .nav-sub { margin-top: 6px; }
.site-nav .nav-sub > a { font-weight: 700; }
.site-nav .nav-sub ul { margin: 0 0 4px 30px; border-left: 2px solid var(--line); }
.site-nav .nav-sub ul a { padding: 7px 16px 7px 14px; font-size: 13px; color: #444; }
.site-nav .nav-sub ul a[aria-current="page"] { color: #fff; }
.nav-group--it a[aria-current="page"] { background: var(--it); }
.nav-group--ps a[aria-current="page"] { background: var(--ps); }

.site-main { padding-top: var(--bar); min-height: 70vh; }

@media (min-width: 1100px) {
    .site-side {
        right: auto; width: var(--side); height: var(--brand-h);
        border-bottom: 0; border-right: 1px solid var(--line);
    }
    .site-brand {
        flex-direction: column; justify-content: center; gap: 10px;
        height: var(--brand-h); padding: 12px 20px; text-align: center;
    }
    .site-brand__mark { width: 96px; height: 96px; }
    .site-brand__name { font-size: 20px; }
    .site-brand__tag { display: block; font-size: 12px; font-weight: 500; line-height: 1.4; color: var(--muted); }
    .nav-toggle { display: none; }
    .site-nav { top: var(--brand-h); width: var(--side); transform: none; padding-top: 0; }
    .site-nav a { padding-top: 9px; padding-bottom: 9px; }
    .site-nav .nav-sub ul a { padding-top: 6px; padding-bottom: 6px; }
    .site-main, .site-footer { margin-left: var(--side); }
    .site-main { padding-top: 0; }
}

/* ---------- Shared pieces ---------- */
.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: 56px; padding-bottom: 56px; }
.section--sand { background: var(--sand); }
.section--it { --accent: var(--it); }
.section--ps { --accent: var(--ps); }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 30px; margin-bottom: 34px; }
.section-head h2 { margin: 0; }
.kicker {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
    font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--accent);
}
.kicker::before { content: ""; width: 10px; height: 10px; background: currentColor; }

/* "więcej" link: bar under the text grows into a full background on hover */
.more {
    position: relative; z-index: 0; display: inline-block; padding: 12px 2px 10px; margin: -10px 0;
    font-size: 12px; font-weight: 700; line-height: 1.2; text-transform: uppercase; text-decoration: none;
    color: var(--ink);
    transition: color .2s ease;
}
.more::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 6px; height: 3px; background: var(--accent); transition: height .2s ease; }
.more::after { content: "\2192"; margin-left: 6px; }
.more:hover { color: #fff; }
.more:hover::before { height: calc(100% - 12px); }

.btn {
    display: inline-block; padding: 14px 26px;
    font-size: 13px; font-weight: 700; line-height: 1.2; letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
    color: #fff; background: var(--accent); border: 2px solid var(--accent);
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn::after { content: "\2192"; margin-left: 10px; }
.btn:hover { background: #fff; color: var(--ink); border-color: #fff; }
a.door:hover .btn { background: #fff; color: var(--ink); border-color: #fff; }
.btn--on-light:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Home: top block (remote help + the service doors) ----------
   One container: same side gutter as the sections below and one gap between all tiles.
   Remote help is a utility, so it stays a low horizontal strip; the doors keep the visual weight
   and both fit on the first screen of a laptop. */
.home-top { --gap: clamp(12px, 1.5vw, 20px); display: grid; gap: var(--gap); padding-top: var(--gap); }
@media (min-width: 1100px) { .home-top { padding-top: 30px; } }

.remote {
    --accent: var(--it);
    display: grid; grid-template-columns: auto 1fr; gap: 14px 20px; align-items: center;
    grid-template-areas: "icon head" "steps steps" "action action";
    padding: 22px clamp(18px, 2.4vw, 32px);
    background: var(--sand); border-left: 4px solid var(--accent);
}
.remote__icon { grid-area: icon; align-self: start; width: 40px; height: 40px; color: var(--accent); }
.remote__head { grid-area: head; }
.remote__top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-bottom: 6px; }
.remote .kicker { flex: none; margin-bottom: 0; }
/* the road: from the label to the button (to the edge on phones, where the button is below the steps) */
.remote__road { flex: 1 1 100%; position: relative; height: 26px; container-type: inline-size; border-bottom: 2px dashed rgba(22, 21, 24, .18); }
.ambulance { position: absolute; left: 0; bottom: 1px; width: 44px; height: 22px; animation: ambulance-drive 9s ease-in-out infinite; }
.ambulance .siren { animation: siren .5s steps(1, end) infinite; }
@keyframes ambulance-drive {
    0%, 4% { transform: translateX(0) scaleX(1); }
    46% { transform: translateX(calc(100cqw - 44px)) scaleX(1); }
    50%, 54% { transform: translateX(calc(100cqw - 44px)) scaleX(-1); }
    96% { transform: translateX(0) scaleX(-1); }
    100% { transform: translateX(0) scaleX(1); }
}
@keyframes siren { 0% { fill: #ff3b3b; } 50% { fill: #2f8bff; } }
.remote h2 { margin: 0; font-size: clamp(19px, 1.9vw, 23px); }
.remote__steps { grid-area: steps; display: grid; gap: 8px 28px; margin: 0; padding: 0; list-style: none; counter-reset: krok; font-size: 14px; line-height: 1.45; color: #333; }
.remote__steps li { counter-increment: krok; display: flex; gap: 10px; }
.remote__steps li::before {
    content: counter(krok); flex: none; display: grid; place-items: center; width: 22px; height: 22px;
    font-size: 12px; font-weight: 700; color: #fff; background: var(--accent);
}
.remote__action { grid-area: action; }
/* from 700 px: heading and button on one line (the road ends at the button), the three steps below */
@media (min-width: 700px) {
    .remote { grid-template-columns: auto 1fr auto; grid-template-areas: "icon head action" ". steps steps"; }
    .remote__top { flex-wrap: nowrap; }
    .remote__road { flex-basis: 0; }
    .remote__action { align-self: start; margin-top: -10px; text-align: right; }
    .remote__steps { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
    .remote { gap: 16px 28px; }
}

/* ---------- Home: the four service doors (2 × 2 from 800 px) ---------- */
.doors { display: grid; gap: var(--gap); }
/* Each door sets its palette in custom properties: a deep colour with a soft light in the top right corner,
   text colour, kicker dot and button. Blue – green / yellow – graphite: no colour repeats in a row or column. */
.door {
    --door-bg: var(--it-deep);
    --door-fg: #fff;
    --door-text: rgba(255, 255, 255, .86);
    --door-dot: #4da3ff;
    --door-btn: #4da3ff;
    --door-btn-fg: #08203d;
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; justify-content: flex-end;
    --pad: 24px;
    min-height: 330px; padding: 110px var(--pad) 30px;
    color: var(--door-fg); background: var(--door-bg); text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease;
}
.door .kicker { color: var(--door-fg); }
.door .kicker::before { background: var(--door-dot); }
.door h2 { font-size: clamp(26px, 3vw, 38px); margin-bottom: .35em; }
.door p { max-width: 30em; margin-bottom: 24px; color: var(--door-text); }
.door .btn { color: var(--door-btn-fg); background: var(--door-btn); border-color: var(--door-btn); }
.door .btn--line { color: var(--door-fg); background: transparent; border-color: currentColor; }
.door__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
/* scope of the service: small square tags in the door's own colours */
.door__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.door__tags li {
    padding: 6px 11px; font-size: 13px; font-weight: 600; line-height: 1.3;
    color: var(--door-fg); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .28);
}
.door--erp .door__tags li { background: rgba(255, 255, 255, .28); border-color: rgba(22, 21, 24, .28); }
/* the wide IT door: description and buttons, then the scope as tags (side by side on desktop) */
.door--wide { justify-content: flex-start; padding-top: 70px; }
.door--wide .door__body { margin-bottom: 22px; }
.door--wide .door__tags { margin-bottom: 0; }
.door__num { position: absolute; top: 24px; right: 24px; font-size: 13px; font-weight: 700; letter-spacing: .12em; opacity: .7; }
.door__art { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
/* small doors: the drawing sits in the middle of the top part, centred in a band under the number; the text
   starts below the band and never runs over it. Each door gives the bounding box of its drawing in viewBox
   units (600x520): --art-cx (horizontal centre), --art-y, --art-h; --art-s is the scale, --band-top/--band-h
   the band. */
.door:not(.door--wide) {
    --art-s: .85; --band-top: 52px; --band-h: 215px;
    padding-top: calc(var(--band-top) + var(--band-h) + 24px);
}
.door:not(.door--wide) .door__art {
    inset: auto; max-width: none; width: calc(600px * var(--art-s)); height: calc(520px * var(--art-s));
    left: calc(50% - var(--art-cx) * var(--art-s) * 1px);
    top: calc(var(--band-top) + (var(--band-h) - var(--art-h) * var(--art-s) * 1px) / 2 - var(--art-y) * var(--art-s) * 1px);
}
@media (min-width: 380px) { .door:not(.door--wide) { --art-s: 1.05; } }
.door--3d { --art-cx: 470; --art-y: 26; --art-h: 201; }
.door--erp { --art-cx: 479.5; --art-y: 62; --art-h: 151; }
.door--auto { --art-cx: 457; --art-y: 32; --art-h: 205; }
/* the wide door keeps its grid background, the network drawing stays faint behind the tags */
.door--wide .door__art g { display: none; } /* phones: the drawing would run through the text */
@media (min-width: 800px) {
    .door--wide .door__art g { display: inline; opacity: .4; }
    .door--wide .door__art g.flows { opacity: .75; }
}

/* Discreet motion in the drawings: short "data packets" travel along the lines between nodes and modules
   (paths have pathLength="100"), the gears on the last door turn slowly against each other.
   Off with prefers-reduced-motion (rule at the end of this file). */
.door__art .flow { stroke-linecap: round; stroke-dasharray: 2 23; animation: door-flow 7s linear infinite; }
.door__art .flow--single { stroke-dasharray: 8 92; animation-duration: 5s; }
.door__art .flow--late { animation-delay: -2.5s; }
@keyframes door-flow { to { stroke-dashoffset: -100; } }
/* 3D printer: the head travels along the rail, the object grows layer by layer, stays a moment, starts again */
.door__art .printhead { animation: print-head 2.6s ease-in-out infinite alternate; }
@keyframes print-head { from { transform: translateX(-22px); } to { transform: translateX(22px); } }
.door__art .print-object { transform-box: fill-box; transform-origin: 50% 100%; animation: print-grow 10s infinite; }
@keyframes print-grow {
    0% { transform: scaleY(0); animation-timing-function: steps(9, end); }
    82%, 100% { transform: scaleY(1); }
}
.door__art .gear { transform-box: fill-box; transform-origin: center; animation: gear-turn 36s linear infinite; }
.door__art .gear--small { animation-duration: 24s; animation-direction: reverse; }
@keyframes gear-turn { to { transform: rotate(360deg); } }
@media (hover: hover) {
    .door:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(16, 24, 32, .28); }
    .door--wide:hover { transform: none; box-shadow: none; } /* not a link itself - its buttons are */
    .door .btn--line:hover { color: var(--ink); background: #fff; border-color: #fff; }
}

.door--it {
    --door-bg: radial-gradient(120% 90% at 90% 0%, #1667c4 0%, transparent 58%), linear-gradient(160deg, #0a2a52, #0b3f7a);
}
.door--3d {
    --door-bg: radial-gradient(120% 90% at 90% 0%, #23a374 0%, transparent 58%), linear-gradient(160deg, #083a2b, #0f5c43);
    --door-dot: #7fe3b5;
    --door-btn: #7fe3b5;
    --door-btn-fg: #06281d;
}
.door--erp {
    --door-bg: radial-gradient(120% 90% at 90% 0%, #ffe38a 0%, transparent 58%), linear-gradient(160deg, #f5c533, #e0a60c);
    --door-fg: #161518;
    --door-text: rgba(22, 21, 24, .82);
    --door-dot: #161518;
    --door-btn: #161518;
    --door-btn-fg: #fff;
}
.door--auto {
    --door-bg: radial-gradient(120% 90% at 90% 0%, #30333b 0%, transparent 58%), linear-gradient(160deg, #1b1c21, #111216);
    --door-dot: #f5c518;
    --door-btn: #f5c518;
    --door-btn-fg: #161518;
}
.door--auto p { max-width: min(30em, 100% - 40px); }
/* green corner on the last door - the signature corner of the first look */
.door--auto::after { content: ""; position: absolute; z-index: -1; right: 0; bottom: 0; border-bottom: var(--corner, 90px) solid #22a861; border-left: var(--corner, 90px) solid transparent; }

/* 800 px: the IT door and the last door span both columns, 3D and systems side by side;
   1100 px: the IT door shows its description and tags side by side;
   1400 px (enough width next to the side menu): the IT door on top, the other three in one row */
@media (min-width: 800px) {
    .doors { grid-template-columns: 1fr 1fr; }
    .door { min-height: 340px; --pad: clamp(24px, 3vw, 44px); padding: 96px var(--pad) 34px; }
    .door h2 { font-size: clamp(24px, 2.3vw, 32px); }
    .door__num { top: 28px; right: clamp(24px, 3vw, 44px); }
    .door--wide, .door--auto { grid-column: 1 / -1; }
    .door--wide { min-height: 0; padding-top: 64px; }
    .door--auto { --corner: 120px; }
}
@media (min-width: 1100px) {
    .door--wide { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; padding-bottom: 40px; }
    .door--wide .door__body { margin-bottom: 0; }
    .door--wide h2 { font-size: clamp(28px, 2.6vw, 38px); }
}
@media (min-width: 1400px) {
    .doors { grid-template-columns: repeat(3, 1fr); }
    .door--auto { grid-column: auto; }
    .door:not(.door--wide) h2 { font-size: clamp(22px, 1.9vw, 28px); }
}

/* ---------- Cards ---------- */
.cards { display: grid; gap: 34px 40px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
/* four cards: 1, 2 or 4 columns - never 3 + 1 */
.cards--quad { grid-template-columns: 1fr; }
@media (min-width: 600px) { .cards--quad { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1400px) { .cards--quad { grid-template-columns: repeat(4, 1fr); } }
.card { display: block; padding-bottom: 20px; border-bottom: 1px solid var(--line-strong); color: var(--ink); text-decoration: none; transition: border-color .2s ease; }
a.card:hover { border-bottom-color: var(--accent); color: var(--ink); }
.card__label { display: block; margin-bottom: 14px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 15px; color: #444; }

/* ---------- Dark box with steps ---------- */
.steps-box { position: relative; overflow: hidden; isolation: isolate; padding: 34px 30px 80px; background: #101010; color: #fff; }
.steps-box::after { content: ""; position: absolute; z-index: -1; right: 0; bottom: 0; border-bottom: 110px solid var(--accent); border-left: 110px solid transparent; }
.steps-box .section-head { margin-bottom: 10px; }
.steps-box .more { color: #fff; }
.steps { display: grid; gap: 0 40px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; padding: 24px 0; border-bottom: 1px solid rgba(255, 255, 255, .25); }
.steps li::before { content: "Krok " counter(step); display: block; margin-bottom: 8px; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .65); }
.steps h3 { margin-bottom: 6px; font-size: 17px; }
.steps p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .8); }

.two-col { display: grid; gap: 30px 60px; margin-top: 44px; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1.2fr 1fr; } }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 0 0 12px 26px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 3px; background: var(--accent); }
.home-links { display: flex; flex-wrap: wrap; gap: 16px 28px; margin: 6px 0 0; }
.note { padding: 22px 24px; background: #fff; border-left: 4px solid var(--accent); font-size: 14px; }
.note p:last-child { margin-bottom: 0; }

/* ---------- Home: contact strip ---------- */
.contact-strip { display: grid; gap: 6px; }
.contact-strip__half { padding: 40px var(--gutter); background: var(--sand); border-top: 4px solid var(--accent); }
.contact-strip__half h2 { font-size: 22px; }
.contact-strip__half p { margin-bottom: 18px; color: #444; }
@media (min-width: 800px) { .contact-strip { grid-template-columns: 1fr 1fr; } }

/* ---------- Inner pages ---------- */
.page-head { padding-top: 44px; padding-bottom: 40px; border-bottom: 1px solid var(--line); border-top: 6px solid var(--accent); }
body:not(.section-it):not(.section-ps) .page-head { border-top-color: var(--ink); }
.page-head h1 { margin: 0; }
.crumbs { margin: 0 0 22px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-hidden] { margin: 0 6px; }

.entry { padding-top: 44px; padding-bottom: 60px; }
.entry > * { max-width: 760px; }
.entry > .alignwide, .entry > .wp-block-columns { max-width: 1040px; }
.entry h2 { margin-top: 1.6em; }
.entry h3 { margin-top: 1.4em; }
.entry > :first-child { margin-top: 0; }
.entry ul, .entry ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.entry li { margin-bottom: .45em; }
.entry li::marker { color: var(--accent); font-weight: 700; }
.entry .lead, .entry .is-style-lead { font-size: 19px; line-height: 1.55; color: #333; }
.entry .wp-block-columns { gap: 40px; }
.entry .wp-block-column { padding-top: 22px; border-top: 4px solid var(--ink); }
.entry .col-it { border-top-color: var(--it); }
.entry .col-ps { border-top-color: var(--ps); }
.entry .col-it a { color: var(--it); }
.entry .col-ps a { color: var(--ps); }
.entry .wp-block-column h2 { margin-top: 0; font-size: 22px; }
.entry .is-style-note, .entry .note { padding: 20px 24px; background: var(--sand); border-left: 4px solid var(--accent); font-size: 15px; }
.entry details { border-bottom: 1px solid var(--line-strong); padding: 16px 0; }
.entry summary { cursor: pointer; font-weight: 700; }
.entry details[open] summary { margin-bottom: 10px; color: var(--accent); }
.entry details p:last-child { margin-bottom: 0; }

.related { padding-top: 50px; padding-bottom: 56px; background: var(--sand); }

/* ---------- Footer ---------- */
.footer-main { display: grid; gap: 34px 50px; padding-top: 50px; padding-bottom: 50px; font-size: 14px; border-top: 1px solid var(--line); }
.footer-main h2 { margin-bottom: 16px; font-size: 16px; }
.footer-main ul { list-style: none; margin: 0; padding: 0; }
.footer-main li { margin-bottom: 8px; }
.footer-main .nav-sub > a { font-weight: 500; }
.footer-main .nav-sub ul { margin-top: 8px; padding-left: 16px; }
.footer-main a { color: var(--ink); text-decoration: none; }
.footer-main a:hover { color: var(--accent); text-decoration: underline; }
.footer-col--it { --accent: var(--it); }
.footer-col--ps { --accent: var(--ps); }
.footer-col--it h2, .footer-col--ps h2 { display: flex; align-items: center; gap: 10px; }
.footer-col--it h2::before, .footer-col--ps h2::before { content: ""; width: 10px; height: 10px; background: var(--accent); }
.footer-main p { margin-bottom: .8em; color: #444; }
@media (min-width: 800px) { .footer-main { grid-template-columns: 1fr 1fr 1.3fr; } }
.footer-addon { padding-top: 24px; padding-bottom: 24px; background: var(--ink); color: #909090; font-size: 13px; }
.footer-addon p { margin: 0 0 6px; max-width: 70em; }
.footer-addon p:last-child { margin: 0; }
.footer-addon a { color: #c8c8c8; }
.footer-addon a:hover { color: #fff; }
.link-button { padding: 8px 0; margin: -8px 0; border: 0; background: none; font: inherit; color: #c8c8c8; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: #fff; }
.footer-addon :focus-visible { outline-color: #fff; }

/* ---------- Cookie consent popup ---------- */
.cookie-popup {
    position: fixed; z-index: 600; right: 12px; bottom: 12px; left: 12px;
    max-height: calc(100vh - 24px); overflow-y: auto;
    padding: 22px 22px 20px;
    background: #fff; border-top: 4px solid var(--ps);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .28);
    font-size: 14px; line-height: 1.55;
}
.cookie-popup[hidden] { display: none; }
.cookie-popup h2 { margin-bottom: 8px; font-size: 17px; }
.cookie-popup p { margin-bottom: 16px; color: #333; }
.cookie-popup a { color: var(--ink); font-weight: 500; }
.cookie-popup__actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* both choices carry the same weight - declining must be as easy as accepting */
.cookie-popup button {
    flex: 1 1 150px; min-height: 46px; padding: 10px 16px;
    font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: #fff; background: var(--ink); border: 2px solid var(--ink); cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
.cookie-popup button:hover { background: #fff; color: var(--ink); }
@media (min-width: 600px) {
    .cookie-popup { left: auto; right: 24px; bottom: 24px; width: 420px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
