/* ==========================================================================
   MAHL Blocksy – blog (Novinky, kategórie, článok) podľa reference/Novinky.dc.html.
   Štruktúra: docs/krok6-blog.php, štítky a záložky: inc/blog.php. Len var(--mahl-*).
   ========================================================================== */

/* ---------- Hero: štítky, nadpis s červenou linkou, perex ---------- */
.mahl-hero-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 18px;
}
.mahl-hero-tags .mahl-tag,
.entry-card .mahl-tag {
	height: 30px;
	padding: 0 12px;
	font-size: 18px;
}
:is(.blog, .category, .single-post) .hero-section .page-title::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin-top: 22px;
	background: var(--mahl-red);
}
.single-post .hero-section .page-description {
	margin-top: 22px;
	font-size: 21px;
	line-height: 1.5;
	color: var(--mahl-navy);
}

/* záložky kategórií (.mahl-subnav z tokenov) */
.mahl-news-cats {
	margin-top: 28px;
}
.mahl-news-cats a {
	min-height: 40px;
	font-size: 16px;
}

/* ---------- Karty v mriežke ---------- */
.entries[data-cards="simple"] {
	--grid-columns-gap: 32px;
	row-gap: 40px;
}
.entries .entry-card {
	gap: 0;
}
.entries .entry-card .ct-media-container {
	margin-bottom: 0;
	border-radius: 0;
}
.entries .entry-card .ct-media-container img {
	border-radius: 0;
}

/* kategória = červený štítok na spodnom okraji obrázka */
.entries .entry-card .entry-meta[data-id="meta_1"] {
	position: relative;
	z-index: 1;
	margin: -15px 0 0 0;
}
.entries .entry-card .entry-meta[data-id="meta_1"] li::after {
	display: none;
}
.entries .entry-card .entry-meta[data-id="meta_1"] a {
	display: inline-flex;
	align-items: center;
	height: 30px;
	padding: 0 12px;
	background: var(--mahl-red);
	color: var(--mahl-white);
	font-family: var(--mahl-font-meta);
	font-style: normal;
	font-weight: var(--mahl-fw-strong);
	font-size: 16px;
	text-transform: none;
	text-decoration: none;
}

/* dátum = meta riadok */
.entries .entry-card .entry-meta[data-id="meta_2"] {
	margin-top: 12px;
	font-family: var(--mahl-font-meta);
	font-style: italic;
	font-weight: var(--mahl-fw-meta);
	font-size: 14px;
	text-transform: uppercase;
	color: var(--mahl-muted);
}

.entries .entry-card .entry-title {
	--theme-font-size: clamp(22px, 2vw, 28px);
	--theme-line-height: .95;
	margin: 8px 0 0;
}
.entries .entry-card .entry-title a {
	color: var(--mahl-navy);
	text-decoration: none;
}
.entries .entry-card .entry-title a:hover {
	color: var(--mahl-red);
}

/* perex a „Čítať článok" len v prvej (širokej) karte */
.entries .entry-card :is(.entry-excerpt, .entry-button) {
	display: none;
}

