/* 新闻页面样式 */

/* 主要内容区域 */
.main-content {
  padding-top: 70px;
}

/* 页面头部 */
.page-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
}

.page-header-content {
  max-width: 600px;
  margin: 0 auto;
}

.page-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* 面包屑导航 */
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0.8;
}

.breadcrumb a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
  opacity: 1;
}

.breadcrumb .separator {
  margin: 0 4px;
}

.breadcrumb .current {
  opacity: 1;
}

/* 新闻筛选区域 */
.news-filter-section {
  background: white;
  padding: 32px 0;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 70px;
  z-index: 100;
}

.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 12px 24px;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-secondary);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  min-height: 44px;
}

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

.filter-tab.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* 新闻列表区域 */
.news-list-section {
  padding: 48px 0 80px;
  background: var(--bg-secondary);
}

.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

/* 新闻卡片 */
.news-card {
  background: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.news-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

.news-card-category {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--primary-color);
  color: white;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  font-weight: 500;
}

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

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-tertiary);
}

.news-card-date::before {
  content: "📅";
  margin-right: 4px;
}

.news-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.read-more {
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: var(--primary-dark);
}

.read-more::after {
  content: " →";
  transition: transform 0.3s ease;
}

.news-card:hover .read-more::after {
  transform: translateX(4px);
}

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

.pagination-btn {
  padding: 12px 24px;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-primary);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  min-height: 44px;
}

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

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

.pagination-info {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 0 16px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-tertiary);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 18px;
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 14px;
  opacity: 0.7;
}

/* 加载状态 */
.loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-tertiary);
  font-size: 16px;
}

/* 新闻详情弹窗 */
.news-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.news-modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: var(--border-radius-lg);
  max-width: 800px;
  max-height: 90vh;
  width: 90%;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.news-modal.show .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  z-index: 1001;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.news-detail {
  padding: 40px;
}

.news-detail .news-header {
  margin-bottom: 30px;
}

.news-detail .news-category {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 6px 12px;
  border-radius: var(--border-radius);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.news-detail .news-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.3;
}

.news-detail .news-meta {
  display: flex;
  gap: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.news-detail .news-image {
  margin: 30px 0;
  text-align: center;
}

.news-detail .news-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

.news-detail .news-content {
  line-height: 1.8;
  color: var(--text-primary);
}

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

.news-detail .news-content p:last-child {
  margin-bottom: 0;
}

/* 演示按钮样式 */
.news-actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.demo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
  color: white;
}

.demo-btn span {
  font-size: 18px;
}

/* 移动端响应式 */
@media (max-width: 768px) {
  .main-content {
    padding-top: 60px;
  }
  
  .page-header {
    padding: 40px 0;
  }
  
  .page-title {
    font-size: 28px;
    margin-bottom: 12px;
  }
  
  .page-subtitle {
    font-size: 16px;
    margin-bottom: 20px;
  }
  
  .news-filter-section {
    padding: 24px 0;
    top: 60px;
  }
  
  .filter-tabs {
    gap: 6px;
  }
  
  .filter-tab {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .news-list-section {
    padding: 32px 0 60px;
  }
  
  .news-list {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .news-card-image {
    height: 200px;
  }
  
  .news-card-content {
    padding: 20px;
  }
  
  .news-card-title {
    font-size: 16px;
  }
  
  .news-card-excerpt {
    font-size: 13px;
  }
  
  .pagination {
    gap: 16px;
    margin-top: 32px;
  }
  
  .pagination-btn {
    padding: 10px 20px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding-top: 56px;
  }
  
  .page-header {
    padding: 32px 0;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .page-subtitle {
    font-size: 15px;
  }
  
  .news-filter-section {
    padding: 20px 0;
    top: 56px;
  }
  
  .filter-tab {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .news-list-section {
    padding: 24px 0 40px;
  }
  
  .news-list {
    gap: 20px;
  }
  
  .news-card-image {
    height: 180px;
  }
  
  .news-card-content {
    padding: 16px;
  }
  
  .news-card-title {
    font-size: 15px;
  }
  
  .news-card-excerpt {
    font-size: 12px;
    margin-bottom: 12px;
  }
  
  .news-card-meta {
    font-size: 12px;
    margin-bottom: 8px;
  }
  
  .read-more {
    font-size: 13px;
  }
  
  .pagination {
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
  }
  
  .pagination-info {
    order: -1;
  }

  /* 移动端弹窗适配 */
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .news-detail {
    padding: 20px;
  }

  .news-detail .news-title {
    font-size: 22px;
  }

  .news-detail .news-meta {
    flex-direction: column;
    gap: 8px;
  }

  .modal-close {
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .demo-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}
