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

/* 页面主背景 */
.cat-main {
    background: #FDFAF3;
}

/* ============ Hero Banner ============ */
.cat-hero {
    width: 100%;
    display: flex;
    justify-content: center;
    background: #FFD98E;
}

.cat-hero-inner {
    width: 120rem;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    padding: 0 15rem;
    box-sizing: border-box;
}

.cat-hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
    box-sizing: border-box;
}

.cat-hero-title {
    color: #372A10;
    font-size: 3.5rem;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 800;
    line-height: 4rem;
    margin: 0;
}

.cat-hero-subtitle {
    color: #372A10;
    font-size: 1.5rem;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 600;
    line-height: 1.5rem;
    margin: 0.75rem 0 0;
}

.cat-hero-desc {
    color: #372A10;
    font-size: 1.125rem;
    font-family: 'Noto Sans', sans-serif;
    line-height: 1.625rem;
    margin: auto 0 0;
    max-width: 50rem;
}

.cat-hero-media {
    width: 38.5rem;
    height: 20rem;
    flex-shrink: 0;
    overflow: hidden;
    background: #FFFFFF;
}

.cat-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-hero-media img:hover {
    transform: scale(1.03);
}

/* ============ Content Area ============ */
.cat-content {
    display: flex;
    justify-content: center;
    background: #FDFAF3;
    padding: 2rem 0;
}

.cat-content-inner {
    width: 90rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ============ Category Tabs ============ */
.cat-tabs {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cat-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
}

.cat-tab-text {
    color: #9E9385;
    font-size: 1.125rem;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 600;
    line-height: 1.625rem;
    transition: color 0.2s;
}

.cat-tab.is-active .cat-tab-text {
    color: #362B1C;
}

.cat-tab-underline {
    display: block;
    width: 100%;
    height: 0.375rem;
    margin-top: 0.25rem;
    background-image: url('../resources/img/selected-tilde.svg');
    background-repeat: repeat-x;
    background-size: auto 0.375rem;
    background-position: 0 0;
    opacity: 0;
    animation: none;
}

.cat-tab.is-active .cat-tab-underline,
.cat-tab:hover .cat-tab-underline {
    opacity: 1;
}

.cat-tab:hover .cat-tab-underline {
    animation: catTildeScroll 1.2s linear infinite;
}

@keyframes catTildeScroll {
    from {
        background-position: 0 0;
    }

    to {
        background-position: -1.125rem 0;
    }
}

/* ============ Article Grid ============ */
.cat-articles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3.125rem;
}


.cat-article-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.cat-article-cover {
    height: 17.375rem;
    overflow: hidden;
    background: #f0f0f0;
}

.cat-article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-article-cover img:hover {
    transform: scale(1.03);
}

.cat-article-title {
    color: #212121;
    font-size: 1.375rem;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 700;
    line-height: 1.875rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-article-excerpt {
    color: #696663;
    font-size: 1rem;
    font-family: 'Noto Sans', sans-serif;
    line-height: 1.5rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-empty {
    text-align: center;
    padding: 3.75rem 0;
    color: #9E9385;
    font-size: 1rem;
}

/* ============ Mobile Styles ============ */
@media (max-width: 768px) {
    .cat-hero {
        width: 100%;
        height: 12.5rem;
        padding: 1rem;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: stretch;
    }

    .cat-hero-text {
        width: 100%;
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 0;
    }

    .cat-hero-title {
        font-size: 2.28rem;
        line-height: 3.25rem;
        text-align: left;
        font-weight: 800;
        margin: 0;
    }

    .cat-hero-subtitle {
        font-size: 1rem;
        line-height: 1.375rem;
        font-weight: 600;
        margin: .25rem 0 0;
    }

    .cat-hero-desc {
        font-size: 0.8125rem;
        line-height: 1.125rem;
        margin: auto 0 0;
    }

    .cat-hero-media {
        width: 100%;
        height: 12.125rem;
        overflow: hidden;
    }

    .cat-hero-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .cat-content {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .cat-content-inner {
        width: 100%;
        gap: 0.75rem;
    }

    .cat-tabs {
        width: 100%;
        min-width: 0;
        gap: 1.5rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0;
        box-sizing: border-box;
    }

    .cat-tabs::-webkit-scrollbar {
        display: none;
    }

    .cat-tab-underline {
        opacity: 0;
        animation: none;
    }

    .cat-tab.is-active .cat-tab-underline {
        opacity: 1;
        animation: catTildeScroll 1.2s linear infinite;
    }

    .cat-tab-text {
        font-size: 0.875rem;
        font-weight: 600;
        line-height: 1.1875rem;
        white-space: nowrap;
    }

    .cat-articles {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.13625rem;
    }

    .cat-article-card {
        gap: 0.36375rem;
    }

    .cat-article-cover {
        height: 6.3175rem;
        overflow: hidden;
    }

    .cat-article-cover img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        display: block;
    }

    .cat-article-title {
        font-size: 0.875rem;
        font-weight: 700;
        line-height: 1.375rem;
        -webkit-line-clamp: 2;
    }

    .cat-article-excerpt {
        display: none;
    }
}