/* ==========================================================================
   wPrawo: single.css (wpisy i strony)
   Nagłówek felietonu, treść (.prose), inicjał, cytaty, autor, udostępnianie.
   ========================================================================== */

.reading-progress { position: fixed; top: 0; left: 0; z-index: 100; width: 100%; height: 3px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; }

/* Nagłówek --------------------------------------------------------------- */
.entry__header { padding-block: 2.5rem 1.5rem; text-align: center; }
.entry__title { margin: 0.25rem 0 1rem; font: 600 clamp(2.1rem, 5.6vw, 3.7rem)/1.05 var(--font-serif); letter-spacing: -0.026em; text-wrap: balance; }
.entry__dek { max-width: 36rem; margin: 0 auto 1.4rem; font: 400 clamp(1.15rem, 2.2vw, 1.4rem)/1.4 var(--font-serif); color: var(--fg-muted); text-wrap: pretty; }
.entry__meta { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0.5rem 1.1rem; font: 500 0.8125rem/1.4 var(--font-sans); color: var(--fg-muted); }
.entry__meta .byline__avatar { width: 2.25rem; height: 2.25rem; }

.entry__media { margin-block: 1rem 2.25rem; }
/* Cała fotografia, bez przycinania; bardzo wysokie zdjęcia są ograniczone do wysokości ekranu i wyśrodkowane. */
.entry__media img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; background: var(--bg-soft); }
.entry__media figcaption { margin-top: 0.6rem; font: 400 0.8125rem/1.45 var(--font-sans); color: var(--fg-muted); }

/* Treść ------------------------------------------------------------------ */
.prose { font: 400 clamp(1.125rem, 1.6vw, 1.375rem)/1.7 var(--font-serif); overflow-wrap: break-word; hyphens: auto; }
.prose > * { margin-block: 0 1.45em; }
.prose > *:last-child { margin-bottom: 0; }
.prose a { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose h2 { margin-top: 2.2em; font-size: 1.8rem; line-height: 1.18; }
.prose h3 { margin-top: 1.9em; font-size: 1.4rem; line-height: 1.22; }
.prose h4 { margin-top: 1.6em; font: 700 0.875rem var(--font-sans); letter-spacing: 0.1em; text-transform: uppercase; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 0.4em; }
.prose hr { margin-block: 2.5em; border: 0; text-align: center; height: auto; }
.prose hr::before { content: "* * *"; letter-spacing: 0.6em; color: var(--fg-muted); font-size: 1.1rem; }
.prose img { height: auto; }
.prose figure, .prose .wp-caption { margin-block: 2em; max-width: 100%; }
.prose figcaption, .prose .wp-caption-text { margin-top: 0.5rem; font: 400 0.8125rem/1.45 var(--font-sans); color: var(--fg-muted); }
.prose iframe, .prose video, .prose embed { max-width: 100%; }
.prose .wp-block-embed__wrapper, .prose .video-container { position: relative; }
.prose table { width: 100%; border-collapse: collapse; font: 400 0.9375rem/1.45 var(--font-sans); }
.prose th, .prose td { padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--rule); text-align: left; }
.prose code, .prose pre { font-size: 0.9em; background: var(--bg-soft); }
.prose pre { padding: 1rem; overflow-x: auto; }

.prose .alignleft { float: left; margin: 0.3em 1.5em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: 0.3em 0 1em 1.5em; max-width: 50%; }
.prose .aligncenter { display: block; margin-inline: auto; }
.prose .alignwide, .prose .alignfull { max-width: none; }

.prose blockquote { margin-inline: 0; padding: 0 0 0 1.25rem; border-left: 3px solid var(--accent); font-style: italic; }
.prose blockquote p { margin: 0 0 0.8em; }
.prose blockquote cite { display: block; font: 600 0.8125rem var(--font-sans); font-style: normal; color: var(--fg-muted); }
.prose blockquote.pullquote, .prose .is-style-pullquote, .prose .wp-block-pullquote {
	margin-block: 2.2em; padding: 1.4rem 0; border: 0; border-block: 2px solid var(--fg);
	text-align: center; font: 500 clamp(1.5rem, 3.2vw, 2rem)/1.25 var(--font-serif); font-style: normal; letter-spacing: -0.012em; text-wrap: balance;
}

