/* ============================================================
   米知云内容分享网站 · 全局样式
   视觉参考 zhiyanmz.com 官网：浅色空气感、淡紫蓝渐变 Hero、
   近黑标题、亮蓝色主按钮、白色圆角卡片
   ============================================================ */

:root {
  /* —— 官网风格色板 —— */
  --brand: #2e7cf6;        /* 亮蓝：主按钮/强调 */
  --brand-2: #1e63e0;      /* 深一档：按钮 hover */
  --brand-deep: #1d5fd6;   /* 链接/强调文字 */
  --brand-ink: #16181d;    /* 标题近黑 */
  --navy: #16181d;         /* 兼容别名 */
  --brand-dark: #1e63e0;   /* 兼容别名 */
  --yellow: #f5c518;       /* 品牌明黄（备用） */
  --yellow-soft: #fff2c2;
  --accent: #2e7cf6;       /* 兼容别名 */
  --ink: #23262b;          /* 正文主色 */
  --ink-2: #3d434c;        /* 正文次级 */
  --muted: #6b7280;        /* 辅助说明 */
  --line: #e8edf4;         /* 分隔线/描边 */
  --bg: #ffffff;
  --bg-soft: #f5f8fd;      /* 浅底分区 */
  --bg-soft-2: #eef4fe;
  --bg-tint: #eef4fe;      /* 兼容别名 */
  --ok: #1f9d57;
  --ok-bg: #e6f6ec;
  --off: #8a94a6;
  --off-bg: #eef1f5;
  --shadow-sm: 0 1px 2px rgba(23, 43, 77, .05), 0 4px 14px rgba(23, 43, 77, .05);
  --shadow-md: 0 10px 30px rgba(23, 43, 77, .09);
  --shadow-lg: 0 24px 60px rgba(23, 43, 77, .14);
  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--navy);
  letter-spacing: 0.5px;
}
.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}
.brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--navy);
  font-size: 15px;
  font-weight: 600;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--brand); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 3px;
  border-radius: 3px;
  background: var(--brand);
}
.nav-cta {
  color: var(--brand) !important;
  font-weight: 700 !important;
}
.nav-cta:hover { opacity: .85; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }

