/*
 * Blog – typografia (BOX36, 27.10.2026)
 * Zakres: tylko blog (lista /blog/, kategorie, tagi, autorzy, pojedyncze wpisy),
 * tylko treść strony (#inner-wrap) – nagłówek i stopka serwisu bez zmian.
 *
 * T1: nagłówki jak zdanie – wielka tylko pierwsza litera, tak jak wpisano w edytorze.
 *     Motyw Kadence globalnie ustawia h1–h6 na "capitalize" (Każde Słowo Z Dużej);
 *     poza blogiem zostaje to bez zmian (decyzja 27.10).
 *     Tytuły wpisów na listach kategorii (archive.css: uppercase !important) – też jak zdanie.
 *     Wyjątek: hasło "BLOG HVAC" (.rev-page-hero-title) zostaje wersalikami;
 *     etykiety kategorii i "Czytaj więcej" to nie nagłówki – bez zmian.
 */
body:is(.blog, .single-post, .category, .tag, .author) #inner-wrap :is(h1, h2, h3, h4, h5, h6):not(.rev-page-hero-title) {
	text-transform: none !important;
}

/*
 * Karty wpisów: link "Dowiedz się więcej" zawsze na tej samej wysokości w rzędzie
 * (przypięty do dołu karty, niezależnie od długości tytułu i opisu). 27.10.2026
 * 1) lista /blog/ i /en/blog/ – karty .rev-blog-card
 * 2) kategorie, tagi, autorzy – karty motywu Kadence .loop-entry
 */
body:is(.blog, .category, .tag, .author) .rev-blog-card .rev-blog-card-body {
	flex: 1 1 auto;
}
body:is(.blog, .category, .tag, .author) .rev-blog-card .rev-blog-card-more {
	margin-top: auto;
}
body:is(.blog, .category, .tag, .author) .loop-entry {
	display: flex;
	flex-direction: column;
}
body:is(.blog, .category, .tag, .author) .loop-entry > .entry-content-wrap {
	flex: 1 1 auto;
}
body:is(.blog, .category, .tag, .author) .loop-entry .entry-footer {
	margin-top: auto;
}

/*
 * T2: pojedynczy wpis – czytelna hierarchia (27.10.2026)
 * Przed: H1 34px cienki, H2 48px, H3 32px, odstęp nad H2 72px, akapit co 32px, linia ~120 znaków.
 * Po:    H1 46 > H2 32 > H3 24 > H4 20 (desktop), nagłówek blisko swojego tekstu,
 *        kolumna tekstu 800px (~85 znaków), grafika wyróżniająca bez zmian (szeroka).
 */

