/* ============================================================
   投票网站 全站样式
   移动优先：基础样式为窄屏编写，768px 以上追加桌面布局
   ============================================================ */

:root {
  --c-primary: #17307a;
  --c-primary-deep: #101f57;
  --c-accent: #12a5b8;
  --c-accent-soft: #e3f4f7;
  --c-bg: #f6f7fb;
  --c-card: #ffffff;
  --c-text: #2c303b;
  --c-text-light: #5d6373;
  --c-border: #e4e8f1;
  --c-shadow: 0 6px 22px rgba(23, 48, 122, 0.08);
  --radius: 12px;
  --max-width: 960px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.85;
  color: var(--c-text);
  background: var(--c-bg);
  word-break: break-word;
}

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

a {
  color: var(--c-primary);
  text-decoration: none;
}

/* ---------- 顶部品牌区 ---------- */
.site-header {
  background: linear-gradient(135deg, var(--c-primary-deep), var(--c-primary));
  color: #fff;
  padding: 14px 0 0;
}

.brand-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0;
  color: #fff;
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
}

.brand-name small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
  margin-left: 6px;
}

/* 右上角微信添加按钮 */
.header-wecom {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  color: var(--c-primary-deep);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  min-height: 36px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-wecom svg {
  width: 18px;
  height: 18px;
  fill: var(--c-accent);
}

.header-wecom:hover {
  background: var(--c-accent-soft);
  transform: translateY(-1px);
}

/* ---------- 主导航：窄屏横向滑动 ---------- */
.main-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 8px;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  padding: 12px 12px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.main-nav a:hover {
  color: #fff;
}

.main-nav a.active {
  color: #fff;
  font-weight: 700;
  border-bottom-color: var(--c-accent);
}

/* ---------- 主体容器 ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: 14px 0;
  font-size: 13px;
  color: var(--c-text-light);
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.breadcrumb li + li::before {
  content: "›";
  margin: 0 8px;
  color: #a2a8b8;
}

.breadcrumb a {
  color: var(--c-text-light);
}

.breadcrumb a:hover {
  color: var(--c-primary);
}

.breadcrumb [aria-current="page"] {
  color: var(--c-text);
}

/* ---------- 文章卡片 ---------- */
.article {
  background: var(--c-card);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 22px 18px 26px;
  margin-bottom: 24px;
}

.article h1 {
  font-size: 25px;
  line-height: 1.4;
  color: var(--c-primary-deep);
  margin: 0 0 14px;
  font-weight: 700;
}

.article h2 {
  font-size: 19px;
  line-height: 1.5;
  color: var(--c-primary-deep);
  margin: 30px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--c-accent);
  font-weight: 700;
}

.article h3 {
  font-size: 16px;
  color: var(--c-primary);
  margin: 20px 0 8px;
  font-weight: 700;
}

.article p {
  margin: 0 0 14px;
}

.article ul,
.article ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.article li {
  margin-bottom: 6px;
}

/* ---------- 配图 ---------- */
.article figure {
  margin: 20px 0;
}

.article figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.article figcaption {
  font-size: 12.5px;
  color: var(--c-text-light);
  margin-top: 8px;
  text-align: center;
}

/* ---------- 四卡片网格 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0 22px;
}

.feature-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px 12px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  border-color: var(--c-accent);
  transform: translateY(-3px);
  box-shadow: var(--c-shadow);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--c-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--c-primary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-primary-deep);
  line-height: 1.4;
}

.feature-desc {
  font-size: 12.5px;
  color: var(--c-text-light);
  line-height: 1.6;
  margin-top: 4px;
}

/* ---------- 转化按钮 ---------- */
.cta-block {
  background: var(--c-accent-soft);
  border: 1px solid #cfe8ee;
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  margin: 26px 0;
}

.cta-block p {
  margin: 0 0 12px;
  font-size: 14.5px;
  color: var(--c-primary-deep);
}

.btn-wecom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 28px;
  background: var(--c-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: 26px;
  transition: background 0.2s ease;
}

.btn-wecom:hover {
  background: #0e8a9b;
  color: #fff;
}

.inline-cta {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 流程步骤 ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 12px 12px 12px 52px;
  background: var(--c-bg);
  border-radius: 10px;
  margin-bottom: 10px;
  min-height: 48px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 场景卡片 ---------- */
.scene-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.scene-card {
  background: var(--c-bg);
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--c-border);
}

.scene-card h3 {
  margin-top: 0;
}

.scene-card p {
  margin-bottom: 0;
  font-size: 14px;
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  margin-bottom: 6px;
}

.faq-item p {
  color: var(--c-text-light);
  font-size: 14.5px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--c-primary-deep);
  color: rgba(255, 255, 255, 0.72);
  padding: 26px 0 30px;
  font-size: 13px;
}

.site-footer .container {
  text-align: center;
}

.footer-nav {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.82);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.site-footer p {
  margin: 6px 0;
}

/* ============================================================
   桌面端：768px 以上
   ============================================================ */
@media (min-width: 768px) {
  body {
    font-size: 16px;
  }

  .brand-name {
    font-size: 21px;
  }

  .main-nav {
    justify-content: space-between;
  }

  .main-nav a {
    padding: 14px 10px 16px;
    font-size: 15px;
  }

  .article {
    padding: 36px 40px 42px;
  }

  .article h1 {
    font-size: 30px;
  }

  .article h2 {
    font-size: 22px;
  }

  .article h3 {
    font-size: 17.5px;
  }

  .scene-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-wecom {
    padding: 8px 18px;
    font-size: 14px;
    min-height: 40px;
  }

  .header-wecom svg {
    width: 20px;
    height: 20px;
  }

  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .feature-card {
    padding: 24px 16px 22px;
  }

  .feature-icon {
    width: 54px;
    height: 54px;
  }

  .feature-title {
    font-size: 16px;
  }

  .feature-desc {
    font-size: 13px;
  }

  .cta-block {
    padding: 26px 24px;
  }
}

@media (min-width: 1024px) {
  .scene-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- 尊重减少动态效果偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
