/*
Theme Name: Linie maty
Theme URI: https://feelfitness.pl
Author: Mata i Hantel
Description: Ćwiczenia w domu i na siłowni rozpisane tak, żeby dało się je zrobić
Version: 1.6
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: mata-i-hantel
*/

/* 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--heading); font-weight: 700; font-size: var(--wp--preset--font-size--small); 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: 6px; }
.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: 6px; }
.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; } }

/* Linie wyrownania maty: jedyna odwazna decyzja. Panel hero to rozwinieta mata z zaokraglonymi koncami,
   przy dolnej krawedzi os z poprzecznymi kreskami jak nadruk wyrownania na macie do jogi. Os wraca tylko pod H1 huba. */
.wpm-mat { position: relative; background: var(--wp--preset--color--secondary); border-radius: 2.25rem; padding: clamp(1.5rem, 4vw, 3.25rem) clamp(1.25rem, 4vw, 3.5rem) clamp(2.75rem, 5vw, 4.25rem); margin-block: 1.5rem 0; gap: clamp(1.5rem, 4vw, 3.5rem); }
.wpm-mat::after { content: ""; position: absolute; left: clamp(1.25rem, 4vw, 3.5rem); right: clamp(1.25rem, 4vw, 3.5rem); bottom: clamp(1.1rem, 2.2vw, 1.6rem); height: 9px; border-top: 1px solid var(--wp--preset--color--primary); background: repeating-linear-gradient(to right, var(--wp--preset--color--primary) 0 1px, transparent 1px 4rem); background-size: 100% 6px; background-repeat: no-repeat; opacity: .55; pointer-events: none; }
.wpm-mat::before { content: ""; position: absolute; left: 50%; bottom: calc(clamp(1.1rem, 2.2vw, 1.6rem) + 1px); width: 3px; height: 17px; margin-left: -1px; background: var(--wp--preset--color--accent); pointer-events: none; }
.wpm-mat .wpm-kicker { margin-block: 0 1.5rem; }
.wpm-home-h1 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.25rem); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; max-width: 16ch; }
.wpm-home-lead { font-size: clamp(1.15rem, 1rem + .4vw, 1.35rem); line-height: 1.5; color: var(--wp--preset--color--contrast); }
.wpm-hero-photo { margin: 0; }
.wpm-hero-photo img { border-radius: 1.25rem; display: block; width: 100%; height: auto; }
.wpm-hub-h1 { position: relative; padding-bottom: 1.1rem; text-wrap: balance; }
.wpm-hub-h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: min(16rem, 60%); height: 9px; border-top: 1px solid var(--wp--preset--color--primary); background: repeating-linear-gradient(to right, var(--wp--preset--color--primary) 0 1px, transparent 1px 2rem); background-size: 100% 6px; background-repeat: no-repeat; opacity: .55; }

/* pasek zaufania: trzy kafle jak klocki na macie, bez obramowan */
.wpm-trust-kafle { background: transparent !important; border: 0; gap: .75rem; margin-block: 1.25rem 2.5rem; padding: 0; }
.wpm-trust-kafle > .wpm-trust-tile { background: var(--wp--preset--color--surface); border-radius: 999px; padding: .45rem 1.1rem; color: var(--wp--preset--color--contrast); font-family: var(--wp--preset--font-family--heading); font-size: .85rem; }

/* typografia i rytm */
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
.wpm-section-head { border-bottom-width: 2px; }
.wpm-section-title { font-size: var(--wp--preset--font-size--x-large); }
.wpm-section-more a { text-decoration: none; font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: .85rem; }
.wpm-section-more a:hover { text-decoration: underline; }
.wp-block-post-title a { text-decoration: none; }
.wp-block-post-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
.wp-block-post-featured-image img { border-radius: 6px; }
.wpm-meta, .wpm-kicker-cat, .wpm-breadcrumbs { font-family: var(--wp--preset--font-family--heading); font-size: .8rem; }
.wpm-most-read .wp-block-post::before { color: var(--wp--preset--color--accent); font-weight: 700; }
.wpm-sidebar .wp-block-post-title { font-size: 1.05rem; }

