/* 08 Blogcikk (single.php): fotós fej, cikk tipográfia, „Olvass tovább”. */

/* A „Blog” menüpont a cikk oldalán is aktív (a WordPress current_page_parent osztálya). */
.tf-page-blogcikk :is(.tf-nav, .tf-mobile-nav) .current_page_parent > a {
	color: var(--c-blue-strong);
}

/* ---------- Fotós fej ---------- */
.tf-article-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(480px, 41.7vw, 600px);
	overflow: hidden;
	border-radius: var(--r-xl);
	background: var(--c-navy);
	isolation: isolate;
}

.tf-article-hero__img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tf-article-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(8, 41, 52, 0) 40%, rgba(8, 41, 52, 0.55) 70%, rgba(8, 41, 52, 0.85) 100%);
}

.tf-article-hero__body {
	display: grid;
	gap: 6px;
	width: 100%;
	padding: 22px;
}

.tf-article-hero__crumb-list {
	display: flex;
	flex-wrap: wrap;
	color: var(--c-sky-400);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
}

.tf-article-hero__crumb-list li + li::before {
	content: "·";
	margin-inline: 0.35em;
}

.tf-article-hero__crumb-list a {
	color: inherit;
	text-decoration: none;
}

.tf-article-hero__crumb-list a:hover {
	color: #fff;
	text-decoration: underline;
}

.tf-article-hero__title {
	max-width: 13.5em;
	color: #fff;
	font-size: clamp(1.875rem, 1.1rem + 2.9vw, 3.75rem);
	line-height: 1.12;
	text-wrap: pretty;
}

.tf-article-hero__meta {
	margin-top: 4px;
	color: var(--c-sky-200);
	font-size: 0.875rem;
}

/* ---------- Cikk ---------- */
.tf-article__body {
	max-width: calc(740px + 2 * var(--gutter));
	padding-top: 32px;
}

.tf-article__content {
	font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
	line-height: 1.78;
}

.tf-article__content > * + * {
	margin-top: 1em;
}

.tf-article__content h2 {
	margin-top: 1.12em;
	margin-bottom: 0;
	font-size: clamp(1.5rem, 1.25rem + 0.85vw, 2rem);
	line-height: 1.25;
	text-wrap: pretty;
}

.tf-article__content h3 {
	margin-top: 1.5em;
	margin-bottom: 0;
	font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
	line-height: 1.3;
}

.tf-article__content :is(h2, h3, h4) + * {
	margin-top: 0.95em;
}

/* Kiemelt idézet a design szerint: középre zárt, kék, nagy betű, háttér nélkül. */
.tf-article__content blockquote {
	margin: 1.25em 0 1.65em;
	padding: 0 16px;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--c-blue);
	font-family: var(--f-head);
	font-size: clamp(1.5rem, 1.25rem + 0.85vw, 2rem);
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	text-wrap: pretty;
}

.tf-article__content blockquote p {
	margin: 0;
}

.tf-article__content blockquote cite {
	display: block;
	margin-top: 0.6em;
	color: var(--c-muted);
	font-family: var(--f-body);
	font-size: var(--fs-sm);
	font-style: normal;
	font-weight: 500;
}

/* Az idézőjelet a sablon teszi ki (a design „…” jele), a szövegben nincs. */
.tf-article__content blockquote {
	quotes: "„" "”";
}

.tf-article__content blockquote p:first-of-type::before {
	content: open-quote;
}

.tf-article__content blockquote p:last-of-type::after {
	content: close-quote;
}

/* Gomb a cikk szövegében (pl. „Árat számolok”): a gomb saját színei, nem a szöveges link stílusa. */
.tf-article__content a.tf-btn {
	color: var(--c-navy);
	text-decoration: none;
}

.tf-article__content a.tf-btn:hover {
	background: var(--c-navy);
	color: #fff;
}

.tf-article__content :is(figure, .wp-block-image, img) {
	margin-block: 1.6em;
}

.tf-article__content figcaption {
	margin-top: 8px;
	color: var(--c-muted);
	font-size: var(--fs-sm);
	line-height: 1.45;
}

/* Egymás utáni képek (a tofolia_blog_content_fixes() csomagolja): két hasáb, mobilon is. */
.tf-article__gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: start;
	gap: 12px;
	margin-block: 1.6em;
}

.tf-article__content .tf-article__gallery figure {
	margin: 0;
}

.tf-article__gallery img {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	margin: 0;
	border-radius: var(--r-lg);
	object-fit: cover;
}

/* Árpélda tábla (a [tofolia_price_examples] rövidkód): széles, ezért vízszintesen görgethető. */
.tf-article__content .tf-table-wrap {
	overflow-x: auto;
}

/* A fejléc tördelhető, a számok nem: desktopon így a 7 oszlop elfér a cikk szélességében. */
.tf-article__content .tf-price-examples :is(th, td) {
	padding-inline: 8px;
	vertical-align: bottom;
}

.tf-article__content .tf-price-examples td {
	white-space: nowrap;
}

.tf-article__content .tf-price-examples th {
	min-width: 5.5em;
	line-height: 1.3;
}

