/* =========================================================================
   Blog — lista wpisów, archiwa i pojedynczy wpis.
   Zbudowane wyłącznie na tokenach motywu (--brand, --graphite, --paper …),
   spójne z nagłówkiem sklepu (.shop-hero) i kartami porad (.post-card).
   Style kart są tu samodzielne, bo na listingu bloga nie renderuje się blok
   porad, który normalnie dostarcza .post / .blog-three.
   ========================================================================= */

main.blog {
  padding-top: 40px;
  padding-bottom: 88px;
}

/* Węższa kolumna czytelności dla treści wpisu. */
.wrap--reading {
  max-width: 800px;
}

/* --- Okruszki ---------------------------------------------------------- */
.blog-breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.blog-breadcrumb a {
  color: var(--steel);
  transition: color 0.2s var(--ease);
}
.blog-breadcrumb a:hover {
  color: var(--brand);
}
.blog-breadcrumb .sep {
  margin: 0 0.5rem;
  color: #c8c6c0;
}

/* --- Nagłówek listingu ------------------------------------------------- */
.blog-hero {
  padding-bottom: 2.4rem;
  margin-bottom: 2.4rem;
  border-bottom: 1px solid var(--line);
}
.blog-hero__row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}
.blog-title {
  position: relative;
  padding-left: 0.9em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--graphite);
}
.blog-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.14em;
  width: 0.42em;
  height: 0.42em;
  border-radius: 999px;
  background: var(--brand);
}
.blog-count {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}
.blog-count span {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--graphite);
}
.blog-hero__desc {
  margin-top: 1rem;
  max-width: 62ch;
  color: var(--steel);
  line-height: 1.65;
}

/* --- Karty wpisów (samodzielne, zgodne z .post-card z porad) ----------- */
.blog-feed {
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: clamp(2rem, 3vw, 3rem);
}
.blog-layout__main {
  min-width: 0;
}
.blog-layout__main .blog-three {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.blog-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}
/* Karty są linkami (a.post); zawężamy selektory, żeby domyślna klasa `post`
   z post_class() na <article> pojedynczego wpisu nie dziedziczyła efektu karty. */
a.post {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}
a.post:hover {
  border-color: #d9c4c1;
}
.post-img {
  position: relative;
  overflow: hidden;
  background: var(--paper);
}
.post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
a.post:hover .post-img img {
  transform: scale(1.06);
}
.post-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 0.42rem 0.85rem;
  background: var(--white);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  box-shadow: var(--shadow-s);
}
.post-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.5rem;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.post-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line);
}
a.post h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.18;
  color: var(--graphite);
}
a.post p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--muted);
}
.post-read {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
  color: var(--brand);
  font-weight: 800;
  font-size: 0.9rem;
  transition: gap 0.25s var(--ease);
}
.post-read svg {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}
a.post:hover .post-read {
  gap: 0.75rem;
}
.post-card {
  min-height: 100%;
}
.post-card .post-img {
  aspect-ratio: 16 / 10;
}
.post-card .post-body {
  flex: 1;
  padding: 1.35rem;
}
.post-card h3 {
  font-size: 1.16rem;
}
.post-card p {
  font-size: 0.9rem;
}
.post-card .post-read {
  margin-top: auto;
  padding-top: 0.1rem;
}
.post-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--paper), #e8e7e4);
  font: 800 1rem var(--font-display);
  text-transform: uppercase;
  color: var(--muted);
}

/* --- Wyróżniony lead --------------------------------------------------- */
.post-feature {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}
.post-feature:hover {
  border-color: #d9c4c1;
}
.post-feature__media {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  background: var(--paper);
}
.post-feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.post-feature:hover .post-feature__media img {
  transform: scale(1.05);
}
.post-feature__body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: clamp(1.75rem, 3vw, 2.75rem);
}
.post-feature__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.post-feature__eyebrow::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-radius: 999px;
  background: var(--brand);
}
.post-feature__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--graphite);
}
.post-feature__excerpt {
  margin: 0;
  color: var(--steel);
  font-size: 1rem;
  line-height: 1.65;
}
.post-feature .post-meta {
  margin-top: auto;
}
.post-feature .post-read {
  font-size: 0.95rem;
}
.post-feature:hover .post-read {
  gap: 0.75rem;
}

