/* ==========================================================================
   P18-INT · Páginas interiores (no hay referencia del original: sistema de diseño del tema)
   - Entradas del Psicoblog (templates/single.html → .vf-single)
   - Archivos de categoría/etiqueta/fecha (templates/archive.html → .vf-archive, reutiliza las
     tarjetas de la sección 12 con .vf-s12)
   - 404 (templates/404.html → .vf-404)
   Ancho de lectura: 800px (las legales usan el mismo, ver zz-legal.css).
   ========================================================================== */
:root {
	--vf-read-w: 800px;
	--vf-rule: #e5e2dc;               /* filetes suaves (tono de neutral muy aclarado) */
}

/* Las tres plantillas pintan <main class="vf-main">: sin huecos con cabecera y pie */
:root .vf-interior {
	margin-block: 0;
}

/* --------------------------------------------------------------------------
   Títulos y texto comunes de las interiores (entradas y legales)
   h1 47px / h2 28px / h3 24px en primary, como los títulos de bloque de la portada
   -------------------------------------------------------------------------- */
:root :is(.vf-single, .vf-legal) h1 {
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1.1;
	color: var(--wp--preset--color--primary);
}

:root :is(.vf-single__content, .vf-legal) :is(h2, h3, h4) {
	margin-top: 45px;
	margin-bottom: 15px;
	line-height: 1.2;
	color: var(--wp--preset--color--primary);
}

:root :is(.vf-single__content, .vf-legal) h2 {
	font-size: var(--wp--preset--font-size--x-large);
}

:root :is(.vf-single__content, .vf-legal) :is(h3, h4) {
	font-size: var(--wp--preset--font-size--large);
}

/* Subtítulos de las entradas: el original los pinta con un #008080 en línea (fuera de la paleta)
   y otros sin color. Se unifican todos en primary. */
:root .vf-single__content :is(h2, h3, h4) mark.has-inline-color {
	color: inherit !important;
	background: none !important;
}

:root :is(.vf-single__content, .vf-legal) :is(p, li) a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

:root :is(.vf-single__content, .vf-legal) :is(ul, ol) {
	padding-left: 1.4em;
}

:root :is(.vf-single__content, .vf-legal) li + li {
	margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Entrada (single)
   -------------------------------------------------------------------------- */
:root .vf-single {
	padding-top: var(--vf-section-pad, 50px);
	padding-bottom: 70px;
}

:root .vf-single > * {
	margin-block: 0;
}

:root .vf-single .vf-single__title {
	margin: 0;
	text-wrap: balance;
}

/* Fecha · categorías */
:root .vf-single .vf-single__meta {
	gap: 6px 18px;
	margin-top: 18px;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--wp--preset--color--neutral);
}

:root .vf-single .vf-single__meta > * {
	margin: 0;
	font-size: inherit;
}

:root .vf-single .vf-single__cats a {
	color: var(--wp--preset--color--secondary);
	text-decoration: none;
}

:root .vf-single .vf-single__cats a:hover,
:root .vf-single .vf-single__cats a:focus-visible {
	text-decoration: underline;
}

:root .vf-single .vf-single__cats .wp-block-post-terms__separator {
	color: var(--wp--preset--color--neutral);
}

/* Imagen destacada a todo el ancho de lectura, sin recortar */
:root .vf-single .vf-single__image {
	margin-top: 30px;
}

:root .vf-single .vf-single__image img {
	display: block;
	width: 100%;
	height: auto;
}

/* Contenido */
:root .vf-single .vf-single__content {
	margin-top: 40px;
}

:root .vf-single .vf-single__content > :first-child {
	margin-top: 0;
}

/* Etiquetas */
:root .vf-single .vf-single__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 40px;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

:root .vf-single .vf-single__tags .wp-block-post-terms__separator {
	display: none;
}

:root .vf-single .vf-single__tags a {
	display: inline-block;
	padding: 3px 12px;
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 999px;
	color: var(--wp--preset--color--secondary);
	text-decoration: none;
	transition: background-color .3s, color .3s;
}

:root .vf-single .vf-single__tags a:hover,
:root .vf-single .vf-single__tags a:focus-visible {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
}

