/* 全局盒模型重置：解决宽度计算偏差的核心！ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", Arial, sans-serif; background: #f4f4f4; color: #333; }
a { text-decoration: none; color: #333; transition: color 0.3s; }
a:hover { color: #c00; }
ul, li { list-style: none; }
img { max-width: 100%; display: block; }

/* 顶部工具栏 */
.sf-toolbar { background: #222; color: #ccc; font-size: 12px; padding: 8px 0; }
.sf-toolbar-box { width: 1000px; margin: 0 auto; }
/* ===== 核心修改：H1样式重置，使其与文本同大 ===== */
.sf-toolbar-left { line-height: 1.6; }
.sf-toolbar-left h1 {
    display: inline; /* 行内显示，不换行 */
    font-size: inherit; /* 继承父级字体大小 12px */
    font-weight: normal; /* 取消加粗 */
    color: inherit; /* 继承父级颜色 */
    margin: 0; /* 去除默认外边距 */
    padding: 0; /* 去除默认内边距 */
}

/* 头部LOGO */
.sf-header { 
  background: #fff; 
  padding: 15px 0; 
  border-bottom: 1px solid #eee; 
  width: 1000px;      /* 固定宽度 1000px */
  margin: 0 auto;     /* 水平居中 */
}
.sf-container { width: 1000px; margin: 0 auto; }
.sf-logo { display: flex; align-items: center; }
.sf-logo-img { margin-right: 15px; }
.sf-logo-title { opacity: 0.8; }

/* 主导航 */
.sf-nav { 
  background: linear-gradient(to bottom, #b30000, #990000);
  width: 1000px;      /* 固定宽度 1000px */
  margin: 0 auto;     /* 水平居中 */
}
.sf-ul-list { display: flex; }
.sf-ul-list li a { display: block; color: #fff; padding: 12px 25px; font-size: 15px; }
.sf-ul-list li a:hover, .sf-ul-list li a.home { background: rgba(0,0,0,0.2); }

/* 主体容器 */
.sf-wrapper { width: 1000px; margin: 20px auto; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }

/* 面包屑 */
.sf-crumbs { padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; font-size: 14px; }
.sf-article-count { color: #c00; font-weight: bold; }

/* ===== 核心修正：强制一行2条，绝不换行 ===== */
.sf-list-news-ul {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* 左右间距20px，上下间距也是20px */
}

.sf-list-news-ul li {
    /* 强制固定宽度：总宽度一半减去半个间距，绝对不会被挤成一行一个 */
    flex: 0 0 calc(50% - 10px);
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.sf-list-news-ul li:hover {
    box-shadow: 0 8px 20px rgba(192,0,0,0.15);
    border-color: #ffcccc;
    transform: translateY(-3px);
}

.news-card {
    display: flex;
    height: 150px;
}

.news-thumb {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    overflow: hidden;
}
.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.sf-list-news-ul li:hover .news-thumb img {
    transform: scale(1.05);
}

.news-info {
    flex: 1;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.news-title {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ===== 新增：内容简介样式 ===== */
.news-summary {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
    flex-grow: 1; /* 占据剩余空间 */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制为2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
    margin-top: auto;
    border-top: 1px dashed #f0f0f0;
    padding-top: 8px;
}

.news-views {
    background: #f8f8f8;
    padding: 1px 8px;
    border-radius: 10px;
    color: #c00;
    font-weight: bold;
}

/* 分页 */
.sf-pagelist { text-align: center; padding: 30px 0 10px; border-top: 1px solid #eee; margin-top: 20px; }
.sf-pagelist li { display: inline-block; margin: 0 3px; }
.sf-pagelist a, .sf-pagelist span { display: block; padding: 8px 16px; border: 1px solid #ddd; background: #fff; color: #555; border-radius: 4px; }
.sf-pagelist a:hover { background: #c00; color: #fff; border-color: #c00; }
.sf-pagelist .on { background: #c00; color: #fff; border-color: #c00; font-weight: bold; }

/* 页脚 */
.sf-footer { background: #222; color: #aaa; padding: 25px 0; margin-top: 30px; text-align: center; font-size: 12px; line-height: 1.8; }
.sf-footer a { color: #ccc; }

/* 响应式适配 */
@media (max-width: 1240px) {
    .sf-container, .sf-toolbar-box, .sf-wrapper { width: 96%; }
}
@media (max-width: 768px) {
    .sf-list-news-ul li { flex: 0 0 100%; }
    .news-card { flex-direction: column; height: auto; }
    .news-thumb { width: 100%; height: 180px; }
}