@import url('../address3/index.css');

/* 与 business3/business-selection：顶栏下主区背景、面包屑下留白（common3-main-content）一致 */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Microsoft YaHei", sans-serif;
    background-color: #f9f9f9;
    background-image: none;
    margin: 0;
    padding: 0;
}

.common3-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 300px);
    padding-top: 0;
    background-color: #ffffff;
}

.news3-main-inner {
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 面包屑与下方新闻卡片列表留白 */
.news3-main-inner > .message-container {
    margin-top: 24px;
}

@media (max-width: 768px) {
    .news3-main-inner {
        padding-left: 15px;
        padding-right: 15px;
    }

    .news3-main-inner > .message-container {
        margin-top: 40px;
    }
}

/* 仅分类工具条：与 address3 工具栏对齐；与上方面包屑留白 */
.news-list-header.compact-header {
    justify-content: flex-end;
    margin-top: 20px;
}

.news-filter-toolbar {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.news-filter-toolbar .filter-item {
    margin: 0;
    padding: 6px 16px;
    font-size: 12px;
    font-family: "Microsoft YaHei", sans-serif;
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fff;
    color: var(--text-secondary, #64748b);
    transition: all 0.3s ease;
}

.news-filter-toolbar .filter-item:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.news-filter-toolbar .filter-item.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 新闻列表：卡片式列表（替代表格） */
.news-feed-panel.message-table-wrapper {
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 4px 20px rgba(34, 58, 94, 0.06);
}

.news-feed-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-feed-item {
    padding: 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.news-feed-item:last-child {
    border-bottom: none;
}

.news-feed-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 20px;
    padding: 18px 22px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
}

.news-feed-link:hover {
    background-color: rgba(34, 58, 94, 0.035);
}

.news-feed-link:hover .news-feed-title {
    color: var(--primary-color);
}

.news-feed-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    margin-right: 12px;
}

.news-feed-bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
    flex-shrink: 0;
}

.news-feed-date {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary, #64748b);
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.news-feed-title {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
    color: var(--text-primary, #1e293b);
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-feed-empty {
    padding: 8px 0 16px;
}

/* 自定义分页（非 layui） */
.pagination-container {
    margin-top: 1.5rem;
}

.pagination {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(34, 58, 94, 0.06);
    padding: 5px;
}

.page-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    border-radius: 50%;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.page-item:hover {
    background: rgba(193, 44, 32, 0.08);
    color: var(--primary-color);
}

.page-item.active {
    background: var(--gradient-accent, var(--primary-color));
    color: #fff;
    box-shadow: 0 4px 12px rgba(193, 44, 32, 0.2);
}

.page-prev,
.page-next {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.page-prev:hover,
.page-next:hover {
    background: rgba(193, 44, 32, 0.08);
    color: var(--primary-color);
}

.page-prev.disabled,
.page-next.disabled {
    cursor: not-allowed;
    color: #ccc;
    background: transparent;
}

.page-ellipsis {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    color: #666;
}

/* 移动端：列表纵向排布 */
@media (max-width: 768px) {
    .news-list-header.compact-header {
        justify-content: flex-end;
    }

    .news-filter-toolbar {
        justify-content: flex-end;
    }

    .news-feed-link {
        padding: 16px 16px 14px;
        gap: 12px 14px;
    }

    .news-feed-title {
        -webkit-line-clamp: 3;
        font-size: 14px;
    }

    .news-feed-date {
        font-size: 12px;
    }

    .news-feed-empty {
        padding: 40px 16px 48px;
    }

    .page-item,
    .page-prev,
    .page-next,
    .page-ellipsis {
        width: 36px;
        height: 36px;
        margin: 0 3px;
    }
}
