/* ===== CSS Variables ===== */
:root {
  --primary: #1a3a6b;
  --primary-light: #2a5a9b;
  --primary-dark: #0f2447;
  --accent: #c41e3a;
  --accent-light: #e8354f;
  --gold: #d4a853;
  --bg: #f5f7fa;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(26, 58, 107, 0.08);
  --shadow-hover: 0 8px 32px rgba(26, 58, 107, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.logo-group:hover { color: inherit; }

.logo-text {
  min-width: 0;
}

.logo-emblem {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--gold), #f0c878);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  line-height: 1.3;
}

.logo-text p {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  font-size: 0.85rem;
}

.lang-item {
  padding: 4px 10px;
  border-radius: 14px;
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  transition: all var(--transition);
  line-height: 1.2;
}

.lang-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.lang-item.active {
  background: rgba(255,255,255,0.95);
  color: var(--primary);
  font-weight: 600;
  cursor: default;
}

.lang-item[role="button"] {
  cursor: pointer;
}

.lang-notice {
  background: #fff8e6;
  border: 1px solid #f0d78c;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: #8a6d1a;
  line-height: 1.6;
}

.lang-sep {
  color: rgba(255,255,255,0.35);
  font-size: 0.8rem;
  user-select: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1e4d8c 100%);
  color: #fff;
  padding: 60px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='rgba(255,255,255,0.03)' d='M0,192L48,176C96,160,192,128,288,128C384,128,480,160,576,165.3C672,171,768,149,864,138.7C960,128,1056,128,1152,138.7C1248,149,1344,171,1392,181.3L1440,192L1440,320L0,320Z'/%3E%3C/svg%3E") bottom center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(196,30,58,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

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

.hero-badge {
  display: inline-block;
  background: rgba(212,168,83,0.2);
  border: 1px solid rgba(212,168,83,0.4);
  color: var(--gold);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.hero h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
}

.hero p {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: rgba(255,255,255,0.85);
  line-height: 1.8;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }

.stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}

/* ===== Quick Links ===== */
.quick-links {
  display: flex;
  gap: 16px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}

