/* Blog article — loaded only on single posts (see inc/blog-article.php). */

body.hs-article-page {
	--hs-navy: #152556;
	--hs-ink: #0b0b0f;
	--hs-text: #2b2f3a;
	--hs-page: #f3f4f6;
	--hs-panel: #ffffff;
	--hs-line: #d5d7de;
	--hs-green: #28d0ac;
	--hs-blue: #2797c1;
	--hs-font-heading: 'Plus Jakarta Sans', sans-serif;
	--hs-font-body: 'Plus Jakarta Sans', sans-serif;
	/* Gap above the sticky columns and jump targets; clears the admin bar when logged in. */
	--hs-sticky-top: calc(var(--wp-admin--admin-bar--height, 0px) + 32px);
}

/*
 * The theme sets `* { font-family: 'Inter' }` and `!important` heading sizes,
 * so fonts are set on elements directly and heading sizes use !important.
 */

/* clip, not hidden: hidden makes a scroll container, which breaks the sticky TOC and CTA card. */
body.hs-article-page #page-container {
	background-color: var(--hs-page);
	overflow: clip !important;
}

/* Peach blob behind the nav. */
body.hs-article-page #page-container::before {
	content: "";
	background: url('/wp-content/themes/Divi-Child/img/article-header.svg') no-repeat;
	background-size: contain;
	width: 666px;
	height: 211px;
	display: block;
	position: absolute;
	top: 0;
	right: 0;
	z-index: 9;
	pointer-events: none;
}

body.hs-article-page #et-main-area,
body.hs-article-page #main-content.hs-article {
	background-color: var(--hs-page) !important;
}

body.hs-article-page #main-content.hs-article {
	padding: 8em 0 5em;
}

.hs-article__inner {
	max-width: 1200px;
	width: 90%;
	margin: 0 auto;
	/* Above the header blob (z-index 9), which reaches down over content on narrow screens. */
	position: relative;
	z-index: 10;
}

.hs-article a:focus-visible,
.hs-article button:focus-visible,
.hs-article summary:focus-visible {
	outline: 2px solid var(--hs-navy);
	outline-offset: 2px;
}

.hs-article__back {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	margin-bottom: 1.75em;
	font-family: var(--hs-font-body);
	font-size: 0.875em;
	color: var(--hs-navy);
	text-decoration: none;
}

.hs-article__back svg {
	flex: none;
	display: block;
}

.hs-article__back:hover {
	text-decoration: underline;
}

/* Panel: hero, body and author box */
.hs-article__panel {
	position: relative;
	background: var(--hs-panel);
	border-radius: 24px;
	padding: 3.5em 3.5em 3em;
}

.hs-article__hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
	gap: 2em;
	align-items: start;
	margin-bottom: 4em;
}

.hs-article__hero--no-image {
	grid-template-columns: 1fr;
}

/* Category badges: one per category, each linking to its category page. */
.hs-article__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	list-style: none;
	padding: 0 !important;
	margin: 0 0 1.25em;
}

.hs-article__badges li {
	margin: 0;
}

.hs-article__badge {
	display: inline-block;
	text-decoration: none;
	padding: 0.3em 1.3em;
	font-family: var(--hs-font-heading);
	font-size: 0.8125em;
	font-weight: bold;
	line-height: 1.4;
	color: #fff;
	background: var(--hs-cat);
	border-radius: 999px;
}

.hs-article__badge:hover,
.hs-article__badge:focus-visible {
	color: #fff;
	text-decoration: underline;
}

.hs-article__title {
	font-family: var(--hs-font-heading);
	font-weight: bold;
	font-size: 2.75em !important;
	line-height: 1.15 !important;
	color: var(--hs-navy);
	padding: 0;
	margin: 0 0 1em;
}

.hs-article__meta,
.hs-article__meta time {
	font-family: var(--hs-font-body);
	font-size: 0.8125em;
	color: var(--hs-text);
	padding: 0;
	margin: 0 0 1.75em;
}

.hs-article__meta time {
	font-size: 1em;
	margin: 0;
}

.hs-share__label {
	font-family: var(--hs-font-body);
	font-size: 0.75em;
	color: var(--hs-text);
	padding: 0;
	margin: 0 0 0.5em;
}

.hs-share__list {
	display: flex;
	gap: 0.75em;
	list-style: none;
	padding: 0 !important;
	margin: 0;
}

.hs-share__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	color: var(--hs-ink);
	background: none;
	border: 0;
	cursor: pointer;
}