/* Anterior / siguiente */
:root .vf-single .vf-single__nav {
	gap: 30px;
	margin-top: 50px;
	padding-top: 25px;
	border-top: 1px solid var(--vf-rule);
}

:root .vf-single .vf-single__nav .post-navigation-link-previous,
:root .vf-single .vf-single__nav .post-navigation-link-next {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.3;
}

:root .vf-single .vf-single__nav a {
	display: inline-block;
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

:root .vf-single .vf-single__nav a:hover .post-navigation-link__title,
:root .vf-single .vf-single__nav a:focus-visible .post-navigation-link__title {
	text-decoration: underline;
}

:root .vf-single .vf-single__nav .post-navigation-link__label {
	display: block;
	margin-bottom: 4px;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--wp--preset--color--neutral);
}

:root .vf-single .vf-single__nav .wp-block-post-navigation-link__arrow-previous,
:root .vf-single .vf-single__nav .wp-block-post-navigation-link__arrow-next {
	color: var(--wp--preset--color--neutral);
}

/* Volver al Psicoblog */
:root .vf-single .vf-single__back {
	margin-top: 30px;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	letter-spacing: 1px;
	text-transform: uppercase;
}

:root .vf-single .vf-single__back a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

:root .vf-single .vf-single__back a::before {
	content: "← ";
}

:root .vf-single .vf-single__back a:hover,
:root .vf-single .vf-single__back a:focus-visible {
	text-decoration: underline;
}

@media (max-width: 767.98px) {
	:root :is(.vf-single, .vf-legal) h1 {
		font-size: 36px;
	}

	:root :is(.vf-single__content, .vf-legal) h2 {
		font-size: var(--wp--preset--font-size--large);
	}

	:root :is(.vf-single__content, .vf-legal) :is(h2, h3, h4) {
		margin-top: 35px;
	}

	:root .vf-single .vf-single__nav {
		flex-direction: column;
		gap: 20px;
	}

	:root .vf-single .vf-single__nav .post-navigation-link-next {
		text-align: left;
	}
}

/* --------------------------------------------------------------------------
   Archivo (categoría Psicoblog y demás): título de bloque + tarjetas de la sección 12
   -------------------------------------------------------------------------- */
:root .vf-archive .vf-archive__title {
	color: var(--wp--preset--color--neutral);
	margin-bottom: 30px;
}

:root .vf-archive .vf-archive__desc {
	margin: 0 0 30px;
	color: var(--wp--preset--color--neutral);
}

/* Título de la tarjeta: h2 aquí (h3 en la portada), mismo aspecto */
:root .vf-archive .wp-block-post-title {
	font-size: var(--wp--preset--font-size--medium);
}

@media (max-width: 768px) {
	:root .vf-archive .vf-archive__title.vf-title--sm {
		margin-bottom: 30px;
	}
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
:root .vf-404 {
	padding-top: 80px;
	padding-bottom: 100px;
	text-align: center;
}

:root .vf-404 > * {
	margin-block: 0;
}

:root .vf-404 .vf-404__code {
	font-size: 110px;
	font-weight: 700;
	line-height: 1;
	color: var(--wp--preset--color--soft);
}

:root .vf-404 .vf-title {
	margin-top: 10px;
	margin-bottom: 20px;
	color: var(--wp--preset--color--primary);
}

:root .vf-404 .vf-404__text {
	color: var(--wp--preset--color--contrast);
}

:root .vf-404 .vf-404__buttons {
	gap: 15px;
	margin-top: 35px;
}

:root .vf-archive .vf-archive__empty {
	text-align: center;
	color: var(--wp--preset--color--neutral);
}

/* Flechas dentro de la etiqueta (las de core quedan fuera del enlace y desalineadas) */
:root .vf-single .vf-single__nav .wp-block-post-navigation-link__arrow-previous,
:root .vf-single .vf-single__nav .wp-block-post-navigation-link__arrow-next {
	display: none;
}

:root .vf-single .vf-single__nav .post-navigation-link-previous .post-navigation-link__label::before {
	content: "← ";
}

:root .vf-single .vf-single__nav .post-navigation-link-next .post-navigation-link__label::after {
	content: " →";
}

/* Primera/última entrada: el enlace que falta deja un div vacío */
:root .vf-single .vf-single__nav > :empty {
	display: none;
}
