.app-categories {
    padding: 48px 0;
    max-width: 1190px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.categories-header {
    text-align: center;
    font-weight: var(--pr-font-weight-heading);
    color: var(--pr-color-title);
    line-height: var(--pr-line-height-display2);
    font-size: calc(var(--pr-font-size-display3) + (24 - 20) * ((100vw - 300px) / (1920 - 300)));
}

.app-categories-wrapper {
    position: relative;
}

#showCategoryItem {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.app-list-category {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.app-category-item {
    padding: 16px;
    text-align: center;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 12px;
}

.app-category-title {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    font-size: 14px;
    text-align: center;
}

.app-category-image {
    position: relative;
}

.app-category-image::before {
    content: "";
    padding-top: calc(100% * 4/3);
    display: block;
}

.app-category-image img {
    width: 100%;
    height: 100%;
    display: block;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    object-position: center;
    border-radius: 5px;
    background-color: #fff;
    transition: filter 250ms ease-in-out;
}

.app-category-item:hover img {
    filter: brightness(0.9);
}

.show-category-item {
    margin-top: calc(12px + (24 - 12) * ((100vw - 300px)/(1920 - 300)));
}

.show-category-item span {
    cursor: pointer;
    padding: 10px 20px;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    border-radius: 24px;
    font-weight: 500;
    user-select: none;
}

.show-category-item span,
#showCategoryItem:checked ~ .show-category-item .show-less {
    display: block;
}

.show-category-item span:hover {
    background-color: var(--secondary);
    color: #fff;
}


#showCategoryItem:checked ~ .show-category-item .show-more,
.show-category-item .show-less {
    display: none;
}

@media (min-width: 1024px) {
    .app-category-item {
        width: calc(100% / 6);
    }

    .app-category-item:nth-child(n + 7) {
        display: none;
    }
    
    #showCategoryItem:checked ~ .app-list-category .app-category-item:nth-child(n + 7) {
        display: grid;
    }
}
@media (min-width: 760px) and (max-width: 1024px) {
    .app-category-item:nth-child(n + 6) {
        display: none;
    }
    
    #showCategoryItem:checked ~ .app-list-category .app-category-item:nth-child(n + 6) {
        display: grid;
    }

    .app-category-item {
        width: calc(100% / 5);
    }
}

@media (max-width: 760px) {
    .app-categories {
        padding-top: 24px;
    }
    .app-categories::before {
        content: "";
        width: 100vw;
        height: 1px;
        display: block;
        background-color: #e1e1e1;
        position: absolute;
        top: 10px;
        left: -16px;
    }
    .app-category-item {
        width: calc(100% / 2);
        padding: 12px;
    }

    .app-category-image::before {
        padding-top: 100%;
    }

    .app-category-item:nth-child(n + 7) {
        display: none;
    }
    
    #showCategoryItem:checked ~ .app-list-category .app-category-item:nth-child(n + 7) {
        display: grid;
    }
}