/* 新闻动态 · 资讯编辑风格 */

/* Hero */
.news-hero {
  position: relative;
  padding: calc(var(--header-h) + 40px) 0 48px;
  overflow: hidden;
}

.news-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--hero-bg);
  pointer-events: none;
}

.news-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at center, rgba(0, 166, 169, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, black 10%, transparent 75%);
}

.news-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
}

.news-hero-glow--1 {
  width: 420px;
  height: 420px;
  top: -12%;
  right: 5%;
  background: radial-gradient(circle, rgba(0, 204, 197, 0.2), transparent 68%);
}

.news-hero-glow--2 {
  width: 320px;
  height: 320px;
  bottom: 0;
  left: -8%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.16), transparent 70%);
}

.news-hero-lines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 80px,
    rgba(0, 166, 169, 0.04) 80px,
    rgba(0, 166, 169, 0.04) 81px
  );
  mask-image: linear-gradient(180deg, black 30%, transparent 100%);
}

.news-hero-inner { position: relative; z-index: 1; }

.news-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.news-breadcrumb a:hover { color: var(--brand-primary); }
.news-breadcrumb span:not([aria-current]) { opacity: 0.5; }
.news-breadcrumb [aria-current="page"] { color: var(--text-secondary); }

.news-hero-title {
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 8px 0 12px;
}

.news-hero-lead {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

/* Live ticker */
.news-ticker {
  margin-top: 28px;
  max-width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.news-ticker-track {
  display: flex;
  gap: 32px;
  width: max-content;
  animation: news-ticker-scroll 42s linear infinite;
}

.news-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.news-cat--sm {
  font-size: 10px;
  padding: 2px 8px;
}

@keyframes news-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .news-ticker-track { animation: none; flex-wrap: wrap; width: auto; }
}

/* Category badges */
.news-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.news-cat--product {
  color: #007a7d;
  background: rgba(0, 166, 169, 0.12);
  border: 1px solid rgba(0, 166, 169, 0.25);
}

.news-cat--event,
.news-cat--tech {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.22);
}

.news-cat--company,
.news-cat--security {
  color: #c96f12;
  background: rgba(232, 136, 58, 0.12);
  border: 1px solid rgba(232, 136, 58, 0.28);
}

.news-cat--industry {
  color: #6d28d9;
  background: rgba(109, 40, 217, 0.1);
  border: 1px solid rgba(109, 40, 217, 0.22);
}

[data-theme="dark"] .news-cat--product { color: #5eead4; }
[data-theme="dark"] .news-cat--event,
[data-theme="dark"] .news-cat--tech { color: #93c5fd; }
[data-theme="dark"] .news-cat--company,
[data-theme="dark"] .news-cat--security { color: #fdba74; }
[data-theme="dark"] .news-cat--industry { color: #c4b5fd; }

/* Spotlight / cards */
.news-spotlight { margin-top: 36px; }

.news-card {
  display: grid;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.news-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  opacity: 0;
  transition: opacity var(--transition);
}

.news-card[data-category="product"]::before { background: var(--brand-primary); }
.news-card[data-category="tech"]::before { background: #2563eb; }
.news-card[data-category="security"]::before { background: #e8883a; }
.news-card[data-category="industry"]::before { background: #6d28d9; }

.news-card:hover::before { opacity: 1; }

.news-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.news-card--featured {
  grid-template-columns: 1.15fr 1fr;
  min-height: 320px;
}

.news-card-cover {
  position: relative;
  overflow: hidden;
  background: var(--bg-elevated);
  min-height: 180px;
}

.news-card--featured .news-card-cover { min-height: 100%; }

.news-card-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-cover-placeholder {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(0, 166, 169, 0.08), rgba(99, 102, 241, 0.06)),
    var(--bg-elevated);
}

.news-card-cover-placeholder--lg { min-height: 280px; }

.news-card-cover-placeholder img { filter: var(--icon-filter); opacity: 0.45; }

.news-card-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
}

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

.news-card-meta time {
  font-size: 12px;
  color: var(--text-muted);
}

.news-card-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
}

.news-card--featured .news-card-title {
  font-size: clamp(20px, 2.5vw, 26px);
}

.news-card-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-primary);
}

.news-card-more img { filter: var(--icon-filter); transition: transform var(--transition); }
.news-card:hover .news-card-more img { transform: translateX(4px); }

/* Toolbar & grid */
.news-section { padding-top: 48px; }

.news-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.news-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-filter-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
}

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

.news-filter-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-deep));
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(0, 166, 169, 0.25);
}

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

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.news-grid .news-card {
  grid-template-columns: 1fr;
}

.news-grid .news-card-cover { aspect-ratio: 16 / 10; min-height: 0; }

.news-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

/* Article detail */
.news-article-hero {
  position: relative;
  padding: calc(var(--header-h) + 40px) 0 32px;
  overflow: hidden;
}

.news-article-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--hero-bg);
  pointer-events: none;
}

.news-article-hero-bg .news-hero-grid,
.news-article-hero-bg .news-hero-glow { position: absolute; inset: 0; }
.news-article-hero-bg .news-hero-glow { inset: auto; }

.news-article-hero-inner { position: relative; z-index: 1; }

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

.news-article-meta time,
.news-read-time {
  font-size: 13px;
  color: var(--text-muted);
}

.news-article-title {
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 820px;
  margin-bottom: 16px;
}

.news-article-deck {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 720px;
  margin: 0;
}

.news-article-cover-wrap { margin-bottom: 40px; }

.news-article-cover {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.news-cover-slot {
  position: absolute;
  right: 16px;
  bottom: 16px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px dashed rgba(0, 166, 169, 0.25);
  opacity: 0.9;
}

.news-article-body { max-width: 720px; margin: 0 auto 64px; }

.news-prose img,
.news-prose .rich-text-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
  border-radius: 12px;
}

.news-prose figure {
  margin: 1.5em 0;
}

.news-prose figcaption {
  margin-top: 0.5em;
  font-size: 0.875em;
  color: var(--muted, #64748b);
  text-align: center;
}

.news-prose {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-secondary);
}

.news-prose p { margin: 0 0 1.25em; }
.news-prose p:last-child { margin-bottom: 0; }

.news-article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.news-related {
  background: var(--bg-elevated);
  padding-bottom: 80px;
}

.news-related-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
}

.news-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.news-related-card {
  display: block;
  padding: 22px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.news-related-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.news-related-card h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  margin: 10px 0 8px;
}

.news-related-card time {
  font-size: 12px;
  color: var(--text-muted);
}

.news-not-found {
  padding: calc(var(--header-h) + 80px) 0 120px;
  text-align: center;
}

.news-not-found a { color: var(--brand-primary); }

/* Responsive */
@media (max-width: 1024px) {
  .news-card--featured { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-toolbar { flex-direction: column; align-items: flex-start; }
  .news-filter { width: 100%; }
  .news-article-deck { font-size: 16px; }
  .news-prose { font-size: 16px; }
}
