/* ===== 全局重置与基础样式 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #263238;
  background: #FAFAFA;
  line-height: 1.8;
  min-height: 100vh;
}
h1, h2, h3, h4, h5, h6 {
  font-family: "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
  font-weight: 700;
  line-height: 1.4;
  color: #1a237e;
}
a { color: #2196F3; text-decoration: none; transition: color .2s; }
a:hover { color: #1565C0; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ===== 配色变量 ===== */
:root {
  --primary: #2196F3;
  --primary-dark: #1565C0;
  --primary-light: #BBDEFB;
  --secondary: #ECEFF1;
  --accent: #F44336;
  --text-dark: #263238;
  --text-light: #546E7A;
  --bg-white: #FFFFFF;
  --bg-light: #FAFAFA;
  --bg-section: #F5F7FA;
  --border: #CFD8DC;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
}

/* ===== 容器 ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ===== 头部导航 ===== */
.site-header {
  background: var(--bg-white);
  border-bottom: 3px solid var(--primary);
  padding: 0;
  z-index: 100;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-area img { height: 40px; width: auto; }
.logo-area span {
  font-family: "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.header-contact {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* 桌面导航 */
.main-nav {
  background: var(--primary);
}
.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.main-nav li { position: relative; }
.main-nav a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background .2s;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--primary-dark);
  color: #fff;
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 16px;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 4px;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ===== Hero区域 ===== */
.hero {
  background: linear-gradient(135deg, #1a237e 0%, #2196F3 50%, #1565C0 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}
.hero h1 {
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 16px;
}
.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* ===== 模块通用 ===== */
.section {
  padding: 48px 0;
}
.section-alt {
  background: var(--bg-section);
}
.section-title {
  font-size: 1.6rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
}
.section-desc {
  color: var(--text-light);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

/* ===== 卡片 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 20px; }
.card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--primary-dark);
}
.card-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 12px;
}
.card-link {
  display: inline-block;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
}
.card-link:hover { color: var(--accent); }

/* ===== 地图模块 ===== */
.map-section { text-align: center; }
.map-section img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0 auto;
}
.map-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}
.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

/* ===== 新闻列表 ===== */
.news-list { list-style: none; }
.news-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.news-item:last-child { border-bottom: none; }
.news-item h3 {
  font-size: 1rem;
  color: var(--text-dark);
  font-family: "Source Han Sans SC", sans-serif;
  font-weight: 500;
}
.news-item h3 a:hover { color: var(--primary); }
.news-date {
  font-size: 0.8rem;
  color: var(--text-light);
  white-space: nowrap;
}
.news-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.75rem;
  margin-right: 8px;
}
.news-tag-red {
  background: #FFEBEE;
  color: var(--accent);
}

/* ===== 数据库入口 ===== */
.db-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.db-entry {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  padding: 16px;
  border-radius: 0 6px 6px 0;
  transition: border-color .2s, box-shadow .2s;
}
.db-entry:hover {
  border-left-color: var(--accent);
  box-shadow: var(--shadow);
}
.db-entry h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.db-entry p {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ===== FAQ/问答 ===== */
.faq-list {}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  padding: 16px 20px;
  background: var(--bg-white);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}
.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--primary);
  transition: transform .2s;
}
.faq-item.open .faq-question::after {
  content: "−";
}
.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.8;
}
.faq-item.open .faq-answer {
  padding: 16px 20px;
  max-height: 600px;
}

/* ===== 引用块 ===== */
blockquote, .legal-quote {
  border-left: 4px solid var(--primary);
  background: #E3F2FD;
  padding: 16px 20px;
  margin: 20px 0;
  font-style: italic;
  color: var(--text-dark);
  border-radius: 0 6px 6px 0;
}

