/* Common style */
@import url('https://fonts.googleapis.com/css?family=Oswald:300,400,700&subset=latin-ext');

.grid {
	margin-left: 18px;
margin-right: 18px;
}

.grid a {
	float: left;
	color: #333;
	margin-right: 44px;
}

.grid figure {
	position: relative;
	overflow: hidden;
	background: #333;
	margin: 0;
	padding: 0;
}

.grid figure img {
	position: relative;
	display: block;
	width: 100%;
	opacity: 0.7;
	-webkit-transition: opacity 0.3s;
	transition: opacity 0.3s;
}

.grid figcaption {
	position: absolute;
	top: 0;
	z-index: 11;
	width: 100%;
	height: 100%;
	text-align: center;
	padding-top: 15px;
}

.grid figcaption h3 {
	font-family: "Oswald",Arial, Verdana," sans-serif";
	margin: -5px 0 20px 0;
	color: #000;
	text-transform: uppercase;
	font-weight: 400;
	font-size: 26px;
	-webkit-transition: -webkit-transform 0.3s;
	transition: transform 0.3s;line-height: 35px;
}

.grid figcaption h3 span{color: #f90101; }

.grid figcaption p {
	padding: 0 20px;
	color: #aaa;
	font-weight: 300;
	-webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
	transition: opacity 0.3s, transform 0.3s;
}

.grid figcaption h3,
.grid figcaption p {
	-webkit-transform: translateY(30px);
	transform: translateY(30px);
}



.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;
}


.grid figcaption,
.grid figcaption h3,
.grid figcaption p,
.grid figure button {
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	
}

/* Style for SVG */
.grid svg {
	position: absolute;
	top: -1px; /* fixes rendering issue in FF */
	z-index: 10;
	width: 102%;
	height: 80%;
}

.grid svg path {
	fill: #fff;
	 filter: alpha(opacity=80);
  /* IE */
  -moz-opacity: 0.8;
  /* Mozilla */
  opacity: 0.8;
  /* CSS3 */
}

/* Hover effects */
.grid a:hover figure img {
	opacity: 1;
}

.grid a:hover figcaption h3,
.grid a:hover figcaption p {
	-webkit-transform: translateY(0);
	transform: translateY(0);
	
}

.grid a:hover figcaption p {
	opacity: 0;
}

/* Individual styles */
.demo-1 body {
	background: #3498db;
}

.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);
}

.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 screen and (max-width: 58em) {
	.grid a {
		width: 33.333%;
	}

	.grid a:nth-child(odd) {
		margin: 0;
		margin-bottom: 25px;
	}

	.grid a:nth-child(3n-1) {
		margin: 30px 0 30px 0;
	}
}

@media screen and (max-width: 45em) {
	.grid {
		max-width: 500px;
	}

	.grid a {
		width: 50%;
	}

	.grid a:nth-child(3n-1) {
		margin: 0;
	}

	.grid a:nth-child(even) {
		margin: 30px 0 -30px 0;
	}


	.grid figcaption h3 {
		margin-bottom: 0px;
		-webkit-transform: translateY(30px);
		transform: translateY(30px);
	}

	.grid figcaption p {
		margin: 0;
		padding: 0 10px;
	}
}

@media screen and (max-width: 27em) {
	.grid {
		max-width: 250px;
	}

	.grid a {
		width: 100%;
	}

	.grid a:nth-child(even) {
		margin: 0;
		margin-bottom: 25px;
	}
}

@media screen and (max-width:1024px){
.grid a {margin-right: 15px;margin-bottom: 15px;}
}

@media screen and (max-width: 980px){
	.grid a{margin-right: 85px;margin-bottom: 45px;}
	.cl-d3{padding-bottom: 0px;}
	.mid-txt{margin-bottom: 55px;}
}
@media screen and (max-width: 800px){.grid figcaption h3{font-size: 15px;line-height: 25px;}}
@media screen and (max-width: 768px){
	.grid figcaption h3{font-size: 15px;line-height: 25px;}
}