/* ============================================================
   template1/css/news.css — 供应商新闻列表页专属样式
   ============================================================ */

/* ---- 新闻分类切换标签 ---- */
.news-tabs {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    margin-bottom: 30px;
    width: 100%;
}

.news-tab {
    position: relative;
    flex: 1;                 /* 均分全宽 */
    text-align: center;
    padding: 18px 20px;
    font-size: var(--font-size-md);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
    border: none;
    background: transparent;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px 2px 0 0;
    transition: width 0.3s;
}

.news-tab.active {
    color: var(--color-primary);
}

.news-tab.active::after {
    width: 60%;
}

.news-tab:hover {
    color: var(--color-primary);
}

/* 分割线 */
.news-tabs .tab-divider {
    width: 1px;
    background: #e0e0e0;
    margin: 12px 0;
    flex-shrink: 0;
}

/* ---- 新闻卡片网格（3列） ---- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* ---- 新闻卡片 ---- */
.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #efefef;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
    border-color: var(--color-primary);
}

/* 封面图 */
.news-card__img-link {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    padding: 20px 20px 0;   /* 上、左右留白，底部紧贴内容区 */
}

.news-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card:hover .news-card__img {
    transform: scale(1.06);
}

/* 卡片内容区 */
.news-card__body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 日期 */
.news-card__date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    color: #999;
    margin-bottom: 12px;
}

.news-card__date-icon {
    font-size: 14px;
    color: #bbb;
}

/* 标题 */
.news-card__title {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: #222;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    transition: color 0.2s;
}

.news-card__title:hover {
    color: var(--color-primary);
}

/* 摘要 */
.news-card__summary {
    font-size: var(--font-size-sm);
    color: #888;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 20px;
    flex: 1;
}

/* "View More" 按钮 */
.news-card__btn {
    display: inline-block;
    padding: 8px 28px;
    border-radius: 20px;      /* 更圆的胶囊形 */
    font-size: var(--font-size-base);
    text-decoration: none;
    transition: all 0.25s;
    align-self: flex-start;
    white-space: nowrap;
    /* 默认统一灰色边框 */
    border: 1px solid #ccc;
    color: #666;
    background: #fff;
}

/* hover 统一变绿色实心 */
.news-card__btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(4, 163, 140, 0.30);
}

/* 所有按钮初始状态统一由基类 .news-card__btn 控制（灰色边框），hover 统一变绿 */

/* ---- 新闻列表主区背景 ---- */
.news-layout {
    padding: 30px 0 50px;
}

/* ---- 响应式 ---- */
@media (max-width: 1199px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .news-grid { grid-template-columns: 1fr; gap: 16px; }
    .news-tab { padding: 14px 20px; font-size: var(--font-size-base); }
    .news-card__body { padding: 15px; }
}
