/* ==========================================================================
   Poradnik nnwdziecka.pl — motyw front-endu
   Odwzorowuje projekt „Portal poradnikowy NNWdziecka" (Claude Design):
   HomePage · Kategoria · Artykuł.
   Odcienie marki (zmienne --brand… i --accent…) wstrzykuje partials/head.php
   przez brand_css_vars(BRAND_COLOR, ACCENT_COLOR).
   ⚠️ Nie pisz sekwencji gwiazdka-ukośnik wewnątrz komentarza — zamyka go
      przedwcześnie i wycina resztę reguł.
   ========================================================================== */

/* --- Tokeny ------------------------------------------------------------- */
:root {
  --brand: #6EA93E;
  --brand-600: #5B9233;
  --brand-700: #4E7F2B;
  --brand-800: #3C6321;
  --brand-100: #E4EFD3;
  --brand-50:  #F2F7EA;
  --accent: #86B524;
  --accent-600: #75A01F;
  --accent-50: #F4F8E9;
  --heart: #DF2228;

  --ink-900: #2B2B2B;
  --ink-700: #4A4A4A;
  --ink-600: #6B6B6B;
  --ink-500: #8A8A8A;
  --line-300: #E0E0E0;
  --line-200: #EAEAEA;
  --surface-100: #F4F4F4;
  --surface-050: #FAFAFA;
  --white: #FFFFFF;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 4px rgba(0,0,0,.10);
  --shadow-card-hover: 0 4px 14px rgba(0,0,0,.14);
  --shadow-lift: 0 10px 30px rgba(0,0,0,.10);
  --ease: cubic-bezier(.4,0,.2,1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 380ms;

  --container: 1200px;
  --content: 1040px;
  --measure: 680px;
  --gutter: 24px;
  --header-h: 71px;

  --font-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  color: var(--ink-600); background: var(--white);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--ink-900); line-height: 1.25; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--brand); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--brand-600); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 12px 20px;
  border-radius: 0 0 var(--radius-md) 0; font-weight: 700;
}
.skip-link:focus { left: 0; color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: var(--content); }

/* --- Pasek postępu czytania -------------------------------------------- */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--brand));
  z-index: 60; transition: width 80ms linear; pointer-events: none;
}

/* --- Nagłówek ----------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line-200);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.is-stuck { box-shadow: 0 4px 18px rgba(0,0,0,.07); }
.site-header__inner {
  max-width: var(--container); margin: 0 auto;
  padding: 14px var(--gutter); display: flex; align-items: center; gap: 24px;
}
.site-header__logo { flex: none; display: flex; align-items: center; gap: 10px; }
.site-header__logo-img { height: 38px; width: auto; }
.site-header__badge {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-700); background: var(--brand-50);
  padding: 4px 9px; border-radius: var(--radius-pill); white-space: nowrap;
}
.site-header__nav { display: flex; align-items: center; gap: 26px; margin-left: 8px; flex-wrap: nowrap; }
.site-header__nav a {
  position: relative; font-size: 15px; font-weight: 600; color: var(--ink-900);
  padding: 6px 0; white-space: nowrap;
}
.site-header__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--brand); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease);
}
.site-header__nav a:hover::after, .site-header__nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-header__nav a[aria-current="page"] { color: var(--brand); }
/* Selektor musi być bardziej szczegółowy niż `.btn` (które ustawia inline-flex
   i stoi niżej w arkuszu) — inaczej mobilny przycisk CTA zostaje widoczny
   na desktopie i rozpycha nagłówek poza ekran. */
.site-header__nav .site-header__nav-extra,
.site-header__nav .site-header__nav-cta { display: none; }

.site-header__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.site-header__search {
  flex: none; width: 42px; height: 42px; border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center; color: var(--ink-700);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.site-header__search:hover { background: var(--surface-100); color: var(--brand-700); }
.site-header__search svg { width: 20px; height: 20px; }
.site-header__right .btn { padding: 11px 20px; font-size: 14.5px; line-height: 1.25; }

.header-menu-btn {
  display: none; width: 44px; height: 44px; flex: none;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-300); background: #fff;
  border-radius: var(--radius-sm); color: var(--ink-900); cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.header-menu-btn:hover { background: var(--surface-100); border-color: var(--ink-500); }
.header-menu-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }

