/* =====================================================================
   Blog / Strefa Wiedzy — port mockupu Blog/mobile/* do motywu.
   1:1 z plikami mockupu, ALE tokeny przemapowane na kolorystykę strony
   (navy #1B3A6B + teal #0098B5). Wszystko scope'owane pod .blog-x,
   żeby nie kolidować z resztą motywu. Nagłówek/stopkę daje motyw.
   ===================================================================== */

.blog-x {
  /* Marka = navy (z palety strony) */
  --brand:        #1B3A6B;
  --brand-deep:   #122850;
  --brand-soft:   #4a6a99;
  --brand-tint:   #e8edf5;
  --brand-tint-2: #d4e0ee;
  /* Akcent = teal (z palety strony) */
  --accent:       #0098B5;
  --accent-soft:  #e0f4f8;
  /* Neutralne / tekst (z palety strony) */
  --ink:          #1E2A3A;
  --ink-2:        #5A6978;
  --muted:        #7A8A99;
  --line:         #e3eaee;
  --surface:      #ffffff;
  --surface-2:    #f7fafb;
  /* Box bezpieczeństwa — semantyczny, zostaje ciepły */
  --warn-bg:      #fdf3ef;
  --warn-line:    #e9c4b6;
  --warn-ink:     #9a4422;
  /* Typografia (per mockup) */
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Skala / rytm */
  --radius: 14px; --radius-sm: 10px; --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(18,40,80,.05), 0 4px 14px rgba(18,40,80,.05);
  --shadow-md: 0 8px 30px rgba(18,40,80,.10);
  --maxw: 1180px; --read: 720px; --ease: cubic-bezier(.22,.61,.36,1);

  font-family: var(--sans); color: var(--ink); line-height: 1.6;
}
.blog-x *, .blog-x *::before, .blog-x *::after { box-sizing: border-box; }
.blog-x img { max-width: 100%; display: block; }
.blog-x a { color: inherit; text-decoration: none; }
.blog-x button { font: inherit; cursor: pointer; }
.blog-x h1, .blog-x h2, .blog-x h3, .blog-x h4 { font-family: var(--serif); line-height: 1.18; color: var(--brand-deep); margin: 0; font-weight: 600; }
.blog-x p { margin: 0; }
.blog-x .wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

/* ----------------------------- EYEBROW ------------------------------- */
.blog-x .eyebrow {
  font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand); display: inline-flex; align-items: center; gap: .55rem;
}
.blog-x .eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--brand); border-radius: 2px; }

/* ----------------------------- PRZYCISKI ----------------------------- */
.blog-x .btn {
  --bg: var(--brand); --fg: #fff;
  display: inline-flex; align-items: center; gap: .5rem; background: var(--bg); color: var(--fg);
  padding: .85rem 1.4rem; border: 1px solid transparent; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease); box-shadow: var(--shadow-sm);
}
.blog-x .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: var(--brand-deep); }
.blog-x .btn--ghost { --bg: transparent; --fg: var(--brand); border-color: var(--brand-tint-2); box-shadow: none; }
.blog-x .btn--ghost:hover { background: var(--brand-tint); border-color: var(--brand-soft); }
.blog-x .btn--light { --bg:#fff; --fg: var(--brand-deep); }
.blog-x .btn--light:hover { background:#fff; color: var(--brand); }
.blog-x .btn svg { width: 1.05em; height: 1.05em; }

/* ===================== BLOG — HERO / NAGŁÓWEK ======================== */
.blog-x .blog-hero { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.blog-x .blog-hero .wrap { padding-block: 56px 44px; max-width: 820px; }
.blog-x .blog-hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); margin: 1rem 0 .9rem; letter-spacing: -.01em; }
.blog-x .blog-hero h1 em { font-style: italic; color: var(--brand); }
.blog-x .blog-hero p { font-size: 1.12rem; color: var(--ink-2); max-width: 60ch; }

/* Filtry kategorii */
.blog-x .filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 26px; }
.blog-x .chip {
  font-family: var(--sans); font-size: .88rem; font-weight: 500; background: #fff; color: var(--ink-2);
  border: 1px solid var(--line); padding: .5rem 1rem; border-radius: 999px; transition: all .18s var(--ease);
}
.blog-x .chip:hover { border-color: var(--brand-soft); color: var(--brand-deep); }
.blog-x .chip[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ====================== POST GŁÓWNY (LEAD) ========================== */
.blog-x .lead-post { padding-block: 52px 0; }
.blog-x .lead-card {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm);
}
.blog-x .lead-card__media { position: relative; min-height: 340px; background: var(--brand-tint); }
.blog-x .lead-card__media img { width: 100%; height: 100%; object-fit: cover; }
.blog-x .lead-card__body { padding: 40px; display: flex; flex-direction: column; }
.blog-x .lead-card__body .post-cat { margin-bottom: 1rem; }
.blog-x .lead-card__body h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); margin-bottom: .8rem; }
.blog-x .lead-card__body h2 a:hover { color: var(--brand); }
.blog-x .lead-card__body .excerpt { color: var(--ink-2); font-size: 1.05rem; margin-bottom: auto; }
.blog-x .lead-card__body .post-meta { margin-top: 1.6rem; }

