/* ============================================
   新闻页面样式
   ============================================ */

/* 页面标题区 */
.page-hero {
  position: relative;
  padding: calc(var(--header-height) + 40px) 0 40px;
  background: var(--bg-secondary);
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 30% 50%, rgba(14, 165, 233, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
}

.page-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg-secondary) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.page-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 16px;
}

.page-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
}

.page-desc {
  font-size: 18px;
  color: var(--text-secondary);
}

/* 新闻列表区 */
.section-news-list {
  background: var(--bg-primary);
  padding: 60px 0 120px;
}

/* 筛选栏 */
.filter-bar {
  margin-bottom: 40px;
}

.filter-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.filter-tab.active {
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary);
}

/* 新闻网格 */
.news-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-normal);
  cursor: pointer;
}

.news-item:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.news-item-image {
  aspect-ratio: 16/9;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.news-item-content {
  padding: 24px;
}

.news-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.news-item-date {
  font-size: 13px;
  color: var(--text-muted);
}

.news-item-type {
  padding: 2px 10px;
  font-size: 12px;
  color: var(--primary-light);
  background: rgba(14, 165, 233, 0.1);
  border-radius: 100px;
}

.news-item-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.news-item-author {
  font-size: 13px;
  color: var(--text-muted);
}

.news-item-views {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.page-btn.active {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
}

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

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.show {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10;
}

.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.modal-body {
  padding: 40px;
  overflow-y: auto;
  max-height: 90vh;
}

/* 新闻详情 */
.news-detail-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.news-detail-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
}

.news-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.news-detail-meta span {
  font-size: 14px;
  color: var(--text-secondary);
}

.news-detail-content {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-secondary);
}

.news-detail-content p {
  margin-bottom: 16px;
}

.news-detail-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 24px 0;
}

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

@media (max-width: 768px) {
  .page-title {
    font-size: 36px;
  }
  
  .filter-tabs {
    gap: 8px;
  }
  
  .filter-tab {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .news-list-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-body {
    padding: 24px;
  }
  
  .news-detail-title {
    font-size: 22px;
  }
}
