/*
Theme Name: Pełna Spiżarnia
Theme URI: https://lepszenizdieta.pl
Author: Pełna Spiżarnia
Description: Co siedzi w owocach, warzywach, ziołach i bakaliach, jak je jeść i jak przechowywać
Version: 1.6.2
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: pelna-spizarnia
*/

/* ramka wstepu (BLUF) i box TL;DR */
.wpm-bluf, .tldr { border-left: 4px solid var(--wp--preset--color--primary); border-radius: 0 6px 6px 0; padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
.wpm-bluf > * { margin-left: 0 !important; margin-right: 0 !important; max-width: none; }
.wpm-bluf .wpm-bluf-label { margin: 0 0 0.5em; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.wpm-bluf p { line-height: 1.6; }
.wpm-bluf p:last-child, .wpm-bluf ul:last-child { margin-bottom: 0; }

/* portal kit: uklad klockow (kolory i fonty z theme.json) */
.wpm-header { border-bottom: 1px solid var(--wp--preset--color--surface); }
.wpm-masthead-kompaktowy { z-index: 20; }
.wpm-servicebar { padding-block: 0.4rem; }
.wpm-brand .wp-block-site-title { margin: 0; }
/* logo (znak albo znak z nazwa) zastepuje nazwe: site-title tylko dla czytnikow i SEO (wydawca 2026-10-08: przy rebrandingu sam znak, bez napisu) */
.wpm-brand:has(.wp-block-site-logo img) .wp-block-site-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wpm-kicker { margin-block: 1.5rem 1rem; }
.wpm-home-h1 { max-width: 22ch; }
.wpm-home-lead { max-width: 60ch; }
.wpm-trust { border-block: 1px solid var(--wp--preset--color--surface); padding-block: 0.6rem; margin-block: 1rem 2rem; }
.wpm-trust-masthead { border: 0; margin: 0; padding: 0; }
.wpm-trust-kafle > p { padding: 0.6rem 1rem; margin: 0; }
.wpm-section { margin-block: 2.5rem; }
.wpm-section-head { border-bottom: 2px solid var(--wp--preset--color--contrast); padding-bottom: 0.4rem; margin-bottom: 1rem; align-items: baseline; }
.wpm-section-title { margin: 0; }
.wpm-mini > .wp-block-column:first-child img { border-radius: 2px; }
.wpm-textrow { border-bottom: 1px solid var(--wp--preset--color--surface); padding-block: 0.5rem; }
.wpm-meta { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.wpm-meta .wp-block-avatar img { border-radius: 50%; }
.wpm-sidebar { position: sticky; top: 5.5rem; align-self: start; }
.wpm-aside-title { font-size: var(--wp--preset--font-size--large); border-bottom: 2px solid var(--wp--preset--color--contrast); padding-bottom: 0.3rem; margin-bottom: 0.8rem; }
.wpm-most-read .wp-block-post-template { counter-reset: wpm; list-style: none; padding: 0; }
.wpm-most-read .wp-block-post { counter-increment: wpm; display: grid; grid-template-columns: 2rem 1fr; gap: 0.5rem; padding-block: 0.5rem; border-bottom: 1px solid var(--wp--preset--color--surface); }
.wpm-most-read .wp-block-post::before { content: counter(wpm); font-family: var(--wp--preset--font-family--heading, inherit); font-size: var(--wp--preset--font-size--x-large); line-height: 1; color: var(--wp--preset--color--muted); }
.wpm-silos, .wpm-footer-silos { list-style: none; padding: 0; margin: 0; }
.wpm-silos li, .wpm-footer-silos li { padding-block: 0.25rem; }
.wpm-single-head { margin-block: 1rem 1.5rem; }
.wpm-kicker-cat { font-size: var(--wp--preset--font-size--small); }
.wpm-lead { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--muted); }
.wpm-breadcrumbs { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.wpm-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0 0 0.8rem; }
.wpm-breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--wp--preset--color--muted); }
.wpm-toc { border: 1px solid var(--wp--preset--color--surface); background: var(--wp--preset--color--surface); padding: 1rem 1.25rem; margin: 0 0 2rem; }
.wpm-toc ol { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.wpm-author-box { margin-block: 2.5rem; border-radius: 2px; }
.wpm-author-box .wp-block-avatar img { border-radius: 50%; }
.wpm-prevnext { border-top: 1px solid var(--wp--preset--color--surface); padding-top: 1rem; }
.wpm-hub-head { margin-block: 1.5rem; }
.wpm-hub-list .wp-block-post:nth-child(-n+3) .wp-block-post-title { font-size: var(--wp--preset--font-size--large); }
.wpm-footer-title { font-size: var(--wp--preset--font-size--medium); margin-bottom: 0.6rem; }
.wpm-footer .wp-block-navigation { font-size: var(--wp--preset--font-size--small); }
.wpm-copy { margin-top: 2rem; }
@media (max-width: 781px) { .wpm-sidebar { position: static; } .wpm-hero-small .wp-block-post-template { grid-template-columns: 1fr; } }

/* Pelna Spizarnia: polka */
:root { --ps-plank: 10px; --ps-lip: 3px; }
body { text-rendering: optimizeLegibility; }
h1, h2, h3, .wp-block-post-title { text-wrap: balance; }
p, li { text-wrap: pretty; }

a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
.wp-block-post-title a, .wpm-footer a, .wp-block-navigation a, .wp-block-site-title a { text-decoration: none; }
.wp-block-post-title a:hover, .wpm-footer a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
:where(a, button, input, .wp-element-button):focus-visible { outline: 3px solid var(--wp--preset--color--primary); outline-offset: 2px; border-radius: 2px; }

.wpm-masthead-kompaktowy { padding-block: 0.6rem; gap: 1.5rem; }
.wpm-header { border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--secondary) 25%, transparent); }
.wp-block-navigation .wp-block-navigation-item__content { padding-block: 0.25rem; }
.wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--primary); }
.wpm-masthead .wp-block-search__input { min-width: 11rem; border-color: color-mix(in srgb, var(--wp--preset--color--muted) 45%, transparent); }

