/* ===== 基础变量 ===== */
:root{
  --border-color: #e9eef3;
  --card-shadow: 0 6px 20px rgba(31,49,71,.06);
  --card-shadow-hover: 0 10px 26px rgba(31,49,71,.10);
  --title-color: #153e7a;
  --text-color: #222;
  --muted-color: #666;
  --lead-color: #4a5568;
  --date-color: #7a8a9b;
  --primary: #1a73e8;
  --bg-light: #f6f8fb;
}

/* ===== 外层容器 ===== */
.news-container{
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ===== 新闻列表 ===== */
.news-grid{
  display: grid;
  grid-template-columns: repeat(2, 380px);
  gap: 24px;
  justify-content: center;
  align-items: stretch;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

/* ===== 卡片区域 ===== */
.news-card-link{
  display: block;
  text-decoration: none;
  color: inherit;
}

.news-card{
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.news-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: #dbe4ee;
}

.news-card img{
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--bg-light);
}

.news-card .txt{
  padding: 14px 16px;
  flex: 1;
  box-sizing: border-box;
}

.news-card .txt h4{
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--title-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .txt .lead{
  font-size: 14px;
  line-height: 1.65;
  color: var(--lead-color);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .date{
  padding: 8px 16px 14px;
  font-size: 13px;
  color: var(--date-color);
}

/* ===== 标题 ===== */
h1{
  text-align: center;
  font-size: 26px;
  margin-bottom: 24px;
}

/* ===== 分页 ===== */
.pg{
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.pg a,
.pg span{
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  text-decoration: none;
}

.pg .on{
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== 新闻详情页 ===== */
.page-narrow,
.news-detail{
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

.news-detail h1{
  text-align: center;
  font-size: 26px;
  margin: 12px 0 8px;
}

.news-detail .meta{
  text-align: center;
  color: var(--muted-color);
  margin-bottom: 20px;
}

.news-detail .cover{
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: var(--bg-light);
}

.news-detail .desc,
.news-detail .content{
  margin-top: 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  line-height: 1.75;
  color: var(--text-color);
  box-sizing: border-box;
}

.news-detail p a{
  color: var(--primary);
  text-decoration: none;
}

.news-detail p a:hover{
  text-decoration: underline;
}

/* ===== 右侧悬浮栏 ===== */
.home-aside-floating{
  top: 108px;
  z-index: 3;
}

.home-aside-floating.is-flow,
body:not(.has-sticky-aside) .home-aside-floating{
  margin-top: 24px;
}

.aside-title{
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ===== 其它新闻 ===== */
.news-detail .more-title{
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 14px;
}

.more-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.more-grid .news-card img{
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

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

@media (max-width: 1024px){
  .home-aside-floating{
    top: 0;
    margin-top: 12px;
  }
}

@media (max-width: 720px){
  .news-grid,
  .more-grid{
    grid-template-columns: 1fr;
  }
}