/*
Theme Name: Bony Białystok
Description: Motyw serwisu projektu „Bony na szkolenie w subregionie białostockim – edycja II”.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: bony
*/

:root {
	--mint: #86dbb3;
	--mint-soft: #e8f8f0;
	--green: #1a3b2b;
	--green-2: #2c5e45;
	--ink: #111813;
	--muted: #4b5a52;
	--line: #d5e2db;
	--bg: #ffffff;
	--bg-alt: #f5faf7;
	--focus: #ffbf00;
	--radius: 10px;
	--wrap: 1140px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html.fs-lg { font-size: 118%; }
html.fs-xl { font-size: 135%; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--green-2); text-underline-offset: 2px; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--green); margin: 1.8em 0 .6em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .35em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--green); color: #fff; padding: 10px 16px; border-radius: 6px; font-weight: 700; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Pasek logotypów FE ---------- */
.fe-strip { background: #fff; border-bottom: 1px solid var(--line); }
.fe-strip .wrap { padding-top: 10px; padding-bottom: 10px; }
.fe-strip img { display: block; width: 100%; max-width: 760px; margin: 0 auto; }

/* ---------- Pasek narzędzi ---------- */
.toolbar { background: var(--green); color: #fff; font-size: .875rem; }
.toolbar .wrap { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; min-height: 44px; }
.toolbar .a11y { display: flex; gap: 6px; }
.toolbar button, .toolbar a { font: inherit; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.45); border-radius: 6px; padding: 4px 10px; cursor: pointer; text-decoration: none; }
.toolbar button[aria-pressed="true"] { background: #fff; color: var(--green); }
.toolbar .account { display: flex; gap: 8px; }
.toolbar .account a.primary { background: var(--mint); color: var(--ink); border-color: var(--mint); font-weight: 700; }

/* ---------- Nagłówek ---------- */
.site-header { background: #fff; border-bottom: 4px solid var(--mint); position: relative; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-top: 14px; padding-bottom: 10px; }
.main-nav { flex-basis: 100%; border-top: 1px solid var(--line); padding-top: 8px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand img { width: 64px; height: 64px; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.05rem; font-weight: 800; color: var(--green); }
.brand-text span { font-size: .85rem; color: var(--muted); }

.nav-toggle { display: none; font: inherit; font-weight: 700; background: var(--green); color: #fff; border: 0; border-radius: 6px; padding: 8px 14px; cursor: pointer; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.main-nav li { margin: 0; }
.main-nav a { display: block; padding: 10px 12px; border-radius: 6px; font-weight: 600; color: var(--ink); text-decoration: none; }
.main-nav a:hover { background: var(--mint-soft); }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav .current_page_parent > a { background: var(--mint); color: var(--ink); }

@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.main-nav { display: none; border-top: 0; padding-top: 0; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 4px solid var(--mint); z-index: 20; box-shadow: 0 10px 20px rgba(0,0,0,.08); }
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; padding: 10px 20px 16px; }
	.brand img { width: 52px; height: 52px; }
	.brand-text span { display: none; }
}

/* ---------- Treść ---------- */
.site-main { padding: 0 0 64px; }
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 36px 0 28px; margin-bottom: 36px; }
.page-head h1 { margin: 0; }
.page-head .meta { color: var(--muted); margin: 8px 0 0; }
.content { max-width: 860px; }
.content > *:first-child { margin-top: 0; }
.content h2 { padding-top: .2em; }
.content ul li::marker { color: var(--green-2); }

/* Hero */
.hero { background: var(--mint); padding: 56px 0; margin-bottom: 0; }
.hero .wrap { display: grid; grid-template-columns: 1fr 260px; gap: 40px; align-items: center; }
.hero h1 { margin: 0 0 .4em; color: var(--ink); font-size: clamp(1.9rem, 4.4vw, 3rem); }
.hero p.lead { font-size: 1.2rem; max-width: 640px; }
.hero img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(26,59,43,.18); }
@media (max-width: 780px) { .hero .wrap { grid-template-columns: 1fr; } .hero img { display: none; } }

.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }
.btn, .wp-block-button__link { display: inline-block; padding: 12px 22px; border-radius: 8px; font-weight: 700; text-decoration: none; border: 2px solid var(--green); background: var(--green); color: #fff; }
.btn:hover, .wp-block-button__link:hover { background: var(--green-2); color: #fff; }
.btn.outline { background: transparent; color: var(--green); }
.btn.outline:hover { background: var(--green); color: #fff; }

.section { padding: 48px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { margin-top: 0; }

/* Kafelki z liczbami / kroki */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 1.5em 0; padding: 0; list-style: none; }
.facts li { margin: 0; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--mint); border-radius: var(--radius); padding: 18px 20px; }
.facts .label { display: block; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.facts .value { display: block; font-size: 1.45rem; font-weight: 800; color: var(--green); margin: 4px 0 2px; line-height: 1.25; }
.facts .note { display: block; font-size: .9rem; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 1.5em 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.5em 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 16px 18px 16px 70px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin: 0; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 38px; height: 38px; border-radius: 50%; background: var(--mint); color: var(--ink); font-weight: 800; display: grid; place-items: center; }
.steps strong { display: block; color: var(--green); }

.details { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; }
.details th, .details td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.details th { width: 32%; color: var(--muted); font-weight: 600; }
@media (max-width: 600px) { .details th, .details td { display: block; width: auto; border: 0; padding: 4px 0; } .details tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; } }

.notice { background: var(--mint-soft); border: 1px solid var(--mint); border-radius: var(--radius); padding: 16px 20px; margin: 1.2em 0; }
.notice.todo { background: #fff6e0; border-color: #e6b54a; }

.phones { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.phones li { margin: 0; }
.phones a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.phones a:hover { background: var(--mint-soft); }

/* Aktualności */
.posts { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.post-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff; display: flex; flex-direction: column; }
.post-card time { color: var(--muted); font-size: .9rem; }
.post-card h2, .post-card h3 { font-size: 1.15rem; margin: .3em 0 .5em; }
.post-card h2 a, .post-card h3 a { text-decoration: none; color: var(--green); }
.post-card .more { margin-top: auto; font-weight: 700; }
.pagination { margin-top: 32px; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.pagination .current { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- Stopka ---------- */
.site-footer { background: var(--green); color: #e6f2ec; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer .funding { background: #fff; color: var(--ink); padding: 18px 0; border-top: 4px solid var(--mint); text-align: center; font-size: .9rem; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; padding: 40px 20px; }
.site-footer h2 { color: var(--mint); font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 .8em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.18); padding: 16px 20px; font-size: .85rem; color: #b9d3c6; }

/* ---------- Tryb wysokiego kontrastu ---------- */
html.hc body, html.hc .site-header, html.hc .page-head, html.hc .section, html.hc .section.alt, html.hc .hero, html.hc .card, html.hc .facts li, html.hc .steps li, html.hc .post-card, html.hc .notice, html.hc .main-nav, html.hc .toolbar, html.hc .site-footer, html.hc .site-footer .funding { background: #000 !important; color: #fff !important; border-color: #fff !important; }
html.hc h1, html.hc h2, html.hc h3, html.hc .facts .value, html.hc .steps strong, html.hc .brand-text strong, html.hc .brand-text span, html.hc .facts .label, html.hc .facts .note, html.hc .details th, html.hc time, html.hc .meta { color: #ffeb3b !important; }
html.hc a, html.hc .main-nav a { color: #ffeb3b !important; text-decoration: underline; }
html.hc .btn, html.hc .wp-block-button__link, html.hc .toolbar a.primary, html.hc .main-nav .current-menu-item > a { background: #ffeb3b !important; color: #000 !important; border-color: #ffeb3b !important; }
html.hc .steps li::before { background: #ffeb3b; color: #000; }
html.hc .fe-strip { background: #fff !important; }

@media print { .toolbar, .nav-toggle, .main-nav, .site-footer .cols { display: none; } }
