/* Common style */
.grid {
	margin: 40px auto;
	max-width: 1250px;
	width: 100%;
}

.grid a {
	float: left;
	max-width: 250px;
	width: 25%;
	color: #333;
}

.grid a:nth-child(odd) {
	margin: 0px 0 0px 0;
}

.grid figure {
	position: relative;
	overflow: hidden;
	margin: 5px;
	background: #333;
}

.grid figure img {
	position: relative;
	display: block;
	width: 100%;
	opacity: 1;
	-webkit-transition: opacity 0.3s;
	transition: opacity 0.3s;
}

.grid figcaption {
	position: absolute;
	bottom: 0;
	z-index: 11;
	width: 100%;
	height: 100%;
	text-align: center;
}


.grid figcaption h2 {
	width: 100%;
	height: 50px;
	padding: 5px 0px;
	color: #fff;
	font-weight: normal;
	font-size: 18px;
	line-height: 26px;
	position: absolute;
	bottom: 0;
	background: #333;
	opacity: 0.8;
	overflow: hidden;
}


.grid figure button {
	position: absolute;
	padding: 4px 20px;
	border: none;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: bold;
	-webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
	transition: opacity 0.3s, transform 0.3s;
}



/* Style for SVG */
.grid svg {
	position: absolute;
	top: -1px;
	/* fixes rendering issue in FF */
	z-index: 10;
	width: 100%;
	height: 100%;
}

.grid svg path {
	fill: #fff;
}

/* Hover effects */
.grid a:hover figure img {
	opacity: 0.7;
}


/* Individual styles */
.demo-1 body {
	background: #3498db;
}

.demo-1 .grid figure button {
	top: 50%;
	left: 50%;
	border: 3px solid #fff;
	background: transparent;
	color: #fff;
	opacity: 0;
	-webkit-transform: translateY(-50%) translateX(-50%) scale(0.25);
	transform: translateY(-50%) translateX(-50%) scale(0.25);
}

.demo-1 .grid a:hover figure button {
	opacity: 1;
	-webkit-transform: translateY(-50%) translateX(-50%) scale(1);
	transform: translateY(-50%) translateX(-50%) scale(1);
}


/* Media Queries */
/* Let's redefine the width of each anchor and the margins */

@media only screen and (max-width:1000px) {
	.grid {
		margin: 40px auto 40px;
		max-width: 1000px;
		width: 100%;
	}

	.grid a {
		float: left;
		max-width: 500px;
		color: #333;
		width: 100%;
	}


	.grid a:nth-child(odd) {
		margin: 0;
	}

	.grid a:nth-child(3n-1) {
		margin: 0 0 0 0;
	}

	.slideBox {
		width: 100%;
		overflow: hidden;
		position: relative;
	}

	.slideBox .bd img {
		width: 100%;
		display: block;
	}

	.slideTxtBox .hd ul li {
		font-size: 30px;
	}
}