/*
 * Blog (Poradnik): listing, single post, related posts, content pages, search results,
 * 404 and comments. Tokens only (--nz-*, --wp--preset-*), mobile first, breakpoint 1000px.
 * The post card itself is .nz-card in theme.css; the pagination and breadcrumb styles
 * come from shop.css (same classes as the shop).
 */

/* ---------- Card additions (blog lists and the homepage guide) ---------- */
/* One column no wider than the card, and a title that may break a long word: with larger text
   (200%, WCAG 1.4.4) a 2rem title word would otherwise push the card past a phone screen. */
.nz-card { grid-template-columns: minmax(0, 1fr); }
.nz-card__title { overflow-wrap: anywhere; }
.nz-card--post .nz-link { justify-self: start; }
.nz-card__meta { margin: -2px 0 0; font-size: 0.9375rem; color: var(--nz-text-2); }

/* The search button keeps its own width inside the inline form (theme.css stretches buttons below 1000px).
   The field may shrink below its intrinsic width (about 20 characters), so field and button fit a
   320px viewport (400% zoom) instead of pushing the page sideways (WCAG 1.4.10). */
.nz-search .nz-search__submit { width: auto; flex: none; }
.nz-search .nz-search__input { min-width: 0; }

/* ---------- Listing: posts page, category, tag, date, search ---------- */
.nz-blog { padding-block: 20px var(--nz-section); }
.nz-blog__header { max-width: 72ch; margin-bottom: 32px; }
.nz-blog__header .nz-eyebrow { margin-bottom: 14px; }
.nz-blog__title { margin: 0; font-size: var(--wp--preset--font-size--heading-2); line-height: 1; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.nz-blog__intro { margin-top: 16px; font-size: var(--wp--preset--font-size--lead); color: var(--nz-text-2); }
.nz-blog__intro > :last-child { margin-bottom: 0; }
.nz-blog__count { margin: 14px 0 0; color: var(--nz-text-2); }

/* Category filters: one scrollable row of links; the active one carries aria-current. */
.nz-blog-filters { display: flex; gap: 28px; margin: 0 0 40px; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; white-space: nowrap; border-bottom: 1px solid var(--nz-line); }
.nz-blog-filters::-webkit-scrollbar { display: none; }
.nz-blog-filters li { flex: none; }
.nz-blog-filters a { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: -1px; padding: 0 0 2px; border-bottom: 2px solid transparent; font-size: 1.0625rem; font-weight: 500; color: var(--nz-muted); }
.nz-blog-filters a:hover { color: var(--nz-text); }
.nz-blog-filters a[aria-current] { font-weight: 700; color: var(--nz-text); border-bottom-color: var(--nz-text); }
.nz-blog-filters a:focus-visible { outline-offset: -2px; }

.nz-blog__grid { margin-top: 8px; }
.nz-blog .nz-pagination { margin-top: 56px; }

/* Empty state */
.nz-blog__empty { max-width: 640px; padding-block: 24px; }
.nz-blog__empty-title { margin-bottom: 12px; font-size: var(--wp--preset--font-size--heading-3); line-height: 1.05; }
.nz-blog__empty-text { color: var(--nz-text-2); }
.nz-blog__empty-link { margin: 0; }

/* ---------- Section head shared by related posts (same look as the homepage heads) ---------- */
.nz-blog-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 32px; padding-bottom: 28px; margin-bottom: 40px; border-bottom: 1px solid var(--nz-line); }
.nz-blog-head__title { margin: 0; font-size: var(--wp--preset--font-size--heading-2); line-height: 1; letter-spacing: -0.01em; }
.nz-blog-head .nz-eyebrow { margin-bottom: 14px; }
.nz-blog-head .nz-link { white-space: nowrap; }
@media (min-width: 1000px) {
  .nz-blog-head { padding-bottom: clamp(16px, 2.5svh, 28px); margin-bottom: clamp(24px, 4svh, 40px); }
}

/* ---------- Single post ---------- */
.nz-post { padding-block: 20px var(--nz-section); }
.nz-post__inner { max-width: 880px; margin-inline: auto; }
.nz-post__header { max-width: 760px; margin: 28px auto 36px; text-align: center; }
.nz-post__header .nz-eyebrow { margin-bottom: 18px; }
.nz-post__header .nz-eyebrow a:hover { color: var(--nz-accent); }
/* Category link in the eyebrow: the hit area grows to 44px around the text, the line does not move. */
.nz-post__header .nz-eyebrow a { position: relative; display: inline-block; }
.nz-post__header .nz-eyebrow a::before { content: ""; position: absolute; inset: -11px 0; }
.nz-post__title { margin: 0 0 20px; font-size: var(--wp--preset--font-size--heading-1); line-height: 0.98; letter-spacing: -0.01em; text-wrap: balance; overflow-wrap: anywhere; }
.nz-post__title--long { font-size: var(--wp--preset--font-size--heading-2); line-height: 1; }
.nz-post__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin: 0; font-size: 0.9375rem; color: var(--nz-text-2); }
.nz-post__meta-sep { color: var(--nz-muted); }
.nz-post__hero { margin: 0 0 40px; }
.nz-post__hero-media { aspect-ratio: 16 / 9; max-height: max(320px, 100svh - 200px); overflow: hidden; border-radius: var(--nz-radius); background: var(--wp--preset--color--card); }
.nz-post__hero-img { width: 100%; height: 100%; object-fit: cover; }
/* Not a wide picture: shown whole at its own proportions (centred), not cropped to 16:9. */
.nz-post__hero--natural .nz-post__hero-media { width: fit-content; max-width: 100%; max-height: none; margin-inline: auto; aspect-ratio: auto; background: transparent; }
.nz-post__hero--natural .nz-post__hero-img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(620px, 100svh - 220px); object-fit: contain; }
.nz-post__hero--natural .nz-post__hero-caption { text-align: center; }
.nz-post__hero-caption { margin-top: 10px; font-size: 0.9375rem; line-height: 1.5; color: var(--nz-text-2); }
.nz-post__content { margin-inline: auto; }
.nz-post__pages { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--nz-line); font-size: 1rem; }
.nz-post__pages a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid var(--nz-line-linen); border-radius: var(--nz-radius); font-weight: 600; }
.nz-post__pages a:hover { border-color: var(--nz-text); }
@media (min-width: 1000px) {
  /* A wider column (was 880px) with a slightly larger text, so the line length stays comfortable. */
  .nz-post__inner { max-width: 1040px; }
  .nz-post__content { font-size: 1.25rem; }
  .nz-post__header { margin: 40px auto 48px; }
  .nz-post__hero { margin-bottom: 56px; }
}

/* Quiz CTA after the content */
.nz-post-cta { max-width: 72ch; margin: 56px auto 0; padding: 32px 24px; background: var(--nz-bg-light); border: 1px solid var(--nz-line); border-radius: var(--nz-radius); }
.nz-post-cta .nz-eyebrow { margin-bottom: 12px; }
.nz-post-cta__title { margin: 0 0 10px; font-size: var(--wp--preset--font-size--heading-3); line-height: 1.05; }
.nz-post-cta__text { max-width: 36em; margin: 0 0 24px; color: var(--nz-text-2); }
.nz-post-cta__actions { display: flex; flex-direction: column; align-items: stretch; gap: 18px; text-align: center; }
.nz-post-cta__actions .nz-link { align-self: center; }
@media (min-width: 1000px) {
  .nz-post-cta { padding: 40px 44px; }
  .nz-post-cta__actions { flex-direction: row; align-items: center; gap: 16px 32px; text-align: left; }
  .nz-post-cta__actions .nz-link { align-self: auto; }
}

/* Related posts */
.nz-related { background: var(--nz-bg-light); }

/* ---------- Content pages ---------- */
.nz-page { padding-block: 20px var(--nz-section); }
.nz-page__header { margin: 24px 0 32px; }
.nz-page__title { margin: 0; font-size: var(--wp--preset--font-size--heading-2); line-height: 1; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.nz-page__hero { max-width: 72ch; margin: 0 0 40px; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--nz-radius); background: var(--wp--preset--color--card); }
.nz-page__hero-img { width: 100%; height: 100%; object-fit: cover; }
.nz-page__content--wide { max-width: none; }
.nz-page--wide .nz-page__header { margin-bottom: 28px; }
@media (min-width: 1000px) {
  .nz-page__header { margin: 32px 0 40px; }
}