.prose .lead, .prose .is-style-lead { font-size: 1.22em; line-height: 1.5; color: var(--fg); }
.prose .note, .prose .is-style-note { font: 400 0.875rem/1.55 var(--font-sans); color: var(--fg-muted); }

/* Inicjał (tylko felietony, pierwszy akapit, albo ręcznie klasą) */
.entry--felieton .prose > p:first-of-type:not(.lead):not(.note)::first-letter,
.prose .has-dropcap::first-letter {
	float: left; margin: 0.06em 0.1em 0 0;
	font: 600 4.3em/0.78 var(--font-serif);
	color: var(--accent-text);
}

/* Stopka wpisu ----------------------------------------------------------- */
.entry__footer { padding-block: 2.5rem 3.5rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.tag-list a { display: inline-block; padding: 0.3rem 0.7rem; border: 1px solid var(--rule); border-radius: 999px; font: 500 0.8125rem var(--font-sans); text-decoration: none; color: var(--fg-muted); }
.tag-list a:hover { border-color: var(--fg); color: var(--fg); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; padding-block: 1.25rem; border-block: 1px solid var(--rule); }
.share__label { font: 700 0.6875rem/1 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); }
.share__list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-width: 2.5rem; height: 2.5rem; padding: 0; border: 1px solid var(--btn-solid-bg); border-radius: 999px; background: var(--btn-solid-bg); color: var(--btn-solid-fg); font: 600 0.8125rem/1 var(--font-sans); text-decoration: none; cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s; }
.share-btn svg { flex: none; width: 1.15rem; height: 1.15rem; }
.share-btn--copy, .share-btn--more { padding-inline: 1rem; }
.share-btn--copy svg, .share-btn--more svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.share-btn:hover { background: var(--btn-solid-bg-hover); border-color: var(--btn-solid-bg-hover); transform: translateY(-1px); }
.share-btn:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
/* Po najechaniu przyciski przyjmują barwy serwisu. */
.share-btn--facebook:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-btn--x:hover, .share-btn--tiktok:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.share-btn--whatsapp:hover { background: #25d366; border-color: #25d366; color: #fff; }
.share-btn--messenger:hover { background: #0084ff; border-color: #0084ff; color: #fff; }
.share-btn--telegram:hover { background: #26a5e4; border-color: #26a5e4; color: #fff; }
.share-btn--instagram:hover { background: linear-gradient(45deg, #f09433, #dc2743 55%, #bc1888); border-color: #dc2743; color: #fff; }
.share-btn--email:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.share__note { flex: 1 0 100%; margin: 0; font: 500 0.875rem/1.4 var(--font-sans); color: var(--fg-muted); }
.share__note[hidden] { display: none; }

.author-box { display: flex; gap: 1.25rem; align-items: flex-start; margin-top: 2rem; padding: 1.5rem; background: var(--bg-soft); }
.author-box__img { flex: none; width: 5rem; height: 5rem; border-radius: 50%; object-fit: cover; }
.author-box__name { margin: 0 0 0.4rem; font: 600 1.25rem/1.2 var(--font-serif); }
.author-box__name a { text-decoration: none; }
.author-box__role { display: block; margin-top: 0.25rem; font: 600 0.6875rem/1 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); }
.author-box__bio { margin: 0 0 0.8rem; font: 400 1rem/1.5 var(--font-serif); color: var(--fg-muted); }
.author-box__link { display: inline-flex; align-items: center; gap: 0.35rem; font: 600 0.8125rem var(--font-sans); color: var(--accent-text); text-decoration: none; }
.author-box__link .icon { width: 1rem; height: 1rem; }
@media (max-width: 520px) { .author-box { flex-direction: column; } }

.page-links { display: flex; gap: 0.5rem; margin-top: 2rem; font: 600 0.875rem var(--font-sans); }

/* Układ wpisu z sidebarem ------------------------------------------------- */
.entry__layout { display: block; }
.entry__main { min-width: 0; }
.entry--no-sidebar .entry__main { max-width: var(--wide); margin-inline: auto; }
/* Na telefonach i tabletach sidebar jest ukryty; push zostaje na końcu wpisu (.push-cta-mobile). */
.sidebar { display: none; }
@media (min-width: 1000px) {
	.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
	.push-cta-mobile { display: none; }
	.entry--has-sidebar .entry__layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 3.5rem; align-items: start; }
	.entry--has-sidebar .entry__main > .prose { max-width: 46rem; }
	.sidebar { position: sticky; top: 5rem; }
}

/* Rotator widgetów */
.side-rotator { position: relative; }
.side-widget { display: flex; flex-direction: column; background: var(--sw-bg); color: var(--sw-fg); border: 1px solid var(--sw-bd, transparent); }
.side-widget[hidden] { display: none; }
.side-widget--ink { --sw-bg: #14171c; --sw-fg: #ffffff; --sw-btn-bg: #ffffff; --sw-btn-fg: #14171c; }
.side-widget--accent { --sw-bg: var(--accent); --sw-fg: var(--on-accent); --sw-btn-bg: var(--on-accent); --sw-btn-fg: var(--accent); }
.side-widget--paper { --sw-bg: var(--bg-soft); --sw-fg: var(--fg); --sw-bd: var(--rule); --sw-btn-bg: var(--btn-solid-bg); --sw-btn-fg: var(--btn-solid-fg); }
.side-widget__media img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.side-widget__body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; padding: 1.4rem 1.4rem 1.5rem; }
.side-widget__eyebrow { margin: 0; font: 700 0.6875rem/1.2 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; }
.side-widget__title { margin: 0; font: 600 1.55rem/1.12 var(--font-serif); letter-spacing: -0.012em; color: inherit; }
.side-widget__text { margin: 0; font: 400 1rem/1.5 var(--font-serif); opacity: 0.9; }
.side-widget__btn { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 0.5rem; padding: 0.55rem 1.1rem; background: var(--sw-btn-bg); color: var(--sw-btn-fg); border: 1px solid var(--sw-btn-bg); border-radius: 999px; font: 700 0.8125rem/1.2 var(--font-sans); text-decoration: none; transition: background 0.2s, color 0.2s; }
.side-widget__btn:hover, .side-widget__btn:focus-visible { background: transparent; color: var(--sw-fg); border-color: var(--sw-fg); }
.side-widget__btn .icon { width: 1rem; height: 1rem; }
.side-widget :focus-visible { outline-color: currentColor; }
.side-rotator__dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 0.85rem; }
.side-rotator__dots button { position: relative; width: 0.55rem; height: 0.55rem; padding: 0; border: 0; border-radius: 999px; background: var(--rule-strong); opacity: 0.35; cursor: pointer; transition: width 0.25s, opacity 0.25s; }
.side-rotator__dots button::before { content: ""; position: absolute; inset: -0.7rem -0.25rem; }
.side-rotator__dots button[aria-current="true"] { width: 1.5rem; opacity: 1; background: var(--accent); }
.side-rotator__dots button:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.side-widget.is-fading { animation: side-in 0.45s ease both; }
@keyframes side-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .side-widget.is-fading { animation: none; } }

/* Kategorie */
.side-cats { border-top: 2px solid var(--fg); padding-top: 0.75rem; }
.side-cats__title { margin: 0 0 0.5rem; font: 700 0.8125rem/1.2 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; }
.side-cats__list { margin: 0; padding: 0; list-style: none; }
.side-cats__list a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); font: 600 0.9375rem/1.3 var(--font-sans); text-decoration: none; color: var(--fg); }
.side-cats__list a:hover { color: var(--accent-text); }
.side-cats__count { font-weight: 500; font-size: 0.8125rem; color: var(--fg-muted); }