/* ===== 文章内容 ===== */
.article-content {
  max-width: 860px;
  margin: 0 auto;
}
.article-content h1 { font-size: 1.8rem; margin-bottom: 16px; }
.article-content h2 { font-size: 1.4rem; margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.article-content h3 { font-size: 1.2rem; margin: 24px 0 10px; }
.article-content p { margin-bottom: 16px; text-align: justify; }
.article-content ul, .article-content ol {
  margin: 12px 0 16px 24px;
  list-style: disc;
}
.article-content li { margin-bottom: 6px; }
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
.article-content th, .article-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.9rem;
}
.article-content th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.article-content tr:nth-child(even) { background: var(--bg-section); }

/* ===== 法律条文高亮 ===== */
.law-article {
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: 6px;
  padding: 16px 20px;
  margin: 16px 0;
  position: relative;
}
.law-article::before {
  content: "§";
  position: absolute;
  top: 8px;
  left: -12px;
  background: var(--primary);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ===== 步骤指南 ===== */
.steps-list { counter-reset: step; }
.step-item {
  position: relative;
  padding: 20px 20px 20px 60px;
  margin-bottom: 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  counter-increment: step;
}
.step-item::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 20px;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.step-item h4 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--primary-dark);
}

/* ===== 警示框 ===== */
.alert {
  padding: 16px 20px;
  border-radius: 6px;
  margin: 20px 0;
  font-size: 0.9rem;
}
.alert-warning {
  background: #FFF3E0;
  border-left: 4px solid #FF9800;
  color: #E65100;
}
.alert-danger {
  background: #FFEBEE;
  border-left: 4px solid var(--accent);
  color: #B71C1C;
}
.alert-info {
  background: #E3F2FD;
  border-left: 4px solid var(--primary);
  color: var(--primary-dark);
}

/* ===== 侧边栏 ===== */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  padding: 32px 0;
}
.sidebar {}
.sidebar-widget {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
}
.sidebar-widget h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}
.sidebar-widget ul li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}
.sidebar-widget ul li:last-child { border-bottom: none; }

/* ===== 页脚 ===== */
.site-footer {
  background: #1a237e;
  color: #B0BEC5;
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: #B0BEC5; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 0.85rem; line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid #283593;
  padding-top: 20px;
  text-align: center;
  font-size: 0.8rem;
}
.footer-bottom p { margin-bottom: 4px; }

/* ===== APP下载页 ===== */
.app-hero {
  background: linear-gradient(135deg, #1565C0, #2196F3);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}
.app-hero h1 { color: #fff; margin-bottom: 16px; }
.download-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--primary-dark);
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform .2s, box-shadow .2s;
}
.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--primary-dark);
}

/* ===== 通用按钮 ===== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background .2s, transform .1s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ===== 标签 ===== */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 500;
}
.tag-blue { background: var(--primary-light); color: var(--primary-dark); }
.tag-red { background: #FFEBEE; color: var(--accent); }
.tag-green { background: #E8F5E9; color: #2E7D32; }

/* ===== 元信息 ===== */
.meta-info {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

/* ===== 法律条文弹窗 ===== */
.tooltip-trigger {
  position: relative;
  border-bottom: 1px dashed var(--primary);
  cursor: help;
}
.tooltip-trigger .tooltip-content {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1a237e;
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  width: 260px;
  z-index: 10;
  box-shadow: var(--shadow-lg);
  font-style: normal;
  line-height: 1.5;
}
.tooltip-trigger:hover .tooltip-content {
  display: block;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 1.6rem; }
  .section { padding: 32px 0; }
  .section-title { font-size: 1.3rem; }
  .card-grid { grid-template-columns: 1fr; }
  .page-layout {
    grid-template-columns: 1fr;
  }
  .sidebar { order: 2; }
  .db-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: block; }
  .main-nav ul {
    display: none;
    flex-direction: column;
  }
  .main-nav ul.open { display: flex; }
  .main-nav a { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .news-item { flex-direction: column; gap: 4px; }
  .download-btns { flex-direction: column; align-items: center; }
  .map-legend { gap: 12px; }
  .header-contact { display: none; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.3rem; }
  .db-grid { grid-template-columns: 1fr; }
  .container { padding: 0 12px; }
}
