/* reviews-articles — page-type overrides, loaded after style.css.
   Scoped to: /reviews/ (.listing--reviews), single review (.review-single),
   /articles/ (.listing--articles), single article (.single-article). */

/* ---------- Shared: readable lead under the page H1 ---------- */

.page-intro__lead--readable {
	max-width: 60ch;
	margin: 16px auto 0;
	font-size: 1.25rem;
	line-height: 1.6;
	color: var(--wp--preset--color--charcoal, #2b2b2b);
	opacity: 0.88;
}

.page-intro--reviews,
.page-intro--articles { padding-bottom: 16px; }

/* ---------- Back pill (single review / single article) ---------- */

.back-pill {
	margin: 0 auto 20px !important;
	text-align: center;
}

.back-pill a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 22px;
	background: #fff;
	border: var(--rl-line);
	border-radius: 999px;
	color: var(--wp--preset--color--coral);
	font-weight: 600;
	font-size: 1.0625rem;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.back-pill a:hover,
.back-pill a:focus-visible {
	border-color: rgba(155, 3, 35, 0.45);
	background: rgba(155, 3, 35, 0.04);
}

/* ---------- Written reviews on /reviews/ ---------- */

/* flex + justify-content:center, so an odd last row is centred at the same card width */
.listing--reviews .review-grid--archive {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	max-width: none;
}

.listing--reviews .review-grid--archive > li {
	display: flex;
	flex: 0 0 calc((100% - 48px) / 3);
	min-width: 0;
	margin: 0;
}

.review-card--archive {
	flex: 1;
	min-width: 0;
	padding: 32px 32px 28px;
}

/* the quote glyph hugged the first text line: lift it a few px (works for every card variant) */
.review-card__quote { transform: translateY(-7px); }

/* quote mark: in the flow (was absolutely positioned and overlapped the first line) */
.review-card--archive > .review-card__quote,
.review-card--single > .review-card__quote {
	position: static;
	display: block;
	margin: 0 0 14px !important;
	margin-inline: 0 !important;
	text-align: left;
	font-size: 3rem;
	line-height: 0.7;
	height: 1.4rem;
	color: var(--wp--preset--color--gold, #ac7f58);
	opacity: 0.85;
}

.review-card--archive > .wp-block-post-content {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.7;
	color: var(--wp--preset--color--charcoal, #2b2b2b);
}

.review-card--archive > .wp-block-post-content > * { margin: 0; max-width: none; }
.review-card--archive > .wp-block-post-content > * + * { margin-top: 1em; }

.review-card--archive > .review-card__author {
	margin: auto 0 0;
	padding-top: 20px;
	font-size: 1.0625rem;
	line-height: 1.4;
	font-weight: 600;
	color: var(--wp--preset--color--coral);
	opacity: 1;
}

/* a thin divider that lines up across the row */
.review-card--archive > .wp-block-post-content { margin-bottom: 20px; }
.review-card--archive > .review-card__author {
	border-top: var(--rl-line);
	padding-top: 18px;
}

@media (max-width: 960px) {
	.listing--reviews .review-grid--archive > li { flex-basis: calc((100% - 24px) / 2); }
}

@media (max-width: 640px) {
	.listing--reviews .review-grid--archive > li { flex-basis: 100%; }
	.review-card--archive { padding: 28px 24px 24px; }
}

/* ---------- Single review ---------- */

.page-intro--review,
.page-intro--article { padding-bottom: 8px; }

.review-single { padding-top: 24px; padding-bottom: var(--rl-section); }

.review-card--single {
	max-width: 760px;
	margin-inline: auto;
	padding: 48px 56px 40px;
}

.review-card--single > .review-card__quote {
	font-size: 4.5rem;
	height: 2.2rem;
	margin-bottom: 20px;
}

.review-card--single > .wp-block-post-content { margin: 0 0 28px; }

.review-card--single .wp-block-post-content p {
	margin: 0;
	max-width: none;
	font-size: 1.25rem;
	line-height: 1.75;
}

.review-card--single .wp-block-post-content p + p { margin-top: 1em; }

.review-card--single > .review-card__author {
	margin: 0;
	padding-top: 22px;
	border-top: var(--rl-line);
	font-size: 1.1875rem;
	line-height: 1.4;
	font-weight: 600;
	color: var(--wp--preset--color--coral);
	opacity: 1;
}

@media (max-width: 640px) {
	.review-card--single { padding: 32px 24px 28px; }
	.review-card--single .wp-block-post-content p { font-size: 1.125rem; }
}

/* ---------- Articles list ---------- */

.listing--articles { padding-top: 40px; }

.listing--articles .article-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	max-width: none;
	list-style: none;
}

.listing--articles .article-grid > li {
	position: relative;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	flex: 0 0 calc((100% - 48px) / 3);
	min-width: 0;
	margin: 0;
	padding: 0 0 28px;
	gap: 0;
	background: #fff;
	border: var(--rl-line);
	border-radius: var(--rl-radius);
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.listing--articles .article-grid > li:hover {
	border-color: rgba(155, 3, 35, 0.4);
	transform: translateY(-2px);
}

.listing--articles .article-grid > li:focus-within {
	border-color: rgba(155, 3, 35, 0.6);
}

.listing--articles .article-grid > li > * { margin-block: 0; }
.listing--articles .article-grid > li > :not(.wp-block-post-featured-image) { margin-inline: 28px; }

.listing--articles .article-grid .wp-block-post-featured-image {
	margin: 0 0 24px;
}

.listing--articles .article-grid .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: calc(var(--rl-radius) - 1px) calc(var(--rl-radius) - 1px) 0 0;
}

.listing--articles .article-grid .wp-block-post-title {
	margin-bottom: 12px;
	font-size: 1.4rem;
	line-height: 1.3;
}

.listing--articles .article-grid .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}

/* the whole card is the click target */
.listing--articles .article-grid .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.listing--articles .article-grid .wp-block-post-excerpt {
	margin-bottom: 20px;
	font-size: 1.0625rem;
	line-height: 1.65;
	opacity: 1;
	color: var(--wp--preset--color--charcoal, #2b2b2b);
}

.listing--articles .article-grid .wp-block-post-excerpt__excerpt { margin: 0; }

.listing--articles .article-grid .article-card__cta {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-top: auto;
	margin-bottom: -10px;
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--wp--preset--color--coral);
	text-decoration: none;
}

.listing--articles .article-grid .article-card__cta::after { content: " →"; white-space: pre; }
.listing--articles .article-grid > li:hover .article-card__cta { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 960px) {
	.listing--articles .article-grid > li { flex-basis: calc((100% - 24px) / 2); }
}

@media (max-width: 640px) {
	.listing--articles .article-grid > li { flex-basis: 100%; }
}

/* ---------- Single article: comfortable reading column ---------- */

.page-intro--article > .wp-block-post-title {
	max-width: 880px;
	line-height: 1.2;
}

.single-article { padding-top: 32px; padding-bottom: var(--rl-section); }

.single-article > .single-article__featured-image {
	margin: 0 auto 48px;
	max-width: 45rem;
}

.single-article .single-article__featured-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: var(--rl-radius);
	display: block;
}

