:root {
  --bg: #f4f6f8;
  --ink: #1a1a1a;
  --muted: #666;
  --meta: #999;
  --red: #d9232e;
  --white: #fff;
  --line: #e8ebef;
  --footer: #1a1a1a;
  --max: 1240px;
  --main: 840px;
  --side: 320px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

/* Top bar */
.top-bar {
  height: 36px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.top-bar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-left { display: flex; gap: 14px; align-items: center; }

.lang-btn { color: var(--muted); }
.lang-btn.active { color: var(--red); font-weight: 600; }

.search-btn {
  border: 0;
  background: transparent;
  color: var(--ink);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Header */
.main-header {
  background: #fff;
  height: 64px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  position: sticky;
  top: 0;
  z-index: 50;
}

.main-nav {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-img {
  height: 48px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  object-position: left center;
}

.slogan {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-links a {
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 22px;
  width: 40px;
  height: 40px;
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 80;
}

.mobile-menu.open { display: block; }

.mobile-panel {
  width: min(280px, 82vw);
  height: 100%;
  background: #fff;
  padding: 20px;
  margin-left: auto;
}

.mobile-panel .close {
  border: 0;
  background: transparent;
  font-size: 24px;
  float: right;
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

/* Hero */
.hero-wrap {
  padding: 20px 0 8px;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #1a1a1a;
  height: 380px;
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform .45s ease;
  will-change: transform;
}

.hero-slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .45;
}

.hero-slide-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 60px 50px;
  color: #fff;
  text-align: left;
}

.hero-tag {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
}

.hero-title {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.35;
  font-weight: 800;
}

.hero-desc {
  margin: 0 0 22px;
  font-size: 15px;
  color: rgba(255,255,255,.88);
  line-height: 1.7;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: #fff;
  border-radius: 8px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 600;
}

.hero-btn:hover { filter: brightness(1.05); }

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}

.hero-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.45);
  padding: 0;
}

.hero-dots button.active { background: var(--red); }

/* Layout */
.page-body { padding: 20px 0 48px; }

.main-grid {
  display: grid;
  grid-template-columns: var(--main) var(--side);
  gap: 40px;
  align-items: start;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h1,
.section-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header h1::before,
.section-header h2::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--red);
  border-radius: 2px;
}

.see-more {
  color: var(--muted);
  font-size: 13px;
}

.see-more:hover { color: var(--red); }

/* News list */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.news-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  min-height: 140px;
}

.news-thumb {
  position: relative;
  display: block;
  background-size: cover;
  background-position: center;
  min-height: 140px;
}

.news-thumb-label {
  position: absolute;
  left: 8px;
  top: 8px;
  background: #fff;
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}

.news-content {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.news-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.news-title a:hover { color: var(--red); }

.news-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-meta {
  margin-top: 10px;
  color: var(--meta);
  font-size: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.side-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f7f8fa;
  border-radius: 8px;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 600;
}

.cat-item:hover { background: #f0f2f5; color: var(--red); }

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud a {
  background: #f7f8fa;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
}

.tag-cloud a:hover {
  background: rgba(217,35,46,.08);
  color: var(--red);
}

.side-ad {
  padding: 0;
  overflow: hidden;
}

.side-ad-media {
  display: block;
  background: #111;
}

.side-ad-media img {
  width: 100%;
  height: auto;
  display: block;
}

.side-ad-body {
  padding: 14px 14px 16px;
}

.side-ad-body h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.side-ad-body p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.side-ad-body strong { color: var(--red); }

.side-ad-extra {
  margin-top: 4px !important;
  color: var(--ink) !important;
  font-weight: 600;
}

.side-ad-body ol {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.side-ad-body li { margin-bottom: 4px; }

.side-ad-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--red);
  color: #fff !important;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 700;
}

.side-ad-btn:hover { filter: brightness(1.06); }

/* Footer */
.site-footer {
  background: var(--footer);
  color: #999;
  padding: 48px 0 24px;
  margin-top: 20px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-brand .logo-text {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.footer-brand p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.7;
}

.social { display: flex; gap: 10px; }
.social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2a2a2a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 12px;
}

.footer-col h4 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 15px;
}

.footer-col a {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
}

.footer-col a:hover { color: #fff; }

.footer-copy {
  border-top: 1px solid #2a2a2a;
  padding-top: 16px;
  font-size: 12px;
  color: #666;
}

/* Article */
.article-page {
  background: #fff;
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.article-cat {
  display: inline-block;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.article-page h1 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.35;
}

.article-meta {
  color: var(--meta);
  font-size: 13px;
  margin-bottom: 18px;
}

.article-cover {
  width: 100%;
  border-radius: 10px;
  margin: 0 0 22px;
  object-fit: cover;
  max-height: 420px;
}

.article-body {
  font-size: 16px;
  line-height: 1.85;
  color: #333;
}

.article-body p { margin: 0 0 16px; }
.article-body h2 {
  margin: 28px 0 12px;
  font-size: 22px;
}
.article-body img {
  width: 100%;
  border-radius: 8px;
  margin: 8px 0 18px;
}

/* Search / list extras */
.page-title-bar {
  margin-bottom: 18px;
}

.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.search-box input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 15px;
  background: #fff;
}

.search-box button {
  border: 0;
  background: var(--red);
  color: #fff;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 600;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
}

.pager-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--ink);
}

.pager-btn:hover { border-color: var(--red); color: var(--red); }

.pager-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.pager-btn.disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

.pager-info {
  margin-left: 6px;
  font-size: 13px;
  color: var(--muted);
}

#listTip {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
}

.empty {
  background: #fff;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.breadcrumb {
  font-size: 13px;
  color: var(--meta);
  margin-bottom: 14px;
}

.breadcrumb a:hover { color: var(--red); }

/* Mobile page special */
.mobile-hero {
  padding: 16px 0;
}

@media (max-width: 1100px) {
  .main-grid { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .hero-slider { height: 320px; }
  .hero-slide-content { padding: 40px 28px; }
  .hero-title { font-size: 22px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-links,
  .slogan { display: none; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .hero-slider { height: auto; min-height: 300px; border-radius: 10px; }
  .hero-slide { min-height: 300px; }
  .hero-slide-content { padding: 28px 20px 48px; max-width: 100%; }
  .hero-title { font-size: 20px; }
  .news-card { grid-template-columns: 120px 1fr; min-height: 110px; }
  .news-thumb { min-height: 110px; }
  .news-title { font-size: 15px; }
  .news-excerpt { -webkit-line-clamp: 2; font-size: 12px; }
  .footer-main { grid-template-columns: 1fr; gap: 20px; }
  .article-page { padding: 18px; }
  .article-page h1 { font-size: 22px; }
}
