/*
Theme Name: Zrost
Theme URI: https://osteosynteza2026.pl
Author: Zrost
Description: Złamania kości wyjaśnione po kolei: od gipsu i zespolenia po zrost i rehabilitację
Version: 1.8
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: zrost
*/

/* 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 */
.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; } }

/* Zrost: szczelina zrostu (jedyny ornament: naglowki dzialow, H1 huba) */
.wpm-section-head,
.wpm-hub-head .wpm-hub-h1 {
  position: relative;
  border-bottom: 0;
  padding-bottom: 0.9rem;
  background-image:
    linear-gradient(var(--wp--preset--color--contrast), var(--wp--preset--color--contrast)),
    linear-gradient(var(--wp--preset--color--contrast), var(--wp--preset--color--contrast));
  background-repeat: no-repeat;
  background-size: 4.5rem 2px, calc(100% - 8.5rem) 2px;
  background-position: left bottom 4px, right bottom 4px;
}
.wpm-section-head::after,
.wpm-hub-head .wpm-hub-h1::after {
  content: "";
  position: absolute;
  left: 4.1rem;
  bottom: 0;
  width: 4.8rem;
  height: 10px;
  border: 2px solid var(--wp--preset--color--contrast);
  border-radius: 50%;
  background: var(--wp--preset--color--secondary);
  box-sizing: border-box;
}
.wpm-hub-head .wpm-hub-h1 { padding-bottom: 1.1rem; margin-bottom: 1.25rem; }
.wpm-section { margin-block: 3.5rem; }
.wpm-section-head { margin-bottom: 1.5rem; }
.wpm-section-title { font-weight: 700; font-size: var(--wp--preset--font-size--x-large); }
.wpm-section-more a { color: var(--wp--preset--color--muted); }
.wpm-section-more a:hover { color: var(--wp--preset--color--primary); }

/* Zrost: strona glowna */
.wpm-home-h1 { max-width: 18ch; font-size: clamp(2.3rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; margin-bottom: 1rem; }
.wpm-home-lead { color: var(--wp--preset--color--muted); text-wrap: pretty; }
.wpm-kicker { margin-block: 2.5rem 2rem; }
.wpm-hero-glowny { gap: 2.5rem; }
.wpm-hero-main .wp-block-post-title { margin-top: 1rem; text-wrap: balance; }
.wpm-aside-title { font-family: var(--wp--preset--font-family--pt-sans); font-weight: 700; font-size: var(--wp--preset--font-size--medium); border-bottom: 1px solid var(--wp--preset--color--contrast); }
.wpm-hero-latest .wp-block-post { padding-block: 0.6rem; border-bottom: 1px solid var(--wp--preset--color--surface); }
.wpm-hero-latest .wp-block-post-title { margin: 0 0 0.25rem; line-height: 1.25; }
.wpm-trust { border-block: 0; border-left: 3px solid var(--wp--preset--color--secondary); padding: 0.2rem 0 0.2rem 0.9rem; max-width: 70ch; margin-block: 1.5rem 3rem; }
.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: 2px; text-underline-offset: 0.18em; }
.wp-block-post-featured-image img { border-radius: 2px; }
.wpm-section-cztery_karty .wp-block-post-title { margin-top: 0.75rem; line-height: 1.25; }
@media (min-width: 600px) and (max-width: 1100px) {
  .wpm-section-cztery_karty .wp-block-post-template, .wpm-related .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Zrost: naglowek */
.wpm-header { border-bottom: 1px solid var(--wp--preset--color--surface); padding-block: 0.75rem; }
.wpm-header .wp-block-navigation a { text-decoration: none; padding-block: 0.3rem; border-bottom: 2px solid transparent; }
.wpm-header .wp-block-navigation a:hover, .wpm-header .wp-block-navigation .current-menu-item > a, .wpm-header .wp-block-navigation a[aria-current="page"] { border-bottom-color: var(--wp--preset--color--primary); }

/* Zrost: tresc wpisu */
.wpm-article .wp-block-post-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.wpm-article .wp-block-post-content a:hover { text-decoration-thickness: 2px; }
.wpm-article .wp-block-post-content p, .wpm-article .wp-block-post-content li { text-wrap: pretty; }
.wpm-article h2, .wpm-article h3 { text-wrap: balance; }
.wpm-article h2 { margin-top: 2.5em; }
.wp-block-quote { border-left: 3px solid var(--wp--preset--color--primary); padding: 0.25rem 0 0.25rem 1.25rem; margin-inline: 0; }
.wp-block-quote p { font-family: var(--wp--preset--font-family--arvo); font-style: italic; font-size: var(--wp--preset--font-size--large); line-height: 1.45; }
.wp-block-quote cite { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); font-style: normal; }
.wp-block-image figcaption, figure figcaption, .wp-element-caption { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); border-top: 1px solid var(--wp--preset--color--surface); padding-top: 0.5rem; margin-top: 0.6rem; text-align: left; }
.wpm-article table { border-collapse: collapse; width: 100%; font-size: var(--wp--preset--font-size--small); }
.wpm-article th, .wpm-article td { border-bottom: 1px solid var(--wp--preset--color--surface); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; }
.wpm-article th { border-bottom: 2px solid var(--wp--preset--color--contrast); }
.wpm-bluf, .tldr { background: var(--wp--preset--color--surface); }
.wpm-bluf .wpm-bluf-label { text-transform: none; letter-spacing: 0; opacity: 1; font-weight: 700; }
.wpm-kicker-cat a { text-decoration: none; font-weight: 700; }
.wpm-author-box { border-left: 3px solid var(--wp--preset--color--secondary); }

