/* Native block editor version of the Blog page. */
.mm-blog-page-template,
.mm-blog-page-template > .wp-block-post-content,
.mm-blog-page-template .mm-blog {
	margin-block-start: 0;
}

.mm-blog-page-template > .wp-block-post-content {
	max-width: none;
}

.mm-blog .mm-blog-shell {
	box-sizing: border-box;
}

.mm-blog-categories {
	margin: 0 0 44px;
	padding: 0;
	list-style: none;
}

.mm-blog-categories.wp-block-categories-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mm-blog-categories li {
	margin: 0;
	list-style: none;
}

.mm-blog-categories a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 15px;
	border: 1px solid #d6e1ec;
	border-radius: 22px;
	background: #fff;
	color: #405167;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .035em;
	text-decoration: none;
	text-transform: uppercase;
}

.mm-blog-categories a:hover {
	border-color: #147ce0;
	background: #147ce0;
	color: #fff;
}

.mm-blog-grid {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mm-blog-grid > .wp-block-post {
	margin: 0;
}

.mm-blog-card {
	height: 100%;
	overflow: hidden;
}

.mm-blog-card-media {
	position: relative;
	margin: 0;
}

.mm-blog-card-media > p {
	display: grid;
	height: 100%;
	margin: 0 !important;
	place-items: center;
	color: rgba(255, 255, 255, .16);
	font-size: 70px;
	font-weight: 900;
}

.mm-blog-card-media .wp-block-post-featured-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
}

.mm-blog-card-media .wp-block-post-featured-image a,
.mm-blog-card-media .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mm-blog-card-copy > .wp-block-post-title {
	margin: 0 0 15px;
	font-size: 25px !important;
	line-height: 1.2;
}

.mm-blog-card-copy > .wp-block-post-title a {
	color: #07172d;
	text-decoration: none;
}

.mm-blog-card-copy > .wp-block-post-excerpt {
	min-height: 75px;
	color: #66768a;
	line-height: 1.65;
}

.mm-blog-card-copy > .wp-block-post-excerpt p {
	margin: 0;
}

.mm-blog-card-meta {
	justify-content: flex-start !important;
	margin: 0 0 15px !important;
	color: #718197;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.mm-blog-card-meta a {
	color: inherit;
	text-decoration: none;
}

.mm-blog-card-meta .wp-block-post-terms__separator {
	padding: 0 4px;
}

.mm-blog-grid > .wp-block-post:first-child {
	grid-column: 1 / -1;
}

.mm-blog-grid > .wp-block-post:first-child .mm-blog-card {
	display: grid;
	grid-template-columns: 1.1fr .9fr;
	min-height: 400px;
}

.mm-blog-grid > .wp-block-post:first-child .mm-blog-card-media {
	height: 100%;
	min-height: 400px;
}

.mm-blog-grid > .wp-block-post:first-child .mm-blog-card-copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 50px;
}

.mm-blog-grid > .wp-block-post:first-child .wp-block-post-title {
	font-size: clamp(35px, 4vw, 54px) !important;
	letter-spacing: -.035em;
}

.mm-blog-grid > .wp-block-post:first-child .wp-block-post-excerpt {
	min-height: 0;
	font-size: 17px;
}

.mm-blog-pagination {
	margin-top: 45px;
}

.mm-blog-pagination a,
.mm-blog-pagination .page-numbers {
	display: grid;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	place-items: center;
	border: 1px solid #d6e1ec;
	border-radius: 5px;
	background: #fff;
	color: #405167;
	text-decoration: none;
}

.mm-blog-pagination .current {
	border-color: #147ce0;
	background: #147ce0;
	color: #fff;
}

@media (max-width: 900px) {
	.mm-blog-grid > .wp-block-post:first-child .mm-blog-card {
		grid-template-columns: 1fr;
	}

	.mm-blog-grid > .wp-block-post:first-child .mm-blog-card-media {
		min-height: 260px;
	}

	.mm-blog-grid > .wp-block-post:first-child .mm-blog-card-copy {
		padding: 32px;
	}
}

/* Gutenberg shows pagination and the no-results branch at the same time while
   editing a Query Loop. Keep the editor preview clean and close to the front. */
.editor-styles-wrapper .mm-blog {
	width: 100%;
	max-width: none;
}

.editor-styles-wrapper .mm-blog-shell {
	width: min(1180px, calc(100% - 40px));
	max-width: 1180px;
	margin-inline: auto;
}

.editor-styles-wrapper .mm-blog-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.editor-styles-wrapper .mm-blog-card-media {
	height: 205px;
	min-height: 205px;
}

.editor-styles-wrapper .mm-blog-grid > .wp-block-post:first-child .mm-blog-card-media {
	height: 400px;
	min-height: 400px;
}

.editor-styles-wrapper .mm-blog-card-copy {
	box-sizing: border-box;
	padding: 28px;
}

.editor-styles-wrapper .mm-blog-card-meta .wp-block-post-terms,
.editor-styles-wrapper .mm-blog-card-copy .wp-block-post-excerpt__more-link,
.editor-styles-wrapper .mm-blog-pagination,
.editor-styles-wrapper .mm-blog-query [data-type="core/query-pagination"],
.editor-styles-wrapper .mm-blog-query [data-type="core/query-no-results"] {
	display: none !important;
}

@media (max-width: 900px) {
	.editor-styles-wrapper .mm-blog-grid {
		grid-template-columns: 1fr;
	}
}