/* ---------- Search results ---------- */
.nz-search-results__form { margin: 28px 0 14px; }
.nz-search-results__shop { margin: 0; font-size: 1rem; color: var(--nz-text-2); }
.nz-search-results__shop .nz-link { font-size: inherit; padding-bottom: 2px; }
.nz-search-results__section { margin-top: 16px; }
.nz-search-results__section + .nz-search-results__section { margin-top: 72px; }
.nz-search-results__heading { margin: 0 0 32px; padding-bottom: 16px; border-bottom: 1px solid var(--nz-line); font-size: var(--wp--preset--font-size--heading-3); line-height: 1.05; }
.nz-search-list { max-width: 72ch; margin: 0; padding: 0; list-style: none; }
.nz-search-list__item { padding: 20px 0; border-bottom: 1px solid var(--nz-line); }
.nz-search-list__item:first-child { padding-top: 0; }
.nz-search-list__title { margin: 0 0 6px; font-size: 1.75rem; line-height: 1.1; }
.nz-search-list__title a { display: inline-block; padding-block: 4px; }
.nz-search-list__excerpt { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--nz-text-2); }

/* ---------- 404 ---------- */
.nz-not-found { padding-block: clamp(48px, 8vw, 96px) var(--nz-section); }
.nz-not-found__inner { max-width: 72ch; }
.nz-not-found__title { margin: 0 0 16px; font-size: var(--wp--preset--font-size--heading-2); line-height: 1; letter-spacing: -0.01em; }
.nz-not-found__text { max-width: 40em; margin: 0 0 28px; color: var(--nz-text-2); }
.nz-not-found__links { display: grid; gap: 12px; margin: 0 0 32px; padding: 0; list-style: none; }
.nz-not-found__links li { display: grid; }
@media (min-width: 1000px) {
  .nz-not-found__links { display: flex; flex-wrap: wrap; }
  .nz-not-found__links li { display: block; }
}

/* ---------- Comments ---------- */
.nz-comments { max-width: 72ch; margin: 64px auto 0; padding-top: 40px; border-top: 1px solid var(--nz-line); }
.nz-comments__title, .nz-comments__form-title { margin: 0 0 24px; font-size: var(--wp--preset--font-size--heading-3); line-height: 1.05; }
.nz-comments__list, .nz-comments__list .children { margin: 0 0 32px; padding: 0; list-style: none; }
.nz-comments__list .children { margin: 16px 0 0 24px; }
.nz-comments__list .comment { padding: 20px 0; border-top: 1px solid var(--nz-line); }
.nz-comments__list .comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 10px; font-size: 0.9375rem; color: var(--nz-text-2); }
.nz-comments__list .avatar { border-radius: var(--nz-radius); }
.nz-comments__list .fn { font-style: normal; font-weight: 700; color: var(--nz-text); }
.nz-comments__list .comment-content p:last-child { margin-bottom: 0; }
.nz-comments__list .reply { margin-top: 8px; font-size: 0.9375rem; font-weight: 700; }
/* Date permalink and reply link: the hit area grows to 44px around the text, the layout does not move. */
.nz-comments__list :is(.comment-metadata, .reply) a { position: relative; display: inline-block; }
.nz-comments__list :is(.comment-metadata, .reply) a::before { content: ""; position: absolute; inset: -10px 0; }
.nz-comments__form p { margin: 0 0 16px; }
.nz-comments__form label { display: block; margin-bottom: 6px; font-size: 0.9375rem; font-weight: 600; }
.nz-comments__form input[type="text"], .nz-comments__form input[type="email"], .nz-comments__form input[type="url"], .nz-comments__form textarea { width: 100%; min-height: 50px; padding: 10px 14px; border: 1px solid var(--nz-text); border-radius: var(--nz-radius); background: var(--nz-bg-light); font: inherit; color: var(--nz-text); }
.nz-comments__form textarea { min-height: 160px; }
.nz-comments__form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9375rem; }
.nz-comments__form .comment-form-cookies-consent label { margin: 0; padding-block: 10px; font-weight: 400; }
.nz-comments__form .comment-form-cookies-consent input { width: 20px; height: 20px; margin-top: 13px; flex: none; accent-color: var(--nz-accent); }
.nz-comments__closed { color: var(--nz-text-2); }