/* Pas z tytułem: bez bladej kopii grafiki w tle (ta sama grafika jest zaraz niżej) */
body.single-post .entry-hero .entry-hero-container-inner {
	background-image: none !important;
	background-color: #f8f8f8;
}
body.single-post .entry-hero .entry-hero-container-inner,
body.single-post .entry-hero .hero-container {
	min-height: 0 !important;
}
body.single-post .entry-hero .entry-header {
	min-height: 0 !important;
	padding: 56px 0 48px;
	gap: 14px;
}
body.single-post .entry-hero .entry-taxonomies {
	margin: 0;
}
body.single-post .entry-hero h1.entry-title {
	font-family: "Bahnschrift", "Noto Sans", sans-serif;
	font-size: clamp(30px, 3.2vw, 46px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--rev-black, #1c1c1b);
	max-width: none;
	margin: 0;
	text-align: left;
	text-wrap: balance;
}

/* Kolumna tekstu – na całą szerokość kontenera (decyzja 27.10, T5) */
body.single-post .entry-content-wrap .entry-content {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}
body.single-post .entry-content :is(p, li) {
	font-size: 17px;
	line-height: 1.75;
}
body.single-post .entry-content > p,
body.single-post .entry-content > :is(ul, ol) {
	margin-top: 0;
	margin-bottom: 20px;
}

/* Nagłówki w treści */
body.single-post .entry-content :is(h2, h3, h4) {
	font-family: "Bahnschrift", "Noto Sans", sans-serif;
	color: var(--rev-black, #1c1c1b);
	letter-spacing: -0.005em;
	text-wrap: balance;
}
body.single-post .entry-content h2 {
	font-size: clamp(25px, 2.2vw, 32px);
	font-weight: 700;
	line-height: 1.2;
	margin: 56px 0 16px !important;
}
body.single-post .entry-content h3 {
	font-size: clamp(20px, 1.7vw, 24px);
	font-weight: 700;
	line-height: 1.25;
	margin: 40px 0 12px !important;
}
body.single-post .entry-content h4 {
	font-size: clamp(18px, 1.4vw, 20px);
	font-weight: 600;
	line-height: 1.3;
	margin: 28px 0 8px !important;
}
/* Dwa nagłówki pod rząd (H2 → H3) – mniejszy odstęp */
body.single-post .entry-content :is(h2, h3) + :is(h3, h4) {
	margin-top: 16px !important;
}
body.single-post .entry-content > :is(h2, h3, h4):first-child {
	margin-top: 0 !important;
}

/* Tabele: w węższej kolumnie przewijają się poziomo zamiast rozpychać stronę */
body.single-post .entry-content figure.wp-block-table {
	overflow-x: auto;
}

@media (max-width: 767px) {
	body.single-post .entry-hero .entry-header {
		padding: 36px 0 32px;
	}
	/* globalne reguły mobilne dają H1 36px + dzielenie wyrazów ("rekupe-ratora") */
	body.single-post .entry-hero h1.entry-title {
		font-size: 28px !important;
		line-height: 1.2;
		hyphens: manual !important;
		-webkit-hyphens: manual !important;
	}
	body.single-post .entry-content :is(p, li) {
		font-size: 16px;
		line-height: 1.7;
	}
	/* T4: globalne reguły mobilne dają H2 28px !important = tyle co H1 wpisu */
	body.single-post .entry-content h2 {
		font-size: 23px !important;
		margin-top: 40px !important;
	}
	body.single-post .entry-content h3 {
		font-size: 20px !important;
		margin-top: 32px !important;
	}
	body.single-post .entry-content h4 {
		font-size: 18px !important;
	}
}

/*
 * T3: karty wpisów – jeden wygląd na liście /blog/, w kategoriach/tagach/autorach
 *     i w "Podobnych wpisach" pod wpisem (27.10.2026)
 * Przed: tytuł karty 18 / 20 / 20 px (w kategoriach WERSALIKAMI i ucięty po 2 liniach),
 *        etykieta 10–11 px w dwóch krojach, autor i data 12 px #888/#999 (za słaby kontrast),
 *        w kategoriach ~58 px dziury między datą a opisem, "Podobne wpisy" 35 px na beżowym tle,
 *        tytuł strony kategorii 55 px, strzałki karuzeli na tekście kart.
 * Po:    tytuł karty 20 px (telefon 18), cały; etykieta 11 px Bahnschrift; autor/data 13 px #6b6b6b;
 *        opis 15 px; "Podobne wpisy" jak H2 we wpisie, bez tła, karty z obramowaniem jak na /blog/;
 *        tytuł kategorii jak H1 wpisu; strzałki karuzeli w rzędzie z kropkami pod kartami.
 */

/* Etykieta kategorii */
body:is(.blog, .category, .tag, .author) .rev-blog-card .rev-blog-card-cat,
body:is(.blog, .category, .tag, .author) .loop-entry .entry-taxonomies a,
body.single-post .entry-related .entry-taxonomies a {
	font-family: "Bahnschrift", "Noto Sans", sans-serif !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--rev-red, #e30613);
}

/* Tytuł karty – cały, bez ucinania po 2 liniach */
body:is(.blog, .category, .tag, .author) .rev-blog-card .rev-blog-card-title,
body:is(.blog, .category, .tag, .author) .loop-entry .entry-title,
body.single-post .entry-related .entry-title {
	font-family: "Bahnschrift", "Noto Sans", sans-serif !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: -0.005em;
	text-wrap: pretty;
}
body:is(.blog, .category, .tag, .author) .loop-entry .entry-title,
body.single-post .entry-related .entry-title {
	display: block !important;
	-webkit-line-clamp: unset !important;
	overflow: visible !important;
	max-height: none !important;
}
body:is(.blog, .category, .tag, .author) .rev-blog-card .rev-blog-card-title a,
body:is(.blog, .category, .tag, .author) .loop-entry .entry-title a,
body.single-post .entry-related .entry-title a {
	color: var(--rev-black, #1c1c1b) !important;
	text-transform: none !important;
}

/* Autor i data – kontrast min. 4.5:1 */
body:is(.blog, .category, .tag, .author) .rev-blog-card .rev-blog-card-meta,
body:is(.blog, .category, .tag, .author) .loop-entry .entry-meta,
body:is(.blog, .category, .tag, .author) .loop-entry .entry-meta :is(a, span, time),
body.single-post .entry-related .entry-meta,
body.single-post .entry-related .entry-meta :is(a, span, time) {
	font-size: 13px !important;
	line-height: 1.6 !important;
	color: #6b6b6b !important;
}

/* Opis */
body:is(.blog, .category, .tag, .author) .rev-blog-card .rev-blog-card-excerpt,
body:is(.blog, .category, .tag, .author) .loop-entry .entry-summary p,
body.single-post .entry-related .entry-summary p {
	font-size: 15px !important;
	line-height: 1.6 !important;
	color: #4a4a4a !important;
}

/* Kategorie/tagi/autorzy: odstępy w karcie (było ~58 px między datą a opisem) */
body:is(.blog, .category, .tag, .author) .loop-entry .entry-header {
	margin-bottom: 0 !important;
}
body:is(.blog, .category, .tag, .author) .loop-entry .entry-meta {
	margin: 10px 0 0 !important;
}
body:is(.blog, .category, .tag, .author) .loop-entry .entry-summary {
	margin-top: 14px !important;
}
body:is(.blog, .category, .tag, .author) .loop-entry .entry-summary p {
	margin: 0 !important;
}

/* Link "Dowiedz się więcej" (lista /blog/) */
body:is(.blog, .category, .tag, .author) .rev-blog-card .rev-blog-card-more {
	font-size: 13px !important;
	letter-spacing: 0.04em;
}

/* "Podobne wpisy": bez beżowego tła motywu (Kadence palette7), karty jak na liście /blog/ */
body.single-post .entry-related {
	background: transparent !important;
}
body.single-post .entry-related article {
	border: 1px solid #ececec !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: #fff;
}
/* "Podobne wpisy" – nagłówek jak H2 we wpisie */
body.single-post .entry-related .entry-related-title {
	font-family: "Bahnschrift", "Noto Sans", sans-serif;
	font-size: clamp(25px, 2.2vw, 32px) !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	margin-bottom: 24px !important;
}
/* Strzałki karuzeli: pod kartami, w rzędzie z kropkami (wcześniej zasłaniały tekst) */
body.single-post .entry-related .splide__arrow {
	top: auto !important;
	bottom: -36px !important;
	height: 32px !important;
	transform: none !important;
}
body.single-post .entry-related .splide__arrow--prev {
	left: 0 !important;
	right: auto !important;
}
body.single-post .entry-related .splide__arrow--next {
	left: auto !important;
	right: 0 !important;
}

/* Tytuł strony kategorii / tagu / autora – jak H1 wpisu */
body:is(.category, .tag, .author) #inner-wrap h1.archive-title {
	font-family: "Bahnschrift", "Noto Sans", sans-serif;
	font-size: clamp(30px, 3.2vw, 46px) !important;
	font-weight: 700 !important;
	line-height: 1.15 !important;
	letter-spacing: -0.01em;
}

@media (max-width: 767px) {
	body:is(.blog, .category, .tag, .author) .rev-blog-card .rev-blog-card-title,
	body:is(.blog, .category, .tag, .author) .loop-entry .entry-title,
	body.single-post .entry-related .entry-title {
		font-size: 18px !important;
		hyphens: manual !important;
		-webkit-hyphens: manual !important;
	}
	body:is(.category, .tag, .author) #inner-wrap h1.archive-title {
		font-size: 28px !important;
		hyphens: manual !important;
		-webkit-hyphens: manual !important;
	}
}

/*
 * T5: siatka bloga = kontener menu (27.10.2026)
 * Menu: max 1400 px, 24 px z boków → lewa krawędź treści = lewa krawędź logo
 * (1920 → 284 px, 1440 → 44 px, ≤1400 i telefon → 24 px).
 * Przed: 3 różne kontenery (1500 bez odstępów, 1290 motywu, sekcja z wcięciem 60 px),
 *        zdjęcie wpisu i „Podobne wpisy” wychodziły poza kontener ujemnymi marginesami.
 * Po:    wszystkie elementy bloga od linii logo do prawej krawędzi menu.
 * Tła na całą szerokość ekranu (pas tytułu, sekcje) zostają – w kontenerze jest tylko treść.
 */

/* 1) Główny kontener treści: lista bloga, wpis, kategorie/tagi/autorzy */
body:is(.blog, .single-post, .category, .tag, .author) #primary > .content-container.site-container,
body.single-post .entry-hero .hero-container.site-container,
body:is(.category, .tag, .author) .entry-hero .hero-container.site-container,
body.single-post .entry-related-inner.content-container.site-container,
body.blog .rev-blog-latest-post-hero .rev-page-hero-inner {
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 1400px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 24px !important;
	padding-right: 24px !important;
}

/* 2) Lista bloga: sekcje i siatki w środku bez własnych wcięć */
body.blog .rev-blog-latest-post-hero .rev-page-hero-content {
	padding-left: 0 !important;
	margin-left: 0 !important;
}
body.blog :is(.rev-blog-filter, .rev-blog-results) {
	padding-left: 0 !important;
	padding-right: 0 !important;
}
body.blog :is(.rev-blog-filter-inner, .rev-blog-grid) {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* 3) Wpis: treść, zdjęcie główne, nawigacja i „Podobne wpisy” na szerokość kontenera */
/* tylko treść samego wpisu – kafelki „Podobne wpisy” zachowują swoje 32 px (poprawka T5b) */
body.single-post article.single-entry > .entry-content-wrap {
	padding-left: 0 !important;
	padding-right: 0 !important;
}
body.single-post .article-post-thumbnail,
body.single-post article.single-entry {
	width: auto !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
body.single-post .article-post-thumbnail img {
	width: 100% !important;
}
body.single-post .entry-hero .entry-header {
	align-items: flex-start !important;
	text-align: left !important;
}
body.single-post .entry-hero .entry-taxonomies {
	width: 100%;
	text-align: left !important;
	justify-content: flex-start !important;
}
body.single-post .entry-related-inner-content {
	width: auto !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	max-width: none !important;
}

/* 4) Kategorie/tagi/autorzy: tytuł w linii logo */
body:is(.category, .tag, .author) .entry-hero .entry-header,
body:is(.category, .tag, .author) #inner-wrap h1.archive-title,
body:is(.category, .tag, .author) .entry-hero .archive-description {
	text-align: left !important;
	align-items: flex-start !important;
	justify-content: flex-start !important;
	margin-left: 0 !important;
}

/*
 * T5b: kafelki „Podobne wpisy” – odstępy wewnątrz karty jak w kartach kategorii
 * (32 px, telefon 24 px). Reguła T5 zdejmująca boczne odstępy treści wpisu
 * obejmowała też te kafelki – tekst dotykał ramki. 27.10.2026
 */
body.single-post .entry-related .entry-content-wrap {
	padding: 32px !important;
}
@media (max-width: 767px) {
	body.single-post .entry-related .entry-content-wrap {
		padding: 24px !important;
	}
}
