﻿body {
    background-color: #f9f9f9;
}

.tag-template {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Tag header */
.tag-header {
    margin-bottom: 40px;
    text-align: center;
}

    .tag-header h1 {
        color: #111;
        margin: 0 0 8px 0;
        font-size: 3rem;
        font-weight: 400;
        letter-spacing: 0.01em;
        font-family: 'Dharma Gothic', sans-serif;
        line-height: 1;
        padding-bottom: 12px;
        border-bottom: 3px solid #680024;
        display: inline-block;
    }

.tag-description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-top: 16px;
}

/* Navigation with circular buttons */
.tag-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

/* Circular arrow buttons (prev/next) */
.page-nav-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #680024;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #680024;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

    .page-nav-circle:hover:not(.disabled) {
        background-color: #680024;
        color: #fff;
        transform: scale(1.1);
    }

    .page-nav-circle.disabled {
        border-color: #ccc;
        color: #ccc;
        cursor: not-allowed;
        opacity: 0.5;
    }

    .page-nav-circle svg {
        flex-shrink: 0;
    }

/* Page numbers container */
.page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Circular page number buttons */
.page-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #680024;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #680024;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

    .page-number:hover {
        background-color: #680024;
        color: #fff;
        transform: scale(1.1);
    }

    .page-number.current {
        background-color: #fef0f5;
        border-color: #680024;
        color: #680024;
        cursor: default;
    }

.page-ellipsis {
    color: #680024;
    font-weight: 600;
    padding: 0 4px;
}

/* Grid wrapper */
.tag-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* Article card */
.tag-article-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.tag-article-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

    .tag-article-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }

    .tag-article-card img {
        width: 100%;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }

    .tag-article-card h4 {
        font-size: 1.15rem;
        font-weight: 600;
        line-height: 1.4;
        margin: 0;
        padding: 16px;
        color: #111;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
    }

.tag-article-card-link:hover h4 {
    color: #680024;
}

/* Mobile support */
@media (max-width: 968px) {
    .tag-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tag-template {
        padding: 30px 15px;
    }

    .tag-header h1 {
        font-size: 2.2rem;
    }

    .tag-articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-nav-circle {
        width: 38px;
        height: 38px;
    }

    .page-number {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
}
