/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #f5f6f7;
  color: #222;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  color: #d32f2f;
  letter-spacing: -0.5px;
}
.main-nav {
  display: flex;
  gap: 24px;
}
.main-nav a {
  font-size: 15px;
  color: #444;
  font-weight: 500;
  transition: color 0.2s;
}
.main-nav a:hover { color: #d32f2f; }

/* Main */
main.container { padding-top: 24px; padding-bottom: 48px; }

/* Featured */
.featured { margin-bottom: 24px; }
.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}
.featured-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.featured-image {
  min-height: 300px;
  background: #eee;
}
.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.badge {
  display: inline-block;
  background: #d32f2f;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
  width: fit-content;
}
.featured-content h1 {
  font-size: 26px;
  line-height: 1.35;
  margin-bottom: 12px;
  color: #111;
}
.excerpt {
  color: #666;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #888;
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; }
  .featured-content h1 { font-size: 20px; }
}

.news-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.card-image {
  aspect-ratio: 16/10;
  background: #eee;
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.news-card:hover .card-image img { transform: scale(1.03); }
.card-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 14px;
}
.card-body { padding: 16px; }
.card-body h2 {
  font-size: 16px;
  line-height: 1.45;
  margin-bottom: 8px;
  color: #222;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-excerpt {
  font-size: 13px;
  color: #777;
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
  padding: 20px 0;
}
.btn {
  display: inline-block;
  padding: 8px 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  transition: all 0.2s;
}
.btn:hover {
  border-color: #d32f2f;
  color: #d32f2f;
}
.page-info {
  font-size: 14px;
  color: #666;
}

/* Article Page */
.article-page {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.article-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}
.article-header h1 {
  font-size: 28px;
  line-height: 1.4;
  margin-bottom: 14px;
  color: #111;
}
.article-meta {
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: #888;
}
.author { color: #d32f2f; font-weight: 500; }

.article-hero {
  margin-bottom: 24px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}
.article-hero img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

.article-content {
  font-size: 17px;
  line-height: 1.85;
  color: #333;
}
.article-content p {
  margin-bottom: 1.2em;
}
.article-content img {
  margin: 16px auto;
  border-radius: 6px;
}
.article-content a {
  color: #d32f2f;
  text-decoration: underline;
}

.article-source {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #999;
}

/* Related */
.related-section {
  margin-top: 32px;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.section-title {
  font-size: 18px;
  margin-bottom: 16px;
  padding-left: 10px;
  border-left: 4px solid #d32f2f;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 768px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
.related-card {
  display: block;
}
.related-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
}
.related-card h4 {
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.related-date {
  font-size: 12px;
  color: #999;
}

/* Error */
.error-page {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
  border-radius: 12px;
}
.error-page h1 {
  font-size: 48px;
  margin-bottom: 16px;
  color: #d32f2f;
}
.error-page p {
  color: #666;
  margin-bottom: 24px;
}

/* Footer */
.site-footer {
  background: #2a2a2a;
  color: #999;
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
}
.site-footer p { margin-bottom: 4px; }
.footer-meta { color: #666; font-size: 12px; }