/* --- Przyciski ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border: 2px solid transparent; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur-fast) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.btn--primary:hover { background: var(--brand-600); color: #fff; box-shadow: var(--shadow-card-hover); }
.btn--white { background: #fff; color: var(--brand-700); }
.btn--white:hover { background: var(--surface-100); color: var(--brand-800); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn--outline { background: #fff; color: var(--ink-900); border-color: var(--line-300); }
.btn--outline:hover { background: var(--brand-50); border-color: var(--brand); color: var(--brand-700); }
.btn--lg { padding: 15px 28px; font-size: 16px; }
.btn--block { width: 100%; }

/* --- Wyszukiwarka ------------------------------------------------------- */
.search-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
/* Cel skoku z ikony lupy w nagłówku — musi wylądować pod przyklejonym paskiem. */
#szukaj { scroll-margin-top: calc(var(--header-h) + 28px); }
.search-form__field {
  flex: 1 1 260px; display: flex; align-items: center; gap: 12px;
  background: var(--surface-100); border: 1px solid var(--line-300);
  border-radius: var(--radius-sm); padding: 0 16px;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.search-form__field:focus-within { border-color: var(--brand); background: #fff; }
.search-form__field svg { width: 20px; height: 20px; flex: none; stroke: var(--ink-500); }
.search-form input {
  flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  padding: 15px 0; font: inherit; font-size: 16px; color: var(--ink-900);
}
.search-form input::placeholder { color: var(--ink-500); }

/* --- HERO (strona główna) ---------------------------------------------- */
.hero { background: #fff; }
.hero__inner {
  padding: 64px var(--gutter) 56px;
  display: flex; flex-wrap: wrap; gap: 48px; align-items: center;
}
.hero__text { flex: 1 1 420px; min-width: 300px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; margin-bottom: 22px;
  background: var(--brand-50); border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 700; color: var(--brand-700); letter-spacing: .02em;
}
.hero__badge svg { width: 15px; height: 15px; }
.hero h1 {
  margin: 0 0 20px; font-size: clamp(2rem, 1.3rem + 2.4vw, 2.875rem);
  /* 1.12 z projektu było za ciasne dla polskich diakrytyków: pole wiersza ma
     ~1.35em, więc kolejne wiersze NACHODZIŁY na siebie o ~10px. */
  line-height: 1.26; font-weight: 800; letter-spacing: -.01em;
  overflow-wrap: break-word; hyphens: auto;
}
/* Podświetlenie rysujemy gradientem o zadanej wysokości, a NIE tłem z paddingiem:
   tło elementu inline zajmuje całe pole glifów (~1.35em) i przy wielu podświetlonych
   wierszach zachodziłoby na sąsiednie. Pasek 82% mieści się w odstępie wiersza. */
.hero h1 mark {
  background: linear-gradient(var(--brand-50), var(--brand-50)) no-repeat;
  background-size: 100% 82%;
  background-position: 0 58%;
  color: inherit; padding: 0 10px; border-radius: 4px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero__lead { margin: 0 0 30px; font-size: 1.1875rem; line-height: 1.6; color: var(--ink-600); max-width: 560px; }
.hero__trust {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin-top: 22px; list-style: none; font-size: .875rem; color: var(--ink-500);
}
.hero__trust li { display: inline-flex; align-items: center; gap: 7px; }
.hero__trust svg { width: 16px; height: 16px; stroke: var(--brand); }
.hero__trust-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-300); }

.hero__media { flex: 1 1 380px; min-width: 300px; position: relative; }
.hero__photo {
  position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card-hover); background: var(--surface-100);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo--empty {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--brand-50), var(--surface-100));
  box-shadow: var(--shadow-card);
}
.hero__photo--empty svg { width: 30%; height: auto; stroke: var(--brand); opacity: .28; }
.hero__card {
  position: absolute; left: -14px; bottom: -18px;
  background: #fff; border: 1px solid var(--line-200); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover); padding: 16px 20px;
  display: flex; align-items: center; gap: 14px; max-width: 250px;
}
.hero__card-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-50); display: flex; align-items: center; justify-content: center;
  color: var(--brand);
}
.hero__card-icon svg { width: 22px; height: 22px; }
.hero__card strong { display: block; font-size: 1.375rem; font-weight: 800; color: var(--ink-900); line-height: 1; }
.hero__card span > strong + * { margin-top: 3px; }
.hero__card > span:last-child { font-size: .8125rem; color: var(--ink-500); }

