/* ==========================================================================
   Metamorph Pre School — Blog post pages
   Breakpoints: laptop <= 1366px, tablet <= 1024px, mobile <= 767px
   ========================================================================== */

/* ---------- Post header ---------- */
.post-header {
	position: relative;
	overflow: hidden;
	margin-top: 50px;
	padding: 0 30px;
}

.post-header__bg-scale {
	position: absolute;
	inset: 0;
}

.post-header__bg {
	position: absolute;
	inset: 0;
	background-image: url("../images/blog/dots.svg");
	background-position: center center;
}

.post-header__inner {
	position: relative;
	max-width: 1000px;
	margin: 0 auto;
	padding: 60px 0 0;
	border-bottom: 35px solid var(--accent-1);
}

.post-header__top {
	display: flex;
	padding-bottom: 20px;
}

.post-header__category {
	display: flex;
	align-items: center;
	width: 66.666%;
	padding-bottom: 10px;
	font-weight: 700;
}

.post-header__category a {
	color: var(--accent-1);
}

.post-header__share {
	display: flex;
	justify-content: flex-end;
	gap: 15px;
	width: 33.334%;
	min-height: 40px;
}

.share-btn {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	color: #FFFFFF;
}

.share-btn--facebook {
	background-color: #3b5998;
}

.share-btn--twitter {
	background-color: #1da1f2;
}

.share-btn--linkedin {
	background-color: #0077b5;
}

.share-btn:hover,
.share-btn:focus {
	color: #FFFFFF;
	opacity: .9;
}

.share-btn__icon svg {
	display: block;
	width: 18.75px;
	height: 18.75px;
	fill: currentColor;
}

.post-header__title {
	margin: 0 0 20px;
	color: #0a303a;
	font-size: 60px;
	font-weight: 900;
	line-height: 1.1em;
}

.post-meta {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -7.5px 20px;
	padding: 0;
	list-style: none;
}

.post-meta__item {
	display: flex;
	align-items: center;
	margin: 0 7.5px;
	padding-bottom: 10px;
}

.post-meta__item a {
	display: flex;
	align-items: center;
	color: var(--accent-1);
}

.post-meta__avatar {
	display: block;
	width: 30px;
	height: 30px;
	border-radius: 100%;
}

.post-meta__text {
	padding-left: 10px;
}

/* ---------- Featured image ---------- */
.post-featured {
	margin: 50px 0 30px;
	padding: 0 30px;
}

.post-featured img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 46px;
}

/* ---------- Article ---------- */
.post-content {
	overflow: hidden;
	margin-bottom: 30px;
	padding: 0 30px;
}

.post-content__wrap {
	padding: 0 30px;
	background-color: #FFFFFF;
}

.post-content__inner {
	max-width: 1000px;
	margin: 0 auto;
}

.post-content__inner > :not(:last-child) {
	margin-bottom: 10px;
}

.post-content__text {
	font-family: var(--font-text);
	font-size: 17px;
	line-height: 1.7em;
}

.post-content__text:not(.post-content__text--lead) {
	display: flow-root;
	padding-bottom: 1%;
}

.post-content__text p {
	margin: 0;
}

/* On one post only the lead paragraph has the 1.7 line height */
.post-content__inner--plain .post-content__text:not(.post-content__text--lead) {
	line-height: inherit;
}

.post-content__heading {
	margin-top: 0;
	padding: 1% 0;
	color: #0a303a;
	font-family: var(--font-comic);
	font-size: 26px;
	font-weight: 900;
	line-height: 1.21em;
}

.post-content__heading--first {
	padding: 0;
}

.post-content__heading--lead {
	padding: 2% 0 0;
}

/* Drop cap on the first paragraph */
.drop-cap {
	float: left;
	margin-right: 16px;
	color: #000000;
	line-height: 1;
	text-align: center;
}

.drop-cap__letter {
	display: inline-block;
	font-size: 83px;
	font-weight: 700;
	line-height: 75px;
}

/* ---------- Post navigation + author ---------- */
.post-footer {
	margin: 20px 0 40px;
	padding: 0 30px;
}

.post-footer__inner {
	display: flow-root;
	max-width: 1000px;
	margin: 0 auto;
}

.post-nav {
	display: flex;
	margin: 40px 0 20px;
	padding: 26px 20px;
	border-radius: 15px;
	background-color: var(--accent-8);
}

.post-nav__link {
	width: 50%;
}

.post-nav__link--next {
	text-align: end;
}

.post-nav__link a {
	display: flex;
	align-items: center;
	max-width: 100%;
	color: var(--accent-1);
}

.post-nav__link--next a {
	justify-content: flex-end;
}

.post-nav__link-inner {
	display: flex;
	flex-direction: column;
}

.post-nav__label {
	color: var(--accent-3);
	font-size: 16px;
}

.post-nav__title {
	font-size: 16px;
	font-weight: 700;
}

