/**
 * Category related posts — grid 4 cols desktop, carousel when > 4 items.
 */

.groser-cat-related-posts {
	width: 100%;
	overflow: hidden;
}

.groser-cat-related-posts .news__item {
	display: flex;
	flex-direction: column;
	min-width: 0;
	height: 100%;
}

.groser-cat-related-posts .news__thumb {
	overflow: hidden;
	border-radius: 6px 6px 0 0;
	aspect-ratio: 317 / 240;
}

.groser-cat-related-posts .news__thumb a {
	display: block;
	height: 100%;
}

.groser-cat-related-posts .news__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.groser-cat-related-posts .news__content {
	flex: 1;
	border: 1px solid var(--color-border, #eee);
	border-top: 0;
	padding: 20px;
}

.groser-cat-related-posts .news__meta-author .avatar {
	width: auto;
	height: auto;
	max-width: none;
	flex-shrink: 0;
	border: none;
}

.groser-cat-related-posts .news__meta-author .avatar img {
	width: 21px !important;
	height: 21px !important;
	max-width: 21px;
	border-radius: 50%;
	display: block;
	object-fit: cover;
}

.groser-cat-related-posts .news__item:hover .news__thumb img {
	transform: scale(1.04);
}

.groser-cat-related-posts .news__item:hover .news__meta-author .avatar img {
	transform: none;
}

.groser-cat-related-posts .news__slide.is-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin-left: 0;
	margin-right: 0;
}

.groser-cat-related-posts .news__slide.is-grid .news__item {
	padding: 0;
}

.groser-cat-related-posts .news__slide.is-carousel {
	margin-left: -10px;
	margin-right: -10px;
}

.groser-cat-related-posts .news__slide.is-carousel .news__item {
	padding: 0 10px;
	height: auto;
}

.groser-cat-related-posts .news__slide.is-carousel .news__thumb {
	aspect-ratio: 317 / 240;
}

@media (max-width: 1199px) {
	.groser-cat-related-posts .news__slide.is-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	.groser-cat-related-posts .news__slide.is-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 575px) {
	.groser-cat-related-posts .news__slide.is-grid {
		grid-template-columns: 1fr;
	}
}