.wpm-home-h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); line-height: 1.08; max-width: 18ch; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.6rem; }
.wpm-home-lead { color: var(--wp--preset--color--muted); }

/* deska polki pod hero i kazdym pasem: wpisy stoja na desce z listwa w kolorze kumkwatu */
.wpm-hero, .wpm-section, .wpm-hub-head { position: relative; padding-bottom: calc(var(--ps-plank) + var(--ps-lip) + 1.25rem); margin-bottom: 3rem; }
.wpm-hero::after, .wpm-section::after, .wpm-hub-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--ps-plank);
  background: var(--wp--preset--color--secondary);
  border-top: var(--ps-lip) solid var(--wp--preset--color--accent);
  border-radius: 1px;
}
.wpm-hero::before, .wpm-section::before, .wpm-hub-head::before {
  content: ""; position: absolute; left: 7%; right: 7%; bottom: -14px; height: 14px;
  border-left: 9px solid var(--wp--preset--color--secondary);
  border-right: 9px solid var(--wp--preset--color--secondary);
  pointer-events: none;
}
.wpm-section-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 1.1rem; }
.wpm-section-title { font-size: var(--wp--preset--font-size--xx-large); }
.wpm-section-more a { color: var(--wp--preset--color--muted); }
.wpm-section-more a:hover { color: var(--wp--preset--color--primary); }
.wpm-section .wp-block-post-template.is-layout-grid { align-items: end; }
.wpm-section .wp-block-post-featured-image img, .wpm-hero .wp-block-post-featured-image img { border-radius: 2px; }
.wpm-trust { border-block: 0; padding-block: 0; margin-block: 0.5rem 2.75rem; max-width: 70ch; }
.wpm-hero { margin-bottom: 2.25rem; }
.wpm-home .wp-block-buttons { margin-block: 0 0.75rem; }
.wpm-aside-title { border-bottom: 0; padding-bottom: 0.45rem; position: relative; }
.wpm-aside-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 3.5rem; height: 4px; background: var(--wp--preset--color--secondary); }
.wpm-most-read .wp-block-post::before { color: var(--wp--preset--color--secondary); }
.wpm-most-read .wp-block-post { border-bottom-color: color-mix(in srgb, var(--wp--preset--color--secondary) 18%, transparent); }
.wpm-meta { gap: 0.35rem 0.9rem; }

