/**
 * Single article (post) layout: reading spacing and the author / reviewer
 * elements. Loaded on single posts only, after the main stylesheet.
 *
 * The title and body share the header's 1280px width, with the same 1rem
 * minimum side gutter as the hero, so their edges line up at every screen
 * size without wrapping content in groups. Spacing follows the Ivy Rehab
 * articles: larger body text with more line height, and more room around
 * headings, lists and the sections of the page.
 */

.single-blog {
	--ivy-article-width: 1280px;
	--ivy-article-gutter: 1rem;
}

/* ---------- Hero ---------- */

.single-blog__hero {
	padding-top: 5.5rem;
}

.single-blog__breadcrumbs {
	margin-bottom: 2rem;
}

.single-blog__meta-row {
	margin-top: 2.5rem;
}

.single-blog__featured-image {
	padding-top: 3.5rem;
}

/* Hide the featured image on blog posts only (Newsroom posts keep it). */
.single-post .single-blog__featured-image {
	display: none;
}

/* ---------- Byline ---------- */

.single-blog__avatars {
	display: flex;
	flex-shrink: 0;
}

.single-blog__avatars .single-blog__author-avatar {
	border: 3px solid #f7f7f7;
}

.single-blog__avatars .single-blog__author-avatar + .single-blog__author-avatar {
	margin-left: -0.875rem;
}

