/*
Theme Name: Podlaski Szlak Bociani
Theme URI: https://www.podlaskiszlakbociani.pl/
Author: Redakcja podlaskiszlakbociani.pl
Description: Motyw klasyczny niezależnego przewodnika po Podlasiu „kilometr po kilometrze”: etapy szlaku, karty miejsc, mapa (Leaflet + OSM), kilometraż i GPX z danych OpenStreetMap (ODbL), kalendarz przyrody, JSON-LD. Kierunek designu „Cztery parki”: tokeny w assets/css/tokens.css, komponenty w assets/css/komponenty.css.
Version: 0.1.1
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: psb
*/

/* =====================================================================
   Warstwa 3: dodatki WordPressa. Kolejność: tokens.css → komponenty.css → style.css.
   Tylko zmienne z tokens.css. Przy zmianie designu podmienia się dwa pierwsze pliki;
   tu zostają rzeczy, których makiety nie pokazują (bloki edytora, huby, listy, strona główna).
   ===================================================================== */

/* ---------- podstawy ---------- */
img, svg, video{ max-width:100%; height:auto; }
.skip:focus{ position:fixed !important; z-index:2000; top:8px; left:8px; width:auto; height:auto; clip:auto; padding:10px 14px; background:var(--bg); color:var(--ink); border:2px solid var(--ink); }
.screen-reader-text{ position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.site h1, .site h2, .site h3, .site h4{ font-family:var(--font-head); }

/* ---------- nagłówek: szuflada na telefonie ---------- */
.drawer{ border-top:var(--border) solid var(--line); background:var(--bg); }
.drawer .wrap{ padding-top:14px; padding-bottom:18px; }
.drawer ul{ list-style:none; margin:14px 0 0; padding:0; columns:2; column-gap:24px; }
.drawer li{ break-inside:avoid; }
.drawer a{ display:block; padding:9px 0; color:var(--ink) !important; text-decoration:none; font-weight:var(--wght-strong); }
@media (min-width:1080px){ .drawer ul{ display:none; } }
.szukaj{ display:flex; gap:8px; }
.szukaj input{ flex:1; min-width:0; font:inherit; font-size:var(--fs-small); min-height:var(--tap); padding:0 12px; border:var(--border) solid var(--line); border-radius:var(--radius); background:var(--bg); color:var(--ink); }

/* ---------- blok tytułu: odcinki paska etapów bez linku ---------- */
.stagebar .segs > *{ display:block; opacity:.55; }
.stagebar .segs > [aria-current]{ opacity:1; background:#fff !important; outline:2px solid var(--route); outline-offset:1px; }
@media (max-width:1023px){ .titleblk .dek{ display:none; } .stagebar .lg .end{ display:none; } .stagebar .lg{ justify-content:flex-start; } }

/* ---------- pierwszy ekran (z makiety 02-etap-strona) ---------- */
.first{ display:flex; flex-direction:column; gap:14px; padding-top:16px; }
.mtop{ display:contents; }
@media (min-width:1024px){
  .first{ display:block; padding-top:0; }
  .mtop{ display:none; }
  .mtop.mtop--zawsze{ display:block; padding-top:28px; }
  .short-wrap{ margin-top:28px; }
  .layout--1{ display:block; }
  .layout--1 .main{ max-width:760px; }
}
.meta{ font-size:var(--fs-small); color:var(--ink-2); border-top:var(--border) solid var(--line-strong); border-bottom:var(--border) solid var(--line); padding:9px 0 10px; line-height:1.55; font-variant-numeric:tabular-nums; margin:0; }
.meta b{ color:var(--ink); font-weight:var(--wght-strong); }
.aside .meta{ margin-bottom:12px; }
.na-szlaku{ font-size:var(--fs-small); color:var(--ink-2); margin:12px 0 0; }
.prose{ margin-top:var(--s-4); }
.first + .prose > .lead:first-child, .prose > .lead:first-child{ margin-top:0; }
.sponsor-tag{ color:var(--ink); }
.partner-tag{ display:inline-block; font-size:var(--fs-caption); font-weight:var(--wght-strong); padding:1px 6px; border:var(--border) solid var(--line); border-radius:var(--radius); color:var(--ink-2); }

/* ---------- treść: bloki edytora ---------- */
.prose .is-style-lead{ font-size:var(--fs-lead); line-height:1.5; }
.prose .wp-block-group.uwaga, .prose .is-style-uwaga{ margin-top:var(--s-5); background:var(--bg-2); border-top:var(--border-strong) solid var(--warn); padding:14px 16px 16px; border-radius:var(--radius); }
.prose .uwaga p + p{ margin-top:var(--s-2); }
.prose blockquote{ margin:var(--s-5) 0 0; padding-left:16px; border-left:var(--border-strong) solid var(--region-accent); }
.prose blockquote cite{ display:block; font-size:var(--fs-caption); color:var(--ink-2); font-style:normal; margin-top:6px; }
.prose figure{ margin:var(--s-5) 0 0; }
.prose figcaption, .prose .wp-element-caption{ font-size:var(--fs-caption); line-height:1.45; color:var(--ink-2); margin-top:8px; }
.prose .wp-block-image img{ display:block; }
.prose hr{ border:0; border-top:var(--border) solid var(--line); margin:var(--s-5) 0; }
.prose dl{ margin:var(--s-3) 0 0; }
.prose code{ font-size:.9em; background:var(--bg-2); padding:1px 4px; border-radius:var(--radius); }
.h-blok{ margin-top:var(--s-6) !important; }
.alignwide, .alignfull{ max-width:100%; }

/* tabele */
.table-wrap, .prose .wp-block-table{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.prose table, .table-wrap table{ width:100%; border-collapse:collapse; font-size:var(--fs-small); line-height:1.45; font-variant-numeric:tabular-nums; }
.prose th, .prose td, .table-wrap th, .table-wrap td{ text-align:left; padding:9px 10px 9px 0; border-bottom:var(--border) solid var(--line); vertical-align:top; }
.prose thead th, .table-wrap thead th{ border-bottom:var(--border) solid var(--line-strong); font-weight:var(--wght-strong); }
.prose tfoot td{ font-weight:var(--wght-strong); border-bottom:0; }
.prose td.num, .table-wrap td.num{ white-space:nowrap; font-family:var(--font-num); font-stretch:var(--wdth-num); }
.psb-etapy .sw{ display:inline-block; width:10px; height:10px; margin-right:8px; vertical-align:0; }
.przypis{ font-size:var(--fs-caption); color:var(--ink-2); margin-top:8px !important; }

/* FAQ z bloków „Szczegóły” (owinięte w .faq przez motyw) */
.prose .faq{ margin-top:var(--s-4); }
.prose .faq details > *:not(summary){ margin:0 0 16px; }

/* źródła z treści (H2 „Źródła” + lista, owinięte w .sources) */
.prose .sources ul{ margin:0; padding-left:1.3em; font-size:var(--fs-small); line-height:1.5; }

/* ---------- klocki ---------- */
.gpxrow{ display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; margin-top:var(--s-3); font-size:var(--fs-small); }
.gpxrow small{ color:var(--ink-2); }
.profile svg{ height:110px; }
@media (min-width:1024px){ .profile svg{ height:150px; } }
.pax{ position:relative; height:28px; font-size:var(--fs-caption); color:var(--ink-2); }
.pax span{ position:absolute; top:6px; white-space:nowrap; }
.pax .pk2{ transform:translateX(-100%); }

.praktycznie{ margin-top:var(--s-6); background:var(--bg-2); border-top:var(--border-strong) solid var(--region-accent); padding:14px 16px 16px; border-radius:var(--radius); }
.praktycznie .h{ margin:0 0 var(--s-2) !important; font-size:var(--fs-h3) !important; font-stretch:var(--wdth-h3); }
.praktycznie dl{ display:grid; grid-template-columns:minmax(110px, max-content) 1fr; gap:6px 16px; margin:0; font-size:var(--fs-small); line-height:1.5; }
.praktycznie dt{ color:var(--ink-2); }
.praktycznie dd{ margin:0; }
.praktycznie .spr{ margin-top:var(--s-3) !important; font-size:var(--fs-caption); color:var(--ink-2); }
.praktycznie .status{ margin-bottom:var(--s-2); }

.nearby{ margin-top:var(--s-6); }
.nearby ul{ list-style:none; margin:var(--s-3) 0 0; padding:0; border-top:var(--border) solid var(--line); }
.nearby li{ display:grid; grid-template-columns:1fr auto; gap:2px 12px; padding:11px 0; border-bottom:var(--border) solid var(--line); font-size:var(--fs-small); margin:0 !important; }
.nearby li small{ grid-column:1; color:var(--ink-2); font-size:var(--fs-caption); }
.nearby li .num{ grid-row:1 / span 2; grid-column:2; align-self:center; }
.nearby .disc, .sleep .disc{ font-size:var(--fs-caption); color:var(--ink-2); margin-top:8px !important; }
.sleep li{ margin:0 !important; }

.partner{ margin-top:var(--s-5); border:var(--border) solid var(--line); border-top:var(--border-strong) solid var(--ink-2); padding:14px 16px 16px; border-radius:var(--radius); }
.partner__label{ font-size:var(--fs-caption) !important; color:var(--ink-2); font-weight:var(--wght-strong); margin:0 0 4px !important; }
.partner__name{ font-weight:var(--wght-strong); margin:0 0 6px !important; }

.kalendarz{ margin:var(--s-5) 0 0; }
.kalendarz__t{ font-weight:var(--wght-strong); margin-bottom:8px; }
.kalendarz table{ table-layout:fixed; min-width:560px; }
.kalendarz th[scope="row"]{ width:30%; font-weight:var(--wght-strong); padding-right:12px; }
.kalendarz th[scope="row"] small{ display:block; font-weight:400; color:var(--ink-2); font-size:var(--fs-caption); }
.kalendarz thead th{ text-align:center; font-size:var(--fs-caption); font-weight:500; color:var(--ink-2); padding:6px 0; }
.kalendarz thead th.teraz{ color:var(--ink); font-weight:var(--wght-strong); }
.kalendarz td{ padding:0 1px !important; height:28px; border-bottom:var(--border) solid var(--line); }
.kalendarz td.p2, .kalendarz .kp2{ background:var(--region-accent); }
.kalendarz td.p1, .kalendarz .kp1{ background:color-mix(in srgb, var(--region-accent) 35%, var(--bg)); }
.kalendarz td.p0, .kalendarz .kp0{ background:var(--bg-2); }
.kalendarz td.teraz{ box-shadow:inset 0 -3px 0 var(--ink); }
.kalendarz .legend i{ display:inline-block; width:14px; height:10px; }
.kalendarz__zr{ font-size:var(--fs-caption); color:var(--ink-2); margin-top:6px; }

.dalej{ margin-top:var(--s-5); border-top:var(--border) solid var(--line); padding-top:var(--s-3); }
.dalej .h{ font-size:var(--fs-caption); color:var(--ink-2); margin:0 0 6px; }
.dalej ul{ list-style:none; padding:0; margin:0; font-weight:var(--wght-strong); }
.prevnext__brak{ display:block; padding:14px 12px 16px 0; color:var(--ink-2); }
.prevnext__brak + .prevnext__brak, .prevnext a + .prevnext__brak, .prevnext__brak + a{ text-align:right; padding:14px 0 16px 12px; border-left:var(--border) solid var(--line); }
.prevnext__brak i{ opacity:.5; }
.prevnext > span:empty{ display:block; }
.prevnext > span:empty + a{ border-left:var(--border) solid var(--line); text-align:right; padding:14px 0 16px 12px; }
.prevnext > span:empty + a i{ margin-left:auto; }

/* ---------- huby, listy, karty ---------- */
.hub{ padding-top:var(--s-4); padding-bottom:var(--s-6); max-width:none; }
.hub__wstep{ max-width:760px; }
.filtry{ display:flex; flex-wrap:wrap; gap:10px 16px; align-items:flex-end; margin:var(--s-5) 0 0; font-size:var(--fs-small); }
.filtry label{ display:grid; gap:4px; color:var(--ink-2); }
.filtry label.chk{ display:flex; gap:8px; align-items:center; min-height:var(--tap); color:var(--ink); }
.filtry select{ font:inherit; min-height:var(--tap); padding:0 10px; border:var(--border) solid var(--line); border-radius:var(--radius); background:var(--bg); color:var(--ink); }
.filtry__n{ margin:0 0 10px auto; color:var(--ink-2); }
.karty{ list-style:none; margin:var(--s-4) 0 0; padding:0; display:grid; gap:0 32px; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); }
.karta{ border-top:var(--border) solid var(--line-strong); padding:12px 0 22px; }
.karta[hidden]{ display:none; }
.karta__img img{ display:block; width:100%; aspect-ratio:3/2; object-fit:cover; margin-bottom:10px; }
.karta__k{ font-size:var(--fs-caption); color:var(--ink-2); margin:0 0 4px; }
.karta__t{ margin:0; font-size:var(--fs-h4); font-stretch:var(--wdth-h3); font-weight:var(--wght-head); line-height:1.25; }
.site .karta__t a{ color:var(--ink); text-decoration:none; }
.site .karta__t a:hover{ text-decoration:underline; }
.karta__o{ margin:6px 0 0; font-size:var(--fs-small); color:var(--ink-2); line-height:1.5; }
.pusto{ margin-top:var(--s-5); color:var(--ink-2); }
.lista-miejsc{ columns:2 260px; column-gap:32px; }
.lista-miejsc li{ break-inside:avoid; }
.tabela-km td small{ color:var(--ink-2); }
.navigation.pagination{ margin-top:var(--s-5); }
.nav-links{ display:flex; gap:12px; flex-wrap:wrap; }

/* ---------- strona główna ---------- */
.home-top{ border-bottom:var(--border) solid var(--line); }
.home-top .wrap{ padding-top:28px; padding-bottom:32px; }
.home-k{ margin:0; font-size:var(--fs-small); color:var(--ink-2); font-weight:var(--wght-strong); }
.home-h{ margin:8px 0 0; font-size:var(--fs-display); font-stretch:var(--wdth-display); font-weight:var(--wght-head); line-height:var(--lh-head); letter-spacing:var(--track-display); max-width:18ch; }
.home-lead{ margin:14px 0 0; font-size:var(--fs-lead); line-height:1.5; max-width:46ch; color:var(--ink-2); }
.trail{ margin-top:28px; }
.trailbar{ max-width:none; margin-top:0; }
.trailbar .segs{ height:14px; }
.trailbar .segs > *{ opacity:1; }
.trailbar .lg{ color:var(--ink-2); opacity:1; }
.trail__etapy{ list-style:none; margin:16px 0 0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:0 24px; font-size:var(--fs-small); }
.trail__etapy li{ border-top:var(--border) solid var(--line); }
.trail__etapy a, .trail__etapy li > span{ display:flex; gap:8px; align-items:baseline; padding:8px 0 8px 12px; position:relative; color:var(--ink) !important; text-decoration:none; }
.trail__etapy a::before, .trail__etapy li > span::before{ content:""; position:absolute; left:0; top:12px; width:4px; height:14px; background:var(--sw); }
.trail__etapy li > span{ color:var(--ink-2) !important; }
.trail__etapy small{ margin-left:auto; color:var(--ink-2); white-space:nowrap; }
.trail__parki{ display:flex; flex-wrap:wrap; gap:6px 18px; margin:14px 0 0; font-size:var(--fs-caption); color:var(--ink-2); }
.trail__parki span::before{ content:""; display:inline-block; width:14px; height:4px; margin-right:6px; vertical-align:middle; background:var(--sw); }
.trail__cta{ display:flex; flex-wrap:wrap; gap:8px; margin:18px 0 0; }
.home{ padding-bottom:var(--s-6); max-width:none; }
.home h2{ font-size:var(--fs-h2); font-stretch:var(--wdth-h2); font-weight:var(--wght-head); line-height:var(--lh-head); letter-spacing:var(--track-head); margin:var(--s-6) 0 var(--s-4); }
.home h2 small{ font-size:.5em; font-weight:500; color:var(--ink-2); letter-spacing:0; }
.huby ul{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:0 24px; }
.huby li{ border-top:var(--border) solid var(--line-strong); }
.huby a{ display:block; padding:12px 0 16px; color:var(--ink) !important; text-decoration:none; }
.huby b{ display:block; font-stretch:var(--wdth-h3); font-weight:var(--wght-head); font-size:var(--fs-h4); }
.huby span{ display:block; font-size:var(--fs-small); color:var(--ink-2); margin-top:2px; }
.huby a:hover b{ text-decoration:underline; }
.teraz ul{ list-style:none; margin:0; padding:0; }
.teraz li{ padding:10px 0; border-bottom:var(--border) solid var(--line); }
.teraz li small{ display:block; color:var(--ink-2); font-size:var(--fs-caption); }

/* ---------- stopka ---------- */
.ftr .disc.wyd{ margin-top:12px; border-top:0; padding-top:0; }
.ftr .menu{ list-style:none; margin:8px 0 0; padding:0; line-height:1.9; }

/* ---------- druk ---------- */
@media print{
  .hdr, .chips, .actions, .aside, .ftr, .mapbox, .sleep{ display:none !important; }
  .titleblk{ background:none; color:#000; }
  .site .titleblk a{ color:#000; }
}
