.category-card{
    float: left;
    display: inline-block;
    position: relative;
    text-align: center;
    width: calc((100% - 60px)/4);
    padding-bottom: calc((100% - 60px)/4);
    border-radius: 20px;
    margin-bottom: 20px;
    margin-right: 20px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 4px -1px var(--box-shadow-color);
}
.category-card:nth-child(4n){
    margin-right: 0;
}
.category-card:hover{
    box-shadow: 0 4px 6px -1px var(--box-shadow-color);
}
.category-card:hover .overlay{
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    box-shadow: none;
    background-color: var(--overlay-color);
}
.category-card:hover .icon-container{
    opacity: 0.8;
    margin-right: 0;
}
.category-card:hover .name{
    overflow: hidden;
    white-space: nowrap;
    width: 0;
}
.category-card .overlay{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: calc(50% - 45px);
    left: calc(50% - 90px);
    width: 180px;
    height: 90px;
    padding: 0 15px;
    border-radius: 20px;
    background-color: var(--overlay-color-solid);
    box-shadow: 0 2px 4px -2px var(--dark-box-shadow-color);
    z-index: 10;
}
.category-card .name{
    display: inline-block;
    width: calc(100% - 70px);
    height: min-content;
    font-family: var(--font);
    font-weight: 400;
    font-size: 17px;
    color: var(--font-color);
}
.category-card .name .counter{
    margin-top: 10px;
    width: 100%;
    font-weight: 700;
    font-size: 19px;
}
.category-card .icon-container{
    float: left;
    display: inline-block;
    position: relative;
    width: 54px;
    height: 54px;
    margin-right: 10px;
    line-height: 57px;
    font-size: 23px;
    color: var(--opposite-font-color);
    text-align: center;
    border-radius: 27px;
    background-image: var(--gradient);
    background-size: 200% 200%;
    background-position: 50% 100%;
    box-shadow: 0 2px 4px -1px var(--box-shadow-color);
}

@media screen and (max-width: 1000px) {
    .category-card{
        width: calc((100% - 20px)/2);
        padding-bottom: calc((100% - 20px)/2);
    }
    body .category-card:nth-child(2n){
        margin-right: 0;
    }
}
@media screen and (max-width: 500px) {
    .category-card{
        width: 100%;
        height: unset;
        padding-bottom: 100%;
        margin-right: 0;
    }
}