/* ------------------------------------------------------------------
 * Niewinski Okna - kompensacja wygladu po uporzadkowaniu POZIOMOW naglowkow
 *
 * Porzadkujemy hierarchie (zeby nie bylo przeskokow h1 -> h5 czy h2 -> h4),
 * ale wyglad ma zostac CO DO PIKSELA taki sam. Kazdy element, ktoremu
 * zmieniono znacznik, dostaje tu z powrotem metryki SWOJEGO STAREGO znacznika.
 *
 * Wartosci nie sa zgadywane - pochodza wprost z motywu:
 *   - desktop:   zmienne --theme-font-hN_* z custom.css
 *   - <=1279px:  responsive.css (nadpisany tylko font-size; interlinia
 *                i marginesy sa w "em", wiec skaluja sie same)
 *   - <=1023px:  responsive.css
 *   - <=767px:   j.w. + wyzerowany letter-spacing
 *   - <=479px:   j.w.
 *
 * Skala motywu, dla porzadku (desktop / 1279 / 1023 / 767 / 479):
 *   h2  2.765em / 36 / 30 / 25 / 23 px
 *   h3  2.059em / 28 / 25 / 23 / 21 px
 *   h4  1.529em / 23 / 22 / 21 / 19 px
 *   h5  1.412em / 20 / 20 / 19 / 18 px
 *   h6  1.118em / 18 / 18 / 17 / 17 px
 *
 * STOPKA JEST CELOWO POMINIETA - tytuly "Odwiedz nas" i "Porozmawiajmy"
 * zostaja jako h6 (decyzja z 22.09).
 * ------------------------------------------------------------------ */


/* ==================================================================
 * CZESC 1: naglowki przestawiane przy renderowaniu (klasy nw-was-hN)
 *
 * DLACZEGO :where()
 * Te naglowki siedza w listach wpisow, realizacji i w nawigacji, gdzie
 * o rozmiarze decyduje caly stos regul motywu - raz klasa ukladu, raz goly
 * znacznik, inaczej na kazdej szerokosci ekranu. Zamiast przepisywac ten
 * stos (i przeoczyc jedna regule na trzydziesci), wchodzimy w kaskade
 * DOKLADNIE tam, gdzie siedzial znacznik, ktory zastepujemy.
 *
 * :where() nie dodaje specyficznosci, wiec selektor "h3:where(.nw-was-h5)"
 * wazy tyle samo co samo "h3" - czyli tyle, co goly "h5" przed zmiana.
 * Skutek: nasza regula wygrywa wszedzie tam, gdzie wczesniej wygrywal goly
 * znacznik, i przegrywa z kazda regula opartana klasach ukladu - dokladnie
 * tak, jak przegrywal goly znacznik. Rownowaznosc wynika z konstrukcji,
 * nie z wyliczenia przypadkow.
 *
 * Arkusz laduje jako ostatni, wiec przy remisie specyficznosci
 * (nasza regula kontra goly nowy znacznik) wygrywa nasza.
 * ================================================================== */

/* --- bylo h3 (pierwszy wpis na /baza-wiedzy/) -------------------- */
h2:where(.nw-was-h3),
h3:where(.nw-was-h3),
h4:where(.nw-was-h3) {
	font-size: 2.059em;
	line-height: 1.086em;
	letter-spacing: -1px;
	margin-top: 1.15em;
	margin-bottom: 0.63em;
}

@media (max-width: 1279px) {
	h2:where(.nw-was-h3),
	h3:where(.nw-was-h3),
	h4:where(.nw-was-h3) {
		font-size: 28px;
	}
}

@media (max-width: 1023px) {
	h2:where(.nw-was-h3),
	h3:where(.nw-was-h3),
	h4:where(.nw-was-h3) {
		font-size: 25px;
		line-height: 29px;
		margin-top: 25px;
		margin-bottom: 16px;
	}
}

@media (max-width: 767px) {
	h2:where(.nw-was-h3),
	h3:where(.nw-was-h3),
	h4:where(.nw-was-h3) {
		font-size: 23px;
		line-height: 27px;
		margin-top: 24px;
		margin-bottom: 14px;
		letter-spacing: 0;
	}
}

