.grid {
	margin: 0 auto;
	list-style: none;
	text-align: center;
	box-sizing: border-box;
}

.grid li {
	display: inline-block;
	width: 19%;
	margin: 0;
	padding: 10px;
	text-align: left;
	position: relative;
}

.grid figure {
	margin: 0;
	position: relative;
}

.grid figure img {
	max-width: 100%;
	display: block;
	position: relative;
}

.grid figcaption {
	position: absolute;
	top: 0;
	left: 0;
	padding: 20px;
	background: #2c3f52;
	color: #ed4e6e;
}

.grid figcaption h3 {
	padding: 7px 0 0 0;
	margin-left: -10px;
	color: #fff;
	font-size: 16px;
	line-height: 18px;
}

.grid figcaption span:before {
	content: 'by ';
}

.grid figcaption a {
	text-align: center;
	padding: 5px 10px;
	border-radius: 2px;
	display: inline-block;
	background: #ed4e6e;
	color: #fff;
}

/* Individual Caption Styles */
/* Caption Style 7 */
.cs-style-7 li:first-child { z-index: 10; }
.cs-style-7 li:nth-child(2) { z-index: 9; }
.cs-style-7 li:nth-child(3) { z-index: 8; }
.cs-style-7 li:nth-child(4) { z-index: 7; }
.cs-style-7 li:nth-child(5) { z-index: 6; }
.cs-style-7 li:nth-child(6) { z-index: 5; }
.cs-style-7 li:nth-child(7) { z-index: 4; }
.cs-style-7 li:nth-child(8) { z-index: 3; }
.cs-style-7 li:nth-child(9) { z-index: 2; }
.cs-style-7 li:nth-child(10) { z-index: 1; }

.cs-style-7 figure img {
	z-index: 10;
}

.cs-style-7 figcaption {
	height: 100%;
	width: 100%;
	opacity: 0;
	-webkit-backface-visibility: hidden;
	-moz-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-transition: opacity 0.3s, height 0.3s, box-shadow 0.3s;
	-moz-transition: opacity 0.3s, height 0.3s, box-shadow 0.3s;
	transition: opacity 0.3s, height 0.3s, box-shadow 0.3s;
	box-shadow: 0 0 0 0px #2c3f52;
}

.no-touch .cs-style-7 figure:hover figcaption,
.cs-style-7 figure.cs-hover figcaption {
	opacity: 1;
	height: 130%;
	box-shadow: 0 0 0 10px #2c3f52;
}

.cs-style-7 figcaption h3 {
	margin-top: 86%;
}

.cs-style-7 figcaption h3,
.cs-style-7 figcaption span,
.cs-style-7 figcaption a {
	opacity: 0;
	-webkit-transition: opacity 0s;
	-moz-transition: opacity 0s;
	transition: opacity 0s;
}

.cs-style-7 figcaption a {
	position: absolute;
	bottom: 20px;
	right: 20px;
}

.no-touch .cs-style-7 figure:hover figcaption h3,
.no-touch .cs-style-7 figure:hover figcaption span,
.no-touch .cs-style-7 figure:hover figcaption a,
.cs-style-7 figure.cs-hover figcaption h3,
.cs-style-7 figure.cs-hover figcaption span,
.cs-style-7 figure.cs-hover figcaption a {
	-webkit-transition: opacity 0.3s 0.2s;
	-moz-transition: opacity 0.3s 0.2s;
	transition: opacity 0.3s 0.2s;
	opacity: 1;
}

@media screen and (max-width: 1024px) {
	.grid li {
		width: 23%;
	}
	.grid figcaption h3 {
		font-size: 15px; line-height: 17px; padding-top: 10px;
	}
}

@media screen and (max-width: 768px) {
	.grid li {
		width: 30%;
	}
}

@media screen and (max-width: 600px) {
	.grid li {
		width: 46%;
	}
}

@media screen and (max-width: 31.5em) {
	.grid {
		padding: 10px 10px 100px 10px;
	}
	.grid li {
		width: 100%;
	}
	.grid figcaption h3 {
		font-size: 20px; line-height: 23px; padding-top: 10px;
	}
}
