/*
 * Pojedynczy wpis (TC\Theme\Wpis) — ładowane tylko na stronie wpisu.
 * Hero korzysta z CSS bloku Hero; tu odmiana .tc-hero--wpis, panel boczny,
 * treść z bloków Gutenberga (akapit, nagłówek, cytat, zdjęcie, lista kroków) i box CTA.
 * Breakpointy z projektu: desktop od 1080px, mobile poniżej 720px. Wymiary w px (html = 15px).
 */

/* ---------- Hero ---------- */

.tc-hero.tc-hero--wpis {
	min-height: clamp(480px, 40vw, 620px);
}

.tc-hero--wpis .tc-hero__inner {
	justify-content: flex-end;
	padding-bottom: clamp(56px, 6vw, 80px);
}

.tc-hero--wpis .tc-hero__tresc {
	max-width: 820px;
}

.tc-hero--wpis .tc-hero__title {
	font-size: clamp(30px, 4.2vw, 56px);
}

.tc-hero--wpis .tc-hero__cien {
	background: linear-gradient(180deg, color-mix(in srgb, var(--czern) 85%, transparent) 0%, transparent 30%, transparent 60%, color-mix(in srgb, var(--czern) 70%, transparent) 100%);
}

.tc-hero--wpis .tc-hero__cien::before {
	background: linear-gradient(90deg, color-mix(in srgb, var(--czern) 88%, transparent) 0%, color-mix(in srgb, var(--czern) 66%, transparent) 45%, color-mix(in srgb, var(--czern) 30%, transparent) 75%, color-mix(in srgb, var(--czern) 15%, transparent) 100%);
}

.tc-wpis__okruszki {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.tc-wpis__okruszki span[aria-hidden] {
	color: var(--tc-color-text);
}

.tc-hero .tc-wpis__okruszki a {
	color: var(--tc-color-text-on-dark);
	text-decoration: none;
	transition: color var(--tc-transition);
}

.tc-hero .tc-wpis__okruszki a:hover,
.tc-hero .tc-wpis__okruszki a:focus-visible {
	color: var(--tc-color-primary);
}

.tc-wpis__okruszki-biezacy {
	color: var(--tc-color-label);
}

.tc-section .tc-wpis__hero-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 28px;
	margin: 0;
	color: var(--tc-color-text-on-dark);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.tc-wpis__hero-meta b {
	color: var(--tc-color-bg);
	font-weight: 800;
}

/* ---------- Treść z panelem ---------- */

.tc-section.tc-wpis {
	padding-block: clamp(56px, 7vw, 96px) clamp(72px, 8vw, 104px);
	background-color: var(--tc-color-bg);
	color: var(--tc-color-heading);
}

.tc-wpis__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(32px, 5vw, 72px);
	align-items: start;
}

.tc-wpis__panel {
	display: flex;
	flex-wrap: wrap;
	gap: 20px 36px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--tc-color-szary-jasny);
}

