/**
 * “Spread” layout: image/card on one side, title + text on the other.
 * Used on carta, livro, about pages, and baralho singles.
 */

:root {
	--yala-face-width: min(280px, 78vw);
	--yala-spread-gutter: clamp(1.25rem, 3vw, 2rem);
}

.yala-single-spread__layout {
	display: grid;
	grid-template-columns: var(--yala-face-width) minmax(0, 1fr);
	gap: var(--yala-spread-gutter);
	align-items: start;
	width: 100%;
}

.yala-single-spread__media,
.yala-single-spread__body {
	position: relative;
	align-self: start;
}

.yala-single-spread__media {
	display: flex;
	justify-content: flex-end;
	width: var(--yala-face-width);
	max-width: 100%;
	padding-top: clamp(0.35rem, 1.5vw, 1.5rem);
}

.yala-single-spread__body {
	padding-top: clamp(1.75rem, 4.5vw, 4.25rem);
}

.yala-single-spread__media .wp-block-post-featured-image {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var(--yala-face-width);
	margin: 0;
}

.yala-single-spread__media .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	max-width: var(--yala-face-width);
	height: auto;
	margin: 0;
	object-fit: contain;
	border-radius: 8px;
	box-shadow:
		0 2px 0 rgba(34, 40, 49, 0.05),
		0 16px 36px rgba(34, 40, 49, 0.2),
		0 4px 10px rgba(34, 40, 49, 0.1);
	transform: none;
}

.yala-single-spread__media .wp-block-post-featured-image img[style*="object-fit"] {
	object-fit: contain !important;
}

.single-livro .yala-single-spread__media .wp-block-post-featured-image img {
	background: #f0ebe3;
}

.yala-about-spread .yala-single-spread__media .wp-block-post-featured-image img,
.yala-about-spread .yala-about-extra-photo img {
	display: block;
	width: 100%;
	max-width: var(--yala-face-width);
	height: auto;
	margin: 0;
	object-fit: contain;
	border-radius: 8px;
	box-shadow:
		0 2px 0 rgba(34, 40, 49, 0.05),
		0 16px 36px rgba(34, 40, 49, 0.2),
		0 4px 10px rgba(34, 40, 49, 0.1);
	background: #f0ebe3;
}

.yala-about-photo-stack {
	display: flex;
	flex-direction: column;
	gap: clamp(0.85rem, 2vw, 1.25rem);
	width: 100%;
	max-width: var(--yala-face-width);
}

.yala-about-photo-stack .wp-block-post-featured-image,
.yala-about-photo-stack__extras .wp-block-post-featured-image {
	width: 100%;
	max-width: 100%;
}

.yala-about-photo-stack__extras {
	display: flex;
	flex-direction: column;
	gap: clamp(0.85rem, 2vw, 1.25rem);
	width: 100%;
}

.yala-single-spread__media .wp-block-post-featured-image.yala-carta-featured--text {
	max-width: var(--yala-face-width);
	margin: 0;
	transform: none;
	box-shadow:
		0 2px 0 rgba(34, 40, 49, 0.05),
		0 16px 36px rgba(34, 40, 49, 0.2),
		0 4px 10px rgba(34, 40, 49, 0.1);
	border-radius: 8px;
}

.yala-single-spread__media .yala-carta-featured--text .yala-card-grid__thumb--text-full {
	border-radius: 8px;
}

.yala-single-spread__body .wp-block-post-title,
body.single-baralho main .wp-block-post-title {
	font-family: var(--yala-font-display);
	font-weight: 500;
}

.yala-single-spread__body .wp-block-post-title {
	max-width: 36rem;
}

@media (min-width: 768px) {
	.page-sobre-circulo .yala-single-spread__body .wp-block-post-title .yala-title-line {
		display: block;
	}
}

.yala-about-spread:has(.yala-page-attribution) .yala-single-spread__body > .wp-block-post-title {
	margin-bottom: 0.3rem !important;
}

.yala-page-attribution {
	margin: 0 0 var(--wp--preset--spacing--40, 1.75rem);
	max-width: 36rem;
}

.yala-page-attribution__quote {
	margin: 0;
	padding: 0.2rem 0 0.2rem 1rem;
	border: 0;
	border-left: 3px solid var(--yala-secondary-bright, #fbc02d);
	background: transparent;
	box-shadow: none;
}

.yala-page-attribution__quote p {
	margin: 0;
	font-family: inherit;
	font-size: 1.05rem;
	font-style: italic;
	line-height: 1.5;
	color: var(--yala-text, #2a1b1a);
}

.yala-page-attribution__quote a {
	font-style: normal;
	font-weight: 600;
}

.yala-spread-cta-stack {
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	max-width: 36rem;
	margin-top: clamp(1.5rem, 4vw, 2.25rem);
}

.yala-spread-cta-stack .yala-home-hero__cta {
	width: 100%;
	text-align: center;
}

@media (max-width: 767px) {
	.yala-single-spread__layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.35rem;
		max-width: 100%;
	}

	.yala-single-spread__media {
		justify-content: center;
		padding-top: 0;
		padding-right: 0;
	}

	.yala-single-spread__body {
		padding-top: 0;
	}

	.yala-about-spread .yala-single-spread__layout:has(.yala-about-photo-stack__extras) {
		grid-template-areas:
			"featured"
			"body"
			"extras";
	}

	.yala-about-spread .yala-single-spread__layout:has(.yala-about-photo-stack__extras) .yala-single-spread__media,
	.yala-about-spread .yala-single-spread__layout:has(.yala-about-photo-stack__extras) .yala-about-photo-stack {
		display: contents;
	}

	.yala-about-spread .yala-about-photo-stack > .wp-block-post-featured-image:first-child {
		grid-area: featured;
		justify-self: center;
		width: var(--yala-face-width);
		max-width: 100%;
	}

	.yala-about-spread .yala-about-photo-stack__extras {
		grid-area: extras;
		justify-self: center;
		width: var(--yala-face-width);
		max-width: 100%;
	}

	.yala-about-spread .yala-single-spread__layout:has(.yala-about-photo-stack__extras) .yala-single-spread__body {
		grid-area: body;
	}
}

/* Círculo de Yala — path cards below the body copy, always single column */
.yala-circulo-paths-grid {
	margin-top: 1.75rem;
	grid-template-columns: 1fr !important;
}