/* ---------------- Hero（淡紫蓝渐变，浅色空气感） ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(720px 420px at 90% -8%, rgba(46, 124, 246, .10), transparent 60%),
    linear-gradient(112deg, #ededfc 0%, #e9f1fd 42%, #ffffff 80%);
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}
.hero > .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: 42px;
  line-height: 1.22;
  margin: 0 0 16px;
  color: var(--navy);
  letter-spacing: 0.3px;
  font-weight: 800;
}
.hero p {
  font-size: 17px;
  color: var(--muted);
  max-width: 620px;
  margin: 0 0 30px;
}
.hero-search {
  display: flex;
  max-width: 520px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.hero-search input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 14px 18px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--ink);
}
.hero-search button {
  border: 0;
  background: var(--brand);
  color: #fff;
  padding: 0 26px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: background .15s;
}
.hero-search button:hover { background: var(--brand-2); }

/* ---------------- 筛选区 ---------------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 8px;
}
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.tab:hover { border-color: var(--brand); color: var(--brand); }
.tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 0;
  background: var(--bg-soft);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.chip:hover { color: var(--brand); }
.chip.active { background: var(--brand); color: #fff; }

.result-meta {
  padding: 14px 0 4px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------------- 卡片网格 ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  padding: 22px 0 60px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #c9dcfd;
}
.card-cover {
  height: 150px;
  position: relative;
  display: grid;
  place-items: center;
  color: var(--brand);
  overflow: hidden;
  border-bottom: 1px solid #f0f4fa;
}
.card-cover .cover-icon {
  font-size: 52px;
  opacity: 0.95;
}
.card-cover .cover-type {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #dbe7fb;
}
.card-cover.cover-img-wrap {
  display: block;
  padding: 0;
  background: var(--bg-tint);
}
.card-cover-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.detail-banner-img {
  background-size: cover;
  background-position: center;
}
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  background: var(--bg-tint);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  align-self: flex-start;
}
.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 8px;
  line-height: 1.35;
}
.card-excerpt {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.card-date { font-size: 12px; color: var(--off); }
.read-more {
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.read-more::after { content: "→"; transition: transform 0.18s; }
.card:hover .read-more::after { transform: translateX(4px); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty .big { font-size: 48px; margin-bottom: 12px; }

/* ---------------- 详情 ---------------- */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-weight: 700;
  margin: 28px 0 16px;
  cursor: pointer;
}
.detail {
  max-width: 820px;
  margin: 0 auto;
  padding-bottom: 80px;
}
.detail-banner {
  height: 220px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--brand);
  font-size: 64px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e6eefb;
}
.detail h1 { font-size: 30px; color: var(--navy); margin: 0 0 12px; }
.detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.detail-meta .tag {
  background: var(--bg-tint);
  color: var(--brand);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
}
.detail-body { font-size: 16px; color: #2b313a; }
.detail-body h2 { font-size: 21px; color: var(--navy); margin: 28px 0 10px; }
.detail-body p { margin: 0 0 14px; }
.detail-body ul, .detail-body ol { padding-left: 22px; margin: 0 0 14px; }
.detail-body li { margin-bottom: 6px; }
.detail-body hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ---------------- 页脚（浅色，贴合官网空气感） ---------------- */
.site-footer {
  background: #f7f9fc;
  border-top: 1px solid var(--line);
  color: #5c6572;
  padding: 44px 0 30px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}
.footer-grid h4 { color: var(--navy); font-size: 15px; margin: 0 0 14px; }
.footer-grid a { display: block; color: #5c6572; font-size: 14px; margin-bottom: 9px; transition: color .15s; }
.footer-grid a:hover { color: var(--brand); }
.footer-brand { font-size: 19px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.footer-brand img { height: 30px; width: auto; }
.footer-brand + p { font-size: 13px; color: #7a8492; max-width: 280px; }
.footer-bottom {
  border-top: 1px solid #e5eaf1;
  margin-top: 30px;
  padding-top: 18px;
  font-size: 13px;
  color: #8a93a1;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
  .nav-toggle { display: block; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 30px; }
  .grid { grid-template-columns: 1fr; gap: 18px; }
  .toolbar { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .detail-banner { height: 160px; font-size: 48px; }
}

/* 通用加载/提示 */
.toast {
  position: fixed;
  bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  z-index: 200;
  font-size: 14px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   下载白皮书按钮 + 留资弹窗
   ============================================================ */
.detail-actions {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 34px; padding: 22px 24px;
  background: linear-gradient(135deg, #eef4fe, #f8fbff);
  border: 1px solid #dfe9f8; border-radius: 14px;
}
.dl-btn {
  background: var(--brand); color: #fff; border: none;
  font-size: 16px; font-weight: 700; padding: 14px 32px; border-radius: 8px;
  cursor: pointer; box-shadow: 0 8px 20px rgba(46, 124, 246, .28);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.dl-btn:hover { background: var(--brand-2); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(46, 124, 246, .36); }
.dl-tip { color: var(--muted); font-size: 13.5px; }

/* 文章末尾：免费注册米知云 CTA */
.register-cta {
  margin-top: 34px; padding: 28px 24px; text-align: center;
  background: linear-gradient(135deg, #eef4fe, #f8fbff);
  border: 1px solid #dfe9f8; border-radius: 14px;
}
.register-cta .reg-btn {
  display: inline-block; background: var(--brand); color: #fff; text-decoration: none;
  font-size: 17px; font-weight: 700; padding: 14px 44px; border-radius: 8px;
  box-shadow: 0 8px 20px rgba(46, 124, 246, .28);
  transition: transform .15s, background .15s, box-shadow .15s;
}
.register-cta .reg-btn:hover { background: var(--brand-2); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(46, 124, 246, .36); }
.register-cta .reg-tip { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

/* 弹窗遮罩 */
.lead-modal-mask {
  position: fixed; inset: 0; background: rgba(22, 26, 32, .5);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; padding: 20px; backdrop-filter: blur(2px);
}
.lead-modal {
  position: relative; width: 100%; max-width: 440px; background: #fff;
  border-radius: 16px; padding: 30px 30px 26px; box-shadow: 0 24px 60px rgba(22, 26, 32, .28);
  max-height: 92vh; overflow-y: auto;
}
.lead-close {
  position: absolute; top: 14px; right: 16px; border: none; background: transparent;
  font-size: 26px; line-height: 1; color: #9aa3b2; cursor: pointer;
}
.lead-head { margin-bottom: 18px; }
.lead-badge {
  display: inline-block; background: var(--brand); color: #fff; font-size: 12px;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 12px; letter-spacing: .5px;
}
.lead-head h3 { margin: 0 0 6px; color: var(--navy); font-size: 20px; }
.lead-sub { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.lead-err { color: #e23; font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.lead-row { margin-bottom: 14px; }
.lead-row label { display: block; font-size: 13.5px; color: var(--navy); margin-bottom: 6px; font-weight: 600; }
.lead-row .req { color: #e23; }
.lead-row input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.lead-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(46, 124, 246, .14); }
.lead-submit {
  width: 100%; background: var(--brand); color: #fff; border: none; cursor: pointer;
  font-size: 16px; font-weight: 700; padding: 14px; border-radius: 8px; margin-top: 4px;
  transition: background .15s;
}
.lead-submit:hover { background: var(--brand-2); }
.lead-submit:disabled { opacity: .6; cursor: default; }
.lead-submit.ghost { background: #eef2f7; color: var(--navy); margin-top: 16px; }
.lead-privacy { font-size: 11.5px; color: #9aa3b2; line-height: 1.6; margin: 12px 0 0; }
.lead-done { text-align: center; padding: 8px 0; }
.lead-check {
  width: 54px; height: 54px; line-height: 54px; margin: 0 auto 12px; border-radius: 50%;
  background: #e7f7ee; color: #1f9d57; font-size: 30px; font-weight: 700;
}
.lead-done h4 { margin: 0 0 10px; color: var(--navy); }
.lead-done p { color: var(--muted); font-size: 13.5px; line-height: 1.7; margin: 0; }
.lead-direct {
  display: inline-block; margin: 16px 0 0; background: var(--brand); color: #fff;
  font-weight: 700; padding: 11px 22px; border-radius: 8px; text-decoration: none; font-size: 14px;
  transition: background .15s;
}
.lead-direct:hover { background: var(--brand-2); }
@media (max-width: 600px) {
  .detail-actions { flex-direction: column; align-items: stretch; }
  .dl-btn { width: 100%; }
}

/* ============================================================
   Hero 左文右图 + 分页
   ============================================================ */
.hero .container.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.hero-text { flex: 1 1 auto; min-width: 0; }
.hero-art { flex: 0 0 auto; display: flex; align-items: flex-end; }
.hero-art img {
  width: 400px;
  max-width: 36vw;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 32px rgba(23, 76, 145, 0.16));
}
@media (max-width: 1100px) {
  .hero-art img { width: 320px; }
}
@media (max-width: 960px) {
  .hero-art { display: none; }
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 34px 0 10px;
}
.pagination:empty { display: none; }
.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.page-btn:hover { border-color: var(--brand); color: var(--brand); }
.page-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
@media (max-width: 600px) {
  .page-btn { min-width: 34px; height: 34px; font-size: 13.5px; }
}

/* 详情页：标题行分享图标 */
.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.detail-head h1 { flex: 1; }
.share-fab {
  flex: none;
  width: 42px; height: 42px;
  margin-top: 6px;
  border: 1px solid #dbe8fd;
  border-radius: 50%;
  background: #f2f7ff;
  color: #2e7cf6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.share-fab:hover {
  background: #2e7cf6; color: #fff; border-color: #2e7cf6;
  box-shadow: 0 6px 16px rgba(46,124,246,.28);
}
.share-fab svg { display: block; }

/* 分享二维码弹层 */
.share-modal-mask {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.share-modal {
  position: relative;
  width: 320px;
  max-width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 26px 22px 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.share-modal-title { margin: 0; font-size: 17px; color: var(--ink, #16181d); }
.share-modal-qr {
  width: 190px; height: 190px;
  image-rendering: pixelated;
  border: 1px solid #eef1f7;
  border-radius: 10px;
  padding: 8px;
  box-sizing: border-box;
}
.share-modal-tip {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #07c160;
  font-weight: 500;
}
.share-wx-icon {
  width: 16px;
  height: 14px;
  display: inline-block;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 28'%3E%3Cpath fill='%2307c160' d='M11.5 1C5.2 1 .2 5.3.2 10.6c0 3 1.6 5.6 4 7.4l-1 3.2 3.6-1.9c1.2.3 2.4.6 3.7.6h.7a8.6 8.6 0 0 1-.4-2.6c0-5.1 4.8-9.2 10.7-9.2h.6C21.2 4 16.8 1 11.5 1zM8 6.4a1.3 1.3 0 1 1 0 2.6 1.3 1.3 0 0 1 0-2.6zm7 0a1.3 1.3 0 1 1 0 2.6 1.3 1.3 0 0 1 0-2.6zM20.9 9.3c-5.3 0-9.6 3.5-9.6 7.9s4.3 7.9 9.6 7.9c1 0 2-.2 3-.5l3.1 1.7-.9-2.7a7.7 7.7 0 0 0 3.5-6.4c0-4.4-4.3-7.9-9.6-7.9h.5zm-3.4 4.2a1.1 1.1 0 1 1 0 2.2 1.1 1.1 0 0 1 0-2.2zm6.8 0a1.1 1.1 0 1 1 0 2.2 1.1 1.1 0 0 1 0-2.2z'/%3E%3C/svg%3E");
}
.share-custom { display: flex; width: 100%; gap: 8px; }
.share-custom input {
  flex: 1; min-width: 0;
  border: 1px solid #e2e8f4; border-radius: 8px;
  padding: 9px 10px; font: inherit; font-size: 13px; color: var(--ink, #16181d);
  outline: none;
}
.share-custom input:focus { border-color: #2e7cf6; }
.share-custom button {
  flex: none; border: 0; border-radius: 8px;
  background: #2e7cf6; color: #fff; font: inherit; font-size: 13px; font-weight: 600;
  padding: 9px 16px; cursor: pointer;
}
.share-custom button:hover { background: #1d5fd6; }
.share-copy {
  border: 1px solid #dbe8fd; border-radius: 8px;
  background: #f2f7ff; color: #2e7cf6;
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 18px; cursor: pointer;
}
.share-copy:hover { background: #e2edfd; }
@media (max-width: 480px) {
  .share-modal { padding: 22px 16px 18px; }
  .share-modal-qr { width: 168px; height: 168px; }
}
