.category-posts {
    width: 100%;
}

.category-posts__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

.category-posts__title {
    font-size: 28px;
    font-weight: 800;
    color: #222222;
    margin: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.category-posts__tabs {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.category-posts__tab {
    position: relative;
    font-size: 15px;
    font-weight: 500;
    color: #666666;
    cursor: pointer;
    padding-bottom: 6px;
    transition: color 0.2s ease;
    white-space: nowrap;
    user-select: none;
}

.category-posts__tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #f28c28;
    transition: width 0.25s ease;
}

.category-posts__tab:hover {
    color: #f28c28;
}

.category-posts__tab.is-active {
    color: #f28c28;
    font-weight: 600;
}

.category-posts__tab.is-active::after {
    width: 100%;
}

.category-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.category-posts[data-columns="2"] .category-posts__grid {
    grid-template-columns: repeat(2, 1fr);
}

.category-posts[data-columns="4"] .category-posts__grid {
    grid-template-columns: repeat(4, 1fr);
}

.category-posts__card {
    display: flex;
    flex-direction: column;
}

.category-posts__image {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 16px;
}

.category-posts__image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.35s ease;
}

.category-posts__card:hover .category-posts__image img {
    transform: scale(1.05);
}

.category-posts__post-title {
    font-size: 16px;
    font-weight: 700;
    color: #222222;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-posts__post-title a {
    color: inherit;
    text-decoration: none;
}

.category-posts__post-title a:hover {
    color: #f28c28;
}

.category-posts__excerpt {
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    margin: 0 0 14px;
    flex-grow: 1;
}

.category-posts__readmore {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #222222;
    text-decoration: none;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.category-posts__readmore:hover {
    color: #f28c28;
}

.category-posts__arrow {
    font-size: 16px;
    line-height: 1;
}

.category-posts__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.category-posts__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.category-posts__page:hover {
    background-color: #f5f5f5;
    color: #f28c28;
    border-color: #f28c28;
}

.category-posts__page.is-current {
    background-color: #f28c28;
    color: #ffffff;
    border-color: #f28c28;
}

@media (max-width: 991px) {
    .category-posts__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-posts[data-columns="4"] .category-posts__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .category-posts__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 24px;
    }

    .category-posts__tabs {
        gap: 20px;
    }

    .category-posts__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .category-posts[data-columns="2"] .category-posts__grid,
    .category-posts[data-columns="4"] .category-posts__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-posts__post-title {
        font-size: 14px;
    }

    .category-posts__excerpt {
        display: none;
    }

    .category-posts__readmore {
        font-size: 12px;
    }
}
