
.item12 {
    float: left;
    position: relative;
    width: 20%;
    padding: 10px;
}

.item12 a{
    overflow: hidden;
    display: block;
}


.grid-sizer {
    width: 20%;
}

@media screen and (max-width: 1399.98px) {
    /* 10 columns for larger screens */
    .grid-sizer {
        width: 25%;
    }
    .item12 {
        width: 25%;
    }
}

@media screen and (max-width: 991.98px) {
    /* 10 columns for larger screens */
    .grid-sizer {
        width: 33.33%;
    }
    .item12 {
        width: 33.33%;
    }
}

@media screen and (max-width: 767.98px) {
    /* 10 columns for larger screens */
    .grid-sizer {
        width: 50%;
    }
    .item12 {
        width: 50%;
    }
}

@media screen and (max-width: 500px) {
    /* 10 columns for larger screens */
    .grid-sizer {
        width: 100%;
    }
    .item12 {
        width: 100%;
    }
}

.image{
    max-width: 100%;
    margin: 0;
    display: block;
    transition: all 0.3s ease-in-out;
}

.item12:hover .image
{
    transform: scale(1.1);
    filter: grayscale(1);
}

.image:after {
    clear:both;
}

.overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    position: absolute;
    top: 0;
    left: 0;
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border: 10px solid white;
    padding: 10px;
}

.overlay .title {
    text-align: center;
    font-size: 20px;
}