/*
 * Single blog post — detail článku.
 *
 *  Struktura:
 *    .post-single
 *      .post-single__header   — kategorie eyebrow + H1 + autor blok
 *      .post-single__cover    — featured image 16:9
 *      .post-single__content  — Gutenberg content (the_content())
 *    .post-single__cta-wrap   — CTA pod článkem (rendrovaná z partial cta-after-content.php)
 *    .post-related            — související články
 */

.post-single {
	max-width: 100%;
}

/* Breadcrumbs na stránce článku — stejná šířka jako text content (760 px) */
.single .breadcrumbs {
	max-width: 760px;
}

/* ── Header ──────────────────────────────────────────────── */
.post-single__header {
	max-width: 760px;
	margin: 0 auto 32px;
	text-align: left;
}

.post-single__category {
	margin: 0 0 16px;
	color: var(--rp-color-text);
	font-size: var(--rp-fs-sm);
	font-weight: var(--rp-fw-regular);
	letter-spacing: -0.02em;
	line-height: 1;
}

.post-single__title {
	margin: 0 0 32px;
	color: var(--rp-color-text);
	font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.625rem);  /* 28→42 px */
	font-weight: var(--rp-fw-medium);
	letter-spacing: var(--rp-tracking-tight);
	line-height: 1.15;
}

/* ── Autor blok ──────────────────────────────────────────── */
.post-author {
	display: flex;
	align-items: center;
	gap: 12px;
}

.post-author__avatar {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	overflow: hidden;
}

.post-author__avatar-img,
.post-author__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 50%;
}

