.category-page {
    padding: 23px 0 42px;
}

.title__container {
    padding: 40px 0;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.title__container::before {
    content: '';
    display: block;
    position: absolute;
    top: -100%;
    left: -49%;
    width: 76%;
    height: auto;
    aspect-ratio: 886/775;
    background: url('../img/category/left.svg') no-repeat;
    background-size: contain;
    z-index: -1;
}

.title__container::after {
    content: '';
    display: block;
    position: absolute;
    top: -208%;
    right: -35%;
    width: 59%;
    height: auto;
    aspect-ratio: 682/710;
    background: url('../img/category/right.svg') no-repeat;
    background-size: contain;
    z-index: -1;
}

.title__header {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #262B48;
}

.title__description {
    font-size: 20px;
    font-weight: 500;
    color: #262B48;
    width: 100%;
    margin: 0 auto;
}

.posts-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
    grid-template-columns: repeat(3, 1fr);
}

.posts-grid__item {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    overflow: hidden;
}

.posts-grid__item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.posts-grid__img {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 16px;
}

.posts-grid__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.posts-grid__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.posts-grid__tag {
    padding: 8px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    line-height: 100%;
}

.posts-grid__title {
    font-size: 20px;
    font-weight: 600;
    line-height: 120%;
    color: #272737;
    margin-bottom: 20px;
}

.posts-grid__details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #A2A2AA;
}

.posts-grid__date,
.posts-grid__author {
    margin: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination span {
    display: block;
    width: 28px;
    height: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #BEBDC7;
    font-size: 14px;
    box-sizing: border-box;
}

.pagination a:hover {
    color: #272737;
}

.pagination .current {
    border-radius: 8px;
    border: 1px solid #E6E6ED;
    color: #272737;
    cursor: default;
}

@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .category-page {
        padding: 0 0 40px;
    }
    
    .title__container {
        padding: 24px 40px;
        text-align: center;
        margin-bottom: 16px;
    }

    .title__container::before {
        top: -171px;
        left: -639px;
        width: 886px;
        background: url('../img/category/mobile-left.svg') no-repeat;
        background-size: contain;
    }
    
    .title__container::after {
        top: -109px;
        right: -173px;
        width: 342px;
        aspect-ratio: 682/710;
        background: url('../img/category/right.svg') no-repeat;
        background-size: contain;
    }
    
    .title__container {
        margin-bottom: 40px;
    }
    
    .title__header {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .title__description {
        font-size: 14px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 16px;
        position: relative;
    }

    .posts-grid::before {
        content: '';
        display: block;
        position: absolute;
        bottom: -36%;
        left: -205%;
        width: 284%;
        height: auto;
        aspect-ratio: 886/775;
        background: url('../img/category/grid-left-mobile.svg') no-repeat;
        background-size: contain;
        z-index: -1;
    }
    
    .posts-grid::after {
        content: '';
        display: block;
        position: absolute;
        top: 69px;
        right: -164px;
        width: 308px;
        height: auto;
        aspect-ratio: 308/287;
        background: url('../img/category/grid-right-mobile.svg') no-repeat;
        background-size: contain;
        z-index: -1;
    }


        
    .posts-grid__title {
        font-size: 16px;
    }
    
    .pagination ul {
        flex-wrap: wrap;
    }
    
}