.hs-share__link:hover {
	color: var(--hs-navy);
}

.hs-share__copy.is-copied {
	color: var(--hs-green);
}

/* Featured image in a blob, overlapping the panel's top-right corner. */
.hs-article__hero-media {
	margin: -7em -5em 0 0;
}

.hs-article__hero-image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 6 / 5;
	object-fit: cover;
	-webkit-mask: url('/wp-content/themes/Divi-Child/img/article-image-mask.svg') center / contain no-repeat;
	mask: url('/wp-content/themes/Divi-Child/img/article-image-mask.svg') center / contain no-repeat;
}

/* Body: TOC | content | call to action */
.hs-article__layout {
	display: grid;
	grid-template-columns: 170px minmax(0, 1fr) 210px;
	gap: 3em;
	align-items: start;
}

.hs-article__layout--no-toc {
	grid-template-columns: minmax(0, 1fr) 210px;
}

.hs-article__toc,
.hs-article__aside {
	position: sticky;
	top: var(--hs-sticky-top);
}

.hs-article__toc ol {
	list-style: none;
	padding: 0 !important;
	margin: 0;
}

.hs-article__toc li {
	margin-bottom: 0.6em;
}

.hs-article__toc a {
	display: block;
	padding: 0.5em 0.85em;
	font-family: var(--hs-font-body);
	font-size: 0.75em;
	line-height: 1.35;
	color: var(--hs-ink);
	text-decoration: none;
	border: 1px solid var(--hs-ink);
	border-radius: 6px;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.hs-article__toc a:hover {
	border-color: var(--hs-green);
}

.hs-article__toc a[aria-current="true"] {
	background: var(--hs-green);
	border-color: var(--hs-green);
	font-weight: bold;
}

/* Article typography */
.hs-article__content {
	max-width: 640px;
}

.hs-article__content > *:first-child {
	margin-top: 0;
}

.hs-article__content p,
.hs-article__content li {
	font-family: var(--hs-font-body);
	font-size: 0.9375em;
	line-height: 1.65;
	color: var(--hs-text);
}

/* Divi resets ol, ul to list-style: none; bring the markers back in the text. */
.hs-article__content ul,
.hs-article__content ol {
	padding: 0 0 0 1.5em;
	margin: 0 0 1.25em;
}

.hs-article__content ul {
	list-style: disc;
}

.hs-article__content ol {
	list-style: decimal;
}

.hs-article__content li {
	margin-bottom: 0.4em;
}

.hs-article__content li > ul,
.hs-article__content li > ol {
	margin: 0.4em 0 0;
}

.hs-article__content p {
	padding: 0;
	margin: 0 0 1.25em;
}

.hs-article__content a {
	font-family: inherit;
	color: var(--hs-navy);
	text-decoration: underline;
}

.hs-article__content strong,
.hs-article__content em,
.hs-article__content span {
	font-family: inherit;
}

.hs-article__intro p {
	font-family: var(--hs-font-heading);
	font-weight: bold;
	font-size: 1.375em;
	line-height: 1.4;
	color: var(--hs-navy);
	margin-bottom: 1em;
}

.hs-article__content h2,
.hs-article__content h3 {
	font-family: var(--hs-font-heading);
	font-weight: bold;
	color: var(--hs-ink);
	padding: 0;
	scroll-margin-top: var(--hs-sticky-top);
}

.hs-article__content h2 {
	font-size: 1.375em !important;
	line-height: 1.3 !important;
	margin: 1.75em 0 0.75em;
}

.hs-article__content h3 {
	font-size: 1.125em !important;
	line-height: 1.35 !important;
	margin: 1.5em 0 0.6em;
}

.hs-article__intro {
	scroll-margin-top: var(--hs-sticky-top);
}

.hs-article__content img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

/* Images inserted in the editor fill the column whatever size was picked
   (a larger file comes from srcset; see the wp_content_img_tag filter in inc/blog-article.php).
   Left/right-aligned images keep their size. */
.hs-article__content img[class*="wp-image-"]:not(.alignleft):not(.alignright) {
	display: block;
	width: 100%;
	margin: 1.5em 0;
}

.hs-article__content .wp-caption:not(.alignleft):not(.alignright) {
	width: auto !important;
	max-width: 100%;
}

.hs-article__content .wp-caption img[class*="wp-image-"] {
	margin-bottom: 0.5em;
}

/* Yellow call-to-action box (inside the content) */
.hs-cta-box {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"title logo"
		"tagline button";
	gap: 1.25em 2em;
	align-items: center;
	padding: 1.75em 2em;
	margin: 2.5em 0;
	background: #fff8d9;
	border: 1px solid #f3e7ad;
	border-radius: 14px;
}

.hs-cta-box .hs-cta-box__title {
	grid-area: title;
	font-family: var(--hs-font-heading);
	font-weight: bold;
	font-size: 1.25em;
	line-height: 1.3;
	color: var(--hs-navy);
	margin: 0;
	padding: 0;
}

.hs-cta-box__logo {
	grid-area: logo;
	justify-self: center;
	width: 84px;
	height: auto;
}

.hs-cta-box .hs-cta-box__tagline {
	grid-area: tagline;
	font-family: var(--hs-font-heading);
	font-weight: bold;
	font-size: 1.125em;
	color: var(--hs-navy);
	margin: 0;
	padding: 0;
}

.hs-article__content .hs-cta-box__button,
.hs-cta-box__button {
	grid-area: button;
	justify-self: end;
	display: inline-block;
	padding: 0.55em 1.25em;
	font-family: var(--hs-font-heading);
	font-weight: bold;
	font-size: 0.8125em;
	color: #fff;
	background: var(--hs-green);
	border-radius: 8px;
	text-decoration: none;
}

.hs-cta-box__button:hover {
	opacity: 0.85;
}

/* Background image uploaded on the post (inline style), behind the banner's text */
.hs-cta-box,
.hs-cta-banner {
	background-size: cover;
	background-position: center;
}

/* "Beat the Sheet Music" card and banner */
.hs-cta-banner {
	display: flex;
	align-items: center;
	color: #fff;
	border-radius: 12px;
}

.hs-cta-banner .hs-cta-banner__title {
	font-family: var(--hs-font-heading);
	font-weight: bold;
	color: #fff;
	padding: 0;
	margin: 0;
}

.hs-cta-banner__button {
	display: inline-block;
	padding: 0.55em 1.1em;
	font-family: var(--hs-font-heading);
	font-weight: bold;
	font-size: 0.75em;
	color: #fff;
	background: var(--hs-navy);
	border-radius: 8px;
	text-decoration: none;
	white-space: nowrap;
}

.hs-cta-banner__button:hover {
	background: #0d1a40;
}

.hs-cta-banner--card {
	flex-direction: column;
	gap: 1.1em;
	padding: 1.75em 1.25em;
	text-align: center;
	background: linear-gradient(135deg, var(--hs-green) 0%, var(--hs-blue) 100%);
}

.hs-cta-banner--card .hs-cta-banner__title {
	font-size: 1.25em;
	line-height: 1.25;
}

.hs-cta-banner--wide {
	justify-content: space-between;
	gap: 1.5em;
	max-width: 560px;
	padding: 1.1em 1.5em;
	margin: 4em auto;
	background: linear-gradient(90deg, #2b4fd8 0%, var(--hs-blue) 55%, var(--hs-green) 100%);
}

.hs-cta-banner--wide .hs-cta-banner__title {
	font-size: 1.125em;
}

/* Author box: last thing in the content column. */
.hs-article__author {
	display: flex;
	align-items: flex-start;
	gap: 1.25em;
	margin-top: 3em;
}

.hs-article__author .hs-article__author-image {
	flex: none;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
}

.hs-article__author .hs-article__author-name {
	font-family: var(--hs-font-heading);
	font-weight: bold;
	font-size: 0.9375em;
	color: var(--hs-navy);
	padding: 0;
	margin: 0 0 0.6em;
}

.hs-article__author .hs-article__author-bio p {
	font-family: var(--hs-font-body);
	font-size: 0.8125em;
	line-height: 1.6;
	color: var(--hs-text);
	padding: 0;
	margin: 0 0 0.9em;
}

.hs-article__author-linkedin {
	display: inline-flex;
	color: var(--hs-navy);
}

/* Related articles */
.hs-related {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.75em;
	max-width: 900px;
	margin: 0 auto 5em;
}

.hs-related-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 8px 8px 1.5em;
	background: #e9eaee;
	border-radius: 16px;
}

.hs-related-card__media {
	position: relative;
	margin-bottom: 1.1em;
}

.hs-related-card__image {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border: 3px solid var(--hs-cat);
	border-radius: 12px;
}

.hs-related-card__image--empty {
	background: #dcdde3;
}

.hs-related-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 0.25em 1em;
	font-family: var(--hs-font-heading);
	font-size: 0.75em;
	font-weight: bold;
	color: #fff;
	background: var(--hs-cat);
	border-radius: 999px;
}