/* Zrost: stopka (gruby pasek) */
.wpm-footer { margin-top: 4rem; }
.wpm-footer-wordmark { font-size: clamp(3rem, 9vw, 6rem) !important; font-weight: 700; line-height: 1; letter-spacing: -0.03em; margin: 0 0 1.5rem; }
.wpm-footer-wordmark a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.wpm-footer-silos { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.wpm-footer a { color: var(--wp--preset--color--contrast); }
.wpm-disclaimer { max-width: 70ch; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--wp--preset--color--muted); }
.wpm-copy { margin-top: 0.5rem; }
.wp-site-blocks > footer { margin-block-start: 0; }

/* Zrost: dostepnosc */
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 2px; }
::selection { background: var(--wp--preset--color--secondary); color: var(--wp--preset--color--contrast); }
@media (max-width: 600px) {
  .wpm-section-head, .wpm-hub-head .wpm-hub-h1 { background-size: 3rem 2px, calc(100% - 6.6rem) 2px; }
  .wpm-section-head::after, .wpm-hub-head .wpm-hub-h1::after { left: 2.7rem; width: 4rem; }
  .wpm-kicker { margin-block: 1.5rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
.wpm-masthead .wp-block-search { width: 15rem; max-width: 100%; }
.wpm-masthead .wp-block-search__inside-wrapper { border: 1px solid var(--wp--preset--color--muted); border-radius: 2px; padding: 2px; }
.wpm-masthead .wp-block-search__input { border: 0; font-size: var(--wp--preset--font-size--small); }
@media (max-width: 600px) { .wpm-masthead .wp-block-search { display: none; } }

/* QA: pas z 3 wpisami w wariancie cztery_karty bez dziury */
.wpm-section-cztery_karty .wp-block-post-template:not(:has(> li:nth-child(4))) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* QA: O serwisie, portrety autorow obok opisu */
.page-id-20 .wp-block-post-content > figure.wp-block-image { float: left; clear: left; width: 132px; margin: .25rem 1.25rem .75rem 0 !important; }
.page-id-20 .wp-block-post-content > figure.wp-block-image img { width: 132px; height: 132px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.page-id-20 .wp-block-post-content > figure.wp-block-image + p { display: flow-root; min-height: 140px; }
.page-id-20 .wp-block-post-content > h2 { clear: both; }
@media (max-width: 600px) { .page-id-20 .wp-block-post-content > figure.wp-block-image, .page-id-20 .wp-block-post-content > figure.wp-block-image img { width: 88px; height: 88px; } .page-id-20 .wp-block-post-content > figure.wp-block-image + p { min-height: 96px; } }
/* QA: szukajka bez podwojnej ramki */
.wpm-masthead .wp-block-search__inside-wrapper { border: 0; padding: 0; }