/* wpis */
.wpm-article { font-size: 1.0625rem; line-height: 1.68; }
.wpm-article > * { max-width: 68ch; }
.wpm-article h2 { margin-top: 2.4rem; font-size: var(--wp--preset--font-size--x-large); }
.wpm-article h3 { margin-top: 1.8rem; font-size: var(--wp--preset--font-size--large); }
.wpm-article blockquote, .wp-block-quote { border-left: 3px solid var(--wp--preset--color--secondary); padding: 0.2rem 0 0.2rem 1.25rem; margin-inline: 0; font-family: var(--wp--preset--font-family--literata); font-style: italic; font-size: var(--wp--preset--font-size--large); line-height: 1.45; }
.wp-block-quote cite { font-family: var(--wp--preset--font-family--public-sans); font-style: normal; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
figure.wp-block-image { margin-block: 2rem; }
figure.wp-block-image img { border-radius: 2px; }
figure figcaption, .wp-element-caption { margin-top: 0.5rem; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.wpm-article table { border-collapse: collapse; width: 100%; font-size: 0.95rem; display: block; overflow-x: auto; }
.wpm-article th, .wpm-article td { border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--secondary) 25%, transparent); padding: 0.5rem 0.75rem; text-align: left; }
.wpm-article th { font-weight: 600; }
.wpm-bluf { background: var(--wp--preset--color--surface); border-left-color: var(--wp--preset--color--secondary); }
.wpm-bluf .wpm-bluf-label { text-transform: none; letter-spacing: 0; opacity: 1; font-weight: 600; }
.wpm-toc { background: transparent; border: 1px solid color-mix(in srgb, var(--wp--preset--color--secondary) 30%, transparent); }
.wpm-author-box { background: var(--wp--preset--color--surface); padding: 1.25rem 1.5rem; }
.wpm-kicker-cat a { color: var(--wp--preset--color--secondary); font-weight: 600; text-decoration: none; }

/* stopka */
.wpm-footer { margin-top: 3rem; border-top: var(--ps-lip) solid var(--wp--preset--color--accent); }
.wp-site-blocks > footer { margin-block-start: 0; }
.wpm-ymyl { margin-top: 2rem; max-width: 70ch; color: var(--wp--preset--color--contrast); }

@media (max-width: 781px) {
  .wpm-masthead-kompaktowy { gap: 0.75rem; }
  .wpm-masthead .wp-block-search { display: none; }
  .wpm-hero::before, .wpm-section::before, .wpm-hub-head::before { left: 4%; right: 4%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
.wpm-hub-head .wpm-trust { margin-bottom: 0; }
.wpm-hub-h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.75rem); max-width: 24ch; }

/* QA 2026-10-29: niepelne siatki - 4 wpisy w siatce 3 kolumn jako 2x2, 2 wpisy jako 2 */
.wp-block-post-template.is-layout-grid:has(> li:nth-child(4):last-child),
.wp-block-post-template.is-layout-grid:has(> li:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 781px) { .wp-block-post-template.is-layout-grid:has(> li:nth-child(4):last-child), .wp-block-post-template.is-layout-grid:has(> li:nth-child(2):last-child) { grid-template-columns: 1fr; } }
/* O nas: redakcja w siatce, portrety nizsze */
.wpm-team, .entry-content .wpm-team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.wpm-team img { aspect-ratio: 4 / 5; max-height: 360px; width: 100%; object-fit: cover; }
@media (max-width: 781px) { .wpm-team, .entry-content .wpm-team { grid-template-columns: 1fr; } }
/* O nas: portrety redakcji mniejsze, nie na cala szerokosc */

.wpm-team { gap: 2rem 2.5rem; }
.wpm-person .wp-block-media-text__media img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.wpm-person .wp-block-media-text__content { padding: 0 0 0 1.25rem; }
.wpm-person h3 { margin-top: 0; font-size: var(--wp--preset--font-size--medium); }
@media (max-width: 781px) { .wpm-team { grid-template-columns: 1fr !important; } .wpm-person.is-stacked-on-mobile { grid-template-columns: 30% auto !important; } .wpm-person.is-stacked-on-mobile .wp-block-media-text__media { grid-column: 1; grid-row: 1; } .wpm-person.is-stacked-on-mobile .wp-block-media-text__content { grid-column: 2; grid-row: 1; padding: 0 0 0 1rem; } }
.wp-block-table { overflow-x: auto; }