.single-article > .wp-block-post-content {
	max-width: 45rem;
	font-size: 1.1875rem;
	line-height: 1.75;
}

.single-article > .wp-block-post-content > * {
	max-width: 45rem;
	margin-block: 0 1.5em;
}

.single-article > .wp-block-post-content > :last-child { margin-bottom: 0; }

.single-article > .wp-block-post-content p {
	font-size: 1.1875rem;
	line-height: 1.75;
}

.single-article > .wp-block-post-content > h2 {
	margin-top: 2.4em;
	margin-bottom: 0.7em;
	padding-top: 0;
	border-top: 0;
	font-size: clamp(1.5rem, 2.4vw, 1.875rem);
	line-height: 1.25;
}

.single-article > .wp-block-post-content > h2::before {
	content: "";
	display: block;
	width: 44px;
	height: 3px;
	margin-bottom: 18px;
	border-radius: 2px;
	background: var(--wp--preset--color--coral);
}

.single-article > .wp-block-post-content > h2:first-child { margin-top: 0; }

.single-article > .wp-block-post-content > h3 {
	margin-top: 2em;
	margin-bottom: 0.6em;
	font-size: 1.4rem;
	line-height: 1.3;
}

.single-article > .wp-block-post-content > ul,
.single-article > .wp-block-post-content > ol {
	padding-left: 1.4em;
	font-size: 1.1875rem;
	line-height: 1.75;
}

.single-article > .wp-block-post-content li + li { margin-top: 0.5em; }

.single-article > .wp-block-post-content > blockquote {
	margin-inline: 0;
	padding: 4px 0 4px 24px;
	border-left: 3px solid var(--wp--preset--color--gold, #ac7f58);
	font-size: 1.25rem;
}

.single-article > .wp-block-post-content > figure,
.single-article > .wp-block-post-content > .wp-block-image {
	margin-block: 2.2em;
}

.single-article > .wp-block-post-content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--rl-radius);
}

@media (max-width: 640px) {
	.single-article > .wp-block-post-content,
	.single-article > .wp-block-post-content p,
	.single-article > .wp-block-post-content > ul,
	.single-article > .wp-block-post-content > ol { font-size: 1.125rem; line-height: 1.75; }
	.single-article > .single-article__featured-image { margin-bottom: 32px; }
}
