/**
 * 新闻动态页面样式
 */

/* 内容页导航栏固定白色背景 - body作为顶层容器 */
body.news-feed-page #nav-bar {
  background-color: #fff !important;
}
body.news-feed-page #nav-bar a {
  color: #333 !important;
}
body.news-feed-page #nav-bar .login-about a {
  color: #003f99 !important;
}

/* 公共字体 */
#newsFeed { font-family: PingFang SC, Microsoft YaHei, sans-serif; }

/* 顶部标题 */
#newsFeed .l1Title {
  padding: 20px 200px;
  color: #fff;
  font-weight: bold;
  font-size: 24px;
  background: linear-gradient(90deg, #1c5cf2, #90c8fa);
  letter-spacing: 5px;
}

/* 页面容器 */
#newsFeed {
  width: 100%;
  margin-top: 80px;
  background-color: #fff;
  min-height: calc(100vh - 80px);
}

#newsFeed .container {
  padding: 40px 20px;
  width: 1170px;
  margin: 0 auto;
}

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

/* 新闻卡片 */
.news-card {
  display: flex;
  background: #fff;
  border: 1px solid #eaeef5;
  padding: 24px;
  gap: 20px;
  transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
}

.news-card:hover {
  box-shadow: 0 15px 38px rgba(0, 0, 0, 0.18);
  transform: translate3d(0, -2px, 0);
}

.news-card-left {
  flex-shrink: 0;
  width: 180px;
  height: 120px;
}

.news-placeholder-img {
  width: 180px;
  height: 120px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-cover-img {
  width: 180px;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
}

.placeholder-icon { width: 100%; height: 100%; }

.news-card-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.news-date {
  font-size: 14px;
  color: #9CA3AF;
}

.news-title {
  font-size: 18px;
  font-weight: bold;
  color: #1F2937;
  line-height: 1.4;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-summary {
  font-size: 14px;
  color: #6B7280;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-more-link {
  font-size: 14px;
  color: #2563EB;
  text-decoration: none;
  margin-top: 4px;
}

.news-more-link:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

/* 分页器 */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  padding: 40px 0 60px;
}

.pagination-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  background: #fff;
  color: #6B7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
  border-color: #2563EB;
  color: #2563EB;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-pages {
  display: flex;
  gap: 4px;
}

.page-num {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  background: #fff;
  color: #6B7280;
  font-size: 14px;
  cursor: pointer;
}

.page-num:hover {
  border-color: #2563EB;
  color: #2563EB;
}

.page-num.active {
  background: #2563EB;
  border-color: #2563EB;
  color: #fff;
}

.pagination-size {
  margin-left: 16px;
}

.size-select {
  width: 90px;
  height: 32px;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  background: #fff;
  color: #1F2937;
  font-size: 14px;
  padding: 0 8px;
  cursor: pointer;
}

.size-select:hover, .size-select:focus {
  border-color: #2563EB;
}

.pagination-jump {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

.jump-text {
  font-size: 14px;
  color: #6B7280;
}

.jump-input {
  width: 50px;
  height: 32px;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  color: #1F2937;
}

.jump-input:hover, .jump-input:focus {
  border-color: #2563EB;
}

.jump-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #2563EB;
  border-radius: 4px;
  background: #fff;
  color: #2563EB;
  font-size: 14px;
  cursor: pointer;
}

.jump-btn:hover {
  background: #2563EB;
  color: #fff;
}

/* 状态样式 */
.news-loading, .news-empty {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 0;
  font-size: 14px;
}

.news-loading { color: #6B7280; }
.news-empty { color: #9CA3AF; }

.news-error {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 0;
  gap: 16px;
  color: #EF4444;
  font-size: 14px;
}

.news-error button {
  padding: 8px 16px;
  border: 1px solid #2563EB;
  border-radius: 4px;
  background: #fff;
  color: #2563EB;
  cursor: pointer;
}

.news-error button:hover {
  background: #2563EB;
  color: #fff;
}

/* 响应式 */
@media (max-width: 768px) {
  #newsFeed .container { width: 100%; padding: 20px 16px; }
  .news-card { flex-direction: column; padding: 16px; gap: 16px; }
  .news-card-left, .news-placeholder-img, .news-cover-img { width: 100%; height: 120px; }
  .pagination-container { flex-wrap: wrap; gap: 8px; }
  .pagination-jump { margin-left: 0; margin-top: 8px; }
}

@media (max-width: 480px) {
  #newsFeed .l1Title { padding: 15px 20px; font-size: 20px; letter-spacing: 2px; }
  .news-placeholder-img, .news-cover-img { height: 100px; }
  .news-title { font-size: 16px; }
  .news-summary { font-size: 13px; }
  .page-num { min-width: 28px; height: 28px; font-size: 13px; }
  .pagination-btn { width: 28px; height: 28px; }
  .size-select { width: 80px; height: 28px; font-size: 13px; }
  .jump-input { width: 40px; height: 28px; font-size: 13px; }
  .jump-btn { height: 28px; font-size: 13px; }
  .jump-text { font-size: 13px; }
}