/**
 * Grid Layout for any template.
 */

.strong-grid {
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;

	-webkit-flex-wrap: wrap;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
}

/* specificity required */
.strong-view .strong-content.strong-grid .testimonial {
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	margin-top: 0;
}

.strong-content.strong-grid.columns-2 .testimonial {
	width: 48%;
}

.strong-content.strong-grid.columns-3 .testimonial {
	width: 31%;
}

.strong-content.strong-grid.columns-4 .testimonial {
	width: 23%;
}

/* the bottom row in the grid */
.strong-content.strong-grid.columns-2 .testimonial:nth-last-child(-n+2),
.strong-content.strong-grid.columns-3 .testimonial:nth-last-child(-n+3),
.strong-content.strong-grid.columns-4 .testimonial:nth-last-child(-n+4) {
	margin-bottom: 0;
}

.strong-view .strong-content.strong-grid .testimonial-inner {
	flex: 1 0 auto;
	height: auto;
}

html.no-js .strong-grid .testimonial {
	float: left;
	margin-right: 1%;
	margin-left: 1%;
}

@media only screen and (max-width: 480px) {
	.strong-view .strong-content.strong-grid .testimonial {
		width: 100%;
	}
}

/* either no JavaScript or no Flexbox */
html.no-js .strong-grid .testimonial,
.strong-grid.noflex .testimonial {
	float: left;
	margin-right: 1%;
	margin-left: 1%;
}

/* float the last column */
.strong-grid.columns-2.noflex .testimonial:nth-of-type(2n+2),
.strong-grid.columns-3.noflex .testimonial:nth-of-type(3n+3),
.strong-grid.columns-4.noflex .testimonial:nth-of-type(4n+4) {
	float: right;
}
