/*
Theme Name: Uważny Widz
Theme URI: https://passionart.org.pl
Author: Uważny Widz
Description: Jak słuchać, patrzeć i rozumieć: koncerty, sztuka, fotografia, architektura
Version: 1.3
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: uwazny-widz
*/

/* ramka wstepu (BLUF) i box TL;DR */
.wpm-bluf, .tldr { background: var(--wp--preset--color--surface); border-left: 3px solid var(--wp--preset--color--primary); border-radius: 0 2px 2px 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; font-weight: 600; color: var(--wp--preset--color--primary); }
.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: 1rem; 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; } }

/* Uwazny Widz: passe-partout (jedyna odwazna decyzja) */
:root { --uw-mat: var(--wp--preset--color--secondary); --uw-bevel: #C4CBC3; --uw-mat-pad: clamp(12px, 3.4vw, 44px); }
.wpm-hero-main .wp-block-post-featured-image,
.wpm-article > .wp-block-post-featured-image,
.wpm-section-duzy_plus_trzy .wp-block-column:first-child .wp-block-post-featured-image,
.wp-block-image.wpm-mat {
  background: var(--uw-mat);
  padding: var(--uw-mat-pad) var(--uw-mat-pad) calc(var(--uw-mat-pad) * 1.45);
  border-radius: 0;
  box-sizing: border-box;
}
.wpm-hero-main .wp-block-post-featured-image img,
.wpm-article > .wp-block-post-featured-image img,
.wpm-section-duzy_plus_trzy .wp-block-column:first-child .wp-block-post-featured-image img,
.wp-block-image.wpm-mat img {
  border: 3px solid var(--wp--preset--color--base);
  outline: 1px solid var(--uw-bevel);
  border-radius: 0;
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.wp-block-image.wpm-mat figcaption { margin: calc(var(--uw-mat-pad) * 0.5) 0 calc(var(--uw-mat-pad) * -0.6); font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); text-align: left; }
.wpm-hero-main .wp-block-post-title { margin-top: 1.25rem; }

/* typografia */
h1, h2, h3, .wp-block-post-title { text-wrap: balance; }
p, li { text-wrap: pretty; }
.wpm-home-h1, .wpm-hub-h1, .wpm-single-head .wp-block-post-title { font-size: clamp(2.3rem, 1.4rem + 3.4vw, 3.5rem); line-height: 1.06; letter-spacing: -0.015em; font-weight: 500; }
.wpm-home-h1 { max-width: 19ch; margin-bottom: 0.6rem; }
.wpm-home-lead { color: var(--wp--preset--color--muted); }
.wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.wp-block-post-title a:hover { color: var(--wp--preset--color--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }

/* linia dzialow w patynie */
.wpm-section-head, .wpm-aside-title { border-bottom: 1px solid var(--wp--preset--color--primary); }
.wpm-section-title { font-size: var(--wp--preset--font-size--xx-large); }
.wpm-section-more a, .wpm-meta a { text-decoration: none; }
.wpm-section-more a:hover, .wpm-meta a:hover { text-decoration: underline; }
.wpm-aside-title { font-family: var(--wp--preset--font-family--bodoni-moda); }
.wpm-section { margin-block: 3.25rem; }
.wpm-meta .wp-block-post-author-name::after { content: ","; }

/* tresc wpisu */
.wp-block-post-content a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.wp-block-post-content a:hover { color: var(--wp--preset--color--contrast); text-decoration-thickness: 2px; }
.wp-block-post-content blockquote, .wp-block-quote { border-left: 2px solid var(--wp--preset--color--primary); margin-inline: 0; padding: 0.2rem 0 0.2rem 1.4rem; font-family: var(--wp--preset--font-family--bodoni-moda); font-size: var(--wp--preset--font-size--large); line-height: 1.45; }
.wp-block-quote cite, .wp-block-quote .wp-block-quote__citation { display: block; margin-top: 0.6rem; font-family: var(--wp--preset--font-family--hanken-grotesk); font-size: var(--wp--preset--font-size--small); font-style: normal; color: var(--wp--preset--color--muted); }
.wp-block-post-content figure { margin-block: 2rem; }
.wp-block-post-content figcaption { text-align: left; border-left: 1px solid var(--uw-bevel); padding-left: 0.7rem; margin-top: 0.6rem; }
.wp-block-post-content table { border-collapse: collapse; width: 100%; font-size: var(--wp--preset--font-size--small); }
.wp-block-post-content th, .wp-block-post-content td { border-bottom: 1px solid var(--uw-bevel); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; }
.wp-block-post-content th { background: var(--wp--preset--color--surface); font-weight: 600; }
.wpm-toc { background: transparent; border: 0; border-top: 1px solid var(--wp--preset--color--primary); border-bottom: 1px solid var(--uw-bevel); padding: 0.9rem 0; }

/* naglowek: afisz sali */
.wpm-masthead-centralny .wpm-brandrow { padding-block: 0.6rem 0.4rem; }
.wpm-sections-bar { border-top: 1px solid var(--uw-bevel); padding-block: 0.35rem; }
.wpm-sections-bar .wp-block-navigation a { text-decoration: none; padding-block: 0.3rem; }
.wpm-sections-bar .wp-block-navigation a:hover, .wpm-sections-bar .current-menu-item > a { color: var(--wp--preset--color--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
.wpm-servicebar { color: var(--wp--preset--color--muted); }
.wpm-servicebar .wp-block-search { max-width: 240px; }
.wpm-404 { padding-block: 2rem 3rem; }

/* fokus i dostepnosc */
:where(a, button, input, select, textarea, summary, .wp-element-button):focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; border-radius: 1px; }
.wp-block-button__link { padding: 0.8rem 1.4rem; min-height: 48px; display: inline-flex; align-items: center; }
.wp-site-blocks > footer { margin-block-start: 0; }
.wpm-footer { border-top: 1px solid var(--uw-bevel); }

@media (max-width: 781px) {
  .wpm-servicebar .wp-block-search { max-width: 170px; }
  .wpm-section { margin-block: 2.25rem; }
}
@media (max-width: 600px) {
  :root { --uw-mat-pad: 12px; }
  .wpm-servicebar { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
