﻿.news-category-page {
    padding: 20px 0 48px;
    min-height: 40vh;
}

.news-category-page .grid.wide {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 10px;
    padding-right: 10px;
}

.news-category-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-category-hero {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.news-category-hero .p-title {
    margin-bottom: 10px;
}

.news-category-hero .p-title span {
    display: block;
    font-size: 34px;
    line-height: 1.12;
    color: var(--text-heading, #291b0e);
    font-weight: 600;
}

.news-category-hero .p-description {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-body, #5f5348);
    font-weight: 500;
}

.news-category-tabs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px;
    border-radius: 999px;
    background: var(--bg-pill, #fff3eb);
    margin: 0 auto;
    max-width: 100%;
}

.news-category-tabs .tab-item {
    min-width: 120px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-body-3, #555);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.news-category-tabs .tab-item.active,
.news-category-tabs .tab-item:hover {
    background: var(--white);
    color: var(--color-1);
    box-shadow: 0 2px 8px rgba(41, 27, 14, 0.06);
}

.news-category-toolbar {
    display: flex;
    justify-content: center;
}

.news-category-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 420px;
    min-height: 46px;
    border: 1px solid var(--border-card-6, #f0e7e0);
    border-radius: 999px;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(41, 27, 14, 0.03);
    overflow: hidden;
}

.news-category-search input[type="text"] {
    flex: 1;
    min-width: 0;
    width: auto;
    height: 44px;
    border: 0 !important;
    outline: 0;
    box-shadow: none !important;
    background: transparent;
    padding: 0 14px 0 0;
    margin: 0;
    font-size: 14px;
    color: var(--text-heading, #291b0e);
    -webkit-appearance: none;
    appearance: none;
}

.news-category-search input::placeholder {
    color: var(--text-muted, #999);
}

.news-category-search-btn,
.news-category-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    color: var(--color-1);
    text-decoration: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.news-category-search-btn i,
.news-category-search-clear i {
    font-size: 15px;
    line-height: 1;
    pointer-events: none;
}

.news-category-board {
    border-radius: 18px;
    border: 1px solid var(--border-card-6, #f0e7e0);
    background: var(--white);
    padding: 22px 18px 20px;
    box-shadow: 0 4px 18px rgba(41, 27, 14, 0.04);
}

.news-category-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-section, #f0e5db);
    font-size: 13px;
    color: var(--text-body-3, #7a6f63);
}

.news-category-meta .count {
    font-weight: 600;
    color: var(--text-heading, #291b0e);
}

.news-category-meta .search-hint strong {
    color: var(--color-1);
    font-weight: 600;
}

.news-category-meta .range {
    margin-left: auto;
}

.news-category-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.news-category-page .p-news-item {
    border-radius: 16px;
    border: 1px solid var(--border-card-3, #f1e4d9);
    background: var(--white);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(41, 27, 14, 0.03);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.news-category-page .p-news-item:hover {
    transform: translateY(-2px);
    border-color: var(--border-card-8, #f2c7a9);
    box-shadow: 0 8px 20px rgba(251, 97, 4, 0.08);
}

.news-category-page .p-news-item .img {
    position: relative;
    height: 162px;
    background: linear-gradient(180deg, #fff8f2 0%, #fff 100%);
    overflow: hidden;
}

.news-category-page .p-news-item .img .img-cate {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    margin: 0;
}

.news-category-page .p-news-item .img .img-cate span {
    display: inline-flex;
    align-items: center;
    display: none;
    justify-content: center;
    min-width: 72px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #ff8a3d;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
}

.news-category-page .p-news-item .img .img-cate.news span {
    background: #ff8a3d;
}

.news-category-page .p-news-item .img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.news-category-page .p-news-item:hover .img img {
    transform: scale(1.03);
}

.news-category-page .p-news-item .img img[src=""] {
    opacity: 0;
}

.news-category-page .p-news-item .content {
    padding: 14px 14px 16px;
    flex: 1;
}

.news-category-page .p-news-item .content .title {
    margin: 0 0 8px;
}

.news-category-page .p-news-item .content .title span {
    display: block;
    font-size: 16px;
    line-height: 1.35;
    color: #242424;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
}

.news-category-page .p-news-item .content .description {
    margin: 0;
}

.news-category-page .p-news-item .content .description span {
    display: block;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
}

.news-category-page .no-data {
    display: block;
    padding: 40px 16px;
    text-align: center;
    color: #7a6f63;
    font-size: 15px;
    border-radius: 14px;
    background: #fffaf6;
    border: 1px dashed #f1d8c4;
}

.news-category-pagination {
    display: flex;
    justify-content: center;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-section, #f0e5db);
}

@media (max-width: 1199px) {
    .news-category-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    .news-category-page {
        padding: 16px 0 40px;
    }

    .news-category-hero .p-title span {
        font-size: 28px;
    }

    .news-category-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .news-category-page .p-news-item .img {
        height: auto;
        aspect-ratio: 16 / 11;
    }

    .news-category-meta .range {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 639px) {
    .news-category-board {
        padding: 16px 12px 14px;
        border-radius: 14px;
    }

    .news-category-tabs {
        width: 100%;
        border-radius: 14px;
        padding: 4px;
    }

    .news-category-tabs .tab-item {
        min-width: 0;
        flex: 1 1 auto;
        min-height: 36px;
        padding: 0 12px;
        font-size: 12px;
    }

    .news-category-list {
        grid-template-columns: 1fr;
    }

    .news-category-hero .p-title span {
        font-size: 24px;
    }

    .news-category-hero .p-description {
        font-size: 14px;
    }
}