@media (max-width: 479px) {
	h2:where(.nw-was-h3),
	h3:where(.nw-was-h3),
	h4:where(.nw-was-h3) {
		font-size: 21px;
		line-height: 25px;
		margin-top: 22px;
		margin-bottom: 13px;
		letter-spacing: 0;
	}
}


/* --- bylo h4 (kafle wpisow na stronie glownej i /baza-wiedzy/,
 *              kafle ikon na /o-nas/ i /okna-premium-prestige/) ---- */
h2:where(.nw-was-h4),
h3:where(.nw-was-h4) {
	font-size: 1.529em;
	line-height: 1.214em;
	letter-spacing: -0.5px;
	margin-top: 1.44em;
	margin-bottom: 0.62em;
}

@media (max-width: 1279px) {
	h2:where(.nw-was-h4),
	h3:where(.nw-was-h4) {
		font-size: 23px;
	}
}

@media (max-width: 1023px) {
	h2:where(.nw-was-h4),
	h3:where(.nw-was-h4) {
		font-size: 22px;
		line-height: 27px;
		margin-top: 24px;
		margin-bottom: 15px;
	}
}

@media (max-width: 767px) {
	h2:where(.nw-was-h4),
	h3:where(.nw-was-h4) {
		font-size: 21px;
		line-height: 25px;
		margin-top: 21px;
		margin-bottom: 12px;
		letter-spacing: 0;
	}
}

@media (max-width: 479px) {
	h2:where(.nw-was-h4),
	h3:where(.nw-was-h4) {
		font-size: 19px;
		line-height: 23px;
		margin-top: 20px;
		margin-bottom: 12px;
		letter-spacing: 0;
	}
}


/* --- bylo h5 (realizacje: siatka na /realizacje/ i suwaki) -------- */
h2:where(.nw-was-h5),
h3:where(.nw-was-h5) {
	font-size: 1.412em;
	line-height: 1.208em;
	letter-spacing: -0.5px;
	margin-top: 1.55em;
	margin-bottom: 0.8em;
}

@media (max-width: 1279px) {
	h2:where(.nw-was-h5),
	h3:where(.nw-was-h5) {
		font-size: 20px;
	}
}

@media (max-width: 1023px) {
	h2:where(.nw-was-h5),
	h3:where(.nw-was-h5) {
		font-size: 20px;
		line-height: 25px;
		margin-top: 20px;
		margin-bottom: 12px;
	}
}

@media (max-width: 767px) {
	h2:where(.nw-was-h5),
	h3:where(.nw-was-h5) {
		font-size: 19px;
		line-height: 23px;
		margin-top: 20px;
		margin-bottom: 11px;
		letter-spacing: 0;
	}
}

@media (max-width: 479px) {
	h2:where(.nw-was-h5),
	h3:where(.nw-was-h5) {
		font-size: 18px;
		line-height: 22px;
		margin-top: 20px;
		margin-bottom: 10px;
		letter-spacing: 0;
	}
}


/* --- bylo h6 (na stronie wpisu: nawigacja "poprzedni / nastepny"
 *              oraz tytuly w bloku "Zobacz rowniez") --------------- */
h3:where(.nw-was-h6),
h4:where(.nw-was-h6) {
	font-size: 1.118em;
	line-height: 1.474em;
	letter-spacing: -0.6px;
	margin-top: 1.75em;
	margin-bottom: 1.1em;
}

@media (max-width: 1279px) {
	h3:where(.nw-was-h6),
	h4:where(.nw-was-h6) {
		font-size: 18px;
		margin-bottom: 12px;
	}
}

@media (max-width: 1023px) {
	h3:where(.nw-was-h6),
	h4:where(.nw-was-h6) {
		font-size: 18px;
		line-height: 22px;
		margin-top: 23px;
		margin-bottom: 10px;
	}
}

