.gallery{
	width: 100%;
	text-align: center;
	padding-top: 0 !important;
}

.photo{
	display: inline-block;
	width: 30%;
	height: 200px;
	margin: 5px;
	overflow: hidden;
	position: relative;
	border-radius: 20px;
}

.photo > div{
	width: 100%;
	height: 100%;
	background-position: center;
    background-size: cover;
    transition: all .5s;
    transform: scale(1.2) rotate(0deg);
}

.gallery-name{
	top: 0;
    position: absolute;
}

.gallery-name > span{
	background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    display: block;
    padding: 10px 0px;
    position: relative;
    bottom: 15px;
    transition: all .5s;
    height: 20px;
    top: calc(100% - 56px);
    font-size: 14px;
    color: white;
}

.gallery-description{
    font-size: 14px;
    width: 90%;
    display: block;
    margin: 0 auto;
    margin-top: 10px;
}

.photo:hover > div{
	transform: scale(1);
	cursor: pointer;
}

.photo:hover > .black-glass{
	opacity: 1;
}

.photo:hover .gallery-name > span{
	top: calc(50% - 20px);
	font-size: 21px;
	height: auto;
	background-color: rgba(20, 33, 43, 0.8);
	color: #0086eb;
}

.black-glass{
	position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0);
    opacity: 0;
}

@media only screen and (max-width: 599px) {
    .photo{
    	width: 100%;
	    height: 140px;
	    margin: 10px 0px;
    }

    .gallery-name > span{
    	top: calc(100% - 51px);
    }

    .photo:hover .gallery-name > span{
        top: 0;
        height: 100%;
    }
}

@media only screen and (min-width: 600px) and (max-width: 767px){
    .photo{
    	width: 90%;
	    height: 140px;
	    margin: 10px 0px;
    }

    .gallery-name > span{
    	top: calc(100% - 51px);
    }
}