.images-loaded .loading {
    opacity: 0;
}

.images-loaded .grid {
    opacity: 1;
}

.loading {
    z-index: 15;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}

.grid {
    width: 80%;
    margin: auto;
    display: grid;
    grid-gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(400px,1fr));
    grid-auto-rows: 1px;
}

.grid .item .content img {
    width: 100%;
}

.grid .content {
    position: relative;
    margin: auto;
    overflow: hidden;
}

.grid .content .content-overlay {
    background: rgba(0,0,0,0.7);
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    opacity: 0;
    -webkit-transition: all 0.4s ease-in-out 0s;
    -moz-transition: all 0.4s ease-in-out 0s;
    transition: all 0.4s ease-in-out 0s;
}

.grid .content:hover .content-overlay{
    opacity: 1;
}

.grid .content-details {
    position: absolute;
    text-align: center;
    padding-left: 1em;
    padding-right: 1em;
    width: 100%;
    top: 50%;
    left: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease-in-out 0s;
}

.grid .content:hover .content-details{
    top: 50%;
    left: 50%;
    opacity: 1;
}

.grid .content-details h3{
    color: #fff;
    letter-spacing: 0.15em;
    margin-bottom: 0.5em;
    text-transform: uppercase;
}

.grid .content-details h4{
    color: #fff;
    font-weight: 300;
    margin-bottom: 0.5em;
}

.grid .content-details p{
    color: #fff;
    font-size: 0.8em;
}

.grid .fadeIn-bottom{
    top: 80%;
}

@media only screen and (max-width: 1024px) {
    .grid {
        width: 97%
    }

    .grid .clicked .content .content-overlay{
        opacity: 1;
    }

    .grid .clicked .content .content-details{
        top: 50%;
        left: 50%;
        opacity: 1;
    }
}