/*
Theme Name: Trening od Zera
Theme URI: https://fitness-platinum.pl
Author: Trening od Zera
Description: Poradnik dla ćwiczących amatorsko: od pierwszego treningu do własnego planu
Version: 1.4
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: trening-od-zera
*/

/* 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; font-family: var(--wp--preset--font-family--archivo); font-weight: 700; 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: 3px; }
.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: 3px; }
.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; } }

/* Trening od Zera: kafel maty puzzle (v1.3) */
:root { --tz-zab: 0.9rem; --tz-krok: 3rem; }
.tz-mata {
  position: relative;
  border-radius: 3px 3px 0 0;
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.75rem) calc(clamp(1.5rem, 4vw, 2.5rem) + var(--tz-zab));
  background-image: radial-gradient(color-mix(in srgb, var(--wp--preset--color--contrast) 7%, transparent) 1px, transparent 1.3px);
  background-size: 6px 6px;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tz-zab) + 1px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 14' preserveAspectRatio='none'%3E%3Cpath d='M14 0H34L39 14H9Z'/%3E%3C/svg%3E") left bottom / var(--tz-krok) var(--tz-zab) repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tz-zab) + 1px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 14' preserveAspectRatio='none'%3E%3Cpath d='M14 0H34L39 14H9Z'/%3E%3C/svg%3E") left bottom / var(--tz-krok) var(--tz-zab) repeat-x;
}
.tz-mata.wpm-kicker { margin-block: 1.5rem 2rem; }
.tz-mata .wpm-home-h1, .tz-mata h1 { margin-top: 0; max-width: 24ch; text-wrap: balance; font-size: clamp(2rem, 1.2rem + 3vw, 3.2rem); line-height: 1.06; letter-spacing: -0.02em; }
.tz-mata .wpm-home-lead, .tz-mata .wpm-hub-lead, .tz-mata p { max-width: 62ch; text-wrap: pretty; }
.tz-mata .wp-block-buttons { margin-top: 1.5rem; }
.tz-mata .wpm-trust { border-color: color-mix(in srgb, var(--wp--preset--color--contrast) 18%, transparent); margin-bottom: 0; }
.tz-mata-brak { margin-block: 2.5rem 3rem; }
.tz-mata-brak::after { content: ""; position: absolute; left: calc(var(--tz-krok) * 2); bottom: 0; width: var(--tz-krok); height: var(--tz-zab); background: var(--wp--preset--color--base); }
.tz-mata-brak .wp-block-search { max-width: 30rem; }
.wpm-home > .tz-mata { animation: tz-klik 0.5s cubic-bezier(.3,1.4,.6,1) both; }
@keyframes tz-klik { from { transform: translateY(-0.6rem); } to { transform: translateY(0); } }

.wpm-trust-linia { border-block-color: var(--wp--preset--color--secondary); }
.wpm-hero-main .wp-block-post-title { margin-top: 0.9rem; text-wrap: balance; }
.wpm-hero-main .wp-block-post-featured-image img, .wpm-section .wp-block-post-featured-image img, .wpm-hub-list .wp-block-post-featured-image img { border-radius: 3px; }
.wpm-section-title, .wpm-aside-title { text-wrap: balance; }
.wpm-most-read .wp-block-post::before { color: var(--wp--preset--color--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.wpm-masthead .wp-block-navigation a { text-decoration: none; padding-block: 0.2rem; border-bottom: 2px solid transparent; }
.wpm-masthead .wp-block-navigation a:hover, .wpm-masthead .wp-block-navigation .current-menu-item > a { border-bottom-color: var(--wp--preset--color--primary); }
.wpm-header { border-bottom: 3px solid var(--wp--preset--color--contrast); }

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

.wp-block-post-content p, .wp-block-post-content li { max-width: 68ch; text-wrap: pretty; }
.wp-block-post-content h2, .wp-block-post-content h3 { text-wrap: balance; margin-top: 2.2em; }
.wpm-bluf, .tldr { background: var(--wp--preset--color--secondary); border-left-width: 4px; }
.wpm-toc { background: var(--wp--preset--color--surface); border: 0; border-left: 3px solid var(--wp--preset--color--contrast); }
.wpm-toc a { text-decoration: none; }
.wpm-toc a:hover { text-decoration: underline; }
.wpm-author-box { border-top: 3px solid var(--wp--preset--color--primary); background: var(--wp--preset--color--surface); padding: 1.25rem 1.5rem; }
.wpm-kicker-cat a { font-family: var(--wp--preset--font-family--archivo); font-weight: 700; text-decoration: none; }
.wp-block-quote { border-left: 3px solid var(--wp--preset--color--primary); padding-left: 1.25rem; margin-inline: 0; font-style: italic; }
.wp-block-quote cite { font-style: normal; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.wp-block-image figcaption, figure figcaption { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); margin-top: 0.5rem; }
.wp-block-image img { border-radius: 3px; }
.wp-block-table table { font-variant-numeric: tabular-nums; border-collapse: collapse; }
.wp-block-table thead { border-bottom: 3px solid var(--wp--preset--color--contrast); }
.wp-block-table td, .wp-block-table th { border: 0; border-bottom: 1px solid var(--wp--preset--color--secondary); padding: 0.5rem 0.75rem; text-align: left; }
.tz-nota { max-width: 70ch; border-top: 1px solid var(--wp--preset--color--secondary); padding-top: 1rem; margin-top: 2rem; }
.wp-site-blocks > footer { margin-block-start: 0; }
.wpm-footer { margin-top: 4rem; }

@media (max-width: 600px) {
  :root { --tz-zab: 0.7rem; --tz-krok: 2.25rem; }
  .wpm-servicebar .wp-block-search { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .wpm-home > .tz-mata { animation: none; transform: none; }
}
.editor-styles-wrapper .tz-mata { animation: none !important; transform: none !important; }
.wpm-footer .wp-block-navigation { font-family: var(--wp--preset--font-family--source-serif-4); font-weight: 400; }
.wpm-servicebar .wp-block-search__input { min-width: 0; }
