body {
	background: #efefef;
	font-family: 'Roboto', sans-serif;
	
}

h1 {
	text-align: center;
	font-weight: 700;
	color:#2E43A6;
}

.gallery {
	/*width: auto;*/
	/*margin: 80px auto;*/
	display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    grid-auto-flow: dense;
    /*list-style: none;*/
    margin: 1em auto;
    padding: 0;
    max-width: 900px;
}

ul {
	/*float: left;*/
	/*margin: 40px 0 40px 0px;*/ /*-40px;*/
}

.gallery li {
	border: 1px solid #ccc;	
	position: relative;
	/*float: left;*/
	list-style: none;
	line-height: 0;
	margin: 0px; /*0 20px 20px 0;*/
	padding: 10px 10px 10px 10px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

li .genericon {
	cursor: pointer;
	opacity: 0;
	-webkit-transition: opacity .2s ease-in-out;
	-moz-transition: opacity .2s ease-in-out;
	-o-transition: opacity .2s ease-in-out;
	-ms-transition: opacity .2s ease-in-out;
	transition: opacity .2s ease-in-out;
}

.gallery li:hover .genericon-zoom {
	opacity: 1;
}

/*.gallery li:nth-child(3n) {
	margin-right: 0;
}*/

.gallery li:before,
.gallery li:after{
	position: absolute;
	content: "";
	z-index: -1;
	bottom: 15px;
	left:  10px;
	width: 50%;
	height: 20%;
	box-shadow: 0 15px 10px rgba(0, 0, 0, 0.7);
	-webkit-transform: rotate(-3deg);
	-moz-transform: rotate(-3deg);
	-ms-transform: rotate(-3deg);
	-o-transform: rotate(-3deg);
	transform: rotate(-3deg);
}

.gallery li:after {
	right: 10px;
	left: auto;
	-webkit-transform: rotate(3deg);
	-moz-transform: rotate(3deg);
	-ms-transform: rotate(3deg);
	-o-transform: rotate(3deg);
	transform: rotate(3deg);
}

.gallery li p {
	margin: 15px 0 15px 0;
	text-transform: uppercase;
	font-size: 12px;
	color: #777;
}

.gallery img {
	width: 100%;
	height: auto;
	cursor: pointer;
	opacity: 0.8;
	-webkit-transition: all .2s ease-in-out;
	-moz-transition: all .2s ease-in-out;
	-o-transition: all .2s ease-in-out;
	-ms-transition: all .2s ease-in-out;
	transition: all .2s ease-in-out;
}

li:hover img {
	opacity: 1;
}

li:hover p {
	font-weight: bold;
	color: #000;
}
 
.gallery li img {
	display: inline-block;/*block;*/
   	object-fit: cover;
   	width: 100%;
   	height: auto;/*100%*/
}

.overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: none;
	background: rgba(0,0,0,.9);
	z-index: 1;
}

input[type=checkbox] {
     display: none;
}

input[type=checkbox]:checked ~ label img {
	position: fixed;
	width: 98%; /*900px;*/
	height: auto; /*600px;*/
	top: 0%; /*50%*/
	left: 0%;/*50%*/
	margin-top: 0px;/*-300px;*/
	margin-left: 0px;/*-450px;*/	
	border: 5px solid #fff;
	z-index: 2;
	-webkit-animation: fadeIn .6s linear;
	-moz-animation: fadeIn .6s linear;
	-o-animation: fadeIn .6s linear;
	-ms-animation: fadeIn .6s linear;
	animation: fadeIn .6s linear;
}

input[type=checkbox]:checked ~ label:hover .genericon-unzoom {
	position: fixed;
	opacity: 1;
	z-index: 99;
}

input[type=checkbox]:checked ~ .overlay {
	display: block;
}

@-webkit-keyframes fadeIn {
	from { -webkit-transform: scale(0); opacity: 0; }
	to { -webkit-transform: scale(1); opacity: 1; }
}

@-moz-keyframes fadeIn {
	from { -moz-transform: scale(0); opacity: 0; }
	to { -moz-transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
	from { transform: scale(0); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}