/* HOBBYTEC Core — Single článok [hbtc_post] */

.hbtc-post {
	--p-green:  #78b956;
	--p-yellow: #f1bb41;
	--p-dark:   #221f20;
	--p-cream:  #f1f1ee;
	--p-soft:   #f8f8f6;
	width: 100%;
	max-width: 1600px;
	margin-left: auto;
	margin-right: auto;
	font-family: "Gilroy-Regular", system-ui, sans-serif;
	color: var(--p-dark);
}

.hbtc-post *,
.hbtc-post *::before,
.hbtc-post *::after { box-sizing: border-box; }

/* ── Reveal ──────────────────────────────────────────────────────────────── */
.hbtc-post [data-hbtc-reveal] {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.6s ease, transform 0.7s cubic-bezier(.22, 1, .36, 1);
}
.hbtc-post [data-hbtc-reveal].is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ── Wrap ────────────────────────────────────────────────────────────────── */
.hbtc-post__wrap {
	width: min(100%, 1480px);
	margin: 0 auto;
	padding: 0 clamp(18px, 4vw, 56px);
}
.hbtc-post__wrap--narrow {
	max-width: 820px;
}

/* ── HERO ────────────────────────────────────────────────────────────────── */
.hbtc-post__hero {
	padding: clamp(28px, 4vw, 56px) 0 clamp(24px, 3vw, 40px);
}

.hbtc-post__back {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin-bottom: clamp(24px, 3vw, 40px);
	padding: 10px 20px 10px 14px;
	border-radius: 999px;
	background: var(--p-soft) !important;
	color: var(--p-dark) !important;
	font-family: "Gilroy-Medium", "Gilroy-Regular", system-ui, sans-serif;
	font-size: 14px;
	text-decoration: none;
	transition: background 0.24s ease, transform 0.24s cubic-bezier(.22, 1, .36, 1);
}
.hbtc-post__back svg { width: 18px; height: 18px; transition: transform 0.24s ease; }
.hbtc-post__back:hover { background: var(--p-cream) !important; transform: translateX(-2px); }
.hbtc-post__back:hover svg { transform: translateX(-3px); }

.hbtc-post__cat {
	display: inline-flex;
	align-items: center;
	margin-bottom: 18px;
	padding: 7px 17px;
	border-radius: 999px;
	background: rgba(120, 185, 86, 0.13) !important;
	color: var(--p-green) !important;
	font-family: "Gilroy-Medium", "Gilroy-Regular", system-ui, sans-serif;
	font-size: 13px;
	letter-spacing: 0.02em;
}

.hbtc-post__title {
	margin: 0 0 22px !important;
	font-family: "Gilroy-ExtraBold", "Gilroy-Regular", system-ui, sans-serif;
	font-weight: 800 !important;
	font-size: clamp(32px, 5vw, 64px) !important;
	line-height: 1.04;
	letter-spacing: -0.03em;
	color: var(--p-dark) !important;
}

.hbtc-post__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 11px;
	font-family: "Gilroy-Medium", "Gilroy-Regular", system-ui, sans-serif;
	font-size: 15px;
	color: rgba(34, 31, 32, 0.5) !important;
}
.hbtc-post__meta-dot {
	width: 4px;
	height: 4px;
	border-radius: 999px;
	background: rgba(34, 31, 32, 0.3);
}

.hbtc-post__cover {
	position: relative;
	z-index: 1;
	margin-top: clamp(28px, 4vw, 52px);
	border-radius: clamp(24px, 3vw, 40px);
	overflow: hidden;
	background: var(--p-cream);
}
.hbtc-post__cover img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* ── TELO ────────────────────────────────────────────────────────────────── */
.hbtc-post__body {
	padding: clamp(36px, 5vw, 64px) 0 clamp(40px, 5vw, 72px);
}

/* jemný overlap content boxu cez cover fotku (len ak je fotka) */
.hbtc-post__body.has-cover {
	position: relative;
	z-index: 2;
	margin-top: clamp(-56px, -4vw, -32px);
	padding-top: 0;
}