/* ====================== SIATKA WPISÓW =============================== */
.blog-x .posts-section { padding-block: 44px 0; }
.blog-x .posts-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 26px; }
.blog-x .posts-head h2 { font-size: 1.5rem; }
.blog-x .posts-head .count { font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.blog-x .post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-x .card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.blog-x .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-tint-2); }
.blog-x .card__media { aspect-ratio: 16 / 10; background: var(--brand-tint); overflow: hidden; }
.blog-x .card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.blog-x .card:hover .card__media img { transform: scale(1.04); }
.blog-x .card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.blog-x .card h3 { font-size: 1.18rem; margin: .9rem 0 .5rem; }
.blog-x .card h3 a:hover { color: var(--brand); }
.blog-x .card .excerpt { color: var(--ink-2); font-size: .96rem; margin-bottom: 1.2rem; }
.blog-x .card .post-meta { margin-top: auto; }

/* Pigułka kategorii */
.blog-x .post-cat {
  display: inline-flex; align-items: center; gap: .4rem; font-family: var(--sans); font-size: .76rem;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: .32rem .7rem; border-radius: 999px;
}
.blog-x .post-cat--blue { color: var(--brand); background: var(--brand-tint); }

/* Meta: autor + czas + data */
.blog-x .post-meta { display: flex; align-items: center; gap: .7rem; font-family: var(--sans); font-size: .85rem; color: var(--muted); }
.blog-x .post-meta .avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(140deg, var(--brand-soft), var(--accent)); display: grid; place-items: center;
  color: #fff; font-weight: 600; font-size: .82rem;
}
.blog-x .post-meta .by { color: var(--ink-2); font-weight: 600; }
.blog-x .post-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

/* Paginacja (WP the_posts_pagination -> .page-numbers) */
.blog-x .pagination { display: flex; gap: .4rem; justify-content: center; align-items: center; margin-top: 48px; }
.blog-x .pagination .nav-links { display: flex; gap: .4rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.blog-x .pagination .page-numbers {
  min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 .7rem;
  border: 1px solid var(--line); border-radius: 10px; font-family: var(--sans); font-size: .92rem; color: var(--ink-2);
}
.blog-x .pagination a.page-numbers:hover { border-color: var(--brand-soft); color: var(--brand-deep); }
.blog-x .pagination .page-numbers.current { background: var(--brand); color: #fff; border-color: var(--brand); }
.blog-x .pagination .page-numbers.dots { border: none; }

/* ===================== PASEK CTA „umów wizytę" ====================== */
.blog-x .cta-band { margin-top: 64px; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; }
.blog-x .cta-band .wrap { padding-block: 54px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.blog-x .cta-band h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .5rem; }
.blog-x .cta-band p { color: #d6e8f0; max-width: 46ch; }
.blog-x .cta-band .actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ============================ SINGLE POST =========================== */
.blog-x .read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--accent), var(--brand)); z-index: 150; transition: width .08s linear; }