/* --- Nagłówki sekcji ---------------------------------------------------- */
.sec-head { margin-bottom: 36px; }
.sec-head--row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section__title { font-size: 1.75rem; font-weight: 700; }
.section__title::after {
  content: ""; display: block; width: 64px; height: 3px;
  background: var(--brand); border-radius: 2px; margin-top: 14px;
}
.section__subtitle { margin-top: 12px; color: var(--ink-600); }
.sec-head__link { font-size: .9375rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.sec-head__link svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.sec-head__link:hover svg { transform: translateX(3px); }

/* --- Kategorie (kompaktowe karty; na mobile rozwijana lista) ------------- */
.cats { background: var(--surface-100); padding: 56px 0; }
.sec-head--cats { margin-bottom: 22px; }

/* <details class="cats-picker">: na desktopie siatka jest wymuszona jako widoczna
   (patrz reguła niżej), a pasek „Wybierz temat" ukryty. Poniżej ~600px pasek staje
   się przełącznikiem, a siatka domyślnie zwinięta — oszczędza wysokość na telefonie. */
.cats-picker__bar { display: none; }

.cats__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px;
}
.cat-card {
  background: #fff; border: 1px solid var(--line-200); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.cat-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); border-color: var(--brand-100); }
.cat-card__icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50);
  display: flex; align-items: center; justify-content: center; color: var(--brand);
  transition: background var(--dur) var(--ease);
}
.cat-card__icon svg { width: 24px; height: 24px; }
.cat-card:hover .cat-card__icon { background: var(--brand-100); }
.cat-card__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cat-card__name { font-size: 1rem; font-weight: 700; color: var(--ink-900); line-height: 1.25; }
.cat-card__count { font-size: .8125rem; color: var(--ink-500); }
.cat-card__arrow {
  flex: none; width: 18px; height: 18px; margin-left: auto; color: var(--line-300);
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.cat-card:hover .cat-card__arrow { color: var(--brand); transform: translateX(3px); }

/* Kategorie na telefonie: pasek „Wybierz temat" + rozwijana lista wierszy. */
@media (max-width: 600px) {
  .cats { padding: 40px 0; }
  .sec-head--cats { display: none; }
  .cats-picker {
    border: 1px solid var(--line-200); border-radius: var(--radius-md);
    background: #fff; box-shadow: var(--shadow-card); overflow: hidden;
  }
  .cats-picker__bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 16px; cursor: pointer; list-style: none;
    font-size: 1rem; font-weight: 700; color: var(--ink-900);
  }
  .cats-picker__bar::-webkit-details-marker { display: none; }
  .cats-picker__bar-label { display: inline-flex; align-items: center; gap: 10px; }
  .cats-picker__bar-label svg { width: 20px; height: 20px; color: var(--brand); }
  .cats-picker__chevron { width: 20px; height: 20px; color: var(--ink-500);
    transition: transform var(--dur) var(--ease); }
  .cats-picker[open] .cats-picker__chevron { transform: rotate(180deg); }
  .cats__grid { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line-200); }
  .cat-card { border: 0; border-radius: 0; box-shadow: none;
    padding: 13px 16px; border-bottom: 1px solid var(--line-200); }
  .cat-card:last-child { border-bottom: 0; }
  .cat-card:hover { transform: none; box-shadow: none; }
  .cat-card__arrow { color: var(--line-300); }
}

/* --- Wyróżnione --------------------------------------------------------- */
.featured { background: #fff; padding: 64px 0; }
.featured__grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: stretch; }
.featured__side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.feat-big {
  position: relative; display: block; min-height: 340px; overflow: hidden;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  background: var(--surface-100); transition: box-shadow var(--dur) var(--ease);
}
.feat-big:hover { box-shadow: var(--shadow-card-hover); }
.feat-big__media { position: absolute; inset: 0; }
.feat-big__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.feat-big:hover .feat-big__media img { transform: scale(1.04); }
.feat-big::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,20,20,0) 30%, rgba(20,20,20,.78) 100%);
}
.feat-big__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 32px 34px; }
.feat-big__body h3 { margin: 0 0 10px; font-size: 1.625rem; line-height: 1.25; font-weight: 700; color: #fff; max-width: 560px; }
.feat-big__meta { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.85); font-size: .875rem; }
.feat-big__meta svg { width: 16px; height: 16px; }
.badge {
  display: inline-block; padding: 5px 12px; margin-bottom: 14px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; border-radius: var(--radius-pill);
}

.feat-small {
  flex: 1; display: flex; gap: 16px; padding: 16px; min-width: 0;
  background: #fff; border: 1px solid var(--line-200); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.feat-small:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.feat-small__media {
  flex: none; width: 104px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--brand-50); position: relative;
}
.feat-small__media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.feat-small__body { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.feat-small__body h3 { margin: 0 0 8px; font-size: 1.0625rem; line-height: 1.35; font-weight: 700; color: var(--ink-900); }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 8px;
}
.feat-small__meta { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-500); font-size: .8125rem; }
.feat-small__meta svg { width: 14px; height: 14px; }

/* --- Listing (najnowsze / kategoria / wyniki) --------------------------- */
.listing { background: var(--surface-050); padding: 64px 0; }
.listing--cat { padding: 40px 0 56px; }
.listing__count { font-size: .9375rem; color: var(--ink-500); margin-bottom: 28px; }
.listing__count strong { color: var(--ink-900); }
.search-head { background: var(--surface-100); border-bottom: 1px solid var(--line-200); padding: 40px 0 36px; }
.search-head .search-form { margin-top: 22px; }