.hbtc-post__content {
	background: var(--p-soft);
	border-radius: clamp(20px, 2.5vw, 32px);
	padding: clamp(24px, 3.5vw, 48px);
	text-align: left;
	font-family: "Gilroy-Regular", system-ui, sans-serif;
	font-size: clamp(17px, 1.3vw, 19px);
	line-height: 1.75;
	color: rgba(34, 31, 32, 0.85);
}
.hbtc-post__content > *:first-child { margin-top: 0; }
.hbtc-post__content > *:last-child { margin-bottom: 0; }

.hbtc-post__content p { margin: 0 0 1.4em; }

.hbtc-post__content h2,
.hbtc-post__content h3,
.hbtc-post__content h4 {
	font-family: "Gilroy-ExtraBold", "Gilroy-Regular", system-ui, sans-serif;
	font-weight: 800 !important;
	color: var(--p-dark) !important;
	letter-spacing: -0.02em;
	line-height: 1.18;
}
.hbtc-post__content h2 { margin: 1.7em 0 0.6em; font-size: clamp(26px, 3vw, 36px); }
.hbtc-post__content h3 { margin: 1.5em 0 0.5em; font-size: clamp(22px, 2.4vw, 28px); }
.hbtc-post__content h4 { margin: 1.4em 0 0.5em; font-size: clamp(19px, 2vw, 22px); }

.hbtc-post__content a {
	color: var(--p-green) !important;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.2s ease;
}
.hbtc-post__content a:hover { color: #5d9740 !important; }

.hbtc-post__content strong,
.hbtc-post__content b {
	font-family: "Gilroy-ExtraBold", "Gilroy-Regular", system-ui, sans-serif;
	font-weight: 800;
	color: var(--p-dark);
}

.hbtc-post__content ul,
.hbtc-post__content ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.hbtc-post__content li { margin-bottom: 0.5em; }
.hbtc-post__content ul li::marker { color: var(--p-green); }

.hbtc-post__content img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 22px;
	margin: 1.8em 0;
}

.hbtc-post__content blockquote {
	margin: 1.8em 0;
	padding: 22px 28px;
	border-radius: 22px;
	background: #fff;
	border-left: 4px solid var(--p-green);
	font-family: "Gilroy-Medium", "Gilroy-Regular", system-ui, sans-serif;
	font-size: clamp(18px, 1.5vw, 21px);
	line-height: 1.55;
	color: var(--p-dark);
}
.hbtc-post__content blockquote p:last-child { margin-bottom: 0; }

/* ── YouTube / oEmbed — responzívne (auto-embed cez the_content) ──────────── */
.hbtc-post__content .wp-block-embed,
.hbtc-post__content figure.wp-block-embed,
.hbtc-post__content .wp-embed-responsive { margin: 1.8em 0; }

.hbtc-post__content iframe,
.hbtc-post__content .wp-block-embed__wrapper iframe,
.hbtc-post__content .fluid-width-video-wrapper iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
	border-radius: 22px;
	margin: 1.8em 0;
}

.hbtc-post__content .wp-block-embed__wrapper iframe,
.hbtc-post__content .fluid-width-video-wrapper iframe { margin: 0; }

.hbtc-post__content figure { margin: 1.8em 0; }
.hbtc-post__content figure img { margin: 0; }
.hbtc-post__content figcaption {
	margin-top: 10px;
	font-size: 14px;
	color: rgba(34, 31, 32, 0.5);
	text-align: center;
}

/* ── Zdieľanie ───────────────────────────────────────────────────────────── */
.hbtc-post__share {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: clamp(32px, 4vw, 48px);
	padding-top: clamp(24px, 3vw, 32px);
	border-top: 2px solid rgba(34, 31, 32, 0.08);
}
.hbtc-post__share-label {
	font-family: "Gilroy-Medium", "Gilroy-Regular", system-ui, sans-serif;
	font-size: 14px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(34, 31, 32, 0.42) !important;
}
.hbtc-post__share-links { display: flex; gap: 10px; }
.hbtc-post__share-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 999px;
	background: var(--p-soft) !important;
	color: var(--p-dark) !important;
	text-decoration: none;
	transition: background 0.24s ease, color 0.24s ease, transform 0.24s cubic-bezier(.22, 1, .36, 1);
}
.hbtc-post__share-link svg { width: 19px; height: 19px; }
.hbtc-post__share-link:hover {
	background: var(--p-green) !important;
	color: #fff !important;
	transform: translateY(-3px);
}

