/* ===== Category Page Styles ===== */

/* Page Header */
.page-header {
    background: #FFFFFF;
    padding: 64px 0;
    border-bottom: 1px solid rgba(139, 154, 126, 0.2);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #8B9A7E 0%, transparent 50%, #8B9A7E 100%);
    opacity: 0.3;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 56px !important;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 16px;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #8B9A7E 0%, transparent 100%);
    border-radius: 2px;
}

.page-description {
    font-size: 17px;
    color: #6B6B6B;
    max-width: 800px;
    line-height: 1.8;
    margin-top: 24px;
}

/* Category Navigation */
.category-navigation {
    background: #FFFFFF;
    border-bottom: 1px solid rgba(139, 154, 126, 0.15);
    position: sticky;
    top: 90px;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden; /* 隐藏超出的装饰元素 */
}

.category-navigation .container {
    overflow: visible; /* 允许按钮内容显示 */
    padding-left: 24px; /* 确保左右有足够间距 */
    padding-right: 24px;
}

.category-tabs {
    display: flex;
    gap: 16px;
    list-style: none;
    overflow-x: visible; /* 改为 visible，让所有按钮都能显示 */
    padding: 24px 0;
    justify-content: center;
    flex-wrap: wrap; /* 如果按钮太多，允许换行 */
}

.category-tabs::-webkit-scrollbar {
    height: 0;
}

.category-tabs li a {
    display: block;
    padding: 14px 32px;
    font-size: 13px;
    font-weight: 600;
    color: #2D2D2D;
    background: #FFFFFF;
    border: 2px solid rgba(139, 154, 126, 0.2);
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-tabs li a:hover {
    border-color: #8B9A7E;
    color: #8B9A7E;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 154, 126, 0.2);
}

.category-tabs li a.active {
    color: #FFFFFF;
    background: #8B9A7E;
    border-color: #8B9A7E;
    box-shadow: 0 4px 12px rgba(139, 154, 126, 0.25);
    transform: translateY(-2px);
}

/* Articles Section */
.articles-section {
    padding: 64px 0;
    position: relative;
}

.articles-section::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 154, 126, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.articles-section::after {
    content: '';
    position: absolute;
    bottom: 15%;
    right: 8%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(139, 154, 126, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Filters Section */
.filters-section {
    padding: 48px 0;
    background: linear-gradient(180deg, rgba(250, 250, 250, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
    border-bottom: 1px solid rgba(139, 154, 126, 0.15);
    position: relative;
}

.filter-note {
    text-align: center;
    color: #6B6B6B;
    font-size: 15px;
    font-style: italic;
    margin-bottom: 24px;
}

.secondary-filters {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 600;
    color: #2D2D2D;
    background: #FFFFFF;
    border: 2px solid rgba(139, 154, 126, 0.2);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    border-color: #8B9A7E;
    color: #8B9A7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 154, 126, 0.2);
}

.filter-btn.active {
    color: #FFFFFF;
    background: #8B9A7E;
    border-color: #8B9A7E;
    box-shadow: 0 4px 12px rgba(139, 154, 126, 0.25);
}

.filters-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(139, 154, 126, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1; /* 放到背景层 */
}

.filters-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
}

.filter-group {
    background: #FFFFFF;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid rgba(139, 154, 126, 0.2);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(139, 154, 126, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #8B9A7E 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-group:hover::before {
    opacity: 1;
}

.filter-group:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 154, 126, 0.15), 0 3px 6px rgba(0, 0, 0, 0.08);
    border-color: rgba(139, 154, 126, 0.3);
}

.filter-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding-bottom: 8px;
    border-bottom: 2px solid #8B9A7E;
    position: relative;
}

.filter-label::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #6F7D64;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-tag {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #2D2D2D;
    background: #FAFAFA;
    border: 1.5px solid rgba(139, 154, 126, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-tag:hover {
    border-color: #8B9A7E;
    color: #8B9A7E;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(139, 154, 126, 0.12);
}

.filter-tag.active {
    color: #FFFFFF;
    background: #8B9A7E;
    border-color: #8B9A7E;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(139, 154, 126, 0.2);
    transform: translateY(-2px);
}

/* Results Header */
.results-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.results-count {
    font-size: 15px;
    color: #6B6B6B;
    font-weight: 500;
}

.results-count strong {
    color: #8B9A7E;
    font-weight: 700;
}

.sort-controls-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-controls label {
    font-size: 13px;
    font-weight: 600;
    color: #2D2D2D;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sort-controls select {
    padding: 8px 16px;
    border: 1.5px solid #E5E5E5;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #2D2D2D;
    background: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-controls select:hover,
.sort-controls select:focus {
    border-color: #8B9A7E;
    outline: none;
}

.clear-filters-btn {
    padding: 8px 20px;
    background: transparent;
    color: #8B9A7E;
    border: 1.5px solid #8B9A7E;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.clear-filters-btn:hover {
    background: #8B9A7E;
    color: #FFFFFF;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

/* Article Card */
.article-card {
    background: #FFFFFF;
    cursor: default; /* 改为 default，因为链接在内部 */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    animation: fadeIn 0.6s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(139, 154, 126, 0.1);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(139, 154, 126, 0.15);
    position: relative;
    display: block;
}

.article-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.article-card-link:hover {
    color: inherit;
}

.article-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8B9A7E 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.article-card:hover::after {
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(139, 154, 126, 0.2), 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: rgba(139, 154, 126, 0.4);
}

/* Article Image */
.article-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 133.33%; /* 4:3 ratio */
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf0 100%);
}

.article-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.article-card:hover .article-image-wrapper::after {
    opacity: 1;
}

.article-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover .article-card-image {
    transform: scale(1.08);
}

/* Article Content */
.article-card-content {
    padding: 24px;
    position: relative;
    z-index: 1;
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.article-tag {
    display: inline-block;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.article-tag-primary {
    color: #8B9A7E;
    background: rgba(139, 154, 126, 0.1);
    border: 1px solid rgba(139, 154, 126, 0.2);
    cursor: pointer;
}

.article-tag-secondary {
    color: #6B6B6B;
    background: rgba(107, 107, 107, 0.08);
    border: 1px solid rgba(107, 107, 107, 0.15);
    cursor: default;
}

.article-tag-primary:hover {
    background: #8B9A7E;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(139, 154, 126, 0.3);
}

.article-card:hover .article-tag-primary {
    background: rgba(139, 154, 126, 0.15);
    color: #8B9A7E;
}

.article-card:hover .article-tag-primary:hover {
    background: #8B9A7E;
    color: #FFFFFF;
}

.article-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 600;
    color: #1A1A1A;
    line-height: 1.4;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.article-card:hover .article-card-title {
    color: #8B9A7E;
    transform: translateX(4px);
}

.article-meta {
    font-size: 13px;
    color: #A8A8A8;
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-meta .reading-time {
    color: #8B9A7E;
    font-weight: 600;
}

.article-stats {
    margin-top: 8px;
    font-size: 13px;
    color: #A8A8A8;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .filters-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .filters-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .category-tabs {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 40px !important;
    }

    .page-description {
        font-size: 16px;
    }

    .category-tabs li a {
        padding: 12px 24px;
        font-size: 12px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sort-controls-wrapper {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
}