/* --- Siatka i karty ----------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.card {
  background: #fff; border: 1px solid var(--line-200); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); overflow: hidden;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); border-color: var(--brand-100); }
.card__link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.card__media {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10;
  background: var(--surface-100); overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.card:hover .card__media img { transform: scale(1.045); }
.card__media--placeholder { display: flex; align-items: center; justify-content: center; background: var(--brand-50); }
.card__media--placeholder svg { width: 46px; height: 46px; stroke: var(--brand); fill: none; opacity: .45; }
.card__cat {
  position: absolute; left: 12px; top: 12px; z-index: 2; padding: 5px 11px;
  background: rgba(255,255,255,.94); color: var(--brand-700);
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border-radius: var(--radius-pill); box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card__title {
  display: block; font-size: 1.1875rem; line-height: 1.32; font-weight: 700;
  color: var(--ink-900); margin-bottom: 10px; text-wrap: balance;
  transition: color var(--dur) var(--ease);
}
.card:hover .card__title { color: var(--brand-700); }
.card__excerpt { display: block; font-size: .9375rem; line-height: 1.55; color: var(--ink-600); flex: 1; margin-bottom: 18px; }
.card__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  color: var(--ink-500); font-size: .8125rem;
  border-top: 1px solid var(--line-200); padding-top: 14px;
}
.card__time { display: inline-flex; align-items: center; gap: 7px; }
.card__time svg { width: 15px; height: 15px; }

/* --- „Załaduj więcej" --------------------------------------------------- */
.more { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 44px; }
.more__bar { width: 100%; max-width: 280px; height: 4px; background: var(--line-200); border-radius: 2px; overflow: hidden; }
.more__bar span { display: block; height: 100%; background: var(--brand); border-radius: 2px; transition: width var(--dur-slow) var(--ease); }
.more__prev { font-size: .875rem; color: var(--ink-500); }
.more.is-loading .btn { opacity: .6; pointer-events: none; }

/* --- Pusty stan --------------------------------------------------------- */
.empty { text-align: center; padding: 70px 20px; color: var(--ink-500); }
.empty svg { width: 52px; height: 52px; stroke: var(--line-300); fill: none; margin: 0 auto 18px; }
.empty p { margin: 4px 0; }
.empty strong { color: var(--ink-700); }

/* --- Okruszki ----------------------------------------------------------- */
.breadcrumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px; font-size: .8125rem; color: var(--ink-500);
}
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before {
  content: ""; width: 5px; height: 5px; flex: none;
  border-top: 1.5px solid var(--ink-500); border-right: 1.5px solid var(--ink-500);
  transform: rotate(45deg); opacity: .7;
}
.breadcrumbs a { color: var(--ink-500); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs [aria-current="page"] { color: var(--ink-700); font-weight: 600; }

/* --- Nagłówek kategorii ------------------------------------------------- */
.cat-head { background: var(--surface-100); border-bottom: 1px solid var(--line-200); padding: 34px 0 40px; }
.cat-head .breadcrumbs { margin-bottom: 22px; }
.cat-head__title { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.cat-head__icon {
  flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--brand-50);
  display: flex; align-items: center; justify-content: center; color: var(--brand);
}
.cat-head h1 { font-size: clamp(1.875rem, 1.4rem + 1.6vw, 2.5rem); line-height: 1.1; font-weight: 800; letter-spacing: -.01em; }
.cat-head__desc { font-size: 1.125rem; line-height: 1.6; color: var(--ink-600); max-width: 620px; }
.cat-head__facts {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin-top: 20px; list-style: none; font-size: .875rem; color: var(--ink-500);
}
.cat-head__facts li { display: inline-flex; align-items: center; gap: 7px; }
.cat-head__facts svg { width: 16px; height: 16px; stroke: var(--brand); }
.cat-head__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-300); }