/* ── SÚVISIACE ───────────────────────────────────────────────────────────── */
.hbtc-post__related {
	margin: 0 clamp(10px, 2vw, 24px) clamp(10px, 2vw, 24px);
	padding: clamp(46px, 6vw, 88px) 0;
	background: var(--p-soft);
	border-radius: clamp(32px, 4vw, 56px);
}

.hbtc-post__related-head { margin-bottom: clamp(30px, 4vw, 52px); }
.hbtc-post__kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	font-family: "Gilroy-Medium", "Gilroy-Regular", system-ui, sans-serif;
	font-size: 14px;
	color: var(--p-green) !important;
}
.hbtc-post__kicker::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 999px;
	background: var(--p-green);
}
.hbtc-post__related-title {
	margin: 0 !important;
	font-family: "Gilroy-ExtraBold", "Gilroy-Regular", system-ui, sans-serif;
	font-weight: 800 !important;
	font-size: clamp(28px, 4vw, 52px) !important;
	line-height: 0.98;
	letter-spacing: -0.03em;
	color: var(--p-dark) !important;
}

.hbtc-post__related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(16px, 2vw, 26px);
}

/* Karta súvisiaceho článku */
.hbtc-post .hbtc-post__card {
	background: #fff !important;
	border-radius: 28px;
	overflow: hidden;
	box-shadow: 0 6px 26px rgba(34, 31, 32, 0.06);
	transition:
		opacity 0.6s ease,
		transform 0.45s cubic-bezier(.22, 1, .36, 1),
		box-shadow 0.45s ease;
}
.hbtc-post .hbtc-post__card.is-visible:hover,
.hbtc-post .hbtc-post__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 24px 52px rgba(34, 31, 32, 0.14);
}
.hbtc-post__card-link { display: block; text-decoration: none; color: inherit; }
.hbtc-post__card-media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--p-cream);
}
.hbtc-post__card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(.22, 1, .36, 1);
}
.hbtc-post__card:hover .hbtc-post__card-media img { transform: scale(1.06); }
.hbtc-post__card-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--p-dark);
	color: rgba(255, 255, 255, 0.85);
	font-family: "Gilroy-ExtraBold", "Gilroy-Regular", system-ui, sans-serif;
	font-weight: 800;
	font-size: 22px;
	letter-spacing: 0.02em;
}
.hbtc-post__card-copy {
	display: flex;
	flex-direction: column;
	padding: clamp(20px, 2.2vw, 28px);
	text-align: left;
}
.hbtc-post__card-title,
.hbtc-post__card-text,
.hbtc-post__card-meta { text-align: left; }
.hbtc-post__card-cat {
	display: inline-flex;
	align-self: flex-start;
	margin-bottom: 12px;
	padding: 5px 13px;
	border-radius: 999px;
	background: rgba(120, 185, 86, 0.12) !important;
	color: var(--p-green) !important;
	font-family: "Gilroy-Medium", "Gilroy-Regular", system-ui, sans-serif;
	font-size: 12px;
}
.hbtc-post__card-title {
	margin: 0 0 10px !important;
	font-family: "Gilroy-ExtraBold", "Gilroy-Regular", system-ui, sans-serif;
	font-weight: 800 !important;
	font-size: clamp(18px, 1.8vw, 22px) !important;
	line-height: 1.18;
	letter-spacing: -0.02em;
	color: var(--p-dark) !important;
}
.hbtc-post__card-text {
	margin: 0 0 16px !important;
	font-family: "Gilroy-Medium", "Gilroy-Regular", system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: rgba(34, 31, 32, 0.55) !important;
}
.hbtc-post__card-meta {
	display: flex;
	gap: 14px;
	margin-top: auto;
	font-family: "Gilroy-Medium", "Gilroy-Regular", system-ui, sans-serif;
	font-size: 13px;
	color: rgba(34, 31, 32, 0.45) !important;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
	.hbtc-post__related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
	.hbtc-post__related-grid { grid-template-columns: 1fr; }
	.hbtc-post__cover img { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
	.hbtc-post [data-hbtc-reveal] {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}
