/* =============================================================================
   PysznieCo.pl - BLOG (frontend). Dopelnienie style.css: naglowek bloga,
   siatka wpisow, typografia artykulu. Korzysta ze zmiennych z style.css.
   ========================================================================== */

.shell--narrow { width: min(760px, 100% - 2 * var(--s5)); margin-inline: auto; }

/* -------------------------------------------------------------- naglowek */
.bloghero {
  padding: var(--s7) 0 var(--s6);
  background:
    radial-gradient(1200px 400px at 15% -10%, var(--leaf-soft), transparent 65%),
    var(--leaf-wash);
  border-bottom: 1px solid var(--line);
}
.bloghero__kicker {
  margin: var(--s3) 0 var(--s2); font-family: var(--font-hand);
  font-size: 1.35rem; color: var(--leaf-dark);
}
.bloghero h1 { max-width: 24ch; }
.bloghero__lead {
  max-width: 62ch; margin: var(--s3) 0 var(--s5);
  font-size: 1.075rem; color: var(--ink-2);
}

.blogsearch { display: flex; gap: var(--s2); max-width: 520px; }
.blogsearch input {
  flex: 1; padding: 12px var(--s4); border: 1px solid var(--line-strong);
  border-radius: var(--r-pill); background: var(--paper); font: inherit; color: var(--ink);
}
.blogsearch input:focus-visible { outline: 2px solid var(--leaf); outline-offset: 1px; }
.blogsearch button {
  padding: 12px var(--s5); border: 0; border-radius: var(--r-pill);
  background: var(--leaf-dark); color: var(--paper); font-weight: 700;
}
.blogsearch button:hover { background: var(--leaf-deeper); }

.blogcats { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.blogcat {
  --cat: var(--leaf-dark);
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--paper);
  color: var(--ink-2); font-size: 0.9rem; font-weight: 600;
  transition: transform 0.18s var(--e-out), border-color 0.18s, color 0.18s;
}
.blogcat:hover { transform: translateY(-2px); border-color: var(--cat); color: var(--cat); }
.blogcat.is-active { background: var(--cat); border-color: var(--cat); color: #fff; }
.blogcat small { opacity: 0.7; font-size: 0.78rem; }

.blogmeta-line { margin: 0 0 var(--s5); color: var(--ink-3); font-size: 0.92rem; }

/* ------------------------------------------------------------ siatka wpisow */
.bloggrid {
  display: grid; gap: var(--s5);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.bpost {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  transition: transform 0.22s var(--e-out), box-shadow 0.22s var(--e-out);
}
.bpost:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.bpost--wide { grid-column: 1 / -1; flex-direction: row; }
.bpost--wide .bpost__media { flex: 0 0 46%; }
.bpost--wide .bpost__body { padding: var(--s6); justify-content: center; }
.bpost--wide .bpost__title { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); }

.bpost__media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--cream); }
.bpost--wide .bpost__media { aspect-ratio: auto; min-height: 280px; }
.bpost__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bpost__flag {
  position: absolute; top: var(--s3); left: var(--s3);
  padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--amber); color: oklch(0.28 0.06 70);
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.02em;
}

.bpost__body { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4) var(--s5) var(--s5); }
.bpost__cat {
  --cat: var(--leaf-dark);
  align-self: start; padding: 4px 11px; border-radius: var(--r-pill);
  background: color-mix(in oklch, var(--cat) 14%, white);
  color: var(--cat); font-size: 0.76rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.bpost__title { font-size: 1.2rem; line-height: 1.25; }
.bpost__title a { color: inherit; }
.bpost__title a:hover { color: var(--leaf-dark); }
.bpost__excerpt { margin: 0; color: var(--ink-2); font-size: 0.94rem; }
.bpost__meta {
  display: flex; flex-wrap: wrap; gap: var(--s3); margin: auto 0 0;
  padding-top: var(--s3); border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: 0.82rem;
}

.blogtags { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); }
.blogtags h2 { font-size: 1.2rem; margin-bottom: var(--s3); }
.blogtags .chip.is-active { background: var(--leaf); color: #fff; border-color: var(--leaf); }

/* ------------------------------------------------------------- pojedynczy wpis */
.post__head { padding: var(--s6) 0 var(--s4); }
.post__head h1 { margin-top: var(--s3); }
.post__lead { margin: var(--s4) 0 0; font-size: 1.12rem; color: var(--ink-2); }
.post__by { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s5); }
.post__by img { border-radius: 50%; object-fit: cover; }
.post__by b { display: block; font-size: 0.95rem; }
.post__by span { color: var(--ink-3); font-size: 0.84rem; }

.post__hero { margin: var(--s4) auto var(--s6); }
.post__hero img {
  width: 100%; max-height: 560px; object-fit: cover;
  border-radius: var(--r-xl); box-shadow: var(--sh-md);
}

.post__content { font-size: 1.06rem; line-height: 1.78; color: var(--ink); }
.post__content > *:first-child { margin-top: 0; }
.post__content h2 { margin: var(--s6) 0 var(--s3); font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem); }
.post__content h3 { margin: var(--s5) 0 var(--s2); font-size: 1.25rem; }
.post__content p { margin: 0 0 var(--s4); }
.post__content ul, .post__content ol { margin: 0 0 var(--s4); padding-left: var(--s5); list-style: revert; }
.post__content li { margin-bottom: var(--s2); }
.post__content a { color: var(--leaf-dark); text-decoration: underline; text-underline-offset: 3px; }
.post__content img { max-width: 100%; height: auto; border-radius: var(--r-lg); }
.post__content figure { margin: var(--s5) 0; }
.post__content figcaption { margin-top: var(--s2); color: var(--ink-3); font-size: 0.86rem; text-align: center; }
.post__content blockquote {
  margin: var(--s5) 0; padding: var(--s4) var(--s5);
  border-left: 4px solid var(--leaf); border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--leaf-wash); color: var(--ink-2); font-size: 1.08rem;
}
.post__content blockquote p:last-child { margin: 0; }
.post__content pre {
  overflow-x: auto; padding: var(--s4); border-radius: var(--r-md);
  background: oklch(0.24 0.02 150); color: oklch(0.94 0.02 145); font-size: 0.9rem;
}
.post__content table { width: 100%; border-collapse: collapse; margin: var(--s5) 0; font-size: 0.95rem; }
.post__content th, .post__content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.post__content th { background: var(--leaf-wash); }
.post__content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--r-lg); }
.post__content hr { margin: var(--s6) 0; border: 0; border-top: 1px solid var(--line); }

.post__tags { margin: var(--s6) 0 var(--s4); }
.post__share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s7); }
.post__share span { color: var(--ink-3); font-size: 0.9rem; }
.post__share a {
  padding: 7px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); color: var(--ink-2); font-size: 0.86rem; font-weight: 600;
}
.post__share a:hover { border-color: var(--leaf); color: var(--leaf-dark); }

@media (max-width: 860px) {
  .bpost--wide { flex-direction: column; }
  .bpost--wide .bpost__media { min-height: 0; aspect-ratio: 16 / 10; }
  .bpost--wide .bpost__body { padding: var(--s4); }
  .bloghero { padding: var(--s6) 0 var(--s5); }
}
