.top_categories {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-column-gap: 15px;
    grid-row-gap: 15px;
}

.top_categories .cat_wrapper a {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    position: relative;
    padding: 0 !important;
}

    .top_categories .cat_wrapper a:before {
        background: rgba(0, 0, 0, 0);
        content: '';
        display: block;
        position: absolute;
        height: 100%;
        width: 100%;
        
        transition: 0.2s ease;
    }

    .top_categories .cat_wrapper a:hover:before {
        background: rgba(0, 0, 0, 0.25);
    }

    .top_categories .cat_wrapper a .cat_name {
        color: #143157 !important;
        font-size: 20px;
        padding: 15px !important;
        text-align: center;
        height: 100%;
        width: 100%;
        
        position: absolute;
        
    }
        /* white chalk background area */
        .top_categories .cat_wrapper a .cat_name:before {
            display: block;
            content: '';
            height: 100%;
            width: 100%;
        }

        /* text for the category */
        .top_categories .cat_wrapper a .cat_name span {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-pack: center;
                -ms-flex-pack: center;
                    justify-content: center;
            -webkit-box-align: center;
                -ms-flex-align: center;
                    align-items: center;
            
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
        }

    .top_categories .cat_wrapper a img {
        width: 100%;
    }