/* --- Wybór kategorii (przyklejony dropdown pod nagłówkiem) -------------- */
.cat-picker-nav {
  background: #fff; border-bottom: 1px solid var(--line-200);
  position: sticky; top: var(--header-h); z-index: 30;
}
.cat-picker { position: relative; }
.cat-picker__toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0; cursor: pointer; list-style: none;
  font-size: .9375rem; font-weight: 700; color: var(--ink-900);
}
.cat-picker__toggle::-webkit-details-marker { display: none; }
.cat-picker__current { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.cat-picker__current .cat-picker__icon { color: var(--brand); }
.cat-picker__icon { flex: none; display: inline-flex; align-items: center; color: var(--ink-500); }
.cat-picker__chevron {
  flex: none; width: 20px; height: 20px; color: var(--ink-500);
  transition: transform var(--dur) var(--ease);
}
.cat-picker[open] .cat-picker__chevron { transform: rotate(180deg); }
.cat-picker__menu {
  position: absolute; left: 0; top: calc(100% + 4px); z-index: 40;
  min-width: 260px; max-width: 340px; width: max-content;
  background: #fff; border: 1px solid var(--line-200); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift); padding: 6px; max-height: 72vh; overflow-y: auto;
  animation: dd-in var(--dur) var(--ease);
}
.cat-picker__item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); font-size: .9375rem; font-weight: 600; color: var(--ink-700);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.cat-picker__item:hover { background: var(--surface-100); color: var(--ink-900); }
.cat-picker__item.is-active { background: var(--brand-50); color: var(--brand-700); }
.cat-picker__item .cat-picker__icon { color: var(--brand); }
.cat-picker__icon--all { color: var(--ink-500); }
.cat-picker__item .cat-picker__icon svg { width: 20px; height: 20px; }
.cat-picker__name { flex: 1; min-width: 0; }
.cat-picker__count {
  flex: none; font-size: .8125rem; font-weight: 700; color: var(--ink-500);
  background: var(--surface-100); border-radius: var(--radius-pill); padding: 2px 9px;
}
.cat-picker__item.is-active .cat-picker__count { background: #fff; color: var(--brand-700); }

/* --- Nagłówek artykułu -------------------------------------------------- */
.article-head { background: var(--surface-100); border-bottom: 1px solid var(--line-200); }
.article-head__inner { max-width: 860px; margin: 0 auto; padding: 34px var(--gutter) 38px; }
.article-hero__cat {
  display: inline-block; padding: 5px 12px; margin-bottom: 18px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; border-radius: var(--radius-pill);
}
.article-hero__cat:hover { background: var(--brand-600); color: #fff; }
.article-head h1 {
  font-size: clamp(1.85rem, 1.3rem + 2.1vw, 2.5rem);
  font-weight: 800; line-height: 1.14; letter-spacing: -.01em; margin-bottom: 18px;
}
.article-hero__lead { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); line-height: 1.6; color: var(--ink-600); margin-bottom: 26px; }
.article-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.article-hero__author { display: flex; align-items: center; gap: 12px; }
.article-hero__author img {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: center top;
  border: 2px solid #fff; box-shadow: var(--shadow-card); flex: none;
}
.article-hero__author-name { font-size: .9375rem; font-weight: 700; color: var(--ink-900); line-height: 1.3; }
.article-hero__author-role { font-size: .8125rem; color: var(--ink-500); line-height: 1.3; }
.article-hero__sep { width: 1px; height: 34px; background: var(--line-300); }
.article-hero__facts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .875rem; color: var(--ink-500); }
.article-hero__facts span { display: inline-flex; align-items: center; gap: 7px; }
.article-hero__facts svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* --- Okładka artykułu --------------------------------------------------- */
.article-cover { max-width: var(--content); margin: 32px auto 0; padding: 0 var(--gutter); }
.article-cover__frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card-hover); background: var(--surface-100);
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

/* --- Układ treści + sidebar -------------------------------------------- */
.article-layout {
  max-width: var(--content); margin: 0 auto;
  padding: 44px var(--gutter) 24px; display: flex; gap: 48px; align-items: flex-start;
}
.article-layout__main { flex: 1 1 auto; min-width: 0; max-width: var(--measure); }
.article-layout__aside {
  flex: none; width: 280px; position: sticky; top: calc(var(--header-h) + 24px);
  display: flex; flex-direction: column; gap: 20px;
}