.tc-wpis__pole {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tc-wpis__pole-nazwa {
	color: var(--tc-color-text);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.tc-wpis__pole-wartosc {
	font-size: 15px;
	font-weight: 800;
}

.tc-wpis__kategoria {
	color: var(--tc-color-label);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.tc-wpis__udostepnij {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
}

.tc-section .tc-wpis__przycisk-ikona,
.tc-section .tc-wpis__kopiuj {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	border: 0;
	border-radius: 0;
	background-color: var(--tc-color-bg-dark);
	color: var(--tc-color-bg);
	transition: background-color var(--tc-transition), color var(--tc-transition);
}

.tc-section .tc-wpis__przycisk-ikona {
	width: 40px;
}

.tc-section .tc-wpis__kopiuj {
	gap: 8px;
	padding: 0 14px;
	font: inherit;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
}

.tc-section .tc-wpis__przycisk-ikona:hover,
.tc-section .tc-wpis__przycisk-ikona:focus-visible,
.tc-section .tc-wpis__kopiuj:hover,
.tc-section .tc-wpis__kopiuj:focus-visible {
	background-color: var(--tc-color-primary);
	color: var(--tc-color-heading);
}

.tc-section .tc-wpis__powrot {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 10px;
	padding: 4px 0;
	color: var(--tc-color-heading);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-decoration: none;
	text-transform: uppercase;
	transition: color var(--tc-transition);
}

.tc-section .tc-wpis__powrot:hover,
.tc-section .tc-wpis__powrot:focus-visible {
	color: var(--tc-color-label);
}

.tc-wpis__powrot-strzalka {
	transform: rotate(180deg);
}

.tc-wpis__artykul {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
	max-width: 760px;
}

.tc-section .tc-wpis__lead {
	margin: 0 0 8px;
	color: var(--tc-color-heading);
	font-size: clamp(18px, 1.6vw, 22px);
	font-weight: 500;
	line-height: 1.6;
	text-wrap: pretty;
}

/* ---------- Bloki w treści ---------- */

.tc-wpis__tresc {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.tc-section .tc-wpis__tresc > * {
	margin: 0;
}

.tc-section .tc-wpis__tresc p {
	color: var(--tc-color-text);
	font-size: 16px;
	line-height: 1.8;
	text-wrap: pretty;
}

.tc-section .tc-wpis__tresc a {
	color: var(--tc-color-heading);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tc-section .tc-wpis__tresc a:hover,
.tc-section .tc-wpis__tresc a:focus-visible {
	color: var(--tc-color-label-na-jasnym);
}

.tc-section .tc-wpis__tresc :is(h2, h3, h4) {
	color: var(--tc-color-heading);
	font-weight: 800;
	line-height: 1.15;
	text-transform: uppercase;
	text-wrap: balance;
}

.tc-section .tc-wpis__tresc h2 {
	margin-top: 24px;
	font-size: clamp(22px, 2.2vw, 30px);
}

.tc-section .tc-wpis__tresc :is(h3, h4) {
	margin-top: 12px;
	font-size: clamp(18px, 1.7vw, 22px);
}

/* Cytat: jasne tło, niebieski cudzysłów, tekst w gradiencie hasła. */
.tc-section .tc-wpis__tresc blockquote {
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin-block: 20px;
	padding: clamp(28px, 3.4vw, 44px) clamp(24px, 3.4vw, 44px);
	border: 0;
	background-color: var(--tc-color-bg-soft);
	font-style: normal;
}

/* Rdzeń WP dokłada cytatowi lewą ramkę selektorem z dwoma :not() — mocniejszym niż powyższy. */
.tc-section .tc-wpis__tresc .wp-block-quote.wp-block-quote {
	border: 0;
}

/* Pusty ::after z CSS Astry byłby w flexie kolejnym elementem i dokładał 18 px przerwy pod tekstem. */
.tc-section .tc-wpis__tresc blockquote::after {
	content: none;
}

.tc-section .tc-wpis__tresc blockquote::before {
	content: "";
	width: 34px;
	height: 26px;
	background-color: var(--tc-color-label);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 26'%3E%3Cpath d='M0 26V15.6C0 6.9 4.6 1.7 13.2 0l1.6 3.9C10 5.3 7.7 8 7.4 12H14v14H0Zm19.2 0V15.6C19.2 6.9 23.8 1.7 32.4 0L34 3.9c-4.8 1.4-7.1 4.1-7.4 8.1h6.6v14h-14Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 26'%3E%3Cpath d='M0 26V15.6C0 6.9 4.6 1.7 13.2 0l1.6 3.9C10 5.3 7.7 8 7.4 12H14v14H0Zm19.2 0V15.6C19.2 6.9 23.8 1.7 32.4 0L34 3.9c-4.8 1.4-7.1 4.1-7.4 8.1h6.6v14h-14Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tc-section .tc-wpis__tresc blockquote p {
	margin: 0;
	background: var(--tc-gradient-haslo);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-size: clamp(20px, 2.1vw, 28px);
	font-weight: 800;
	line-height: 1.3;
	text-wrap: balance;
}

.tc-section .tc-wpis__tresc blockquote cite {
	color: var(--tc-color-text);
	font-size: 13px;
	font-style: normal;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Zdjęcie: kadr 16:9 jak w projekcie, podpis pod spodem. */
.tc-section .tc-wpis__tresc figure.wp-block-image {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-block: 16px;
}

.tc-wpis__tresc figure.wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.tc-section .tc-wpis__tresc figcaption {
	margin: 0;
	color: var(--tc-color-text);
	font-size: 13px;
	line-height: 1.5;
	text-align: left;
}

/* Lista numerowana = kroki: limonkowy kwadrat z numerem (01, 02…) na jasnym tle. */
.tc-section .tc-wpis__tresc ol {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 0;
	list-style: none;
	counter-reset: tc-krok;
}

/* Własny licznik: wbudowany list-item nie liczy elementów z display: flex (wychodziło „00”). */
.tc-section .tc-wpis__tresc ol > li {
	counter-increment: tc-krok;
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin: 0;
	padding: 18px 20px;
	background-color: var(--tc-color-krok);
	color: var(--tc-color-heading);
	font-size: 15px;
	line-height: 1.6;
	list-style: none;
	text-wrap: pretty;
}

.tc-section .tc-wpis__tresc ol > li::before {
	content: counter(tc-krok, decimal-leading-zero);
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin-top: -5px;
	background-color: var(--tc-color-primary);
	color: var(--tc-color-heading);
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
}

.tc-section .tc-wpis__tresc ul {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-left: 20px;
}

.tc-section .tc-wpis__tresc ul > li {
	margin: 0;
	color: var(--tc-color-text);
	font-size: 16px;
	line-height: 1.7;
}

/* ---------- Box pod treścią ---------- */

.tc-wpis__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 24px;
	padding: clamp(24px, 3vw, 36px);
	background-color: var(--tc-color-bg-dark);
	color: var(--tc-color-bg);
}

.tc-wpis__cta-tekst {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 440px;
}

.tc-section .tc-wpis__cta-etykieta {
	margin: 0;
	color: var(--tc-color-label);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.tc-section .tc-wpis__cta-zdanie {
	margin: 0;
	color: var(--tc-color-bg);
	font-size: clamp(18px, 1.8vw, 24px);
	font-weight: 800;
	line-height: 1.25;
}

.tc-section a.tc-button.tc-wpis__cta-przycisk {
	padding: 17px 22px;
}

/* ---------- Desktop: panel po lewej, przyklejony ---------- */

@media (min-width: 1080px) {
	.tc-wpis__inner {
		grid-template-columns: 220px minmax(0, 1fr);
	}

	.tc-wpis__panel {
		position: sticky;
		top: 110px;
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 28px;
		padding-bottom: 0;
		border-bottom: 0;
	}
}