.hs-related-card .hs-related-card__title {
	font-family: var(--hs-font-heading);
	font-weight: bold;
	font-size: 1.25em !important;
	line-height: 1.25 !important;
	color: var(--hs-ink);
	padding: 0 0.6rem;
	margin: 0 0 1em;
	/* Grows so the link sits at the bottom whatever the title's line count. */
	flex: 1;
}

.hs-related-card__link {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	gap: 0.4em;
	margin: 0 0.6rem;
	font-family: var(--hs-font-heading);
	font-weight: bold;
	font-size: 0.8125em;
	color: var(--hs-navy);
	text-decoration: underline;
}

/* Covers the whole card, so the card opens the article. */
.hs-related-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 16px;
}

.hs-related-card:hover .hs-related-card__title,
.hs-related-card:focus-within .hs-related-card__title {
	text-decoration: underline;
}

.hs-related-card__link span[aria-hidden] {
	font-family: var(--hs-font-heading);
	font-size: 1.4em;
	text-decoration: none;
}

/* FAQs */
/* FAQs: after the article text, before the author box. */
.hs-faqs {
	margin-top: 3em;
}

.hs-faqs .hs-faqs__title {
	font-family: var(--hs-font-heading);
	font-weight: bold;
	font-size: 1.75em !important;
	line-height: 1.2 !important;
	color: var(--hs-navy);
	margin: 0 0 0.75em;
}

