/* ==========================================================================
   Blog: vista de entrada (encabezado, portada, texto, pie y relacionadas).
   Depende de blog.css (variables --ko-blog-*, tarjetas y barra lateral).
   ========================================================================== */

/* Entrada ------------------------------------------------------------------ */

.ko-post__header {
	padding-top: clamp(40px, 6vw, 96px);
}

.ko-post__meta {
	gap: 6px 10px;
	margin-bottom: 22px;
}

.ko-post__title {
	max-width: 16ch;
	margin: 0;
	font-size: clamp(44px, 7vw, 104px);
	line-height: 0.92;
	overflow-wrap: anywhere;
}

.ko-post__lead {
	max-width: 46ch;
	margin: 26px 0 0;
	font-size: clamp(18px, 1.6vw, 21px);
	line-height: 1.6;
	color: var(--ko-blog-text);
}

.ko-post__byline {
	margin-top: 26px;
}

.ko-post__cover {
	margin-block: clamp(36px, 4.5vw, 64px) 0;
}

.ko-post__cover-img {
	display: block;
	width: 100%;
	max-height: 82vh;
	object-fit: cover;
}

.ko-post__cover figcaption {
	margin-top: 10px;
	font-size: 13px;
	font-style: italic;
	color: var(--ko-muted);
}

.ko-post__layout {
	display: grid;
	gap: 32px;
	padding-top: clamp(40px, 5vw, 72px);
	padding-bottom: clamp(64px, 8vw, 112px);
}

.ko-post__main {
	width: 100%;
	max-width: 720px;
	min-width: 0;
}

.ko-post__layout:not(.has-sidebar) .ko-post__main {
	margin-inline: auto;
}

/* Texto de la entrada ------------------------------------------------------ */

.ko-prose {
	font-size: 18px;
	line-height: 1.8;
	color: color-mix(in srgb, var(--ko-ink) 88%, var(--ko-paper));
}

.ko-prose > :first-child {
	margin-top: 0;
}

.ko-prose > p:first-child::first-letter {
	float: left;
	margin: 0.08em 0.12em 0 0;
	font-family: var(--ko-font-display);
	font-weight: 700;
	font-size: 4.1em;
	line-height: 0.78;
	color: var(--ko-ink);
}

.ko-prose p,
.ko-prose ul,
.ko-prose ol,
.ko-prose table,
.ko-prose pre {
	margin: 0 0 1.4em;
}

.ko-prose h2,
.ko-prose h3,
.ko-prose h4 {
	color: var(--ko-ink);
}

.ko-prose h2 {
	margin: 2em 0 0.6em;
	font-size: clamp(28px, 3vw, 40px);
	line-height: 1;
}

.ko-prose h3 {
	margin: 1.8em 0 0.5em;
	font-size: 24px;
	line-height: 1.1;
}

.ko-prose h4 {
	margin: 1.6em 0 0.5em;
	font-size: 17px;
	letter-spacing: 0.06em;
}

.ko-prose a {
	color: var(--ko-ink);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.ko-prose a:hover {
	text-decoration-thickness: 2px;
}

.ko-prose ul,
.ko-prose ol {
	padding-left: 1.2em;
}

.ko-prose li {
	margin-bottom: 0.4em;
}

.ko-prose li::marker {
	color: var(--ko-ink);
}

.ko-prose blockquote {
	margin: 2em 0;
	padding: 4px 0 4px 26px;
	border-left: 2px solid var(--ko-ink);
	font-size: 22px;
	font-style: italic;
	line-height: 1.5;
	color: var(--ko-ink);
}

.ko-prose blockquote p:last-child {
	margin-bottom: 0;
}

.ko-prose blockquote cite {
	display: block;
	margin-top: 12px;
	font-size: 13px;
	font-style: normal;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ko-muted);
}

.ko-prose img {
	max-width: 100%;
	height: auto;
}

/* Fotos verticales (tatuajes): tope de alto para no comerse la pantalla. */
.ko-prose figure img,
.ko-prose .wp-caption img {
	display: block;
	width: auto;
	max-height: min(640px, 78vh);
}

.ko-prose figure,
.ko-prose .wp-caption {
	max-width: 100%;
	margin: 2.2em 0;
}

.ko-prose .wp-caption {
	width: auto !important;
}

.ko-prose figcaption,
.ko-prose .wp-caption-text {
	margin-top: 10px;
	font-size: 13px;
	font-style: italic;
	line-height: 1.5;
	color: var(--ko-muted);
}

.ko-prose .aligncenter {
	display: block;
	margin-inline: auto;
}

@media (min-width: 768px) {
	.ko-prose .alignleft {
		float: left;
		max-width: 50%;
		margin: 0.4em 28px 1em 0;
	}

	.ko-prose .alignright {
		float: right;
		max-width: 50%;
		margin: 0.4em 0 1em 28px;
	}
}

.ko-prose::after {
	content: "";
	display: table;
	clear: both;
}

.ko-prose hr {
	margin: 3em 0;
	border: 0;
	border-top: 1px solid var(--ko-blog-line);
}

