/*
Theme Name: xDataLab
Theme URI: https://xdatalab.eu
Author: xDataLab
Description: Wizytówka xDataLab – dwa wyraźnie rozdzielone działy: informatyka oraz przygotowanie do egzaminu na patent strzelecki. Układ z bocznym panelem nawigacji.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: xdatalab
*/

/* ---------- 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;
    --sand: #f4f2ec;
    --white: #fff;
    --ps: #d20019;          /* patent strzelecki */
    --it: #0b5cad;          /* informatyka */
    --it-deep: #0a2540;
    --accent: var(--ps);
    --side: 250px;
    --bar: 60px;
    --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(--white);
}
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; }
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(--white);
    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: 36px; height: 36px; 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(--white);
    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); }
.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: 11px; 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); }
.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: 190px;
        border-bottom: 0; border-right: 1px solid var(--line);
    }
    .site-brand {
        flex-direction: column; justify-content: center; gap: 12px;
        height: 190px; padding: 20px; text-align: center;
    }
    .site-brand__mark { width: 64px; height: 64px; }
    .site-brand__name { font-size: 20px; }
    .site-brand__tag { display: block; font-size: 11px; font-weight: 500; line-height: 1.4; color: var(--muted); }
    .nav-toggle { display: none; }
    .site-nav { top: 190px; width: var(--side); transform: none; padding-top: 0; }
    .site-nav a { padding-top: 9px; padding-bottom: 9px; }
    .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: 2px 2px 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: -4px; 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% + 8px); }

.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; }
.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: intro ---------- */
.intro { padding-top: 56px; padding-bottom: 40px; }
.intro h1 { max-width: 16em; }
.intro p { max-width: 46em; font-size: 18px; color: #444; margin-bottom: 0; }

/* ---------- Home: the two doors ---------- */
.doors { display: grid; gap: 6px; background: var(--white); }
.door {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; justify-content: flex-end;
    min-height: 420px; padding: 170px var(--gutter) 44px;
    color: #fff; text-decoration: none;
}
.door .kicker { color: #fff; }
.door h2 { font-size: clamp(28px, 3.2vw, 42px); margin-bottom: .35em; }
.door p { max-width: 30em; margin-bottom: 26px; color: rgba(255, 255, 255, .86); }
.door--ps p { max-width: min(30em, 100% - 40px); }
.door__num { position: absolute; top: 30px; right: var(--gutter); font-size: 13px; font-weight: 700; letter-spacing: .12em; opacity: .7; }
.door__art { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }

.door--it { --accent: var(--it); background: var(--it-deep); }
.door--it .kicker::before { background: #4da3ff; }
.door--ps { --accent: var(--ps); background: #101010; }
.door--ps .kicker::before { background: var(--ps); }
/* red corner, the PZSS-like signature of the shooting part */
.door--ps::after { content: ""; position: absolute; z-index: -1; right: 0; bottom: 0; border-bottom: var(--corner, 110px) solid var(--ps); border-left: var(--corner, 110px) solid transparent; }

@media (min-width: 800px) {
    .doors { grid-template-columns: 1fr 1fr; }
    .door { min-height: 520px; padding-left: clamp(24px, 3vw, 50px); padding-right: clamp(24px, 3vw, 50px); }
    .door__num { right: clamp(24px, 3vw, 50px); }
    .door--ps { --corner: 150px; }
}
@media (min-width: 1400px) {
    .door--ps { --corner: 200px; }
}

/* ---------- 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); }
.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 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: 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; scroll-behavior: auto !important; }
}