.blog-x .breadcrumb { font-family: var(--sans); font-size: .85rem; color: var(--muted); padding-block: 22px 0; }
.blog-x .breadcrumb .wrap { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.blog-x .breadcrumb a:hover { color: var(--brand); }
.blog-x .breadcrumb .sep { opacity: .5; }

.blog-x .article-head { padding-block: 18px 0; }
.blog-x .article-head .wrap { max-width: var(--read); }
.blog-x .article-head .post-cat { margin-bottom: 1.1rem; }
.blog-x .article-head h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); letter-spacing: -.01em; margin-bottom: 1rem; }
.blog-x .article-head .dek { font-size: 1.2rem; color: var(--ink-2); line-height: 1.55; }

.blog-x .byline { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.blog-x .byline .avatar { width: 50px; height: 50px; border-radius: 50%; flex: 0 0 auto; background: linear-gradient(140deg, var(--brand-soft), var(--accent)); display: grid; place-items: center; color: #fff; font-weight: 600; font-family: var(--sans); }
.blog-x .byline .who { font-family: var(--sans); line-height: 1.35; }
.blog-x .byline .who b { color: var(--ink); font-weight: 600; }
.blog-x .byline .who small { display: block; color: var(--muted); font-size: .85rem; }
.blog-x .byline .meta-pills { display: flex; gap: .5rem; margin-left: auto; flex-wrap: wrap; font-family: var(--sans); font-size: .82rem; color: var(--muted); }
.blog-x .byline .meta-pills span { display: inline-flex; align-items: center; gap: .35rem; background: var(--surface-2); border: 1px solid var(--line); padding: .35rem .7rem; border-radius: 999px; }
.blog-x .byline .meta-pills svg { width: 15px; height: 15px; color: var(--brand-soft); }

.blog-x .review-note { display: flex; align-items: center; gap: .55rem; margin-top: 16px; font-family: var(--sans); font-size: .86rem; color: var(--accent); background: var(--accent-soft); border: 1px solid #cfe7ee; border-radius: 10px; padding: .6rem .9rem; }
.blog-x .review-note svg { width: 17px; height: 17px; flex: 0 0 auto; }
.blog-x .review-note a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.blog-x .article-hero { padding-block: 30px 0; }
.blog-x .article-hero .wrap { max-width: 980px; }
.blog-x .article-hero figure { margin: 0; }
.blog-x .article-hero img, .blog-x .ph--hero { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 21/9; object-fit: cover; box-shadow: var(--shadow-sm); }
.blog-x .article-hero figcaption { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin-top: .7rem; text-align: center; }

.blog-x .article-layout { padding-block: 40px 0; }
.blog-x .article-layout .wrap { display: grid; grid-template-columns: 230px minmax(0, var(--read)) 1fr; gap: 48px; align-items: start; max-width: 1180px; }
.blog-x .toc { position: sticky; top: 100px; font-family: var(--sans); }
.blog-x .toc__title { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; font-weight: 700; }
.blog-x .toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; border-left: 2px solid var(--line); }
.blog-x .toc a { display: block; padding: .42rem 0 .42rem 1rem; margin-left: -2px; font-size: .9rem; color: var(--muted); border-left: 2px solid transparent; transition: color .15s var(--ease), border-color .15s var(--ease); }
.blog-x .toc a:hover { color: var(--brand-deep); }
.blog-x .toc a.is-active { color: var(--brand-deep); border-left-color: var(--brand); font-weight: 600; }

/* .prose */
.blog-x .prose { font-family: var(--serif); color: var(--ink); font-size: 1.16rem; line-height: 1.78; }
.blog-x .prose > * + * { margin-top: 1.5rem; }
.blog-x .prose .lead { font-size: 1.3rem; color: var(--ink-2); line-height: 1.6; }
.blog-x .prose h2 { font-size: 1.7rem; margin-top: 3rem; scroll-margin-top: 100px; }
.blog-x .prose h2::before { content: ""; display: block; width: 40px; height: 3px; border-radius: 3px; background: var(--brand); margin-bottom: 1.1rem; }
.blog-x .prose h3 { font-size: 1.32rem; margin-top: 2.2rem; scroll-margin-top: 100px; color: var(--brand); }
.blog-x .prose a:not(.btn) { color: var(--brand); text-decoration: underline; text-decoration-color: var(--brand-tint-2); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.blog-x .prose a:not(.btn):hover { text-decoration-color: var(--brand); }
.blog-x .prose strong { color: var(--brand-deep); font-weight: 600; }
.blog-x .prose ul, .blog-x .prose ol { padding-left: 1.3rem; display: grid; gap: .6rem; }
.blog-x .prose li { padding-left: .3rem; }
.blog-x .prose ul li::marker { color: var(--brand-soft); }
.blog-x .prose ol li::marker { color: var(--brand); font-weight: 700; }
.blog-x .prose blockquote { margin: 2.4rem 0; padding: .4rem 0 .4rem 1.8rem; border-left: 4px solid var(--accent); font-size: 1.42rem; line-height: 1.5; color: var(--brand-deep); font-style: italic; }
.blog-x .prose blockquote cite { display: block; margin-top: .8rem; font-style: normal; font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.blog-x .prose figure { margin: 2.4rem 0; }
.blog-x .prose figure img { border-radius: var(--radius); }
.blog-x .prose figcaption { font-family: var(--sans); font-size: .85rem; color: var(--muted); margin-top: .6rem; }

/* callout / box informacyjny */
.blog-x .callout { font-family: var(--sans); font-size: 1rem; line-height: 1.6; border-radius: var(--radius); padding: 22px 24px; margin: 2.4rem 0; background: var(--brand-tint); border: 1px solid var(--brand-tint-2); color: var(--ink-2); }
.blog-x .callout__head { display: flex; align-items: center; gap: .55rem; line-height: 1.3; font-weight: 700; color: var(--brand-deep); margin-bottom: .5rem; }
/* wpautop wstrzykuje <br> po ikonie w treści the_content → rozbija flex na 2 linie. Neutralizujemy. */
.blog-x .callout__head br, .blog-x .safety__head br { display: none; }
.blog-x .callout__head svg { width: 20px; height: 20px; color: var(--brand); flex: 0 0 auto; display: block; }
.blog-x .callout p { font-family: var(--sans); }

/* box bezpieczeństwa */
.blog-x .safety { font-family: var(--sans); border-radius: var(--radius); padding: 22px 24px; margin: 2.4rem 0; background: var(--warn-bg); border: 1px solid var(--warn-line); }
.blog-x .safety__head { display: flex; align-items: center; gap: .55rem; line-height: 1.3; font-weight: 700; color: var(--warn-ink); margin-bottom: .4rem; }
.blog-x .safety__head svg { width: 20px; height: 20px; color: var(--warn-ink); flex: 0 0 auto; display: block; }
.blog-x .safety p { color: #7c4a36; font-size: .98rem; }
.blog-x .safety b { color: var(--warn-ink); }

/* stopka artykułu: tagi + udostępnianie */
.blog-x .article-foot { max-width: var(--read); margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.blog-x .tags { display: flex; gap: .5rem; flex-wrap: wrap; }
.blog-x .tag { font-family: var(--sans); font-size: .85rem; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: .4rem .85rem; border-radius: 999px; }
.blog-x .tag:hover { border-color: var(--brand-soft); color: var(--brand-deep); }
.blog-x .share { display: flex; gap: .5rem; align-items: center; margin-top: 22px; font-family: var(--sans); font-size: .88rem; color: var(--muted); }
.blog-x .share .sbtns { display: flex; gap: .45rem; }
.blog-x .share button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--brand-deep); display: grid; place-items: center; transition: all .15s var(--ease); }
.blog-x .share button:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.blog-x .share svg { width: 18px; height: 18px; }

/* karta autora (bio) */
.blog-x .author-card { max-width: var(--read); margin: 40px auto 0; display: flex; gap: 1.3rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.blog-x .author-card .avatar { width: 76px; height: 76px; border-radius: 50%; flex: 0 0 auto; background: linear-gradient(140deg, var(--brand-soft), var(--accent)); display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 1.3rem; font-family: var(--sans); }
.blog-x .author-card .eyebrow { font-size: .72rem; }
.blog-x .author-card h3 { font-size: 1.25rem; margin: .55rem 0 .3rem; }
.blog-x .author-card .role { font-family: var(--sans); font-size: .9rem; color: var(--accent); font-weight: 600; margin-bottom: .7rem; }
.blog-x .author-card p { font-family: var(--sans); font-size: .95rem; color: var(--ink-2); }
.blog-x .author-card .author-link { display: inline-flex; align-items: center; gap: .4rem; margin-top: .9rem; font-family: var(--sans); font-weight: 600; font-size: .9rem; color: var(--brand); }
.blog-x .author-card .author-link svg { width: 16px; height: 16px; }

/* disclaimer medyczny */
.blog-x .disclaimer { max-width: var(--read); margin: 28px auto 0; font-family: var(--sans); font-size: .85rem; color: var(--muted); line-height: 1.55; background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px 20px; }

/* powiązane artykuły */
.blog-x .related { padding-block: 64px 0; }
.blog-x .related .wrap { max-width: 1180px; }
.blog-x .related h2 { font-size: 1.6rem; margin: .4rem 0 26px; }

/* placeholdery zdjęć (gdy brak miniatury) */
.blog-x .ph { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, var(--brand-tint), var(--brand-tint-2)); }
.blog-x .ph svg { width: 46px; height: 46px; color: var(--brand); opacity: .35; }
.blog-x .ph--hero { aspect-ratio: 21/9; border-radius: var(--radius-lg); }

/* ============================ RESPONSYWNOŚĆ (treść bloga) ========== */
@media (max-width: 1080px) {
  .blog-x .article-layout .wrap { grid-template-columns: minmax(0, var(--read)); justify-content: center; }
  .blog-x .toc { display: none; }
  .blog-x .article-layout .wrap > [aria-hidden="true"]:empty { display: none; }
}
@media (max-width: 920px) {
  .blog-x .lead-card { grid-template-columns: 1fr; }
  .blog-x .lead-card__media { min-height: 240px; }
  .blog-x .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .blog-x .wrap { padding-inline: 18px; }
  .blog-x .post-grid { grid-template-columns: 1fr; }
  .blog-x .lead-card__body { padding: 28px; }
  .blog-x .prose { font-size: 1.08rem; }
  .blog-x .byline .meta-pills { margin-left: 0; width: 100%; }
  .blog-x .cta-band .wrap { flex-direction: column; align-items: flex-start; }
  .blog-x .author-card { flex-direction: column; }
  .blog-x .article-hero img, .blog-x .ph--hero { aspect-ratio: 16 / 10; }
  .blog-x .prose blockquote { font-size: 1.22rem; padding-left: 1.3rem; }
  .blog-x .prose h2 { font-size: 1.45rem; }
}

/* Zwijany spis treści — tylko tablet/telefon (gdy sticky TOC zniknął) */
.blog-x .toc-m { display: none; }
@media (max-width: 1080px) {
  .blog-x .toc-m { display: block; font-family: var(--sans); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 18px; margin-bottom: 2.2rem; }
  .blog-x .toc-m summary { cursor: pointer; list-style: none; font-weight: 600; color: var(--brand-deep); padding: 15px 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  .blog-x .toc-m summary::-webkit-details-marker { display: none; }
  .blog-x .toc-m summary::after { content: ""; width: 9px; height: 9px; flex: 0 0 auto; border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg); transition: transform .2s var(--ease); }
  .blog-x .toc-m[open] summary::after { transform: rotate(-135deg); }
  .blog-x .toc-m ol { list-style: none; margin: 0; padding: 0 0 14px; display: grid; gap: .1rem; counter-reset: t; }
  .blog-x .toc-m a { display: block; padding: .55rem 0; color: var(--ink-2); font-size: .95rem; font-family: var(--sans); }
  .blog-x .toc-m a::before { counter-increment: t; content: counter(t) ". "; color: var(--brand-soft); font-weight: 600; }
  .blog-x .toc-m a:hover { color: var(--brand); }
}