.ko-prose iframe,
.ko-prose video,
.ko-prose embed {
	max-width: 100%;
}

.ko-prose iframe[src*="youtube"],
.ko-prose iframe[src*="youtu.be"],
.ko-prose iframe[src*="vimeo"] {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

.ko-prose code {
	padding: 2px 6px;
	background: var(--ko-blog-soft);
	font-size: 0.88em;
}

.ko-prose pre {
	padding: 18px;
	overflow-x: auto;
	background: var(--ko-blog-soft);
	font-size: 14px;
}

.ko-prose pre code {
	padding: 0;
	background: none;
}

.ko-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.ko-prose th,
.ko-prose td {
	padding: 10px 12px 10px 0;
	border-bottom: 1px solid var(--ko-blog-line);
	text-align: left;
}

.ko-prose .gallery {
	display: grid;
	grid-template-columns: repeat(var(--ko-gallery-cols, 3), minmax(0, 1fr));
	gap: 8px;
	margin: 2.2em 0;
}

.ko-prose .gallery-columns-2 {
	--ko-gallery-cols: 2;
}

.ko-prose .gallery-columns-4 {
	--ko-gallery-cols: 4;
}

.ko-prose .gallery-item {
	margin: 0;
}

.ko-prose .gallery-item img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

/* Línea de tiempo: <ul class="ko-timeline"><li><strong>Fecha</strong> Texto</li></ul> */
.ko-prose .ko-timeline {
	margin: 2em 0 2.2em 6px;
	padding: 0;
	border-left: 1.5px solid var(--ko-ink);
	list-style: none;
}

.ko-prose .ko-timeline li {
	position: relative;
	margin: 0;
	padding: 0 0 22px 26px;
	font-size: 16px;
	line-height: 1.6;
}

.ko-prose .ko-timeline li:last-child {
	padding-bottom: 0;
}

.ko-prose .ko-timeline li::before {
	content: "";
	position: absolute;
	top: 0.5em;
	left: -5.5px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--ko-ink);
}

.ko-prose .ko-timeline strong {
	display: block;
	margin-bottom: 2px;
	font-family: var(--ko-font-display);
	font-size: 15px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ko-ink);
}

.ko-post__pages {
	display: flex;
	gap: 10px;
	margin-top: 2em;
	font-family: var(--ko-font-display);
	text-transform: uppercase;
}

/* Pie de la entrada -------------------------------------------------------- */

.ko-post__footer {
	display: grid;
	gap: 36px;
	margin-top: 56px;
}

.ko-post__share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 22px;
	padding-top: 24px;
	border-top: 1px solid var(--ko-blog-line);
}

.ko-post__share-label {
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ko-muted);
}

.ko-post__share a,
.ko-post__share button {
	position: relative;
	padding-block: 6px;
	font-family: var(--ko-font-display);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
}

.ko-post__share a::after,
.ko-post__share button::after {
	content: "";
	position: absolute;
	inset: auto 0 2px;
	height: 1.5px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.4s var(--ko-ease);
}

.ko-post__share a:hover::after,
.ko-post__share a:focus-visible::after,
.ko-post__share button:hover::after,
.ko-post__share button:focus-visible::after {
	transform: scaleX(1);
	transform-origin: left;
}

.ko-post__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	padding: 32px 0;
	border-block: 1px solid var(--ko-blog-line);
}

.ko-post__cta p {
	max-width: 24ch;
	margin: 0;
	font-family: var(--ko-font-display);
	font-weight: 700;
	font-size: clamp(22px, 2.4vw, 30px);
	line-height: 1.05;
	text-transform: uppercase;
}

.ko-post__nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.ko-post__nav a {
	display: grid;
	gap: 6px;
	padding: 20px;
	border: 1px solid var(--ko-blog-line);
	text-decoration: none;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.ko-post__nav-next {
	grid-column: 2;
	text-align: right;
}

.ko-post__nav span {
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ko-muted);
}

.ko-post__nav strong {
	font-family: var(--ko-font-display);
	font-size: 18px;
	line-height: 1.1;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.ko-post__nav a:hover,
.ko-post__nav a:focus-visible {
	border-color: var(--ko-ink);
	background: var(--ko-ink);
	color: var(--ko-paper);
}

.ko-post__nav a:hover span,
.ko-post__nav a:focus-visible span {
	color: inherit;
}

@media (max-width: 560px) {
	.ko-post__nav {
		grid-template-columns: minmax(0, 1fr);
	}

	.ko-post__nav-next {
		grid-column: auto;
	}
}

.ko-post__related {
	padding-block: clamp(56px, 7vw, 104px);
	border-top: 1px solid var(--ko-blog-line);
}

.ko-post__related-title {
	margin: 0 0 clamp(32px, 4vw, 56px);
	font-size: clamp(40px, 5.5vw, 72px);
	line-height: 0.95;
}

@media (prefers-reduced-motion: reduce) {
	.ko-post__share a::after,
	.ko-post__share button::after {
		transition-duration: 0.01ms !important;
	}
}
