/* Szablon devpage „Bistro” – magazyn na dużych kaflach w stylu Foxiz Food. Własny kod, czcionki systemowe (bez Google Fonts – RODO).
   Przebudowa pod inną domenę: w polu „własny CSS” domeny nadpisz tokeny, np. <style>:root{--accent:#e11d48}</style>.
   Logo w ciemnym nagłówku jest rozjaśniane do białego (--logo-filter). Domena z jasnym logo: <style>:root{--logo-filter:none}</style>. */
:root {
  --accent: #b86e00;      /* pomarańcz wzoru #ffb244 jako tekst na bieli ma 1,9:1 – ten ciemniejszy 4,6:1; jasny zostaje na tła przycisków */
  --accent-bg: #ffb244;
  --dark: #191c20;        /* nagłówek */
  --ink: #282828;
  --muted: #5f5f5f;
  --line: #ececec;
  --soft: #f6f6f7;
  --bg: #fff;
  --wrap: 1222px;
  --r: 5px;
  --sec-pad: 40px;
  --gap: 24px;
  --side: 300px;
  --logo-filter: brightness(0) invert(1);
  --head: Signika, "Segoe UI", "Trebuchet MS", Roboto, Arial, sans-serif;
  --ui: "Josefin Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --body: Georgia, "Roboto Slab", "DejaVu Serif", serif;  /* bez Rockwella – nie ma polskich znaków (ę, ś, ł wstawiane z innej czcionki) */
  /* kolory etykiet działów – zmieniają się po kolei jak we wzorze */
  --c1: #c2410c; --c2: #7c3aed; --c3: #2e7d32; --c4: #c2185b; --c5: #3949ab;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.7 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; color: var(--ink); margin: 0; letter-spacing: -.01em; }
.bs-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.bs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bs-pill { display: inline-block; padding: 4px 10px; border-radius: 100px; background: var(--c1); color: #fff; font: 700 11px/1.3 var(--ui); text-transform: uppercase; letter-spacing: .03em; }
a.bs-pill:hover { color: #fff; opacity: .9; }
:is(.bs-hero, .bs-sec__grid) > :nth-child(5n+2) .bs-pill { background: var(--c2); }
:is(.bs-hero, .bs-sec__grid) > :nth-child(5n+3) .bs-pill { background: var(--c3); }
:is(.bs-hero, .bs-sec__grid) > :nth-child(5n+4) .bs-pill { background: var(--c4); }
:is(.bs-hero, .bs-sec__grid) > :nth-child(5n+5) .bs-pill { background: var(--c5); }
.bs-meta { display: block; font: 600 12px/1.4 var(--ui); color: var(--muted); margin-top: 8px; }
.bs-img { display: block; overflow: hidden; border-radius: var(--r); background: var(--soft); }
.bs-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
a:hover .bs-img img, .bs-img:hover img { transform: scale(1.04); }
.bs-banner { max-width: var(--wrap); margin: 20px auto; padding: 0 16px; text-align: center; }
.bs-banner:empty, .bs-banner:not(:has(*)) { display: none; }
.bs-banner img { margin: 0 auto; }

/* Nagłówek ciemny */
.bs-head { background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 50; }
.bs-head .bs-wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.bs-logo img { max-height: 38px; width: auto; filter: var(--logo-filter); }
.bs-nav { margin: 0 auto; }
.bs-nav ul { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; list-style: none; }
.bs-nav li a { display: block; padding: 8px 12px; font: 700 13px/20px var(--ui); text-transform: uppercase; letter-spacing: .03em; color: #fff; white-space: nowrap; }
.bs-nav li a:hover, .bs-nav li:has(> a[href="/"]) a { color: var(--accent-bg); }
.bs-burger { display: none; }
.bs-burger-btn { display: none; cursor: pointer; font: 700 14px/1 var(--ui); color: #fff; padding: 12px 0; min-height: 44px; margin-left: auto; }

/* Strona główna: 2 duże kafle + 3 mniejsze, z numerami */
.bs-hero { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; counter-reset: bs; }
.bs-ov { position: relative; display: block; overflow: hidden; background: #222; color: #fff; counter-increment: bs; }
.bs-ov img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.bs-ov:hover img { transform: scale(1.04); }
.bs-ov::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,0) 75%); }
.bs-ov__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; z-index: 1; }
.bs-ov h2, .bs-ov h3 { color: #fff; font-size: 22px; line-height: 1.2; margin-top: 10px; }
.bs-ov .bs-meta { color: rgba(255,255,255,.85); }
.bs-ov:hover, .bs-ov:hover h2, .bs-ov:hover h3 { color: #fff; }
.bs-hero .bs-ov { grid-column: span 2; aspect-ratio: 4 / 3; }
.bs-hero .bs-ov:nth-child(-n+2) { grid-column: span 3; aspect-ratio: 16 / 10; }
.bs-hero .bs-ov:nth-child(-n+2) h2 { font-size: 34px; }
.bs-hero .bs-ov:nth-child(-n+2)::before { content: "0" counter(bs); position: absolute; right: 18px; bottom: 14px; z-index: 1; font: 700 46px/1 var(--head); color: rgba(255,255,255,.28); }
.bs-hero .bs-ov:nth-child(-n+2) .bs-ov__body { padding: 24px 90px 24px 24px; }

/* Działy jako kolorowe kafle (tylko na głównej) */
.bs-topics { display: none; }
body:has(.bs-hero) .bs-topics { display: block; max-width: var(--wrap); margin: var(--sec-pad) auto 0; padding: 0 16px; }
.bs-topics__title { text-align: center; font: 700 22px/1.2 var(--head); margin: 0 0 16px; }
.bs-topics ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
/* w kaflach tylko działy z wpisami – bez stron stałych devpage (start, kontakt, polityka, ogłoszenia, katalog firm) */
.bs-topics li:has(> a:is([href="/"], [href*="kontakt"], [href*="polityka"], [href*="ogloszenia"], [href*="katalog-firm"])) { display: none; }
.bs-topics a { display: flex; align-items: flex-end; min-height: 74px; padding: 12px 14px; border-radius: var(--r); color: #fff; font: 700 16px/1.2 var(--head); background: linear-gradient(120deg, #1d1f24 30%, var(--c1)); }
.bs-topics li:nth-child(5n+2) a { background: linear-gradient(120deg, #1d1f24 30%, var(--c2)); }
.bs-topics li:nth-child(5n+3) a { background: linear-gradient(120deg, #1d1f24 30%, var(--c3)); }
.bs-topics li:nth-child(5n+4) a { background: linear-gradient(120deg, #1d1f24 30%, var(--c4)); }
.bs-topics li:nth-child(5n+5) a { background: linear-gradient(120deg, #1d1f24 30%, var(--c5)); }
.bs-topics a:hover { color: #fff; filter: brightness(1.15); }

/* Układ treść + panel boczny */
.bs-main { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 40px; margin-top: var(--sec-pad); margin-bottom: var(--sec-pad); }
.bs-main > main { min-width: 0; }
.bs-aside { min-width: 0; display: flex; flex-direction: column; gap: 30px; }

/* Sekcje kategorii */
.bs-sec + .bs-sec { margin-top: var(--sec-pad); }
.bs-sec__title { font: 700 24px/1.2 var(--head); margin: 0 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--line); position: relative; }
.bs-sec__title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 56px; height: 2px; background: var(--accent-bg); }
.bs-sec__grid { display: grid; gap: var(--gap); align-items: start; }
.bs-sec__grid:has(> .bs-card) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bs-sec__grid:has(> .bs-post) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px var(--gap); }
.bs-sec__grid:has(> .bs-row) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.bs-sec__grid:has(> .bs-ov) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.bs-sec__grid > .bs-ov { aspect-ratio: 4 / 3; }
.bs-sec__grid > .bs-ov:first-child { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
.bs-sec__grid > .bs-ov:first-child h3 { font-size: 30px; }
.bs-ov p { display: none; }
.bs-sec__grid > .bs-ov:first-child p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 8px 0 0; max-width: 640px; font-size: 15px; color: rgba(255,255,255,.9); }
/* Kafle w rzędzie dzielą wiersze (subgrid): tytuły, zajawki i autorzy w jednej linii */
.bs-card, .bs-post { display: grid; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
.bs-card { grid-row: span 3; }
.bs-post { grid-row: span 4; }
.bs-card .bs-img { position: relative; aspect-ratio: 4 / 3; margin-bottom: 12px; }
.bs-card .bs-pill { position: absolute; right: 10px; top: 10px; }
.bs-card h3 { font-size: 18px; line-height: 1.3; }
.bs-card .bs-meta, .bs-post .bs-meta { align-self: end; }
.bs-post .bs-img { position: relative; aspect-ratio: 1; margin-bottom: 14px; }
.bs-post .bs-pill { position: absolute; right: 12px; top: 12px; }
.bs-post h3 { font-size: 22px; line-height: 1.25; }
.bs-post p { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bs-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.bs-row .bs-img { aspect-ratio: 4 / 3; }
.bs-row h3 { font-size: 17px; line-height: 1.3; margin-top: 6px; }

/* Panel boczny */
.bs-widget { border: 1px solid var(--line); border-radius: 7px; padding: 18px; }
.bs-widget__title { font: 700 19px/1.2 var(--head); margin: 0 0 14px; text-align: center; }
.bs-widget ul { list-style: none; margin: 0; padding: 0; }
.bs-widget li + li { margin-top: 14px; }
.bs-witem { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; align-items: center; }
.bs-witem img { width: 80px; height: 64px; object-fit: cover; border-radius: var(--r); }
.bs-witem b, .bs-wnum b { font: 700 15px/1.3 var(--head); }
.bs-widget ul:has(.bs-wnum) { counter-reset: bsw; }
.bs-wnum { counter-increment: bsw; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.bs-wnum::before { content: counter(bsw); width: 28px; height: 28px; border-radius: 50%; background: var(--accent-bg); color: var(--dark); font: 700 13px/28px var(--head); text-align: center; }
.bs-wbig { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; color: #fff; }
.bs-wbig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bs-wbig::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0) 65%); }
.bs-wbig b { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; font: 700 16px/1.3 var(--head); }
.bs-wbig:hover { color: #fff; }

/* Artykuł */
.bs-ahead { margin: 0 0 24px; }
.bs-ahead h1 { font-size: 38px; line-height: 1.15; margin: 12px 0 10px; }
.bs-ahead .bs-meta { font-size: 13px; }
.bs-ahead .bs-img { margin-top: 18px; aspect-ratio: 16 / 9; }
.bs-content { font-size: 17px; line-height: 1.8; }
.bs-content > p:first-of-type::first-letter { float: left; font: 700 64px/.85 var(--head); margin: 6px 12px 0 0; color: var(--accent); }
.bs-content h2 { font-size: 26px; line-height: 1.25; margin: 32px 0 12px; }
.bs-content h3 { font-size: 21px; line-height: 1.3; margin: 26px 0 10px; }
.bs-content p { margin: 0 0 18px; }
.bs-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.bs-content ul, .bs-content ol { padding-left: 22px; margin: 0 0 18px; }
.bs-content li + li { margin-top: 6px; }
.bs-content blockquote { margin: 30px 0; text-align: center; font: 700 22px/1.45 var(--head); }
.bs-content blockquote::before { content: "”"; display: block; font: 700 64px/.6 Georgia, serif; color: var(--accent-bg); margin-bottom: 12px; }
.bs-content table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 15px; display: block; overflow-x: auto; }
.bs-content th, .bs-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.bs-content th { background: var(--soft); }
/* Zdjęcia w treści obok tekstu; !important – stare wpisy mają rozmiar w style="" */
.bs-content img { float: left; width: 40% !important; max-width: 340px; height: auto !important; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); margin: 6px 24px 14px 0; }
.bs-content :is(h1, h2, h3, h4) img { float: none; display: block; margin: 0 0 12px; }
.bs-content::after { content: ""; display: block; clear: both; }
/* Oznaczenie wpisu sponsorowanego („Reklama”): obrazek bezpośrednio w treści, na końcu */
.bs-content > img { float: none; clear: both; display: block; width: auto !important; max-width: 120px; max-height: 30px; aspect-ratio: auto; object-fit: contain; border-radius: 0; margin: 24px 0 0; }
.bs-pn { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin: 32px 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bs-pn a { display: block; font: 700 16px/1.35 var(--head); }
.bs-pn span { display: block; font: 700 11px/1.4 var(--ui); text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.bs-pn__next { text-align: right; grid-column: 2; }
.bs-related .bs-sec__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Stopka jasna, wyśrodkowana */
.bs-foot { border-top: 1px solid var(--line); margin-top: 24px; padding: 40px 0 20px; text-align: center; background: var(--soft); }
.bs-flogo { display: inline-block; background: var(--dark); padding: 12px 18px; border-radius: 7px; margin-bottom: 14px; }
.bs-flogo img { max-height: 38px; width: auto; filter: var(--logo-filter); }
.bs-foot > .bs-wrap > p { max-width: 640px; margin: 0 auto 26px; font-size: 15px; color: var(--muted); }
.bs-fcols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; text-align: left; }
.bs-ftitle { font: 700 17px/1.2 var(--head) !important; margin: 0 0 14px !important; }
.bs-foot ul { list-style: none; margin: 0; padding: 0; }
.bs-foot li + li { margin-top: 12px; }
.bs-fitem { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 10px; align-items: center; }
.bs-fitem img { width: 60px; height: 46px; object-fit: cover; border-radius: var(--r); }
.bs-fitem b { display: block; font: 700 14px/1.3 var(--head); }
.bs-fitem small { display: block; font: 600 12px/1.3 var(--ui); color: var(--muted); margin-top: 2px; }
.bs-fcats { display: flex; flex-wrap: wrap; gap: 8px; }
.bs-fcats li + li { margin-top: 0; }
.bs-fcats a { display: inline-block; padding: 6px 12px; border-radius: 100px; background: #fff; border: 1px solid var(--line); font: 700 12px/1.3 var(--ui); }
.bs-copy { padding: 16px; text-align: center; font: 600 12px/1.5 var(--ui); color: var(--muted); background: var(--soft); }
.bs-copy ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 0 0 6px; padding: 0; list-style: none; }

@media (max-width: 1100px) {
  .bs-hero .bs-ov:nth-child(-n+2) h2 { font-size: 26px; }
  .bs-sec__grid:has(> .bs-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .bs-main { grid-template-columns: 1fr; }
  .bs-burger-btn { display: block; }
  .bs-head .bs-wrap { flex-wrap: wrap; gap: 0 16px; }
  .bs-nav { order: 3; width: 100%; display: none; margin: 0; }
  .bs-head:has(.bs-burger:checked) .bs-nav { display: block; }
  .bs-nav ul { flex-direction: column; align-items: stretch; padding-bottom: 8px; }
  .bs-nav li a { padding: 12px 6px; border-top: 1px solid rgba(255,255,255,.15); }
  .bs-fcols { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  :root { --sec-pad: 30px; }
  .bs-hero { grid-template-columns: 1fr 1fr; }
  .bs-hero .bs-ov, .bs-hero .bs-ov:nth-child(-n+2) { grid-column: span 2; aspect-ratio: 4 / 3; }
  .bs-hero .bs-ov:nth-child(n+3) { grid-column: span 1; aspect-ratio: 3 / 4; }
  .bs-hero .bs-ov:nth-child(5) { grid-column: span 2; aspect-ratio: 16 / 9; }
  .bs-hero .bs-ov:nth-child(-n+2) h2 { font-size: 23px; }
  .bs-ov h2, .bs-ov h3 { font-size: 17px; }
  .bs-sec__grid:has(> .bs-post), .bs-sec__grid:has(> .bs-row), .bs-related .bs-sec__grid { grid-template-columns: 1fr; }
  .bs-sec__grid:has(> .bs-ov) { grid-template-columns: 1fr 1fr; }
  .bs-sec__grid > .bs-ov:first-child { aspect-ratio: 4 / 3; }
  .bs-sec__grid > .bs-ov:first-child h3 { font-size: 22px; }
  .bs-ahead h1 { font-size: 28px; }
  .bs-content img { float: none; width: 100% !important; max-width: none; margin: 14px 0; }
  .bs-content > img { width: auto !important; max-width: 120px; margin: 24px 0 0; }
}
@media (max-width: 479px) {
  .bs-sec__grid:has(> .bs-card) { grid-template-columns: 1fr; }
  .bs-pn { grid-template-columns: 1fr; }
  .bs-pn__next { grid-column: 1; text-align: left; }
}
