.tag-primary-content {
    width: 100%;
    max-width: 100%;
    padding: 20px 10px;
    box-sizing: border-box;
    background: #fff;
}

.tag-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.tag-title {
    font-size: 2.5rem;
    color: #333;
    margin: 0;
    line-height: 1.3;
    font-weight: 700;
}

.tag-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    margin-top: 15px;
    font-style: italic;
}

.tag-post-count {
    font-size: 1rem;
    color: #888;
    margin-top: 10px;
}

.tag-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px 0;
}

.tag-post-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    padding: 0;
    margin: 0;
}

.tag-post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.tag-post-thumbnail {
    border-radius: 8px;
    width: 100%;
    aspect-ratio: 2/1.3;
    overflow: hidden;
    position: relative;
}

.tag-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tag-post-item:hover .tag-post-thumbnail img {
    transform: scale(1.05);
}

.tag-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;
}

.tag-post-content {
    padding: 5px;
}

.tag-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);
}

.tag-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tag-post-title a:hover {
    color: #e74c3c;
}

.tag-pagination-container {
    margin-top: 50px;
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.tag-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;
}

.tag-pagination-container .page-numbers:hover,
.tag-pagination-container .page-numbers.current {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.tag-pagination-container .page-numbers.dots {
    border: none;
    background: none;
    color: #999;
}

.tag-no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.tag-no-posts h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

.tag-no-posts p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

@media only screen and (max-width: 1024px) and (min-width: 768px) {
    .tag-primary-content {
        padding: 20px 10px;
    }

    .tag-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .tag-title {
        font-size: 2.2rem;
    }
}

@media only screen and (max-width: 767px) {
    .tag-primary-content {
        padding: 10px 5px;
    }

    .tag-title {
        font-size: 2rem;
    }

    .tag-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .tag-post-content {
        padding: 5px;
    }

    .tag-post-title {
        font-size: 15px;
    }
}

@media only screen and (max-width: 480px) {
    .tag-primary-content {
        padding: 10px 5px;
    }

    .tag-title {
        font-size: 1.8rem;
    }

    .tag-posts-grid {
        gap: 15px;
    }

    .tag-post-content {
        padding: 5px;
    }

    .tag-post-title {
        font-size: 13px;
    }
}

.tag-primary-content .ast-article-post,
.tag-primary-content .ast-article-single {
    padding: 5px !important;
    border: 0px !important;
    margin: 0 !important;
}
