/*
Theme Name: Łapa w Łapę
Theme URI: https://tresura-psa.pl
Author: Łapa w Łapę
Description: Szkolenie psa bez krzyku i szarpania, krok po kroku
Version: 1.5
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: lapa-w-lape
*/

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

/* Lapa w Lape: luzna smycz.
   Jedyna ozdoba serwisu: linka w mandarynce, ktora lekko zwisa (nigdy nie jest napieta) i wisi na karabinczyku w sliwce.
   Oddziela dzialy na stronie glownej, zamyka glowe huba i konczy tekst wpisu przed ramka autora. */
:root {
  --lwl-rope: var(--wp--preset--color--accent);
  --lwl-clip: var(--wp--preset--color--primary);
  --lwl-sag: 16px;
}
.wpm-section-head,
.wpm-related-wrap > .wpm-section-title,
.wpm-hub-head {
  position: relative;
  border-bottom: 0;
  padding-bottom: calc(var(--lwl-sag) + 0.6rem);
}
.wpm-section-head::after,
.wpm-related-wrap > .wpm-section-title::after,
.wpm-hub-head::after,
.wpm-article > .wp-block-post-content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--lwl-sag);
  border-bottom: 5px solid var(--lwl-rope);
  border-radius: 0 0 50% 50% / 0 0 var(--lwl-sag) var(--lwl-sag);
  background: radial-gradient(circle at 9px 5px, transparent 4px, var(--lwl-clip) 4.5px, var(--lwl-clip) 8px, transparent 8.5px) no-repeat;
  pointer-events: none;
}
.wpm-article > .wp-block-post-content { position: relative; padding-bottom: calc(var(--lwl-sag) + 1.5rem); }
.wpm-section { margin-block: clamp(2.5rem, 5vw, 4rem); }
.wpm-section-head { margin-bottom: 1.25rem; }
.wpm-section-title { font-size: var(--wp--preset--font-size--xx-large); }
.wpm-section-more a { font-weight: 500; }

/* typografia i rytm */
h1, h2, h3, .wp-block-post-title { text-wrap: balance; }
p, li { text-wrap: pretty; }
.wpm-home-h1 { max-width: 20ch; font-size: clamp(2.1rem, 4.4vw, 3.25rem); line-height: 1.08; margin-bottom: 0.6rem; }
.wpm-kicker { margin-block: clamp(1.5rem, 4vw, 2.75rem) 1.25rem; }
.wpm-home-lead { color: var(--wp--preset--color--muted); }
.wpm-trust { border-block: 0; background: var(--wp--preset--color--surface); border-radius: 6px; padding: 0.7rem 1rem; margin-block: 1.25rem 0; }
.wpm-home > .wp-block-buttons { margin-top: 1.25rem; }

/* okladka */
.wpm-hero-okladka .wp-block-cover { border-radius: 6px; overflow: hidden; min-height: clamp(340px, 56vh, 560px) !important; padding: clamp(1.25rem, 4vw, 2.75rem); }
.wpm-hero-okladka .wp-block-cover__inner-container { max-width: 34ch; }
.wpm-hero-okladka .wp-block-post-title { line-height: 1.1; margin-block: 0.3rem 0.6rem; }
.wpm-hero-okladka .wp-block-post-title a,
.wpm-hero-okladka .wp-block-post-terms a,
.wpm-hero-okladka .wpm-meta,
.wpm-hero-okladka .wpm-meta a { color: var(--wp--preset--color--base); }
.wpm-hero-okladka .wp-block-post-terms a { text-decoration: none; font-weight: 500; }