.post-nav__separator {
	width: 0;
}

.author-box {
	display: flex;
	align-items: center;
	padding: 30px 0;
}

.author-box__avatar {
	flex: none;
	margin-right: 30px;
}

.author-box__avatar {
	display: block;
}

.author-box__avatar img {
	display: inline-block;
	vertical-align: baseline;
	width: 100px;
	height: 100px;
	border-radius: 500px;
	object-fit: cover;
}

.author-box__text {
	flex: 1 1 auto;
	font-size: 17px;
}

.author-box__name {
	margin: 9.6px 0 33px;
	color: #0a303a;
	font-size: 16px;
	font-weight: 800;
	line-height: 1px;
	text-transform: uppercase;
}

.author-box__bio {
	margin-bottom: 10px;
}

.author-box__button {
	display: inline-block;
	padding: 10px 18px;
	color: rgb(63, 68, 75);
	font-family: var(--font-button);
	font-size: 15px;
	font-weight: 100;
	line-height: 1;
}

/* ---------- Related posts ---------- */
.related-posts {
	margin-bottom: 100px;
	padding: 100px 30px;
	background-color: var(--accent-8);
}

.related-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px 40px;
}

.related-card {
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
	border-radius: 3px;
	background-color: var(--accent-8);
}

.related-card__thumb {
	display: block;
	position: relative;
	margin-bottom: 20px;
	padding-bottom: 60%;
	overflow: hidden;
}

.related-card__thumb img {
	position: absolute;
	top: 50%;
	left: 50%;
	width: auto;
	max-width: none;
	height: 100%;
	transform: translate(-50%, -50%) scale(1.01);
	transition: filter .3s;
}

.related-card:hover .related-card__thumb img {
	filter: brightness(115%);
}

.related-card__badge {
	position: absolute;
	top: 0;
	left: 0;
	margin: 15px;
	padding: .6em 1.2em;
	border-radius: 999px;
	background-color: var(--accent-2);
	color: #FFFFFF;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: .5px;
	text-transform: uppercase;
}

.related-card__title {
	margin: 0 0 15px;
	font-size: 26px;
	font-weight: 800;
	line-height: 1.3em;
}

.related-card__title a {
	color: var(--accent-3);
}

/* ==========================================================================
   RESPONSIVE — TABLET (<= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
	.post-header {
		margin-top: 0;
	}

	.post-header__bg {
		background-size: contain;
		background-repeat: no-repeat;
	}

	.post-header__top {
		padding-bottom: 0;
	}

	.post-header__share {
		min-height: 38px;
	}

	.post-header__title {
		font-size: 50px;
	}

	.post-content {
		margin: 30px 0 0;
	}

	.post-content__wrap {
		padding: 0;
	}

	/* The theme spaces paragraphs from tablet down */
	.post-content__text {
		display: flow-root;
	}

	.post-content__text p {
		margin: 10px 0 20px;
	}

	.post-content__text:not(.post-content__text--lead) {
		padding-bottom: 0;
	}

	.post-footer {
		margin: 0;
	}

	.related-posts {
		margin: 40px 0;
	}

	.related-posts__grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   RESPONSIVE — MOBILE (<= 767px)
   ========================================================================== */
@media (max-width: 767px) {
	.post-header {
		margin-top: 20px;
		padding: 0 20px;
	}

	.post-header__inner {
		padding-top: 0;
	}

	.post-header__top {
		flex-wrap: wrap;
	}

	.post-header__category,
	.post-header__share {
		width: 100%;
		padding-bottom: 20px;
	}

	.post-header__category {
		padding-bottom: 30px;
	}

	.post-header__share {
		justify-content: flex-start;
		min-height: 58px;
	}

	.post-header__title {
		font-size: 30px;
	}

	.post-meta {
		margin: 0 -5px 20px;
		font-size: 12px;
	}

	.post-meta__item {
		margin: 0 5px;
	}

	.post-meta__avatar {
		width: 0;
		height: 0;
	}

	.post-featured,
	.post-content,
	.post-footer {
		padding: 0 20px;
	}

	.post-content {
		margin-top: 20px;
	}

	.post-content__wrap {
		padding-bottom: 20px;
	}

	.post-content__heading,
	.post-content__heading--first,
	.post-content__heading--lead {
		padding: 10px 0 0;
		font-size: 24px;
	}

	.post-nav__label,
	.post-nav__title {
		font-size: 15px;
	}

	.author-box {
		padding: 35px 5px;
	}

	.author-box__avatar {
		margin-right: 0;
	}

	.author-box__avatar img {
		width: 0;
		height: 0;
	}

	.author-box__name,
	.author-box__bio {
		font-size: 15px;
	}

	.related-posts {
		margin: 40px 0 70px;
		padding: 60px 20px;
	}

	.related-card__thumb {
		padding-bottom: 50%;
	}
}
