/*
 * Pulido de bloques nativos de WordPress que theme.json no puede expresar a
 * nivel de sub-elemento (el input+botón del buscador comparten un solo
 * borde; la fecha de "entradas recientes" va más chica que el título).
 * Todo referenciando los custom properties que genera theme.json — nada de
 * colores sueltos.
 */

/* Panel del post destacado (home) */
.featured-quote-panel {
	position: relative;
}

.featured-quote-panel::before {
	content: "\201C";
	position: absolute;
	top: -0.15em;
	left: 0.2em;
	font-family: var(--wp--preset--font-family--body);
	font-size: 8rem;
	line-height: 1;
	opacity: 0.22;
	pointer-events: none;
}

.featured-quote-panel > * {
	position: relative;
}

/* Navegación del header */
.site-nav p {
	margin: 0;
}

.site-nav a {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
	padding-bottom: 5px;
	border-bottom: 2px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover {
	color: var(--wp--preset--color--primary);
	border-bottom-color: var(--wp--preset--color--primary);
}

@media (prefers-reduced-motion: reduce) {
	.site-nav a {
		transition: none;
	}
}

/* Paginación del listado de entradas */
.wp-block-query-pagination {
	align-items: center;
	gap: 6px;
}

.wp-block-query-pagination-numbers {
	display: flex;
	align-items: center;
	gap: 4px;
}

.wp-block-query-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 6px;
	border-radius: 8px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.85rem;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.wp-block-query-pagination a.page-numbers:hover {
	background: var(--wp--preset--color--subtle);
}

.wp-block-query-pagination .page-numbers.current {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	font-weight: 700;
}

.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	text-decoration: none;
	transition: color 0.15s ease;
}

.wp-block-query-pagination-previous:hover,
.wp-block-query-pagination-next:hover {
	color: var(--wp--preset--color--primary);
}

/* Meta del post (fecha · tiempo de lectura) */
.post-meta {
	align-items: baseline;
}

/*
 * El separador va como pseudo-elemento y no como un bloque de párrafo aparte:
 * un "·" en su propio bloque arrastra su propia caja de línea y queda
 * desalineado verticalmente respecto a la fecha.
 */
.post-meta .meta-sep::before {
	content: "|";
	margin-right: 0.75em;
	opacity: 0.4;
}

/*
 * Etiquetas al pie del post. WordPress no renderiza nada dentro de post-terms
 * cuando la entrada no tiene etiquetas, pero el grupo contenedor sí conserva su
 * borde y su padding: queda una línea suelta flotando. Se oculta el bloque
 * completo salvo que de verdad haya etiquetas dentro.
 */
.post-tags:not(:has(.wp-block-post-terms)) {
	display: none;
}

/* Volver al blog (post individual) */
.back-to-blog {
	margin: 0;
}

.back-to-blog a {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	text-decoration: none;
	transition: color 0.15s ease;
}

.back-to-blog a:hover {
	color: var(--wp--preset--color--primary);
}

/* Anterior / Siguiente (post individual) */
.post-nav {
	/*
	 * Sin borde propio: el bloque del newsletter que va justo encima ya cierra
	 * con una línea, y dos seguidas se leen como un error de maquetación.
	 */
	padding-top: 4px;
}

.post-nav .wp-block-post-navigation-link {
	max-width: 46%;
}

.post-nav .wp-block-post-navigation-link:last-child {
	text-align: right;
}

.post-nav .post-navigation-link__label {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin-bottom: 6px;
}

.post-nav a {
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	line-height: 1.35;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
	transition: color 0.15s ease;
}

.post-nav a:hover {
	color: var(--wp--preset--color--primary);
}

/* Relacionados (post individual) */
.is-related-posts .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--foreground);
}

.is-related-posts .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}

/* Buscador */
.wp-block-search__inside-wrapper {
	border: 1px solid var(--wp--preset--color--subtle);
	border-radius: 8px;
	overflow: hidden;
	background: var(--wp--preset--color--background);
	align-items: stretch;
	padding: 0 !important;
}

.wp-block-search__button {
	height: auto;
}

.wp-block-search__input {
	border: none !important;
	background: transparent;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	padding: 10px 14px !important;
	flex-grow: 1;
	min-width: 0;
}

.wp-block-search__input:focus,
.wp-block-search__input:invalid,
.wp-block-search__input:focus:invalid {
	outline: none;
	box-shadow: none;
}

.wp-block-search__inside-wrapper:focus-within {
	border-color: var(--wp--preset--color--primary);
}

.wp-block-search__button {
	background: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--background) !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 10px 18px !important;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	cursor: pointer;
}

.wp-block-search__button:hover {
	background: var(--wp--preset--color--foreground) !important;
}

/* Entradas recientes */
ul.wp-block-latest-posts__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.wp-block-latest-posts__list li {
	margin: 0;
}

.wp-block-latest-posts__post-title {
	display: block;
	font-family: var(--wp--preset--font-family--body);
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
	line-height: 1.35;
	margin-bottom: 3px;
}

.wp-block-latest-posts__post-title:hover {
	color: var(--wp--preset--color--primary);
}

.wp-block-latest-posts__post-date {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.72rem;
	color: var(--wp--preset--color--muted);
}

/* Categorías */
ul.wp-block-categories-list,
ul.wp-block-categories {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.wp-block-categories-list li,
.wp-block-categories li {
	margin: 0;
}

.wp-block-categories-list a,
.wp-block-categories li a {
	font-family: var(--wp--preset--font-family--heading);
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
}

.wp-block-categories-list a:hover,
.wp-block-categories li a:hover {
	color: var(--wp--preset--color--primary);
}
