.grid {
	margin: 0 0 0 0;
	padding: 0;
	list-style: none;
	position: relative;
	width: 100%;
}

.grid li {
	position: relative;
	float: left;
	overflow: hidden;
	width: 16.6666667%; /* Fallback */
	width: -webkit-calc(100% / 3);
	width: calc(100% / 3);
}

.grid li a,
.grid li a img {
	display: block;
	width: 100%;
	cursor: pointer;
}

.grid li a img {
	max-width: 100%;
}

/* Flexbox is used for centering the heading */
.grid li a div {
	position: absolute;
	left: 20px;
	top: 20px;
	right: 20px;
	bottom: 20px;
	background: rgba(0,0,0,0.6);
	display: -webkit-flex;
	display: -moz-flex;
	display: -ms-flex;
	display: flex;
	
	-webkit-justify-content: center;
	justify-content: center;
	-webkit-flex-direction: column; 
	flex-direction: column;
	
	-webkit-align-items: center;
	-moz-align-items: center;
	-ms-align-items: center;
    align-items: center;
    text-align: center;
    opacity: 0;
	-moz-transition:all .4s ease-in-out;
    -webkit-transition:all .4s ease-in-out;
    -o-transition:all .4s ease-in-out;
    transition:all .4s ease-in-out;
}

.grid li a:hover div {
	opacity: 1;
	-moz-transition:all .4s ease-in-out;
    -webkit-transition:all .4s ease-in-out;
    -o-transition:all .4s ease-in-out;
    transition:all .4s ease-in-out;
}

.grid li a div:hover h1 {
	-webkit-animation-name: fadeInUp;
	animation-name: fadeInUp;
}

.grid li a div h1 {
	width: 100%;
	color: #fff;
	text-transform: uppercase;
	font-size: 36px;
	line-height: 34px;
	letter-spacing: 1px;
	font-weight: 600;
	padding: 0 10px;
	margin-bottom: 15px;
}

.grid li a div:hover h2 {
	-webkit-animation-name: fadeInUp;
	animation-name: fadeInUp;
}

.grid li a div h2 {
	width: 100%;
	color: #fff;
	text-transform: uppercase;
	font-size: 32px;
	line-height: 30px;
	letter-spacing: 1px;
	font-weight: 100;
	padding: 0 10px;
}

.placeholder {
	width:100%;
	height:100%;
	background:#000;
}

/* Example for media query: change number of items per row */

@media screen and (max-width: 1190px) {
	.grid li {
		width: 20%; /* Fallback */
		width: -webkit-calc(100% / 3);
		width: calc(100% / 3);
	}
	
	.grid li a div h1 {
		font-size: 32px;
		line-height: 30px;
	}

	.grid li a div h2 {
		font-size: 24px;
		line-height: 22px;
	}
}

@media screen and (max-width: 945px) {
	.grid li {
		width: 25%; /* Fallback */
		width: -webkit-calc(100% / 2);
		width: calc(100% / 2);
	}
	
	.grid li a div h1 {
		font-size: 24px;
		line-height: 22px;
		margin-bottom:10px;
	}

	.grid li a div h2 {
		font-size: 18px;
		line-height: 16px;
	}
}

@media screen and (max-width: 660px) {
	.grid li {
		width: 33.3333333%; /* Fallback */
		width: -webkit-calc(100% / 2);
		width: calc(100% / 2);
	}
	
	.grid li a div h1 {
		font-size: 30px;
		line-height: 28px;
	}

	.grid li a div h2 {
		font-size: 24px;
		line-height: 22px;
	}
}

@media screen and (max-width: 660px) {
	.grid li {
		width: 33.3333333%; /* Fallback */
		width: -webkit-calc(100% / 1);
		width: calc(100% / 1);
	}
	
	.grid li a div h1 {
		font-size: 30px;
		line-height: 28px;
	}

	.grid li a div h2 {
		font-size: 24px;
		line-height: 22px;
	}
}

@media screen and (max-width: 400px) {
	.grid li {
		width: 50%; /* Fallback */
		width: -webkit-calc(100% / 1);
		width: calc(100% / 1);
	}
	
	.grid li a div h1 {
		font-size: 24px;
		line-height: 22px;
		margin-bottom:10px;
	}

	.grid li a div h2 {
		font-size: 18px;
		line-height: 16px;
	}
}

@media screen and (max-width: 300px) {
	.grid li {
		width: 100%;
	}
	
	.grid li a div h1 {
		font-size: 24px;
		line-height: 22px;
		margin-bottom:10px;
	}

	.grid li a div h2 {
		font-size: 18px;
		line-height: 16px;
	}
}