.tf-article__content .tf-price-examples__note {
	margin-top: 0.75em;
	color: var(--c-muted);
	font-size: var(--fs-sm);
	line-height: 1.55;
}

/* 800 px alatt a 7 oszlop nem fér ki: soronként egy kártya, a cella előtt az oszlop neve (data-label). */
@media (max-width: 799.98px) {
	.tf-article__content .tf-table-wrap:has(> .tf-price-examples) {
		padding: 0;
		overflow: visible;
		background: none;
	}

	.tf-article__content .tf-price-examples,
	.tf-article__content .tf-price-examples :is(tbody, tr, td) {
		display: block;
	}

	.tf-article__content .tf-price-examples thead {
		display: none;
	}

	.tf-article__content .tf-price-examples tbody {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
		gap: 12px;
	}

	.tf-article__content .tf-price-examples tr {
		padding: 4px 18px;
		border-radius: var(--r-md);
		background: var(--c-surface);
	}

	.tf-article__content .tf-price-examples tr td {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: 12px;
		padding: 10px 0;
		border-bottom: 1px solid var(--c-line-soft);
		text-align: right;
		white-space: normal;
	}

	.tf-article__content .tf-price-examples td::before {
		content: attr(data-label);
		color: var(--c-muted);
		text-align: left;
	}

	/* Kártya fej: a tó mérete, fölötte kicsiben az oszlop neve. */
	.tf-article__content .tf-price-examples tr td:first-child {
		display: block;
		color: var(--c-ink);
		font-weight: 700;
		text-align: left;
	}

	.tf-article__content .tf-price-examples td:first-child::before {
		display: block;
		font-size: var(--fs-2xs);
		font-weight: 500;
	}

	.tf-article__content .tf-price-examples tr td:last-child {
		border-bottom: 0;
		color: var(--c-ink);
		font-size: 1rem;
	}

	.tf-article__content .tf-price-examples td:last-child::before {
		color: var(--c-ink);
		font-weight: 600;
	}
}

.tf-article__content table {
	font-size: var(--fs-sm);
}

/* ---------- Olvass tovább ---------- */
.tf-article-related {
	margin-top: 36px;
}

.tf-article-related__title {
	font-size: clamp(1.5rem, 1.25rem + 0.85vw, 2rem);
	line-height: 1.3;
}

.tf-article-related__list {
	display: grid;
	grid-auto-columns: 240px;
	grid-auto-flow: column;
	gap: 12px;
	margin: 8px calc(-1 * var(--gutter)) 0;
	padding: 6px var(--gutter); /* felül is: a fókuszgyűrűt ne vágja le a görgető sáv */
	overflow-x: auto;
	scroll-padding-inline: var(--gutter);
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.tf-article-related__list::-webkit-scrollbar {
	display: none;
}

.tf-related-card {
	scroll-snap-align: start;
}

.tf-related-card__link {
	display: grid;
	gap: 12px;
	color: var(--c-ink);
	text-decoration: none;
}

.tf-related-card__media {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--r-lg);
	background: var(--c-surface);
}

.tf-related-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms var(--ease);
}

.tf-related-card__title {
	color: var(--c-ink);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
	text-wrap: pretty;
}

.tf-related-card__link:hover .tf-related-card__title {
	color: var(--c-blue-strong);
}

@media (hover: hover) {
	.tf-related-card__link:hover .tf-related-card__img {
		transform: scale(1.03);
	}
}

/* A design szerint a CTA sáv közelebb van a kapcsolódó cikkekhez, mint a --s-section (mobil ~40, desktop ~100 px). */
.tf-page-blogcikk .tf-cta-wrap {
	padding-top: clamp(40px, 0.75rem + 6.2vw, 100px);
}

/* ---------- 640+ ---------- */
@media (min-width: 640px) {
	.tf-article-hero__body {
		padding: 40px;
	}

	.tf-article-related__list {
		grid-auto-columns: auto;
		grid-auto-flow: row;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
		margin: 14px 0 0;
		padding: 0;
		overflow: visible;
	}
}

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
	.tf-article-hero__body {
		gap: 10px;
		padding: 0 96px 60px;
	}

	.tf-article-hero__crumb-list {
		font-size: var(--fs-xs);
		letter-spacing: 0.04em;
	}

	.tf-article-hero__title {
		max-width: 820px;
		line-height: 1.1;
	}

	.tf-article-hero__meta {
		margin-top: 8px;
		font-size: 1rem;
	}

	.tf-article__body {
		padding-top: 72px;
	}

	.tf-article__content h2 {
		margin-top: 1.25em;
	}

	.tf-article__content :is(h2, h3, h4) + * {
		margin-top: 1.15em;
	}

	.tf-article__content blockquote {
		margin: 1.2em 0 1.74em;
		line-height: 1.34;
	}

	.tf-article-related {
		margin-top: 80px;
	}

	.tf-article-related__list {
		gap: 20px;
		margin-top: 18px;
	}

	.tf-related-card__media {
		aspect-ratio: 419 / 240;
	}

	.tf-related-card__link {
		gap: 11px;
	}

	.tf-related-card__title {
		font-size: 1.3125rem;
	}
}