.single-blog__author-name a,
.single-blog__reviewer a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.single-blog__author-name a:hover,
.single-blog__author-name a:focus-visible,
.single-blog__reviewer a:hover,
.single-blog__reviewer a:focus-visible {
	color: var(--ivy-color-secondary, #03269a);
}

.single-blog__reviewer {
	display: none;
}

.single-blog__date {
	margin-top: 0.15rem;
}

/* ---------- Body ---------- */

.single-blog__content {
	padding: 4rem 0 3rem;
	font-size: 1.125rem;
	line-height: 1.75;
}

/* Text blocks sit in a centered reading column, whether they are at the top
   level of the article or inside a full-width group. */
.single-blog__content > :is(p, h2, h3, h4, h5, h6, ul, ol, blockquote, .wp-block-quote, .wp-block-table, .wp-block-image, .wp-block-details, .wp-block-separator, .wp-block-embed, .wp-block-buttons, .rank-math-block, .wp-block-rank-math-toc-block),
.single-blog__content > .wp-block-group > :is(p, h2, h3, h4, h5, h6, ul, ol, blockquote, .wp-block-quote, .wp-block-table, .wp-block-image, .wp-block-details, .wp-block-separator, .wp-block-embed, .wp-block-buttons, .rank-math-block, .wp-block-rank-math-toc-block) {
	width: min(100% - (var(--ivy-article-gutter) * 2), var(--ivy-article-width));
	max-width: var(--ivy-article-width);
	margin-right: auto;
	margin-left: auto;
}

/* Inside a group, the group's own padding is the gutter. */
.single-blog .single-blog__content > .wp-block-group > * {
	width: 100%;
}

.single-blog__content p {
	margin-top: 0;
	margin-bottom: 1.5rem;
	font-size: inherit;
	line-height: inherit;
}

.single-blog__content :is(h2, h3, h4) {
	margin-bottom: 1.25rem;
}

.single-blog__content h2 {
	margin-top: 4rem;
	font-size: 2.25rem;
}

.single-blog__content h3 {
	margin-top: 2.75rem;
}

.single-blog__content h4 {
	margin-top: 2.25rem;
	font-size: 1.25rem;
}

.single-blog__content > :first-child,
.single-blog__content > .wp-block-group > :first-child {
	margin-top: 0;
}

.single-blog__content :is(ul, ol) {
	margin-top: 0;
	margin-bottom: 2rem;
	line-height: inherit;
}

.single-blog__content li + li {
	margin-top: 0.75rem;
}

.single-blog__content li > :is(ul, ol) {
	margin-top: 0.75rem;
	margin-bottom: 0;
}

.single-blog__content .wp-block-image,
.single-blog__content figure {
	margin-top: 3rem;
	margin-bottom: 3rem;
}

.single-blog__content :is(blockquote, .wp-block-quote) {
	margin-top: 2.5rem;
	margin-bottom: 2.5rem;
	padding: 0.25rem 0 0.25rem 1.5rem;
	border-left: 3px solid var(--ivy-color-secondary, #03269a);
}

.single-blog__content .wp-block-separator {
	margin-top: 3.5rem;
	margin-bottom: 3.5rem;
}

/* About Ivy Health & Disclaimer (synced pattern, inc/article-patterns.php):
   the About text starts a third of the way in on desktop, the disclaimer is
   small, centered print across the full width. */
.single-blog__content .article-about {
	margin-bottom: 3rem;
}

.single-blog__content .article-about__title {
	margin-top: 0;
	margin-bottom: 1.25rem;
	font-size: 1.375rem;
	font-weight: 400;
}

.single-blog__content .article-about p {
	margin-bottom: 0;
	font-size: 1rem;
	line-height: 1.6;
}

.single-blog__content .article-disclaimer {
	font-size: 0.75rem;
	line-height: 1.5;
	text-align: center;
}

.single-blog__content .article-disclaimer p {
	margin-bottom: 0;
}

@media (min-width: 782px) {
	.single-blog__content .article-about {
		padding-left: 35%;
	}
}

/* Full-width groups inside an article: less vertical padding than on landing
   pages, so sections don't feel cut off from each other. */
.single-blog__content > .wp-block-group {
	padding-top: 3.5rem;
	padding-bottom: 3.5rem;
}

/* ---------- Author and reviewer cards ---------- */

.single-blog__people {
	display: grid;
	gap: 1.5rem;
	width: min(100% - (var(--ivy-article-gutter) * 2), var(--ivy-article-width));
	margin: 1rem auto 0;
	padding: 3rem 0 6rem;
	border-top: 1px solid #dde1df;
}

.single-blog__person {
	display: flex;
	align-items: flex-start;
	gap: 1.75rem;
	padding: 2rem;
	border-radius: 1rem;
	background: #fff;
}

.single-blog__person-photo {
	flex-shrink: 0;
}

.single-blog__person-image {
	display: block;
	width: 7rem;
	height: 7rem;
	border-radius: 50%;
	object-fit: cover;
}

.single-blog__person-body {
	min-width: 0;
}

.single-blog__person-role {
	margin: 0 0 0.35rem;
	color: #5f6865;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.single-blog__person-name {
	margin: 0;
	font-size: 1.5rem;
	line-height: 1.2;
}

.single-blog__person-name a {
	color: inherit;
	text-decoration: none;
}

.single-blog__person-name a:hover,
.single-blog__person-name a:focus-visible {
	color: var(--ivy-color-secondary, #03269a);
	text-decoration: underline;
}

.single-blog__person-job {
	margin: 0.35rem 0 0;
	color: #5f6865;
	font-size: 0.95rem;
	font-weight: 600;
}

.single-blog__person-bio {
	margin: 1rem 0 0;
	font-size: 1rem;
	font-weight: 300;
	line-height: 1.65;
}

.single-blog__person-cta {
	margin-top: 1rem;
}

/* ---------- Small screens ---------- */

@media screen and (max-width: 42rem) {
	.single-blog__hero {
		padding-top: 3.5rem;
	}

	.single-blog__content {
		padding-top: 2.5rem;
		font-size: 1.0625rem;
	}

	.single-blog__content h2 {
		margin-top: 3rem;
		font-size: 1.875rem;
	}

	.single-blog__content h3 {
		margin-top: 2.25rem;
	}

	.single-blog__content > .wp-block-group {
		padding-top: 2.5rem;
		padding-bottom: 2.5rem;
	}

	.single-blog__people {
		padding-bottom: 4rem;
	}

	.single-blog__person {
		flex-direction: column;
		gap: 1.25rem;
		padding: 1.5rem;
	}

	.single-blog__person-image {
		width: 5.5rem;
		height: 5.5rem;
	}
}