/* tresc wpisu */
.wp-block-post-content a { text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: color-mix(in srgb, var(--wp--preset--color--primary) 55%, transparent); }
.wp-block-post-content a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
.wp-block-post-content > p, .wp-block-post-content li { max-width: 68ch; }
.wp-block-quote { border-left: 3px solid var(--wp--preset--color--primary); margin-inline: 0; padding: .25rem 0 .25rem 1.4rem; font-style: italic; font-size: 1.15em; }
.wp-block-quote cite { font-style: normal; font-family: var(--wp--preset--font-family--heading); font-size: .8rem; color: var(--wp--preset--color--muted); }
.wp-block-post-content figure { margin-block: 2rem; }
.wp-block-post-content figure img { border-radius: 6px; }
.wp-block-post-content figcaption, .wp-element-caption { font-family: var(--wp--preset--font-family--heading); font-size: .8rem; color: var(--wp--preset--color--muted); margin-top: .5rem; }
.wp-block-post-content table { border-collapse: collapse; width: 100%; font-size: .95em; }
.wp-block-table { overflow-x: auto; }
.wp-block-post-content th, .wp-block-post-content td { border-bottom: 1px solid var(--wp--preset--color--secondary); padding: .5rem .6rem; text-align: left; }
.wp-block-post-content th { font-family: var(--wp--preset--font-family--heading); font-size: .85em; }
.wpm-bluf, .tldr { background: var(--wp--preset--color--surface); }
.wpm-toc { border-radius: 6px; font-family: var(--wp--preset--font-family--heading); font-size: .9rem; }
.wpm-author-box { background: var(--wp--preset--color--surface); padding: 1.25rem 1.5rem; }

/* stopka */
.wpm-ymyl { margin-top: 1rem; color: var(--wp--preset--color--muted); }
.wp-site-blocks > footer { margin-block-start: 0; }
.wpm-footer { margin-top: 3rem; }

/* fokus i dostepnosc */
:where(a, button, input, summary, [tabindex]):focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 3px; border-radius: 2px; }
.wp-element-button:focus-visible { outline-color: var(--wp--preset--color--contrast); }

@media (max-width: 781px) {
  .wpm-mat { border-radius: 1.5rem; }
  .wpm-mat .wp-block-column { flex-basis: 100% !important; }
  .wpm-home-h1 { max-width: none; }
  .wpm-trust-kafle { gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* QA 2026-10-29 */
.wpm-brand .wp-block-site-logo { flex-shrink: 0; }
.wpm-masthead .wp-block-navigation { flex: 1 1 auto; }
@media (max-width: 781px) {
  .wpm-masthead { gap: .75rem; }
  .wpm-brand .wp-block-site-logo, .wpm-brand .wp-block-site-logo img { display: block !important; width: 44px !important; height: auto; }
  .wpm-masthead .wp-block-navigation { order: -1; flex: 0 0 auto; }
}
.wpm-section-more { font-size: .9rem !important; font-weight: 600; }
.wpm-trust-kafle > .wpm-trust-tile { font-size: .9rem; }
.wpm-prevnext { gap: 1rem; margin-top: 2rem; }
.wpm-prevnext .wp-block-post-navigation-link { flex: 1 1 16rem; padding: .9rem 1.1rem; border: 1px solid var(--wp--preset--color--surface); border-radius: .75rem; font-family: var(--wp--preset--font-family--heading); font-size: .95rem; line-height: 1.35; }
.wpm-prevnext .post-navigation-link-previous::before { content: "Poprzedni tekst"; display: block; font-size: .75rem; color: var(--wp--preset--color--muted); margin-bottom: .25rem; }
.wpm-prevnext .post-navigation-link-next { text-align: right; }
.wpm-prevnext .post-navigation-link-next::before { content: "Następny tekst"; display: block; font-size: .75rem; color: var(--wp--preset--color--muted); margin-bottom: .25rem; }
.wp-block-post-template.is-layout-grid { align-items: start; }
