/* ================================
   TAG HEADER
   ================================ */
.tag-header {
    position: relative;
    text-align: center;
    margin-bottom: 60px;
    padding: 80px 48px;
    background: var(--color-primary);
    border-radius: var(--radius-xl);
    color: #ffffff;
    overflow: hidden;
}

.tag-header-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
}

.tag-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.tag-header-content {
    position: relative;
    z-index: 2;
}

.tag-name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tag-description {
    max-width: 700px;
    margin: 0 auto 24px;
    font-size: 1.125rem;
    line-height: 1.7;
    opacity: 0.95;
}

.tag-post-count {
    display: inline-block;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* ================================
   TAG POSTS SECTION
   ================================ */
.tag-posts {
    padding-bottom: 60px;
}

.tag-posts .post-grid {
    margin-bottom: 48px;
}

/* ================================
   RELATED TAGS
   ================================ */
.related-tags {
    margin-top: 40px;
    padding: 60px 0;
    border-top: 2px solid var(--border-light);
}

.related-tags h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 32px 0;
    text-align: center;
}

.related-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.related-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    background: var(--bg-light);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1;
    transition: var(--transition);
    border: 2px solid var(--border-light);
}

.related-tag:hover {
    background: var(--color-primary);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.related-tag-name {
    display: inline-flex;
    align-items: center;
}

.related-tag-count {
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
    font-weight: 400;
}

/* ================================
   NO POSTS MESSAGE
   ================================ */
.tag-posts .no-posts {
    text-align: center;
    padding: 80px 24px;
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--border-light);
}

.tag-posts .no-posts-icon {
    margin-bottom: 24px;
    color: var(--text-muted);
}

.tag-posts .no-posts-icon svg {
    width: 64px;
    height: 64px;
    stroke: var(--text-muted);
}

.tag-posts .no-posts-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.tag-posts .no-posts-message {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ================================
   PAGINATION
   ================================ */
.tag-posts .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 40px 0;
}

.tag-posts .pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 20px;
    background: var(--bg-light);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.tag-posts .pagination a:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tag-posts .pagination .page-number {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ================================
   RESPONSIVE TABLET FOR TAG
   ================================ */
@media (max-width: 1023px) {
    .tag-header {
        padding: 60px 32px;
    }

    .tag-name {
        font-size: 2.5rem;
    }
}

/* ================================
   RESPONSIVE MOBILE FOR TAG
   ================================ */
@media (max-width: 767px) {
    .tag-header {
        padding: 60px 24px;
        margin-bottom: 40px;
        border-radius: var(--radius-lg);
    }

    .tag-name {
        font-size: 2rem;
    }

    .tag-description {
        font-size: 1rem;
    }

    .related-tags {
        margin-top: 32px;
        padding: 40px 0;
    }

    .related-tags h3 {
        font-size: 1.25rem;
        margin-bottom: 24px;
    }

    .related-tags-list {
        gap: 8px;
    }

    .related-tag {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .tag-posts .pagination {
        padding: 32px 0;
        gap: 12px;
    }

    .tag-posts .pagination a {
        min-width: 44px;
        height: 44px;
        padding: 0 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 479px) {
    .tag-header {
        padding: 48px 20px;
    }

    .tag-post-count {
        padding: 8px 18px;
        font-size: 0.8rem;
    }

    .related-tag {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}