.toc { background: #fff; border: 1px solid var(--line-200); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 22px 24px; }
.toc__title { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 16px; }
.toc ul { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.toc li a {
  display: block; padding: 7px 0 7px 14px; font-size: .9375rem; line-height: 1.4;
  color: var(--ink-700); border-left: 2px solid var(--line-200);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}
.toc li a:hover { color: var(--brand-700); border-left-color: var(--brand-100); padding-left: 18px; }
.toc li a.is-active { color: var(--brand-700); font-weight: 700; border-left-color: var(--brand); }
.toc--sub a { padding-left: 28px !important; font-size: .875rem; }
.toc--sub a:hover, .toc--sub a.is-active { padding-left: 32px !important; }

.aside-cta { background: var(--brand); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 24px; color: #fff; }
.aside-cta__title { font-size: 1.125rem; font-weight: 800; line-height: 1.25; color: #fff; margin-bottom: 8px; }
.aside-cta p { font-size: .875rem; line-height: 1.55; color: rgba(255,255,255,.92); margin-bottom: 18px; }

.toc-mobile { display: none; max-width: var(--content); margin: 24px auto 0; padding: 0 var(--gutter); }
.toc-mobile__box { border: 1px solid var(--line-200); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-card); }
.toc-mobile summary {
  cursor: pointer; list-style: none; padding: 15px 18px; font-weight: 700;
  font-size: .9375rem; color: var(--ink-900); display: flex; align-items: center; justify-content: space-between;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after {
  content: ""; width: 8px; height: 8px; flex: none;
  border-bottom: 2px solid var(--ink-500); border-right: 2px solid var(--ink-500);
  transform: rotate(45deg) translateY(-2px); transition: transform var(--dur) var(--ease);
}
.toc-mobile[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.toc-mobile ul { list-style: none; padding: 0 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.toc-mobile li a { font-size: .9375rem; color: var(--ink-700); }

/* --- Treść artykułu (prose) -------------------------------------------- */
.prose { font-size: 1.125rem; line-height: 1.72; color: var(--ink-700); }
.prose > p { margin: 0 0 20px; }
.prose h2 { margin: 44px 0 16px; font-size: 1.625rem; line-height: 1.25; font-weight: 700; color: var(--ink-900); scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h3 { margin: 30px 0 12px; font-size: 1.25rem; line-height: 1.3; font-weight: 700; color: var(--ink-900); scroll-margin-top: calc(var(--header-h) + 24px); }
.prose a {
  font-weight: 600; text-decoration: underline; text-decoration-color: var(--brand-100);
  text-underline-offset: 3px; text-decoration-thickness: 2px;
  transition: text-decoration-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.prose a:hover { text-decoration-color: var(--brand); }
.prose strong { color: var(--ink-900); font-weight: 700; }
.prose em { font-style: italic; }

.prose ul { margin: 0 0 22px; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.prose ul li { position: relative; padding-left: 34px; font-size: 1.0625rem; line-height: 1.6; }
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px;
  border-radius: 50%; background-color: var(--brand-50);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236EA93E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.prose ol { margin: 0 0 22px; list-style: none; counter-reset: li; display: flex; flex-direction: column; gap: 12px; }
.prose ol li { position: relative; padding-left: 38px; font-size: 1.0625rem; line-height: 1.6; counter-increment: li; }
.prose ol li::before {
  content: counter(li); position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: .8125rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.prose li > ul, .prose li > ol { margin-top: 12px; margin-bottom: 0; }

.prose blockquote {
  margin: 26px 0; padding: 18px 24px; border-left: 4px solid var(--brand);
  background: var(--brand-50); border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1.0625rem; color: var(--ink-700);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.table-scroll {
  overflow-x: auto; margin: 0 0 26px; border-radius: var(--radius-md);
  border: 1px solid var(--line-200); box-shadow: var(--shadow-card); -webkit-overflow-scrolling: touch;
}
.prose table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: .9375rem; background: #fff; }
.prose thead th {
  background: var(--brand-50); color: var(--ink-900); font-weight: 700; text-align: left;
  padding: 13px 16px; border-bottom: 2px solid var(--brand-100); white-space: nowrap;
}
.prose tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line-200); color: var(--ink-700); vertical-align: top; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) { background: var(--surface-050); }

.prose img { border-radius: var(--radius-md); margin: 26px 0; box-shadow: var(--shadow-card); }
.prose hr { border: 0; border-top: 1px solid var(--line-200); margin: 36px 0; }
.prose code { background: var(--surface-100); padding: 2px 6px; border-radius: var(--radius-sm); font-size: .9em; color: var(--ink-900); }

.expert-note {
  margin: 34px 0; padding: 24px 26px; background: var(--brand-50);
  border: 1px solid var(--brand-100); border-left: 4px solid var(--brand); border-radius: var(--radius-md);
}
.expert-note h2 { margin: 0 0 12px !important; font-size: 1.25rem !important; display: flex; align-items: center; gap: 10px; }
.expert-note h2::before {
  content: ""; width: 22px; height: 22px; flex: none; background-color: var(--brand); border-radius: 50%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpolyline points='9 12 11 14 15 10'/%3E%3C/svg%3E") center / 22px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpolyline points='9 12 11 14 15 10'/%3E%3C/svg%3E") center / 22px no-repeat;
}
.expert-note > p:last-child { margin-bottom: 0; }

/* --- FAQ ---------------------------------------------------------------- */
.faq { margin-top: 52px; }
.faq > h2 { font-size: 1.625rem; font-weight: 700; scroll-margin-top: calc(var(--header-h) + 24px); }
.faq > h2::after { content: ""; display: block; width: 64px; height: 3px; background: var(--brand); border-radius: 2px; margin: 14px 0 22px; }
.faq__item {
  border: 1px solid var(--line-200); border-radius: var(--radius-md); background: #fff;
  margin-bottom: 12px; overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.faq__item[open] { border-color: var(--brand-100); box-shadow: var(--shadow-card); }
.faq__q {
  cursor: pointer; list-style: none; padding: 18px 22px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  font-weight: 700; font-size: 1.0625rem; color: var(--ink-900); line-height: 1.45;
  transition: background var(--dur) var(--ease);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { background: var(--brand-50); }
.faq__icon { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--brand); transition: transform var(--dur) var(--ease); }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__a { padding: 0 22px 20px; color: var(--ink-700); font-size: 1rem; line-height: 1.7; }

/* --- Box autora --------------------------------------------------------- */
.author-section { background: #fff; }
.author-section__inner { max-width: var(--content); margin: 0 auto; padding: 8px var(--gutter) 8px; }
.author-section .author-box { max-width: 840px; }
.author-box {
  display: flex; flex-wrap: wrap; gap: 28px; margin-top: 40px;
  background: var(--surface-100); border: 1px solid var(--line-200);
  border-radius: var(--radius-lg); padding: 32px 34px;
}
.author-box__photo { flex: none; }
.author-box__photo img {
  width: 128px; height: 128px; border-radius: var(--radius-md);
  object-fit: cover; object-position: center top; box-shadow: var(--shadow-card);
}
.author-box--noimg .author-box__photo { display: none; }
.author-box__content { flex: 1 1 360px; min-width: 240px; }
.author-box__label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
.author-box__name { font-size: 1.4375rem; font-weight: 800; display: inline; margin-right: 12px; }
.author-box__verified {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  font-size: 13px; font-weight: 700; color: var(--brand-700);
  background: var(--brand-50); padding: 3px 10px; border-radius: var(--radius-pill);
}
.author-box__verified svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.author-box__title { font-size: .9375rem; font-weight: 600; color: var(--ink-600); margin: 6px 0 14px; }
.author-box__bio { font-size: 1rem; line-height: 1.65; color: var(--ink-700); margin-bottom: 14px; }
.author-box__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.author-box__knf {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-600);
  border: 1px solid var(--line-300); background: #fff; border-radius: var(--radius-sm); padding: 7px 12px;
}
.author-box__knf svg { width: 15px; height: 15px; stroke: var(--brand); fill: none; stroke-width: 2; flex: none; }
.author-box__knf strong { color: var(--ink-900); }
.author-box__contact { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--brand); }
.author-box__contact svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* --- Udostępnianie ------------------------------------------------------ */
.share { display: flex; align-items: center; gap: 14px; margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--line-200); }
.share__label { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-500); }
.share__btns { display: flex; gap: 9px; }
.share__btn {
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-300); background: #fff; color: var(--ink-600);
  display: flex; align-items: center; justify-content: center; transition: all var(--dur) var(--ease);
}
.share__btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px); }
.share__btn svg { width: 19px; height: 19px; }
.share__btn.is-copied { background: var(--brand); border-color: var(--brand); color: #fff; }

/* --- CTA (wspólna sekcja) ---------------------------------------------- */
.cta { background: #fff; padding: 24px 0 72px; }
.cta__box {
  position: relative; overflow: hidden; background: var(--brand);
  border-radius: var(--radius-lg); padding: 52px 48px;
  display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between;
}
.cta__blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); pointer-events: none; }
.cta__blob--a { right: -40px; top: -40px; width: 220px; height: 220px; }
.cta__blob--b { right: 120px; bottom: -70px; width: 180px; height: 180px; background: rgba(255,255,255,.07); }
.cta__text { flex: 1 1 440px; min-width: 280px; position: relative; }
.cta__text h2 { margin: 0 0 12px; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); line-height: 1.2; font-weight: 800; color: #fff; }
.cta__text p { font-size: 1.125rem; line-height: 1.55; color: rgba(255,255,255,.92); max-width: 560px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; position: relative; }

/* --- Powiązane ---------------------------------------------------------- */
.related { background: var(--surface-050); border-top: 1px solid var(--line-200); margin-top: 56px; }
.related__inner { max-width: var(--content); margin: 0 auto; padding: 56px var(--gutter); }
.related h2 { font-size: 1.625rem; font-weight: 700; }
.related h2::after { content: ""; display: block; width: 64px; height: 3px; background: var(--brand); border-radius: 2px; margin: 14px 0 30px; }

/* --- Blok SEO/LLM ------------------------------------------------------- */
.home-seo { background: #fff; border-top: 1px solid var(--line-200); padding: 56px 0 64px; }
.home-seo__inner { max-width: 900px; }
.home-seo h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 18px; }
.home-seo p { margin-bottom: 16px; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-700); }
.home-seo strong { color: var(--ink-900); }

/* --- Stopka ------------------------------------------------------------- */
.site-footer { background: var(--surface-100); border-top: 1px solid var(--line-200); }
.site-footer__grid {
  max-width: var(--container); margin: 0 auto; padding: 56px var(--gutter) 28px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 36px 24px;
}
.footer-brand { min-width: 220px; }
.footer-logo { display: inline-block; margin-bottom: 16px; }
.footer-logo img { height: 34px; width: auto; }
.footer-logo-text { font-size: 1.25rem; font-weight: 800; color: var(--ink-900); }
.footer-brand p { font-size: .875rem; line-height: 1.6; color: var(--ink-600); max-width: 280px; }
.footer-col { display: flex; flex-direction: column; }
.footer-col h4 { font-size: .875rem; font-weight: 700; color: var(--ink-900); margin-bottom: 14px; }
.footer-col a { font-size: .875rem; color: var(--ink-600); padding: 5px 0; }
.footer-col a:hover { color: var(--brand); }
/* ⚠️ Selektor MUSI być co najmniej tak szczegółowy jak `.footer-col a` — inaczej
   to tamta reguła narzuca `padding: 5px 0` i numer telefonu dotyka obrysu pigułki. */
.footer-col .footer-phone {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 4px;
  padding: 10px 18px; border: 1px solid var(--line-300); border-radius: var(--radius-pill);
  background: #fff; color: var(--ink-900) !important; font-weight: 700; font-size: .9375rem;
  align-self: flex-start;
  /* Bez tych trzech reguł pigułka kurczyła się poniżej swojej treści (113px przy
     potrzebnych ~168px) i numer telefonu wychodził poza obrys. */
  width: fit-content; max-width: 100%; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.footer-col .footer-phone:hover { background: var(--brand-50); border-color: var(--brand); }
.footer-col .footer-phone svg { flex: none; width: 17px; height: 17px; stroke: var(--brand); fill: none; stroke-width: 2; }
.site-footer__bottom {
  max-width: var(--container); margin: 0 auto; padding: 22px var(--gutter) 28px;
  border-top: 1px solid var(--line-300); display: flex; flex-wrap: wrap;
  gap: 12px 24px; justify-content: space-between; align-items: center;
  font-size: .8125rem; color: var(--ink-500);
}
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Blok przynależności do grupy CTU — nad dolnym paskiem stopki. */
.footer-group {
  max-width: var(--container); margin: 0 auto; padding: 20px var(--gutter);
  border-top: 1px solid var(--line-300);
  display: flex; align-items: center; gap: 16px;
}
.footer-group__logo { flex: none; display: inline-flex; }
.footer-group__logo img { width: 46px; height: 46px; display: block; }
.footer-group__logo-text {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%; background: var(--brand);
  color: #fff; font-weight: 800; font-size: .875rem; letter-spacing: .02em;
}
.footer-group__text { font-size: .8125rem; line-height: 1.55; color: var(--ink-600); }
.footer-group__text strong { color: var(--ink-900); font-weight: 700; }

/* --- Animacja wejścia --------------------------------------------------- */
/* Treść widoczna DOMYŚLNIE — ukrywamy do animacji dopiero, gdy JS działa
   (klasa .js z head.php). Bez tego przy braku JS karty zostałyby niewidoczne. */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* --- RWD ---------------------------------------------------------------- */
@media (max-width: 1179px) {
  /* Nagłówek przechodzi w „burger" wcześniej niż reszta layoutu — pięć nazw
     kategorii + ikona + CTA nie mieszczą się w jednym wierszu poniżej ~1180px. */
  .header-menu-btn { display: flex; }
  .site-header__inner { gap: 12px; }
  .site-header__search { display: none; }
  .site-header__nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0; background: #fff;
    border-top: 1px solid var(--line-200); border-bottom: 1px solid var(--line-200);
    padding: 6px var(--gutter) 16px; box-shadow: var(--shadow-lift);
  }
  .site-header__nav.is-open { display: flex; animation: dd-in var(--dur) var(--ease); }
  .site-header__nav .site-header__nav-extra { display: block; }
  .site-header__nav .site-header__nav-cta { display: inline-flex; margin-top: 16px; }
  .site-header__nav a { padding: 13px 4px; font-size: 1rem; border-bottom: 1px solid var(--line-200); }
  .site-header__nav a::after { display: none; }
  .site-header__nav a.btn { border-bottom: 0; padding: 12px 22px; }
  .site-header__right { gap: 10px; margin-left: auto; }
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (max-width: 1023px) {
  .featured__grid { grid-template-columns: 1fr; }
  .article-layout { gap: 34px; }
  .article-layout__aside { width: 250px; }
}

@media (max-width: 879px) {
  :root { --gutter: 18px; --header-h: 67px; }
  .site-header__inner { padding: 11px var(--gutter); }
  .site-header__badge { display: none; }

  .hero__inner { padding: 42px var(--gutter) 56px; gap: 40px; }
  .hero__media { margin-bottom: 12px; }
  .hero__card { left: 8px; bottom: -16px; }
  .cats, .featured, .listing { padding: 44px 0; }

  .article-layout { flex-direction: column; padding-top: 32px; }
  .article-layout__main { max-width: 100%; }
  .article-layout__aside { position: static; width: 100%; }
  .toc { display: none; }
  .toc-mobile { display: block; }

  .prose { font-size: 1.0625rem; }
  .prose h2 { font-size: 1.4375rem; margin-top: 36px; }
  .prose h3 { font-size: 1.1875rem; }

  .author-box { padding: 24px; gap: 20px; }
  .author-box__photo img { width: 88px; height: 88px; }
  .cta { padding: 16px 0 56px; }
  .cta__box { padding: 32px 24px; }
  .cta__actions { width: 100%; }
  .cta__actions .btn { width: 100%; }
  .related__inner { padding: 44px var(--gutter); }
  .feat-big__body { padding: 24px 22px; }
  .feat-big__body h3 { font-size: 1.3125rem; }
  .search-form .btn { width: 100%; }
}

@media (max-width: 479px) {
  .article-hero__sep { display: none; }
  .share { flex-direction: column; align-items: flex-start; gap: 12px; }
  .feat-small { flex-direction: column; }
  .feat-small__media { width: 100%; aspect-ratio: 16 / 10; }
}

/* --- Druk --------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .toc, .toc-mobile, .share, .cta, .aside-cta,
  .related, .read-progress, .skip-link, .more, .cat-picker-nav { display: none !important; }
  body { color: #000; font-size: 11pt; }
  .article-layout { display: block; padding: 0; }
  .article-layout__main { max-width: 100%; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
  .faq__item { break-inside: avoid; }
}