.post-author__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.post-author__name {
	color: var(--rp-color-text);
	font-size: 14px;
	font-weight: var(--rp-fw-semibold);
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.post-author__role {
	font-weight: var(--rp-fw-regular);
	color: rgba(243, 244, 246, 0.7);
}

.post-author__sub {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	color: rgba(243, 244, 246, 0.5);
	font-size: 12px;
	font-weight: var(--rp-fw-regular);
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.post-author__dot {
	color: rgba(243, 244, 246, 0.3);
}

/* ── Cover image ──────────────────────────────────────────── */
.post-single__cover {
	/* Šířka = vnitřní obsah .container: max 760px minus 2× padding (24px) = 712px.
	   Na užších viewportech: 100% šířky minus oba paddingy (stejné jako text). */
	display: block;
	width: calc(100% - 2 * var(--rp-space-5));
	max-width: calc(760px - 2 * var(--rp-space-5));
	margin: 0 auto 48px;
	border-radius: var(--rp-radius-md);
	border: 1px solid var(--rp-color-border);
	overflow: hidden;
}

.post-single__cover-image {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* ── Body content (Gutenberg) ─────────────────────────────
 *  Prose styles pro the_content() — H2/H3, p, ul/ol, blockquote, figure.
 *  Max-width 760 px, centrovaný. */
.post-single__content {
	max-width: 760px;
	margin: 0 auto;
	color: var(--rp-color-text);
	font-size: 16px;
	font-weight: var(--rp-fw-regular);
	letter-spacing: -0.02em;
	line-height: 1.7;
}

.post-single__content > * {
	margin-block: 0 24px;
}
.post-single__content > *:last-child {
	margin-bottom: 0;
}

.post-single__content h2 {
	margin-top: 48px;
	margin-bottom: 16px;
	color: var(--rp-color-text);
	font-size: clamp(1.375rem, 1.15rem + 1vw, 1.75rem);
	font-weight: var(--rp-fw-medium);
	letter-spacing: var(--rp-tracking-tight);
	line-height: 1.25;
}
.post-single__content h2:first-child {
	margin-top: 0;
}

.post-single__content h3 {
	margin-top: 32px;
	margin-bottom: 12px;
	color: var(--rp-color-text);
	font-size: 1.25rem;
	font-weight: var(--rp-fw-medium);
	letter-spacing: var(--rp-tracking-tight);
	line-height: 1.3;
}

.post-single__content p {
	color: rgba(243, 244, 246, 0.85);
}

.post-single__content a {
	color: var(--rp-color-accent-light);
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
	.post-single__content a:hover {
		color: var(--rp-color-accent);
	}
}

.post-single__content strong { color: var(--rp-color-text); font-weight: var(--rp-fw-semibold); }
.post-single__content em { color: rgba(243, 244, 246, 0.95); }

.post-single__content ul,
.post-single__content ol {
	padding-left: 24px;
	color: rgba(243, 244, 246, 0.85);
}
.post-single__content li { margin-bottom: 8px; }
.post-single__content li::marker { color: var(--rp-color-accent); }

.post-single__content blockquote {
	margin: 32px 0;
	padding: 16px 24px;
	background: rgba(243, 244, 246, 0.04);
	border: 1px solid rgba(243, 244, 246, 0.1);
	border-radius: 8px;
	color: rgba(243, 244, 246, 0.9);
	font-style: italic;
}
.post-single__content blockquote p:last-child { margin-bottom: 0; }

/* ── Block style varianty Quote bloku ─────────────────────
   Klient v editoru přepne Styles → Tip / Pozor. Bloku se nasadí
   .is-style-tip / .is-style-pozor a frontend renderuje barevný box. */

.post-single__content .wp-block-quote.is-style-tip,
.post-single__content .wp-block-quote.is-style-pozor {
	margin: 32px 0;
	padding: 20px 24px;
	border-radius: 8px;
	font-style: normal;
}

.post-single__content .wp-block-quote.is-style-tip {
	background: rgba(34, 197, 94, 0.08);
	border: 1px solid rgba(34, 197, 94, 0.25);
}

.post-single__content .wp-block-quote.is-style-pozor {
	background: rgba(239, 124, 43, 0.08);
	border: 1px solid rgba(239, 124, 43, 0.25);
}

/* Label badge (TIP / POZOR) — vyrenderuje se přes ::before. */
.post-single__content .wp-block-quote.is-style-tip::before,
.post-single__content .wp-block-quote.is-style-pozor::before {
	display: inline-block;
	margin-bottom: 8px;
	padding: 3px 10px;
	border-radius: 4px;
	color: var(--rp-color-bg);
	font-size: 10px;
	font-weight: var(--rp-fw-bold);
	letter-spacing: 0.12em;
	line-height: 1.2;
}
.post-single__content .wp-block-quote.is-style-tip::before {
	content: "TIP";
	background: var(--rp-color-accent);
}
.post-single__content .wp-block-quote.is-style-pozor::before {
	content: "POZOR";
	background: var(--rp-color-warning);
}

.post-single__content .wp-block-quote.is-style-tip p,
.post-single__content .wp-block-quote.is-style-pozor p {
	margin: 0 0 8px;
	color: var(--rp-color-text);
	font-style: normal;
}
.post-single__content .wp-block-quote.is-style-tip p:last-of-type,
.post-single__content .wp-block-quote.is-style-pozor p:last-of-type {
	margin-bottom: 0;
}

/* Citace pole pod textem v Quote bloku — pro Tip/Pozor nemá smysl. */
.post-single__content .wp-block-quote.is-style-tip cite,
.post-single__content .wp-block-quote.is-style-pozor cite {
	display: none;
}

.post-single__content figure,
.post-single__content .wp-block-image {
	margin: 32px 0;
}
.post-single__content figure img,
.post-single__content .wp-block-image img {
	width: 100%;
	height: auto;
	border-radius: var(--rp-radius-md);
	display: block;
}
.post-single__content figcaption {
	margin-top: 8px;
	color: rgba(243, 244, 246, 0.5);
	font-size: 13px;
	text-align: center;
}

.post-single__content code {
	padding: 2px 6px;
	background: rgba(243, 244, 246, 0.08);
	border-radius: 4px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.9em;
}

.post-single__content pre {
	padding: 16px;
	background: rgba(0, 0, 0, 0.3);
	border-radius: 8px;
	overflow-x: auto;
}
.post-single__content pre code {
	padding: 0;
	background: transparent;
}

.post-single__content hr {
	margin: 48px 0;
	border: 0;
	border-top: 1px solid rgba(243, 244, 246, 0.1);
}

/* ── CTA pod článkem ─────────────────────────────────────── */
.post-single__cta-wrap {
	margin-top: var(--rp-space-10);   /* 120px */
}

/* ── Související články ──────────────────────────────────── */
.post-related {
	margin-top: 80px;
	padding-bottom: 80px;
}

.post-related__container {
	max-width: var(--rp-content-max);
	margin-inline: auto;
	padding-inline: var(--rp-space-5);
}

.post-related__title {
	margin: 0 0 32px;
	color: var(--rp-color-text);
	font-size: clamp(1.375rem, 1.15rem + 1vw, 1.75rem);
	font-weight: var(--rp-fw-medium);
	letter-spacing: var(--rp-tracking-tight);
	line-height: 1.25;
}

.post-related__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
}

@media (max-width: 1023px) {
	.post-related__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}
}

@media (max-width: 600px) {
	.post-related__grid {
		grid-template-columns: 1fr;
	}
}