.hs-faq {
	background: #dff5fd;
	border-radius: 12px;
	margin-bottom: 1em;
}

.hs-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding: 1em 1.5em;
	font-family: var(--hs-font-heading);
	font-weight: bold;
	font-size: 1.125em;
	color: var(--hs-navy);
	cursor: pointer;
	list-style: none;
}

.hs-faq__question::-webkit-details-marker {
	display: none;
}

.hs-faq__question::after {
	content: "";
	flex: none;
	width: 10px;
	height: 10px;
	border-right: 2px solid var(--hs-navy);
	border-bottom: 2px solid var(--hs-navy);
	transform: translateY(-3px) rotate(45deg);
	transition: transform 0.2s ease;
}

.hs-faq[open] .hs-faq__question::after {
	transform: translateY(3px) rotate(-135deg);
}

.hs-faq__answer {
	padding: 0 1.5em 1.25em;
}

.hs-faq__answer p {
	font-family: var(--hs-font-body);
	font-size: 0.875em;
	line-height: 1.6;
	color: var(--hs-text);
	padding: 0;
	margin: 0 0 0.75em;
}

/* Tablet */
@media all and (max-width: 980px) {
	body.hs-article-page #page-container::before {
		width: 444px;
		height: 140px;
	}

	body.hs-article-page #main-content.hs-article {
		padding-top: 7em;
	}

	.hs-article__panel {
		padding: 2em 1.5em;
	}

	.hs-article__hero {
		grid-template-columns: 1fr;
		margin-bottom: 2.5em;
	}

	.hs-article__hero-media {
		order: -1;
		margin: 0;
	}

	.hs-article__title {
		font-size: 2.25em !important;
	}

	.hs-article__layout,
	.hs-article__layout--no-toc {
		grid-template-columns: 1fr;
		gap: 2em;
	}

	.hs-article__toc,
	.hs-article__aside {
		position: static;
	}

	.hs-article__toc ol {
		display: flex;
		flex-wrap: wrap;
		gap: 0.5em;
	}

	.hs-article__toc li {
		margin: 0;
	}

	.hs-article__aside {
		display: none;
	}
}

/* Mobile */
@media all and (max-width: 600px) {
	body.hs-article-page #page-container::before {
		width: 300px;
		height: 95px;
	}

	.hs-article__title {
		font-size: 1.875em !important;
	}

	.hs-cta-box {
		grid-template-columns: 1fr;
		grid-template-areas:
			"logo"
			"title"
			"tagline"
			"button";
		padding: 1.5em;
	}

	.hs-cta-box__logo,
	.hs-cta-box__button {
		justify-self: start;
	}

	.hs-cta-banner--wide {
		flex-direction: column;
		text-align: center;
	}

	.hs-related {
		grid-template-columns: 1fr;
	}
}