/* linki: podkreslenie w mandarynce jako slad smyczy, tekst zawsze w sliwce */
.wpm-main p a, .wpm-main li a, .wpm-footer-note a {
  text-decoration-line: underline;
  text-decoration-color: var(--lwl-rope);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.wpm-main p a:hover, .wpm-main li a:hover { text-decoration-thickness: 3px; }
.wp-block-post-title a { text-decoration: none; }
.wp-block-post-title a:hover { text-decoration: underline; text-decoration-color: var(--lwl-rope); text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
:where(a, button, input, .wp-element-button):focus-visible {
  outline: 3px solid var(--lwl-clip);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--wp--preset--color--secondary);
  border-radius: 3px;
}

/* karty i miniatury */
.wpm-main .wp-block-post-featured-image img { border-radius: 6px; }
.wpm-main .wp-block-post-featured-image { margin-bottom: 0.75rem; }
.wpm-section .wp-block-post-title { margin-block: 0 0.35rem; line-height: 1.2; }
.wpm-mini { gap: 1rem; margin-bottom: 1rem; }
.wpm-row { gap: 1.5rem; padding-block: 1rem; border-bottom: 1px solid var(--wp--preset--color--surface); }
.wpm-meta { gap: 0.25rem 0.9rem; }

/* wpis */
.wpm-single-head .wp-block-post-title { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
.wpm-kicker-cat a { text-decoration: none; font-weight: 500; }
.wpm-article .wp-block-post-featured-image img { border-radius: 6px; }
.wpm-article .wp-block-post-content h2 { margin-top: 2.4em; font-size: var(--wp--preset--font-size--x-large); }
.wpm-article .wp-block-post-content h3 { margin-top: 1.8em; font-size: var(--wp--preset--font-size--large); }
.wpm-article .wp-block-post-content ol li::marker { font-family: var(--wp--preset--font-family--zilla-slab); font-weight: 600; color: var(--lwl-clip); }
.wpm-article .wp-block-post-content li + li { margin-top: 0.35em; }
.wp-block-quote {
  border-left: 0;
  padding: 0 0 0 1.25rem;
  margin-inline: 0;
  font-family: var(--wp--preset--font-family--zilla-slab);
  font-size: var(--wp--preset--font-size--large);
  line-height: 1.4;
  box-shadow: inset 5px 0 0 var(--lwl-rope);
}
.wp-block-quote cite { font-family: var(--wp--preset--font-family--rubik); font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); font-style: normal; }
.wpm-main figure { margin-block: 2rem; }
.wpm-main figure img { border-radius: 6px; }
.wpm-main figcaption { margin-top: 0.5rem; text-align: left; }
.wpm-main table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.wpm-main th, .wpm-main td { border-bottom: 1px solid var(--wp--preset--color--secondary); padding: 0.55rem 0.6rem; text-align: left; vertical-align: top; }
.wpm-main thead th { border-bottom: 2px solid var(--wp--preset--color--contrast); font-weight: 600; }
.wpm-author-box { gap: 1.25rem; align-items: flex-start; }
.wpm-prevnext a { font-weight: 500; }
.wpm-related-wrap { margin-block: 3rem; }

/* hub */
.wpm-hub-head { margin-bottom: 2rem; }
.wpm-hub-h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; max-width: 22ch; }
.wpm-hub-lead { color: var(--wp--preset--color--muted); max-width: 60ch; }

/* naglowek */
.wpm-servicebar { padding-inline: 0.75rem; border-radius: 0 0 6px 6px; color: var(--wp--preset--color--muted); }
.wpm-brandrow { padding-block: 0.85rem; align-items: center; }
.wpm-header .wp-block-navigation a { text-decoration: none; font-weight: 500; }
.wpm-header .wp-block-navigation a:hover,
.wpm-header .wp-block-navigation .current-menu-item > a { text-decoration: underline; text-decoration-color: var(--lwl-rope); text-decoration-thickness: 3px; text-underline-offset: 0.35em; }

/* stopka: gruby pasek w sliwce */
.wp-site-blocks > footer { margin-block-start: 0; }
.wpm-footer { margin-top: clamp(3rem, 6vw, 5rem); }
.wpm-footer a { color: var(--wp--preset--color--base); text-decoration-color: var(--lwl-rope); text-underline-offset: 0.2em; }
.wpm-footer a:hover { color: var(--wp--preset--color--secondary); }
.wpm-footer-wordmark { font-family: var(--wp--preset--font-family--zilla-slab); font-weight: 600; line-height: 1; margin-bottom: 1.5rem; }
.wpm-footer-wordmark a { text-decoration: none; }
.wpm-footer-silos { columns: 2 14rem; column-gap: 2rem; }
.wpm-footer-note { max-width: 62ch; margin-top: 2rem; }
.wpm-copy { margin-top: 0.75rem; }

/* mobile */
@media (max-width: 1000px) {
  .wpm-section .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wpm-related .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  :root { --lwl-sag: 12px; }
  .wpm-section .wp-block-post-template.is-layout-grid,
  .wpm-hub-list .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr; }
  .wpm-section .wp-block-columns.wpm-row { flex-wrap: nowrap !important; gap: 0.9rem; }
  .wpm-section .wp-block-columns.wpm-row > .wp-block-column:first-child { flex-basis: 34% !important; }
  .wpm-section .wp-block-columns.wpm-row > .wp-block-column:last-child { flex-basis: 66% !important; }
  .wpm-row .wp-block-post-excerpt { display: none; }
  .wpm-servicebar .wp-block-search { display: none; }
  .wpm-hero-okladka .wp-block-cover__inner-container { max-width: none; }
  .wpm-author-box { flex-wrap: wrap !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
