/* Split from main.css for page-context loading */
/* Generated automatically */

.catalogue__view-toggle {
	border: 1px solid var(--color-accent);
	background: transparent;
	color: var(--color-text);
	font: inherit;
	font-size: 0.8125rem;
	min-height: 2.75rem;
	min-width: 2.75rem;
	padding: 0.5rem 0.75rem;
	cursor: pointer;
	appearance: none;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1.2;
	box-sizing: border-box;
}

@media (hover: hover) {
	.catalogue__view-toggle:hover {
		background: #000;
		color: #fff;
		border-color: #000;
	}
}

@media (hover: hover) and (prefers-color-scheme: dark) {
	.catalogue__view-toggle:hover {
		background: var(--color-accent);
		color: var(--color-on-accent);
		border-color: var(--color-accent);
	}
}

.recipe-single__grid .recipe-detail {
	padding-left: 0;
	padding-right: 0;
}

.recipe-single__grid .recipe-detail__media {
	aspect-ratio: 2 / 1;
	max-height: none;
	min-height: 0;
	background: var(--color-accent);
}

.recipe-single__grid .recipe-detail__media img {
	background: #000000;
	mix-blend-mode: luminosity;
}

@media (min-width: 960px) {
	.recipe-single__grid .recipe-detail {
		display: grid;
		grid-template-columns: 1fr 1fr;
		align-items: stretch;
	}

	/* La altura la marca el panel; la imagen rellena sin forzar un cuadrado mínimo. */
	.recipe-single__grid .recipe-detail__media {
		aspect-ratio: auto;
		align-self: stretch;
		height: 100%;
		min-height: 0;
		margin-bottom: 0;
	}
}

.recipe-single {
	padding: 0 var(--space-xs) var(--space-lg);
}

@media (min-width: 27em) {
	.recipe-single {
		padding: 0 var(--space-sm) var(--space-lg);
	}
}

@media (min-width: 1000px) {
	.recipe-single {
		padding: 0 var(--space-md) var(--space-lg);
	}
}

@media (min-width: 960px) {
	.recipe-single {
		padding: 0 var(--space-lg) var(--space-lg);
	}
}

/* Escala tipográfica del single:
 * <960px   → base (1 columna)
 * 960px    → sube al pasar a 2 columnas
 * 1100px   → intermedio
 * 1300px   → grande
 * 1501px+  → máximo
 */
.recipe-single__title {
	font-size: 3rem;
	font-weight: bold;
	letter-spacing: -0.04em;
	line-height: 1;
	text-wrap: balance;
	padding-bottom: 0.5rem;
}

@media (min-width: 960px) {
	body.single,
	body.page:not(.asicomo-theme--map-view),
	body.error404 {
		font-size: 1.05rem;
	}

	.recipe-single__title {
		font-size: 4rem;
		padding-bottom: 0.65rem;
	}
}

@media (min-width: 1100px) {
	body.single,
	body.page:not(.asicomo-theme--map-view),
	body.error404 {
		font-size: 1.2rem;
	}

	.recipe-single__title {
		font-size: 5.5rem;
		padding-bottom: 0.75rem;
	}
}

@media (min-width: 1300px) {
	body.single,
	body.page:not(.asicomo-theme--map-view),
	body.error404 {
		font-size: 1.35rem;
	}

	.recipe-single__title {
		font-size: 6.75rem;
		padding-bottom: 0.85rem;
	}
}

@media (min-width: 1501px) {
	body.single,
	body.page:not(.asicomo-theme--map-view),
	body.error404 {
		font-size: 1.5rem;
	}

	.recipe-single__title {
		font-size: 8rem;
		padding-bottom: 1rem;
	}

}
/* Descripción: escala descendente en móvil → 1.5rem en desktop */
body.single .recipe-detail__value--description,
.catalogue .recipe-detail__value--description {
	font-size: 1rem;
	line-height: 1.35;
}

body.single .recipe-detail__value--description p {
	max-width: 80ch;
	text-wrap: pretty;
}

.catalogue .recipe-detail__value--description p {
	text-wrap: balance;
}

@media (min-width: 600px) {
	body.single .recipe-detail__value--description,
	.catalogue .recipe-detail__value--description {
		font-size: 1.125rem;
	}
}

@media (min-width: 960px) {
	body.single .recipe-detail__value--description,
	.catalogue .recipe-detail__value--description {
		font-size: 1.25rem;
	}
}

@media (min-width: 1100px) {
	body.single .recipe-detail__value--description,
	.catalogue .recipe-detail__value--description {
		font-size: 1.5rem;
	}
}

.recipe-single__back {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.25rem 0 0;
	padding: 0;
}

.recipe-single__back a {
	display: inline-block;
	padding: 0.5em 0.85em;
	background: var(--color-accent);
	color: var(--color-on-accent);
	text-decoration: none;
	border: 1px solid var(--color-accent);
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

@media (hover: hover) {
	.recipe-single__back a:hover {
		background: #000;
		border-color: #000;
	}
}

.recipe-single__back a.recipe-single__back-link--secondary {
	background: var(--color-bg);
	color: var(--color-text);
	border: 1px solid var(--color-accent);
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

@media (hover: hover) {
	.recipe-single__back a.recipe-single__back-link--secondary:hover {
		background: #000;
		color: #fff;
		border-color: #000;
	}
}

@media (hover: hover) and (prefers-color-scheme: dark) {
	.recipe-single__back a.recipe-single__back-link--secondary:hover {
		background: var(--color-accent);
		color: var(--color-on-accent);
		border-color: var(--color-accent);
	}
}

.recipe-single__back a::after {
	display: none;
}

.recipe-single__map {
	width: 100%;
	aspect-ratio: 3 / 2;
	margin-top: 1rem;
	border: 1px solid var(--color-accent);
	background: var(--color-map-bg);
	z-index: 0;
}

.recipe-single__map--clean-tiles .leaflet-tile-pane {
	filter: grayscale(0.1) contrast(0.9) brightness(1.04);
}

.recipe-single__map .maplibregl-map,
.recipe-single__map .leaflet-maplibre-gl-layer {
	width: 100%;
	height: 100%;
}

.recipe-single__map .maplibregl-ctrl-attrib,
.recipe-single__map .maplibregl-ctrl-bottom-right {
	display: none;
}

.recipe-single__map-marker {
	width: 16px;
	height: 16px;
	border: 2px solid var(--color-on-accent);
	border-radius: 50%;
	background: var(--color-accent);
	box-shadow: 0 0 0 1px var(--color-accent);
	cursor: pointer;
}

.recipe-single__map-marker--active {
	box-shadow: 0 0 0 2px var(--color-accent);
	transform: scale(1.15);
}

.recipe-detail__extra-addresses-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.recipe-detail__extra-address-item {
	margin: 0;
}

.recipe-detail__address-barrio {
	display: block;
	margin-top: 0.35rem;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

.recipe-detail__address-barrio-label {
	font-weight: 600;
}

.recipe-single__map-user-marker {
	width: 16px;
	height: 16px;
	border: 2px solid var(--color-on-accent);
	border-radius: 50%;
	background: #1a73e8;
	box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.35);
}

.recipe-single__map .leaflet-container {
	font: inherit;
	width: 100%;
	height: 100%;
	background: var(--color-map-bg);
}

.recipe-single__map .leaflet-control-attribution {
	font-size: 0.625rem;
	line-height: 1.2;
	background: var(--color-map-attrib-bg);
	color: var(--color-text);
}

.recipe-single__grid {
	display: block;
}

.recipe-single__page-content > *:first-child {
	margin-top: 0;
}

.recipe-single__page-content > *:last-child {
	margin-bottom: 0;
}

.recipe-single__page-content p,
.recipe-single__page-content ul,
.recipe-single__page-content ol {
	margin: 0 0 1em;
	line-height: 1.55;
}

.recipe-single__page-content.scope-text p {
	max-width: 80ch;
	text-wrap: pretty;
}

.recipe-single__page-content h2,
.recipe-single__page-content h3,
.recipe-single__page-content h4 {
	margin: 1.5em 0 0.5em;
	font-weight: 600;
	line-height: 1.25;
}

.recipe-single__page-content ul,
.recipe-single__page-content ol {
	padding-left: 1.25em;
}

/* ── Related Posts (CRP) ── */

.related-posts {
	margin-top: 3rem;
	padding: 2rem var(--space-xs) 2rem;
	border-top: 1px solid var(--color-accent);
}

@media (min-width: 27em) {
	.related-posts {
		padding-left: var(--space-sm);
		padding-right: var(--space-sm);
	}
}

@media (min-width: 1000px) {
	.related-posts {
		padding-left: var(--space-md);
		padding-right: var(--space-md);
	}
}

@media (min-width: 960px) {
	.related-posts {
		padding-left: var(--space-lg);
		padding-right: var(--space-lg);
	}
}

.related-posts__title {
	font-family: var(--font-main);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1;
	color: var(--color-text);
	text-wrap: balance;
	margin: 0 0 1.5rem;
}

.related-posts .crp_related {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

.related-posts .crp_related li {
	margin: 0;
	padding: 0;
}

.related-posts .crp_related li a {
	display: block;
	text-decoration: none;
	color: var(--color-text);
}

.related-posts__media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 2 / 1;
	overflow: hidden;
	isolation: isolate;
	background: var(--color-accent);
	margin: 0 0 0.5rem;
	padding: 0;
}

.related-posts__media img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	background-color: transparent;
	mix-blend-mode: luminosity;
	filter: brightness(1.2) contrast(0.8);
	transition: opacity 0.3s ease;
}

@media (hover: hover) {
	.related-posts .crp_related li a:hover .related-posts__media img {
		opacity: 0.85;
	}
}

.related-posts .crp_related li a span {
	font-family: var(--font-main);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: 0.03em;
	text-wrap: balance;
	display: block;
	margin: 0;
}

@media (min-width: 27em) {
	.related-posts .crp_related li a span {
		font-size: 1.5rem;
	}
}

/* Una columna: solo los 3 primeros. */
.related-posts .crp_related li:nth-child(n + 4) {
	display: none;
}

@media (min-width: 850px) {
	.related-posts .crp_related {
		grid-template-columns: repeat(3, 1fr);
	}

	.related-posts__title {
		font-size: 2.25rem;
	}
}

/* Dos columnas: los 4 primeros. */
@media (min-width: 850px) and (max-width: 1269px) {
	.related-posts .crp_related {
		grid-template-columns: repeat(2, 1fr);
	}

	.related-posts .crp_related li:nth-child(-n + 4) {
		display: list-item;
	}

	.related-posts .crp_related li:nth-child(n + 5) {
		display: none;
	}
}

@media (min-width: 1270px) {
	.related-posts .crp_related li:nth-child(n + 4) {
		display: list-item;
	}
}

@media (min-width: 1100px) {
	.related-posts__title {
		font-size: 2.75rem;
	}

	.related-posts .crp_related li a span {
		font-size: 2rem;
	}
}

@media (min-width: 1300px) {
	.related-posts__title {
		font-size: 3.25rem;
	}

	.related-posts .crp_related li a span {
		font-size: 2.5rem;
	}
}

@media (min-width: 1501px) {
	.related-posts__title {
		font-size: 3.5rem;
	}
}