@media (max-width: 767px) {
	h3:where(.nw-was-h6),
	h4:where(.nw-was-h6) {
		font-size: 17px;
		line-height: 21px;
		margin-top: 18px;
		margin-bottom: 9px;
		letter-spacing: 0;
	}
}

@media (max-width: 479px) {
	h3:where(.nw-was-h6),
	h4:where(.nw-was-h6) {
		font-size: 17px;
		line-height: 21px;
		margin-top: 18px;
		margin-bottom: 8px;
		letter-spacing: 0;
	}
}


/* ==================================================================
 * CZESC 2: naglowki przestawione w danych Elementora (strona glowna)
 *
 * Tu znamy konkretne widgety, wiec celujemy w nie wprost - to czytelniejsze
 * niz dokladanie im klas i pewniejsze niz poleganie na kolejnosci arkuszy.
 * ================================================================== */

/* --- "Patryk Niewinski" (widget cebd270): h5 -> h2 ---------------
 * Pierwszy naglowek po H1, wiec przeskok h1 -> h5 byl najgorszy na
 * witrynie. Widget nie ma przypietej typografii, rozmiar szedl wprost
 * z reguly h5 - odtwarzamy komplet metryk h5.
 * Uwaga: przy <=767 i <=479 o interlinii decydowala regula
 * h5.sc_item_title (20 px), a nie sam znacznik - stad te wartosci.   */

.page-id-62 .elementor-element-cebd270 h2.sc_item_title {
	font-size: 1.412em;
	line-height: 1.208em;
	letter-spacing: -0.5px;
	margin-top: 1.55em;
	margin-bottom: 0.8em;
}

@media (max-width: 1279px) {
	.page-id-62 .elementor-element-cebd270 h2.sc_item_title {
		font-size: 20px;
	}
}

@media (max-width: 1023px) {
	.page-id-62 .elementor-element-cebd270 h2.sc_item_title {
		font-size: 20px;
		line-height: 25px;
		margin-top: 20px;
		margin-bottom: 12px;
	}
}

@media (max-width: 767px) {
	.page-id-62 .elementor-element-cebd270 h2.sc_item_title {
		font-size: 19px;
		line-height: 20px;
		margin-top: 20px;
		margin-bottom: 11px;
		letter-spacing: 0;
	}

	/* Motyw zmniejszal podpis "Wlasciciel" regula zalezna od znacznika
	 * tytulu (.sc_title_default h5.sc_item_title_tag + .sc_title_subtitle).
	 * Po zmianie na h2 przestala pasowac - odtwarzamy ja punktowo.     */
	.page-id-62 .elementor-element-cebd270 .sc_title_subtitle {
		font-size: 1em;
	}
}

@media (max-width: 479px) {
	.page-id-62 .elementor-element-cebd270 h2.sc_item_title {
		font-size: 18px;
		line-height: 20px;
		margin-top: 20px;
		margin-bottom: 10px;
		letter-spacing: 0;
	}
}


/* --- Etykiety "Segment" x3: h6 -> h3 ------------------------------
 * To widgety atomowe Elementora. font-size (14px), letter-spacing,
 * grubosc i kolor sa przypiete w local-62-frontend-desktop.css, a
 * .e-heading-base zeruje marginesy - jedyna rzecza, ktora zalezala od
 * znacznika, byla INTERLINIA. Tylko ona wymaga odtworzenia.          */

.elementor .e-4834d36-f938cc3.e-heading-base,
.elementor .e-d5054c7-094fbca.e-heading-base,
.elementor .e-4592346-541545f.e-heading-base {
	line-height: 1.474em;
}

@media (max-width: 1023px) {
	.elementor .e-4834d36-f938cc3.e-heading-base,
	.elementor .e-d5054c7-094fbca.e-heading-base,
	.elementor .e-4592346-541545f.e-heading-base {
		line-height: 22px;
	}
}

@media (max-width: 767px) {
	.elementor .e-4834d36-f938cc3.e-heading-base,
	.elementor .e-d5054c7-094fbca.e-heading-base,
	.elementor .e-4592346-541545f.e-heading-base {
		line-height: 21px;
	}
}
