/* -------------------------------------------------------------
/
/ Reflex
/ A minimalist quick-start framework built with CSS Flex.
/
/ reflex-grid.css
/
/ -------------------------------------------------------------*/

.reflex-grid {
	width: 100%;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: stretch;
}
.reflex-grid .block {
	padding: 0;
	margin: 0;
	flex-basis: 125px;
	flex-grow: 1;
}

/* Placeholder elements */

.reflex-grid.placeholder .block {
	min-height: 200px;
	background: #ddd;
}
.reflex-grid.placeholder .reflex-grid .block {
	background: #aaa;
}

/* -------------------------------------------------------------
/
/ Optional horizontal spacing between reflex-grid blocks
/
/ -------------------------------------------------------------*/

.reflex-grid.with-spacing .block {
	margin-right: 30px;
}
.reflex-grid.with-spacing .block:last-of-type {
	margin-right: 0;
}

/* For grid blocks in slick slider */

.reflex-grid.with-spacing .slick-slide {
	margin-right: 30px;
}
.reflex-grid.with-spacing .slick-list {
	margin-right: -30px;
}

@media(max-width:600px) {
	.reflex-grid.with-spacing .slick-slide {
		margin-right: 0;
	}
	.reflex-grid.with-spacing .slick-list {
		margin-right: 0;
	}
}

/* -------------------------------------------------------------
/
/ Images
/
/ -------------------------------------------------------------*/

.reflex-grid .block img {
	width: 100%;
	height: auto;
	vertical-align: top;
}

/* -------------------------------------------------------------
/
/ reflex-grid Device Breakpoints
/
/ Desc: in addition to the above flex-basis paremeter,
/ specific breakpoints are configured to fine-tune
/ when multi-column reflex-grids will break into rows.
/
/ -------------------------------------------------------------*/

/* 1st Breakpoint */

@media(max-width:1024px) {
	/* 6 blocks collapse into 2 rows of 3 blocks */
	.reflex-grid .block:first-of-type:nth-last-of-type(6),
	.reflex-grid .block:first-of-type:nth-last-of-type(6) ~ .block {
		flex-basis: 30%;
	}
	/* Adjust horizontal spacing between reflex-grid blocks */
	.reflex-grid.sm-spacing .block:first-of-type:nth-last-of-type(6) ~ .block:nth-of-type(3),
	.reflex-grid.med-spacing .block:first-of-type:nth-last-of-type(6) ~ .block:nth-of-type(3),
	.reflex-grid.lg-spacing .block:first-of-type:nth-last-of-type(6) ~ .block:nth-of-type(3),
	.reflex-grid.with-spacing .block:first-of-type:nth-last-of-type(6) ~ .block:nth-of-type(3) {
		margin-right: 0;
	}
	/* 6 blocks collapse into 2 rows of 3 blocks */
	.reflex-grid .block:first-of-type:nth-last-of-type(4),
	.reflex-grid .block:first-of-type:nth-last-of-type(4) ~ .block {
		flex-basis: 40%;
	}
	/* 4 blocks break into 2 rows of 2 blocks */
	.reflex-grid .block:first-of-type:nth-last-of-type(4),
	.reflex-grid .block:first-of-type:nth-last-of-type(4) ~ .block {
		flex-basis: 40%;
		margin-bottom: 30px;
	}
	.reflex-grid .block:first-of-type:nth-last-of-type(4) ~ .block:nth-of-type(even) {
		margin-right: 0;
	}
	/* Reflex nav menu settings */
	nav.reflex .reflex-grid .block:first-of-type:nth-last-of-type(4),
	nav.reflex .reflex-grid .block:first-of-type:nth-last-of-type(4) ~ .block {
		display: block;
		margin:0;
	}
}


/* 2nd Breakpoint */

@media(max-width:699px) {
	/* 5 blocks collapse into 1 column */
	.reflex-grid .block:first-of-type:nth-last-of-type(5),
	.reflex-grid .block:first-of-type:nth-last-of-type(5) ~ .block {
		flex-basis: 100%;
	}
	.reflex-grid.with-spacing .block:first-of-type:nth-last-of-type(5),
	.reflex-grid.with-spacing .block:first-of-type:nth-last-of-type(5) ~ .block {
		margin: 30px 0 30px 0;
	}
}

/* Final Breakpoint */

@media(max-width:599px) {
	.reflex-grid:not(.no-collapse) {
		display: block;
	}
	.reflex-grid.sm-spacing .block {
		margin: 0 0 5px 0;
	}with
	.reflex-grid.med-spacing .block {
		margin: 0 0 10px 0;
	}
	.reflex-grid.lg-spacing .block {
		margin: 0 0 15px 0;
	}
	.reflex-grid.with-spacing .block, .reflex-grid.with-spacing .block ~ .block {
		margin: 0 0 30px 0;
	}
	.reflex-grid .block:last-of-type {
		margin: 0;
	}
}

