/*
 * Blog: the listing (centered article stack), pagination, single post, static
 * page and empty states. Mirrors riversedgecutlery.com/blog/.
 */

/* ---- Listing ---------------------------------------------------------- */

@media (min-width: 1200px) {
	.blog-list {
		margin: 0 -28.5px;
	}
}

.blog {
	margin-bottom: 1.5rem;
}

@media (min-width: 801px) {
	.blog {
		width: 100%;
		margin: auto;
	}
}

.blog + .blog {
	margin-top: 3rem;
	padding-top: 3rem;
	border-top: 1px solid var(--rec-line);
}

.blog-list .blog:last-child {
	margin-bottom: 0;
}

.blog-post-figure {
	display: block;
	margin: auto;
	text-align: center;
}

@media (min-width: 801px) {
	.blog-post-figure {
		width: 66.66667%;
	}
}

.blog-thumbnail {
	position: relative;
	max-width: 190px;
	margin: 0 auto 2rem;
}

.blog-thumbnail a {
	display: block;
}

.blog-thumbnail img {
	display: block;
	width: 100%;
}

.blog-thumbnail__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	background: #f8f8f8;
}

.blog-thumbnail__placeholder img {
	width: 80%;
	opacity: 0.45;
}

.blog-post-body {
	display: block;
	width: 100%;
	margin: 0 auto;
	text-align: center;
}

@media (min-width: 551px) {
	.blog-post-body {
		width: 83.33333%;
	}
}

@media (min-width: 801px) {
	.blog-post-body {
		width: 66.66667%;
	}
}

@media (min-width: 1261px) {
	.blog-post-body {
		width: 50%;
	}
}

.blog-title {
	margin: 0 1.5rem 0.38889rem;
	font-size: 22px;
	overflow-wrap: anywhere;
}

.blog-title a {
	color: var(--rec-text);
	text-decoration: none;
}

.blog-title a:hover,
.blog-title a:focus {
	color: var(--rec-green);
}

.blog-date {
	margin: 0 0 1.5rem;
	color: var(--rec-blue);
	text-align: center;
}

.blog-post {
	font-size: 15px;
	text-align: left;
}

.blog-post a {
	color: var(--rec-text);
}

.blog-post a:hover,
.blog-post a:focus {
	color: var(--rec-green);
}

/* ---- Pagination ------------------------------------------------------- */

.pagination {
	margin-top: 60px;
}

.pagination-list {
	margin: 0 0 27px;
	text-align: center;
}

.pagination-item {
	display: inline-block;
	margin: 0 7px 0 0;
	border: 1px solid transparent;
	color: var(--rec-blue);
	vertical-align: middle;
}

.pagination-link {
	display: block;
	min-width: 36px;
	padding: 0 0.5rem;
	border-radius: 4px;
	color: var(--rec-blue);
	font-size: 18px;
	font-weight: 400;
	line-height: 36px;
	transition: background-color 0.3s ease-out;
}

.pagination-link:hover,
.pagination-link:focus {
	background: #f0f0f0;
	color: var(--rec-blue);
}

.pagination-item--current {
	border-color: var(--rec-line);
	border-radius: 50%;
}

.pagination-item--current .pagination-link {
	padding: 0;
	color: var(--rec-text);
}

.pagination-item--gap {
	min-width: 36px;
	line-height: 36px;
	text-align: center;
}

.pagination-item--next .pagination-link,
.pagination-item--previous .pagination-link {
	display: flex;
	align-items: center;
	padding: 10px 20px 8px;
	border-radius: 30px;
	background: var(--rec-green);
	color: #fff;
	line-height: 1.1;
}

.pagination-item--next .pagination-link:hover,
.pagination-item--next .pagination-link:focus,
.pagination-item--previous .pagination-link:hover,
.pagination-item--previous .pagination-link:focus {
	background: var(--rec-green-dark);
	color: #fff;
}

.pagination-link .icon {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.pagination-link .icon-flip {
	margin-right: 2px;
	transform: scaleX(-1);
}

/* ---- Single post / page content --------------------------------------- */

.blog-post.entry-content {
	font-size: 15px;
	overflow-wrap: break-word;
}

.entry-content > :last-child {
	margin-bottom: 0;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin: 2.28571rem 0 0.77778rem;
}

.entry-content ul {
	margin: 0 0 1.5rem 20.7px;
	padding: 0;
	list-style: disc;
}

.entry-content ol {
	margin: 0 0 1.5rem 20.7px;
	padding: 0;
	list-style: decimal;
}

.entry-content li {
	margin: 0;
}

.entry-content blockquote {
	margin: 0 0 1.5rem;
	padding: 0.25rem 0 0.25rem 1.25rem;
	border-left: 3px solid var(--rec-green);
}

.entry-content img {
	max-width: 100%;
	height: auto;
}

.entry-content figure {
	margin: 0 0 1.5rem;
}

.entry-content figcaption,
.wp-caption-text {
	margin-top: 0.4rem;
	font-size: 13px;
}

.entry-content table {
	width: 100%;
	margin-bottom: 1.5rem;
	border-collapse: collapse;
}

.entry-content th,
.entry-content td {
	padding: 8px 10px;
	border: 1px solid var(--rec-line);
	text-align: left;
}

.entry-content .alignleft {
	float: left;
	margin: 0 1.5rem 1rem 0;
}

.entry-content .alignright {
	float: right;
	margin: 0 0 1rem 1.5rem;
}

.entry-content .aligncenter {
	display: block;
	margin-right: auto;
	margin-left: auto;
}

.entry-content::after {
	content: "";
	display: block;
	clear: both;
}

.rec-page .blog-post {
	max-width: 900px;
	margin: 0 auto;
}

.tags {
	margin: 3rem 0 1.5rem;
	font-size: 0;
	text-align: center;
	list-style: none;
}

.tags .tag {
	display: inline-block;
}

.tags .tag a {
	display: inline-block;
	padding: 7px 9px;
	color: var(--rec-blue);
	font-size: 18px;
	line-height: 27px;
}

.tags .tag a:hover,
.tags .tag a:focus {
	color: var(--rec-green);
}

.page-links {
	margin-top: 1rem;
}

.post-navigation {
	max-width: 66.66667%;
	margin: 3rem auto 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--rec-line);
}

@media (max-width: 800px) {
	.post-navigation {
		max-width: 100%;
	}
}

.post-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
	flex: 1 1 0;
	font-size: 15px;
}

.post-navigation .nav-next {
	text-align: right;
}

.post-navigation .nav-subtitle {
	display: block;
	color: var(--rec-blue);
	font-size: 13px;
	text-transform: uppercase;
}

.post-navigation .nav-title {
	font-family: var(--rec-font-heading);
	font-weight: 700;
}

/* ---- Empty / 404 / blog search ---------------------------------------- */

.rec-empty {
	max-width: 640px;
	margin: 0 auto;
	padding: 1.5rem 0 3rem;
	text-align: center;
}

.rec-empty__title {
	margin-bottom: 0.5rem;
	font-family: var(--rec-font-heading);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.25px;
}

.rec-blogsearch {
	display: flex;
	gap: 10px;
	margin-top: 1.5rem;
}

.rec-blogsearch__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	padding: 0 18px;
	border: 1px solid #d5d5d5;
	border-radius: 30px;
	font-family: var(--rec-font-body);
	font-size: 16px;
	font-weight: 300;
}

.rec-blogsearch__input:focus {
	border-color: var(--rec-green);
	outline: none;
}

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

@media (max-width: 550px) {
	.blog-title {
		margin-right: 0;
		margin-left: 0;
	}
}
