@charset "UTF-8";

/* P5 分类标签前置 */
.news-section {
  padding: 60px 0;
}

.news-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
}

/* 分类标签侧边栏 */
.news-tags-bar {
  background: var(--light);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--border);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.news-tags-bar h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--dark);
}

.tag-list {
  list-style: none;
}

.tag-list li {
  margin-bottom: 4px;
}

.tag-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  transition: all 0.2s ease;
}

.tag-list a:hover,
.tag-list a.active {
  background: var(--dark);
  color: var(--primary);
}

.tag-list a span {
  font-size: 12px;
  color: var(--text-light);
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 8px;
  border-radius: 10px;
}

.tag-list a:hover span,
.tag-list a.active span {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.15);
}

/* 新闻列表 */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.news-item:hover {
  box-shadow: 0 4px 16px var(--shadow);
  border-color: transparent;
}

.news-item-date {
  text-align: center;
  min-width: 60px;
}

.news-item-date .day {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1;
}

.news-item-date .month {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.news-item-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-item-body p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag-pill {
  font-size: 12px;
  padding: 3px 10px;
  background: var(--light);
  border-radius: 4px;
  color: var(--secondary);
}

.news-item-arrow {
  font-size: 20px;
  color: var(--border);
  transition: color 0.3s ease;
}

.news-item:hover .news-item-arrow {
  color: var(--dark);
}

@media (max-width: 1024px) {
  .news-layout {
    grid-template-columns: 1fr;
  }

  .news-tags-bar {
    position: static;
  }

  .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tag-list li {
    margin: 0;
  }
}

@media (max-width: 768px) {
  .news-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .news-item-arrow {
    display: none;
  }
}