/* --- Sidebar kategorii ------------------------------------------------ */
.blog-sidebar {
  position: sticky;
  top: 24px;
}
.blog-sidebar__panel {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}
.blog-sidebar__title {
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
  color: var(--graphite);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.blog-categories {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.blog-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-s);
  color: var(--steel);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  transition:
    background 0.18s var(--ease),
    color 0.18s var(--ease);
}
.blog-category:hover,
.blog-category:focus-visible {
  background: var(--brand-tint);
  color: var(--brand);
}
.blog-category.is-current {
  background: var(--brand);
  color: var(--white);
}
.blog-category__count {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding-inline: 0.4rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}
.blog-category.is-current .blog-category__count {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

/* --- Paginacja --------------------------------------------------------- */
.blog-pagination {
  margin-top: 3rem;
}
.blog-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.blog-pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.65rem;
  border-radius: var(--radius-s);
  color: var(--steel);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  transition:
    background 0.18s var(--ease),
    color 0.18s var(--ease),
    border-color 0.18s var(--ease),
    transform 0.15s var(--ease);
}
.blog-pagination a.page-numbers:not(.prev):not(.next):hover {
  background: var(--brand-tint);
  color: var(--brand);
}
.blog-pagination .page-numbers.current {
  background: var(--brand);
  color: var(--white);
}
.blog-pagination .page-numbers.dots {
  min-width: 24px;
  color: var(--muted);
}
.blog-pagination a.prev,
.blog-pagination a.next {
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--steel);
}
.blog-pagination a.prev:hover,
.blog-pagination a.next:hover {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
}
.blog-pagination a.page-numbers:active {
  transform: scale(0.96);
}
.blog-pagination .page-numbers svg {
  width: 20px;
  height: 20px;
}

/* --- Pusty stan -------------------------------------------------------- */
.blog-empty {
  max-width: 520px;
  margin: 2rem auto;
  padding: 3.5rem 2rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--white);
}
.blog-empty__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.2rem;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand);
}
.blog-empty__icon svg {
  width: 30px;
  height: 30px;
}
.blog-empty h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--graphite);
}
.blog-empty p {
  margin: 0 0 1.6rem;
  color: var(--muted);
}

/* =========================================================================
   Pojedynczy wpis
   ========================================================================= */
main.single {
  padding-bottom: 96px;
}
.single-hero {
  padding-top: 40px;
  padding-bottom: 2.4rem;
}
.single-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.1rem;
  padding: 0.42rem 0.9rem;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background 0.2s var(--ease);
}
.single-kicker:hover {
  background: #efdcd9;
}
.single-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.15rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--graphite);
}
.single-lead {
  margin: 1.1rem 0 0;
  max-width: 62ch;
  color: var(--steel);
  font-size: 1.15rem;
  line-height: 1.6;
}
.single-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}
.single-meta__author {
  color: var(--graphite);
  font-weight: 700;
}
.single-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c8c6c0;
}

/* --- Okładka ----------------------------------------------------------- */
.single-cover {
  margin: 0 0 3rem;
}
.single-cover .wrap {
  padding-inline: 24px;
}
.single-cover img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  border-radius: var(--radius-l);
}

