.category-primary-content {
    width: 100%;
    max-width: 100%;
    padding: 20px 10px;
    box-sizing: border-box;
    background: #fff;
}

.category-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.category-title {
    font-size: 2.5rem;
    color: #333;
    margin: 0;
    line-height: 1.3;
    font-weight: 700;
}

.category-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    margin-top: 15px;
    font-style: italic;
}

.category-post-count {
    font-size: 1rem;
    color: #888;
    margin-top: 10px;
}

.category-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px 0;
}

.category-post-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;

    padding: 0;
    margin: 0;
}

.category-post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.category-post-thumbnail {
    border-radius: 8px;
    width: 100%;
    aspect-ratio: 2/1.3;
    overflow: hidden;
    position: relative;
}

.category-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-post-item:hover .category-post-thumbnail img {
    transform: scale(1.05);
}

.category-post-placeholder {
    width: 100%;
    aspect-ratio: 2/1;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

.category-post-content {
    padding: 5px;
}

.category-post-title {
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
    font-weight: 600;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: calc(1.4em * 3);
}

.category-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-post-title a:hover {
    color: #e74c3c;
}

.category-post-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.category-post-meta a {
    color: #e74c3c;
    text-decoration: none;
}

.category-post-meta a:hover {
    text-decoration: underline;
}

.category-post-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

.category-post-excerpt p {
    margin: 0;
}

.category-read-more {
    display: inline-block;
    margin-top: 15px;
    color: #e74c3c;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.category-read-more:hover {
    color: #c0392b;
    text-decoration: underline;
}

.category-pagination-container {
    margin-top: 50px;
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.category-pagination-container .page-numbers {
    display: inline-block;
    padding: 12px 18px;
    margin: 0 5px;
    border: 2px solid #e74c3c;
    color: #e74c3c;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    background: #fff;
}

.category-pagination-container .page-numbers:hover,
.category-pagination-container .page-numbers.current {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.category-pagination-container .page-numbers.dots {
    border: none;
    background: none;
    color: #999;
}

.category-no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.category-no-posts h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

.category-no-posts p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

@media only screen and (max-width: 1024px) and (min-width: 768px) {
    .category-primary-content {
        padding: 20px 10px;
    }

    .category-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .category-title {
        font-size: 2.2rem;
    }
}

@media only screen and (max-width: 767px) {
    .category-primary-content {
        padding: 10px 5px;
    }

    .category-title {
        font-size: 2rem;
    }

    .category-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .category-post-content {
        padding: 5px;
    }

    .category-post-title {
        font-size: 15px;
    }
}

@media only screen and (max-width: 480px) {
    .category-primary-content {
        padding: 10px 5px;
    }

    .category-title {
        font-size: 1.8rem;
    }

    .category-posts-grid {
        gap: 15px;
    }

    .category-post-content {
        padding: 5px;
    }

    .category-post-title {
        font-size: 13px;
    }

    .category-post-meta {
        font-size: 0.8rem;
    }
}

 .category-primary-content .ast-article-post,
.category-primary-content .ast-article-single {
    padding: 5px !important;
    border: 0px !important;
    margin: 0 !important;
}
