/* Match the image tiles on Our Work without changing that page's styles. */
:is(.page-id-1415, .news-category) .wp-block-post-template,
.news-article .bricks-related-posts .related-posts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}

:is(.page-id-1415, .news-category) .wp-block-post-template > li,
.news-article .bricks-related-posts .related-posts > li {
	position: relative;
	height: 261px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border-radius: var(--box-border-radius-medium);
	background: var(--colour-dark);
}

:is(.page-id-1415, .news-category) .wp-block-post-template > li::after,
.news-article .bricks-related-posts .related-posts > li::after {
	position: absolute;
	inset: 0;
	content: "";
	background: linear-gradient(rgba(0, 0, 0, .5), rgba(255, 255, 255, .5));
	mix-blend-mode: multiply;
	pointer-events: none;
	transition: background-color .3s ease;
}

:is(.page-id-1415, .news-category) .wp-block-post-template > li:hover::after,
:is(.page-id-1415, .news-category) .wp-block-post-template > li:focus-within::after,
.news-article .bricks-related-posts .related-posts > li:hover::after,
.news-article .bricks-related-posts .related-posts > li:focus-within::after {
	background-color: var(--colour-dark-t-3);
}

:is(.page-id-1415, .news-category) .wp-block-post-featured-image,
.news-article .bricks-related-posts figure,
.news-article .bricks-related-posts figure > a {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
}

:is(.page-id-1415, .news-category) .wp-block-post-featured-image img,
.news-article .bricks-related-posts figure img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

:is(.page-id-1415, .news-category) .wp-block-post-title,
.news-article .bricks-related-posts .post-content {
	position: absolute;
	inset: 0;
	z-index: 2;
	margin: 0;
	padding: 0;
}

.news-article .bricks-related-posts .post-content h3 {
	height: 100%;
	margin: 0;
}

:is(.page-id-1415, .news-category) .wp-block-post-title a,
.news-article .bricks-related-posts .post-content h3 a {
	display: block;
	width: 100%;
	height: 100%;
	padding: 22px;
	color: var(--colour-white);
	font-size: clamp(22px, 2vw, 30px);
	font-weight: 600;
	line-height: 1.1;
	text-decoration: none;
}

:is(.page-id-1415, .news-category) .wp-block-post-title a:focus-visible,
.news-article .bricks-related-posts .post-content h3 a:focus-visible {
	outline: 3px solid var(--colour-white);
	outline-offset: -5px;
}

:is(.page-id-1415, .news-category) .wp-block-query-pagination,
.news-pagination {
 display: flex;
 flex-wrap: wrap;
 justify-content: center;
 align-items: center;
 gap: 12px;
 margin-top: 30px;
 width: 100%;
}

:is(.page-id-1415, .news-category) .wp-block-query-pagination > * {
 margin: 0;
}

:is(.page-id-1415, .news-category) .wp-block-query-pagination-numbers {
 display: inline-flex;
 align-items: center;
 flex-wrap: wrap;
 justify-content: center;
 gap: 10px;
}

.news-category-buttons {
 display: flex;
 flex-wrap: wrap;
 gap: 12px;
}

.page-id-1415 #brx-content > .wp-block-query + h2,
.news-browse-categories,
.news-read-more {
 margin-top: 40px;
}

.news-category-buttons .brxe-button {
 flex: 0 0 auto;
}

.page-id-1415 #brx-content,
.news-category {
 padding-top: 40px;
 padding-bottom: 40px;
}

.news-category .wp-block-post-template,
.news-category .news-browse-categories {
 width: 100%;
}

.news-article .brxe-post-navigation {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 30px;
 width: 100%;
 padding-bottom: 40px;
}

.news-article .brxe-post-navigation > a {
 width: 100%;
 max-width: none;
 min-width: 0;
}

.news-article .brxe-post-navigation > .prev-post {
 grid-column: 1;
}

.news-article .brxe-post-navigation > .next-post {
 grid-column: 2;
}

.news-article .brxe-post-navigation .content {
 min-width: 0;
}

.news-article .news-back-link .brxe-button {
	gap: 10px;
}

@media (max-width: 991px) {
	:is(.page-id-1415, .news-category) .wp-block-post-template,
	.news-article .bricks-related-posts .related-posts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
 .news-article .brxe-post-navigation {
  grid-template-columns: minmax(0, 1fr);
 }

 .news-article .brxe-post-navigation > .next-post {
  grid-column: 1;
 }


	:is(.page-id-1415, .category) #brx-content {
		padding-right: 15px;
		padding-left: 15px;
	}

	:is(.page-id-1415, .news-category) .wp-block-post-template,
	.news-article .bricks-related-posts .related-posts {
		grid-template-columns: minmax(0, 1fr);
	}
}