/* --- Treść (prose) ----------------------------------------------------- */
.post-prose {
  color: var(--ink);
  font-size: 1.075rem;
  line-height: 1.8;
}
.post-prose > * + * {
  margin-top: 1.4rem;
}
.post-prose h2,
.post-prose h3,
.post-prose h4 {
  font-family: var(--font-display);
  color: var(--graphite);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.post-prose h2 {
  margin-top: 2.6rem;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 800;
}
.post-prose h3 {
  margin-top: 2.2rem;
  font-size: 1.35rem;
  font-weight: 700;
}
.post-prose h4 {
  margin-top: 1.8rem;
  font-size: 1.12rem;
  font-weight: 700;
}
.post-prose p {
  margin-top: 1.4rem;
}
.post-prose a:not(.btn) {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}
.post-prose a:not(.btn):hover {
  color: var(--brand-dark);
}
.post-prose ul,
.post-prose ol {
  margin-top: 1.4rem;
  padding-left: 1.4rem;
}
.post-prose li {
  margin-top: 0.55rem;
  line-height: 1.7;
}
.post-prose ul li {
  list-style: none;
  position: relative;
  padding-left: 0.4rem;
}
.post-prose ul li::before {
  content: "";
  position: absolute;
  left: -0.9rem;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand);
}
.post-prose ol {
  list-style: decimal;
}
.post-prose ol li::marker {
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 800;
}
.post-prose blockquote {
  margin: 2rem 0;
  padding: 0.4rem 0 0.4rem 1.6rem;
  border-left: 3px solid var(--brand);
  color: var(--graphite);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.post-prose blockquote p {
  margin: 0;
}
.post-prose blockquote cite {
  display: block;
  margin-top: 0.8rem;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 600;
}
.post-prose img,
.post-prose .wp-block-image img {
  border-radius: var(--radius-m);
}
.post-prose figure {
  margin: 2rem 0;
}
.post-prose figcaption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
.post-prose :is(code, kbd) {
  padding: 0.15em 0.4em;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.9em;
}
.post-prose pre {
  margin: 2rem 0;
  padding: 1.3rem 1.5rem;
  background: var(--graphite);
  color: #f4f4f3;
  border-radius: var(--radius-m);
  overflow: auto;
  line-height: 1.6;
}
.post-prose pre code {
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
}
.post-prose hr {
  margin: 2.6rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.post-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.96rem;
}
.post-prose th,
.post-prose td {
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  text-align: left;
}
.post-prose th {
  background: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--graphite);
}
.single-pagelinks {
  margin-top: 2rem;
  display: flex;
  gap: 0.4rem;
  font-weight: 700;
}
.single-pagelinks a,
.single-pagelinks > span {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--steel);
}
.single-pagelinks a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* --- Stopka wpisu: tagi + udostępnianie -------------------------------- */
.single-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.single-tag {
  padding: 0.42rem 0.85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 600;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.single-tag:hover {
  background: var(--brand-tint);
  border-color: #e4cdca;
  color: var(--brand);
}
.single-share {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.single-share__label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.single-share__btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--steel);
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.15s var(--ease);
}
.single-share__btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  transform: translateY(-2px);
}
.single-share__btn svg {
  width: 18px;
  height: 18px;
}

/* --- Nawigacja prev / next --------------------------------------------- */
.single-nav {
  margin-top: 3rem;
}
.single-nav__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.single-nav__link {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.single-nav__link:hover {
  border-color: #d9c4c1;
  box-shadow: var(--shadow-s);
  transform: translateY(-3px);
}
.single-nav__link--next {
  text-align: right;
}
.single-nav__dir {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.single-nav__link--next .single-nav__dir {
  justify-content: flex-end;
}
.single-nav__dir svg {
  width: 16px;
  height: 16px;
}
.single-nav__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.25;
  color: var(--graphite);
}

/* --- Powiązane --------------------------------------------------------- */
.single-related {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

/* =========================================================================
   Responsywność
   ========================================================================= */
@media (max-width: 1060px) {
  .blog-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 1.5rem;
  }
  .blog-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 880px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    position: static;
    grid-row: 1;
  }
  .blog-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .post-feature {
    grid-template-columns: 1fr;
  }
  .post-feature__media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}
@media (max-width: 680px) {
  .blog-categories {
    grid-template-columns: 1fr;
  }
  .blog-three,
  .blog-layout__main .blog-three {
    grid-template-columns: 1fr;
  }
  .single-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .single-nav__grid {
    grid-template-columns: 1fr;
  }
  .single-nav__link--next {
    text-align: left;
  }
  .single-nav__link--next .single-nav__dir {
    justify-content: flex-start;
  }
}
@media (max-width: 480px) {
  .single-cover .wrap {
    padding-inline: 18px;
  }
  .single-cover img {
    border-radius: var(--radius-m);
  }
}