/* ---------- Prvý článok na 1. strane = široká karta ---------- */
@media (min-width: 690px) {
	body:not(.paged) .entries[data-archive="default"] > .entry-card:first-child {
		grid-column: 1 / -1;
		position: relative;
		display: flex;
		flex-flow: row wrap;
		align-content: center;
		align-items: center;
		gap: 0 6px;
		min-height: 400px;
		padding: 48px 48px 48px calc(50% + 48px);
		background: var(--mahl-white);
	}
	body:not(.paged) .entries[data-archive="default"] > .entry-card:first-child .ct-media-container {
		position: absolute;
		inset: 0 auto 0 0;
		width: 50%;
		aspect-ratio: auto;
	}
	body:not(.paged) .entries[data-archive="default"] > .entry-card:first-child .ct-media-container img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
	body:not(.paged) .entries[data-archive="default"] > .entry-card:first-child .entry-meta {
		margin: 0;
	}
	/* dátum ako navy štítok pred kategóriou */
	body:not(.paged) .entries[data-archive="default"] > .entry-card:first-child .entry-meta[data-id="meta_2"] {
		order: -1;
	}
	body:not(.paged) .entries[data-archive="default"] > .entry-card:first-child .entry-meta[data-id="meta_2"] time {
		display: inline-flex;
		align-items: center;
		height: 30px;
		padding: 0 12px;
		background: var(--mahl-navy);
		color: var(--mahl-white);
		font-style: normal;
		font-weight: var(--mahl-fw-strong);
		font-size: 16px;
		text-transform: none;
	}
	body:not(.paged) .entries[data-archive="default"] > .entry-card:first-child :is(.entry-title, .entry-excerpt, .entry-button) {
		flex: 0 0 100%;
	}
	body:not(.paged) .entries[data-archive="default"] > .entry-card:first-child .entry-title {
		--theme-font-size: clamp(32px, 3.6vw, 52px);
		margin-top: 22px;
	}
	body:not(.paged) .entries[data-archive="default"] > .entry-card:first-child .entry-title::after {
		content: "";
		display: block;
		width: 56px;
		height: 4px;
		margin-top: 18px;
		background: var(--mahl-red);
	}
	body:not(.paged) .entries[data-archive="default"] > .entry-card:first-child .entry-excerpt {
		display: block;
		margin-top: 18px;
		font-size: 15px;
		color: var(--mahl-text-2);
	}
	body:not(.paged) .entries[data-archive="default"] > .entry-card:first-child .entry-button {
		display: block;
		flex: 0 0 auto;
		margin-top: 16px;
		padding: 0 0 2px;
		background: none;
		border: 0;
		border-bottom: 3px solid var(--mahl-red);
		color: var(--mahl-navy);
		font-family: var(--mahl-font-display);
		font-style: italic;
		font-weight: var(--mahl-fw-strong);
		font-size: 19px;
		text-transform: uppercase;
		text-decoration: none;
	}
}

/* ---------- Stránkovanie: štvorce ---------- */
.ct-pagination {
	--theme-border-radius: 0;
	justify-content: center;
	gap: 4px;
}
.ct-pagination :is(a, span).page-numbers {
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 0;
	border-radius: 0;
	background: var(--mahl-white);
	color: var(--mahl-navy);
	font-family: var(--mahl-font-display);
	font-style: italic;
	font-weight: var(--mahl-fw-display);
	font-size: 18px;
	text-transform: uppercase;
}
.ct-pagination .page-numbers.current,
.ct-pagination a.page-numbers:hover {
	background: var(--mahl-navy);
	color: var(--mahl-white);
}

/* ---------- Článok ---------- */
.single-post .ct-featured-image img {
	border-radius: 0;
}
.single-post .post-navigation .item-label {
	font-family: var(--mahl-font-meta);
	font-style: italic;
	font-weight: var(--mahl-fw-meta);
	text-transform: uppercase;
	color: var(--mahl-muted);
}
.single-post .post-navigation .item-title {
	font-family: var(--mahl-font-display);
	font-style: italic;
	font-weight: var(--mahl-fw-display);
	text-transform: uppercase;
	color: var(--mahl-navy);
}
.single-post .post-navigation .ct-media-container img {
	border-radius: 0;
}

/* súvisiace články */
.ct-related-posts-container {
	background: var(--mahl-white);
}
.ct-related-posts .ct-module-title {
	--theme-font-size: 34px;
	padding-bottom: 10px;
	border-bottom: 3px solid var(--mahl-navy);
}
.ct-related-posts .ct-media-container,
.ct-related-posts .ct-media-container img {
	border-radius: 0;
}
.ct-related-posts .related-entry-title {
	--theme-font-family: var(--mahl-font-display);
	--theme-font-style: italic;
	--theme-font-weight: var(--mahl-fw-display);
	--theme-font-size: 22px;
	--theme-line-height: .95;
	--theme-text-transform: uppercase;
}
.ct-related-posts .related-entry-title a {
	color: var(--mahl-navy);
}
.ct-related-posts .related-entry-title a:hover {
	color: var(--mahl-red);
}
.ct-related-posts .entry-meta {
	font-family: var(--mahl-font-meta);
	font-style: italic;
	text-transform: uppercase;
	color: var(--mahl-muted);
}

/* veľkosť nadpisu stránky (Blocksy ju nastavuje cez .entry-header .page-title) */
body:is(.blog, .category) .hero-section .entry-header .page-title {
	--theme-font-size: clamp(44px, 6.2vw, 80px);
}
body.single-post .hero-section .entry-header .page-title {
	--theme-font-size: clamp(34px, 4.6vw, 60px);
}
.single-post .post-navigation .ct-media-container {
	border-radius: 0;
}
