/* Masonry-style posts grid - shared by home, category/tag/date archives and the author page */

.alm-reveal {
	display: flex;
	flex-wrap: wrap;
	width: calc(100% + 30px);
	margin-left: -15px;
}

.alm-reveal .posts-item {
	box-sizing: border-box;
	padding: 0 15px;
}

@media screen and (max-width: 440px) {

	.gridlove-posts-page {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}

	.gridlove-posts-page .row.gridlove-posts {
		margin-left: 0;
		margin-right: 0;
	}

	.gridlove-posts-page .row.gridlove-posts > [class*="col-"] {
		padding-left: 0;
		padding-right: 0;
	}

	.gridlove-posts-page .alm-reveal,
	.author-posts__inner .alm-reveal {
		width: 100%;
		margin-left: 0;
	}

	.gridlove-posts-page .alm-reveal .posts-item,
	.author-posts__inner .alm-reveal .posts-item {
		padding-left: 0;
		padding-right: 0;
	}

	.gridlove-posts-page .gridlove-posts-section,
	.author-posts__inner .gridlove-posts-section {
		padding: 0;
	}

	.author-posts__inner {
		padding: 16px;
	}

}

@media screen and (min-width: 580px) and (max-width: 1023px) {

	.alm-reveal .posts-item {
		-webkit-box-flex: 0;
		-webkit-flex: 0 0 50%;
		-ms-flex: 0 0 50%;
		flex: 0 0 50%;
		max-width: 50%;
	}

}

@media screen and (min-width: 1024px) {

	/* Post cards */

	.alm-reveal .posts-item:nth-child(0n + 1),
	.alm-reveal .posts-item:nth-child(6n + 1),
	.alm-reveal .posts-item:nth-child(6n) {
		-webkit-box-flex: 0;
		-webkit-flex: 0 0 41.666667%;
		-ms-flex: 0 0 41.666667%;
		flex: 0 0 41.666667%;
		max-width: 41.666667%;
	}

	.alm-reveal .posts-item:nth-child(0n + 2),
	.alm-reveal .posts-item:nth-child(0n + 4),
	.alm-reveal .posts-item:nth-child(6n + 2),
	.alm-reveal .posts-item:nth-child(6n + 4) {
		-webkit-box-flex: 0;
		-webkit-flex: 0 0 25%;
		-ms-flex: 0 0 25%;
		flex: 0 0 25%;
		max-width: 25%;
	}

	.alm-reveal .posts-item:nth-child(0n + 3),
	.alm-reveal .posts-item:nth-child(0n + 5),
	.alm-reveal .posts-item:nth-child(6n + 3),
	.alm-reveal .posts-item:nth-child(6n + 5) {
		-webkit-box-flex: 0;
		-webkit-flex: 0 0 33.333333%;
		-ms-flex: 0 0 33.333333%;
		flex: 0 0 33.333333%;
		max-width: 33.333333%;
	}

}
