/* 首页「资讯」分类：最新 6 条纯文字链接（无底框，标题前带小图标，不展示预览图） */
.fg-more { margin-left: auto; font-size: .8rem; color: var(--accent); text-decoration: none; }
.fg-more:hover { text-decoration: underline; }
.news-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 14px; margin-top: 10px; }
/* 首页资讯卡 / 推荐卡共用：无边框无背景，hover 淡底反馈，标题前统一小文档图标 */
.news-home-card, .news-rel-card {
    display: flex; align-items: flex-start; gap: 9px; min-width: 0;
    padding: 9px 8px; border-radius: 8px; text-decoration: none; color: inherit;
    transition: background .15s;
}
.news-home-card:hover, .news-rel-card:hover { background: #f5f7fa; }
.news-home-card::before, .news-rel-card::before {
    content: ''; flex: none; width: 15px; height: 15px; margin-top: 3px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 1.75h6l3 3V14a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5V2.25a.5.5 0 0 1 .5-.5Z' fill='none' stroke='%239aa3b2' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M9.3 1.9V5h2.9M5.7 8h4.2M5.7 10.7h4.2' fill='none' stroke='%239aa3b2' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.nh-body, .news-rel-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.nh-body b, .news-rel-body b { font-size: .88rem; font-weight: normal; line-height: 1.5; color: var(--text, #1f2430); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-home-card:hover b, .news-rel-card:hover b { color: var(--accent); }
.nh-body small, .news-rel-body small { color: var(--text-dim); font-size: .74rem; }

@media (max-width: 900px) { .news-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .news-home-grid { grid-template-columns: 1fr; } }

/* ==================== 资讯：列表页 / 详情页 / 静态页共用 ==================== */
.news-list-head { margin: 6px 0 20px; }
.news-list-head h1 { margin-bottom: 6px; }
.news-list-head p { color: var(--text-dim); margin-bottom: 14px; }
.news-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.news-cats a {
    display: inline-block; padding: 6px 14px; border: 1px solid var(--border, #e3e6eb);
    border-radius: 999px; color: var(--text-dim); font-size: .86rem; text-decoration: none; background: #fff;
}
.news-cats a:hover { border-color: var(--accent); color: var(--accent); }
.news-cats a.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.news-card {
    display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
    background: #fff; border: 1px solid var(--border, #e3e6eb); border-radius: 12px; transition: border-color .15s, transform .15s;
}
.news-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.news-card-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #f4f6f9; }
.news-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card-cat {
    position: absolute; left: 10px; top: 10px; background: rgba(31,36,48,.82); color: #fff;
    font-size: .72rem; padding: 3px 9px; border-radius: 999px;
}
.news-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.news-card-body h2 { font-size: 1.04rem; line-height: 1.45; margin: 0 0 8px; color: var(--text, #1f2430); }
.news-card-body p {
    color: var(--text-dim); font-size: .86rem; line-height: 1.6; margin: 0 0 12px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-meta { margin-top: auto; display: flex; gap: 14px; color: var(--text-dim); font-size: .78rem; }

.news-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 26px 0 8px; }
.news-pg {
    min-width: 36px; height: 36px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border, #e3e6eb); border-radius: 8px; background: #fff; color: var(--text, #1f2430);
    text-decoration: none; font-size: .9rem;
}
.news-pg:hover { border-color: var(--accent); color: var(--accent); }
.news-pg.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.news-pg.disabled { opacity: .4; pointer-events: none; }
.news-pg-gap { color: var(--text-dim); padding: 0 2px; }
.news-pg-info { margin-left: 10px; color: var(--text-dim); font-size: .82rem; }

/* 详情页宽度与首页主容器（1240px）一致，外层 .container.container-wide 已限定宽度 */
.news-detail { width: 100%; max-width: none; margin: 0; }
.news-detail-head { margin-bottom: 20px; }
.news-detail-head h1 { font-size: 1.9rem; line-height: 1.4; margin-bottom: 10px; }
.news-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text-dim); font-size: .84rem; }
.news-meta span { padding-left: 12px; border-left: 2px solid var(--accent); }
.news-cover { margin: 0 0 24px; border-radius: 12px; overflow: hidden; background: #f4f6f9; }
.news-cover img { display: block; width: 100%; }
.news-content { font-size: 1rem; line-height: 1.9; color: #2b303b; }
.news-content h2 {
    font-size: 1.4rem; margin: 32px 0 12px; padding-left: 12px; border-left: 4px solid var(--accent); line-height: 1.4;
}
.news-content h3 { font-size: 1.15rem; margin: 24px 0 10px; }
.news-content p { margin: 0 0 16px; }
.news-content img { display: block; max-width: 100%; height: auto; margin: 18px auto; border-radius: 10px; border: 1px solid #e9ecf1; }
.news-content ul, .news-content ol { padding-left: 24px; margin: 0 0 16px; }
.news-content li { margin-bottom: 8px; }
.news-content blockquote {
    margin: 18px 0; padding: 12px 18px; background: #fff7f2; border-left: 4px solid var(--accent); color: #5a4638; border-radius: 0 8px 8px 0;
}
.news-content pre { background: #1f2430; color: #e8ecf3; padding: 16px 18px; border-radius: 10px; overflow-x: auto; }
.news-content code { background: #f1f3f7; padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.news-content pre code { background: transparent; padding: 0; }
.news-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .92rem; }
.news-content th, .news-content td { border: 1px solid #e3e6eb; padding: 8px 12px; text-align: left; }
.news-content th { background: #f6f8fb; }
.news-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 16px; }
.news-tag { background: #f1f3f7; color: #5c6472; padding: 4px 12px; border-radius: 999px; font-size: .8rem; }
.news-back { border-top: 1px solid var(--border, #e3e6eb); padding-top: 16px; color: var(--text-dim); font-size: .9rem; }
.news-back a { color: var(--accent); text-decoration: none; }

.news-related { width: 100%; max-width: none; margin: 38px 0 10px; }
.news-related h2 { font-size: 1.25rem; margin-bottom: 10px; }
.news-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 14px; }

/* 后台资讯编辑：上传图片 / 已有配图插入 */
.news-upload-btn { position: relative; cursor: pointer; white-space: nowrap; }
.news-img-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.news-img-pick {
    width: 96px; height: 62px; padding: 0; overflow: hidden; cursor: pointer;
    background: #fff; border: 1px solid var(--border, #e3e6eb); border-radius: 8px;
}
.news-img-pick:hover { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,106,61,.18); }
.news-img-pick img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 后台资讯管理页 */
.news-admin-tip { background: #f6f8fb; border: 1px solid var(--border, #e3e6eb); border-radius: 10px; padding: 14px 16px; }
.news-admin-tip code, .news-admin-tip pre { font-size: .8rem; }
.news-admin-tip pre { background: #1f2430; color: #e8ecf3; border-radius: 8px; padding: 12px; overflow-x: auto; margin: 8px 0 0; }

@media (max-width: 900px) {
    .news-grid, .news-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .news-grid, .news-related-grid { grid-template-columns: 1fr; }
    .news-detail-head h1 { font-size: 1.5rem; }
    .news-content { font-size: .96rem; line-height: 1.8; }
    .news-pg-info { width: 100%; margin: 6px 0 0; }
}
