/**
 * Single post (news article) — Figma Article 475:3424.
 */

.single-post {
	--single-post-pad-block-start: var(--space-80);
	--single-post-pad-block-end: var(--space-64);
	--single-post-col: 50.5rem; /* 808px */
	--single-post-stack-gap: var(--space-48);
	--single-post-header-gap: var(--space-24);
	--single-post-media-h: 24rem; /* 384px */
	--single-post-lead-size: 1.125rem; /* 18px */
	--single-post-lead-lh: 1.625; /* 29.25 / 18 */
	--single-post-body-size: var(--text-body-lg-size); /* 16px */
	--single-post-body-lh: 1.625; /* 26 / 16 */
	--single-post-h2-size: 1.75rem; /* 28px */
	--single-post-quote-bg: #f5f5f5;
	--single-post-bullet: 0.5rem; /* 8px diamond */

	width: 100%;
	box-sizing: border-box;
	padding-block: var(--single-post-pad-block-start) var(--single-post-pad-block-end);
	background-color: var(--color-bg);
}

.single-post__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--single-post-stack-gap);
}

.single-post__back {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	max-width: var(--single-post-col);
	text-decoration: none;
	color: var(--color-brand-secondary);
}

.single-post__back:hover .single-post__back-label,
.single-post__back:focus-visible .single-post__back-label {
	color: var(--color-brand-primary);
}

.single-post__back:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 3px;
}

.single-post__back-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	overflow: clip;
}

.single-post__back-icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transform: rotate(180deg); /* Figma asset points right; back link flips it */
}

.single-post__back-label {
	font-family: var(--font-sans);
	font-size: var(--text-body-size);
	font-weight: 800;
	line-height: 1.25rem;
	letter-spacing: 0.0857em;
	text-transform: uppercase;
	color: var(--color-brand-secondary);
}

.single-post__header {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--single-post-header-gap);
	width: 100%;
	max-width: var(--single-post-col);
}

.single-post__meta {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 0.75rem; /* 12px */
	font-weight: 900;
	line-height: 1rem;
	letter-spacing: 0.0667em;
	text-transform: uppercase;
	color: var(--color-grey-blue-1);
}

.single-post__title {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--text-display-md-size); /* 48px */
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: var(--text-heading-letter-spacing);
	text-transform: uppercase;
	color: var(--color-brand-primary);
}

.single-post__media {
	display: block;
	margin: 0;
	width: 100%;
	max-width: var(--single-post-col);
	height: var(--single-post-media-h);
	overflow: hidden;
	background-color: #f0f0f0;
	border: 1px solid var(--color-blue-200);
	box-sizing: border-box;
}

.single-post__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.single-post__content {
	width: 100%;
	max-width: var(--single-post-col);
	font-family: var(--font-sans);
	font-size: var(--single-post-body-size);
	font-weight: 400;
	line-height: var(--single-post-body-lh);
	letter-spacing: 0;
	color: var(--color-text-secondary);
}

.single-post__content > *:first-child {
	margin-top: 0;
}

.single-post__content > *:last-child {
	margin-bottom: 0;
}

.single-post__content > p:first-of-type {
	font-size: var(--single-post-lead-size);
	line-height: var(--single-post-lead-lh);
}

.single-post__content p {
	margin: 0 0 var(--space-24);
}

.single-post__content h2 {
	margin: var(--space-48) 0 var(--space-24);
	font-family: var(--font-sans);
	font-size: var(--single-post-h2-size);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-brand-primary);
}

.single-post__content h3 {
	margin: var(--space-32) 0 var(--space-16);
	font-family: var(--font-sans);
	font-size: var(--text-h3-size);
	font-weight: 800;
	line-height: var(--text-heading-line-height);
	letter-spacing: var(--text-heading-letter-spacing);
	text-transform: uppercase;
	color: var(--color-brand-primary);
}

.single-post__content ul,
.single-post__content ol {
	margin: 0 0 var(--space-24);
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.75rem; /* 12px */
}

.single-post__content li {
	position: relative;
	padding-inline-start: 1.25rem; /* 20px */
	font-size: var(--single-post-body-size);
	line-height: var(--single-post-body-lh);
	color: var(--color-text-secondary);
}

.single-post__content ul > li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.5rem;
	width: var(--single-post-bullet);
	height: var(--single-post-bullet);
	background-color: var(--color-brand-secondary);
	transform: rotate(45deg);
}

.single-post__content ol {
	counter-reset: single-post-ol;
}

.single-post__content ol > li {
	counter-increment: single-post-ol;
}

.single-post__content ol > li::before {
	content: counter(single-post-ol) '.';
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 700;
	color: var(--color-brand-secondary);
}

.single-post__content blockquote {
	display: flex;
	flex-direction: column;
	gap: var(--space-16);
	margin: var(--space-48) 0;
	padding: var(--space-32) var(--space-32) var(--space-32) 2.25rem; /* 36px left */
	background-color: var(--single-post-quote-bg);
	border: 0;
	border-inline-start: 4px solid var(--color-brand-secondary);
	box-sizing: border-box;
}

.single-post__content blockquote p {
	margin: 0;
	font-size: var(--single-post-lead-size);
	font-weight: 700;
	line-height: var(--single-post-lead-lh);
	color: var(--color-brand-primary);
}

.single-post__content blockquote cite,
.single-post__content blockquote footer {
	display: block;
	font-style: normal;
	font-size: var(--text-body-size);
	font-weight: 400;
	line-height: 1.25rem;
	color: var(--color-grey-blue-1);
}

.single-post__content a {
	color: var(--color-brand-secondary);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.single-post__content a:hover {
	color: var(--color-brand-primary);
}

.single-post__content img {
	display: block;
	max-width: 100%;
	height: auto;
}

.single-post__ctas {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--space-16);
	width: 100%;
	max-width: var(--single-post-col);
	padding-block-start: 3.0625rem; /* 49px */
	border-block-start: 1px solid var(--color-blue-200);
	box-sizing: border-box;
}

.single-post__cta {
	--btn-angled-min-width: 16.875rem; /* 270px */
	--btn-angled-min-height: 2.875rem; /* 46px */
}

/* Related variant — centered header (Figma 698:1788), same cards as news carousel */
.news-carousel--related {
	border-block-start: 0;
}

.news-carousel--related::before {
	display: none;
}

.news-carousel--related .news-carousel__header {
	justify-content: center;
}

.news-carousel--related .news-carousel__intro {
	flex: 0 1 auto;
	align-items: center;
	text-align: center;
	width: 100%;
}

.news-carousel--related .news-carousel__eyebrow {
	justify-content: center;
}

.news-carousel--related .news-carousel__heading {
	font-size: var(--text-h1-size); /* 40px — Figma related */
	width: 100%;
}

@media (max-width: 1439px) {
	.single-post {
		--single-post-pad-block-start: var(--space-64);
		--single-post-media-h: 20rem;
	}

	.single-post__title {
		font-size: var(--text-h1-size);
	}
}

@media (max-width: 767px) {
	.single-post {
		--single-post-pad-block-start: var(--space-48);
		--single-post-pad-block-end: var(--space-40);
		--single-post-stack-gap: var(--space-32);
		--single-post-media-h: 14rem;
	}

	.single-post__title {
		font-size: var(--text-h2-size);
	}

	.single-post__content h2 {
		font-size: var(--text-h3-size);
		margin-block-start: var(--space-32);
	}

	.single-post__ctas {
		flex-direction: column;
		align-items: stretch;
		padding-block-start: var(--space-32);
	}

	.single-post__cta {
		--btn-angled-min-width: 100%;
	}
}
