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

/* Hero */
.news-hero {
  padding-top: 100px;
  background: var(--tech-blue);
  min-height: 350px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.news-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

.news-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 150%;
  background: radial-gradient(ellipse, rgba(0, 212, 170, 0.15) 0%, transparent 70%);
}

.news-hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.news-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-sm);
}

.news-hero h1 span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.news-hero p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.125rem;
}

/* 新闻列表 */
.news-section {
  padding: var(--space-xl) 0 var(--space-2xl);
  background: var(--bg-light);
}

.news-filter {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border: 2px solid var(--border);
  background: white;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.3s;
}

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

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

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.news-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 102, 255, 0.1);
  border-color: rgba(0, 212, 170, 0.3);
}

.news-img {
  position: relative;
  height: 180px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc, #e8f4f0);
}

.news-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  padding: 8px;
  box-sizing: border-box;
}

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

.news-category {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: rgba(0, 212, 170, 0.9);
  color: var(--tech-blue);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.news-content {
  padding: var(--space-md);
}

.news-content h3 {
  font-size: 1.0625rem;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.news-content h3 a {
  color: var(--text-dark);
  transition: color 0.3s;
}

.news-content h3 a:hover {
  color: var(--primary);
}

.news-content p {
  font-size: 0.875rem;
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.news-meta .date::before {
  content: '📅 ';
}

.news-meta .views::before {
  content: '👁 ';
}

.loading,
.no-news {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-gray);
}

.api-tip {
  text-align: center;
  padding: var(--space-md);
  color: var(--text-light);
  font-size: 0.875rem;
}

/* 分页 */
.news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
}

.page-btn {
  padding: 8px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.3s;
}

.page-btn:hover {
  background: var(--primary-dark);
}

.page-info {
  color: var(--text-gray);
  font-size: 0.9375rem;
}

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

@media (max-width: 768px) {
  .news-hero {
    min-height: 250px;
    padding: 100px 0 50px;
  }

  .news-hero h1 {
    font-size: 1.75rem;
  }

  .news-hero p {
    font-size: 1rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .news-filter {
    gap: var(--space-xs);
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.875rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .news-img {
    height: 160px;
  }

  .news-content {
    padding: var(--space-sm);
  }

  .news-content h3 {
    font-size: 1rem;
  }

  .news-content p {
    font-size: 0.8125rem;
    -webkit-line-clamp: 2;
  }

  .detail-header {
    padding: 20px;
  }

  .detail-header h1 {
    font-size: 1.5rem;
  }

  .detail-content {
    padding: 20px;
  }

  .detail-content p {
    font-size: 0.9375rem;
  }

  .related-list {
    grid-template-columns: 1fr;
  }
}