.quick-link-card {
  flex: 1;
  min-width: 200px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.quick-link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.quick-link-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.quick-link-icon.blue { background: #e8f0fe; }
.quick-link-icon.red { background: #fde8ec; }
.quick-link-icon.gold { background: #fef6e4; }
.quick-link-icon.green { background: #e6f7ed; }

.quick-link-text h4 {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 2px;
}

.quick-link-text span {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ===== Section ===== */
.section { padding: 48px 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.section-title::before {
  content: "";
  width: 4px;
  height: 24px;
  background: linear-gradient(to bottom, var(--accent), var(--gold));
  border-radius: 2px;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ===== Service Grid ===== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.service-card-top {
  padding: 24px 24px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.service-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.service-card .card-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.service-card-bottom {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.service-card-bottom span {
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 500;
}

.arrow-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 0.8rem;
}

.service-card:hover .arrow-icon {
  background: var(--primary);
  color: #fff;
}

/* Card color themes */
.theme-1 .service-card-icon { background: linear-gradient(135deg, #e8f0fe, #c5d9f7); }
.theme-2 .service-card-icon { background: linear-gradient(135deg, #e0ecff, #b3d4ff); }
.theme-3 .service-card-icon { background: linear-gradient(135deg, #e6f4fd, #b8e0f7); }
.theme-4 .service-card-icon { background: linear-gradient(135deg, #e8f5f0, #b8e6d0); }
.theme-5 .service-card-icon { background: linear-gradient(135deg, #fef0f3, #f5c6d0); }
.theme-6 .service-card-icon { background: linear-gradient(135deg, #f3eeff, #d4c4f7); }

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb .sep { margin: 0 8px; color: var(--border); }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ===== List Page ===== */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  padding: 24px 0 48px;
}

.content-main {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.content-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  color: #fff;
}

.content-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
}

.content-header p {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 4px;
}

.article-list { list-style: none; }

.article-list li {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.article-list li:last-child { border-bottom: none; }

.article-list li:hover { background: #f8fafc; }

.article-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  gap: 16px;
  color: var(--text);
}

.article-list a:hover { color: var(--primary-light); }

.article-list .article-title {
  flex: 1;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-list .article-title::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.article-list .article-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.list-footer {
  padding: 16px 28px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

/* ===== Sidebar ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.sidebar-card-header {
  padding: 16px 20px;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
}

.sidebar-nav { list-style: none; }

.sidebar-nav li a {
  display: block;
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

.sidebar-nav li:last-child a { border-bottom: none; }

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: #f0f5ff;
  color: var(--primary);
  padding-left: 24px;
}

.sidebar-nav li a.active {
  border-left: 3px solid var(--primary);
  font-weight: 500;
}

/* ===== Detail Page ===== */
.detail-container {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 40px;
  margin-bottom: 32px;
}

.detail-page {
  padding-bottom: 64px;
}

.detail-title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.5;
}

.detail-meta {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.detail-meta span { margin: 0 12px; }

.detail-content {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text);
}

.detail-content p { margin-bottom: 12px; text-indent: 2em; }

.detail-content p[style*="text-align: center"],
.detail-content p[style*="text-align:center"] { text-indent: 0; text-align: center; }

.detail-content p[style*="text-align: right"],
.detail-content p[style*="text-align:right"] { text-indent: 0; text-align: right; }

.detail-content strong { font-weight: 600; }

.detail-content img { margin: 16px auto; border-radius: var(--radius-sm); }

.detail-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.detail-content table td,
.detail-content table th {
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 0.9rem;
}

.detail-content table th {
  background: #f0f5ff;
  font-weight: 600;
}

.detail-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
  margin-bottom: 24px;
  padding-top: 24px;
  padding-bottom: 8px;
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-light);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: #f0f5ff;
  color: var(--primary);
}

.btn-service {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  box-shadow: 0 2px 8px rgba(196, 30, 58, 0.25);
}

.btn-service:hover {
  background: linear-gradient(135deg, var(--accent-light), #f04a62);
  color: #fff;
  box-shadow: 0 4px 16px rgba(196, 30, 58, 0.35);
  transform: translateY(-1px);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  margin-top: auto;
  padding: 40px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.8;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.footer-col ul { list-style: none; }

.footer-col li {
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.footer-col a { color: rgba(255,255,255,0.7); }
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.8rem;
}

.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: var(--gold); }

/* ===== Icon Map (SVG inline via CSS) ===== */
.icon { display: inline-block; width: 1.5em; text-align: center; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: auto; }

  .site-header .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .header-inner {
    height: auto;
    min-height: 56px;
    padding: 10px 0;
    align-items: center;
    gap: 10px;
  }

  .logo-group { gap: 10px; }

  .logo-emblem {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .logo-text h1 {
    font-size: 0.92rem;
    letter-spacing: 0;
    line-height: 1.35;
  }

  .logo-text .logo-subtitle { display: none; }

  .lang-switch {
    padding: 3px 4px;
    flex-shrink: 0;
  }

  .lang-item {
    padding: 4px 8px;
    font-size: 0.78rem;
  }

  .lang-sep { font-size: 0.72rem; }

  .menu-toggle { display: block; }

  .hero { padding: 40px 0 60px; }

  .quick-links { margin-top: -30px; }

  .quick-link-card { min-width: 100%; }

  .service-grid { grid-template-columns: 1fr; }

  .service-card-top {
    align-items: center;
    text-align: center;
  }

  .detail-container { padding: 24px 16px; }

  .article-list a {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
  }

  .content-header { padding: 18px 16px; }

  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 8px 0;
    gap: 8px;
  }

  .logo-emblem {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .logo-text h1 {
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .lang-item {
    padding: 3px 6px;
    font-size: 0.72rem;
  }

  .hero-stats { gap: 20px; }
  .stat-num { font-size: 1.4rem; }
  .section-header { flex-direction: column; align-items: flex-start; }
}

/* ===== Loading ===== */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.loading::after {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }
