/* ==========================================================================
   GPT108.com 博客 / 教程 内页样式
   --------------------------------------------------------------------------
   ★ 规范：内页同时引入 /styles.css（共享设计变量 + 极光背景 + 按钮）和本文件。
     本文件只放内页专属组件，不再重复定义设计变量和背景，保证与主页完全一致。
   ========================================================================== */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* body 背景、字体、颜色等均由 /styles.css 提供（含极光网格背景 .bg-deco/.bg-mesh）。
   内页正文行距略大，单独覆盖一下即可。 */
body { line-height: 1.8; }
/* 仅文章正文里的链接用蓝色（避免影响导航/卡片/页脚链接的样式） */
.article-body a { color: var(--blue-600); }
.article-body a:hover { text-decoration: underline; }

.shell { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }
.shell-wide { max-width: 1200px; }

/* 顶栏 */
.blog-topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: background 320ms ease, border-color 320ms ease, box-shadow 320ms ease;
}
.blog-topbar.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: rgba(33, 28, 20, 0.06);
  box-shadow:
    0 8px 28px -10px rgba(33, 28, 20, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}
.blog-topbar-inner {
  width: min(var(--shell), calc(100% - 48px)); margin: 0 auto; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  transition: height 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.blog-topbar.is-scrolled .blog-topbar-inner { height: 60px; }
.blog-brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.blog-brand-mark { width: 38px; height: 38px; }
.blog-brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.42rem; color: var(--ink-1); letter-spacing: -0.015em; }
.blog-brand-name em {
  font-style: normal; font-weight: 900;
  background: linear-gradient(90deg, #138A75 0%, #C2730E 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.blog-nav-cta {
  margin-left: 10px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--ink-1) 0%, #322B1F 100%);
  color: #fff !important; font-size: 0.86rem; font-weight: 700;
  text-decoration: none !important;
  box-shadow:
    0 6px 16px -3px rgba(33, 28, 20, 0.30),
    0 0 0 1.5px rgba(255, 255, 255, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  transition: background .18s, transform .18s, box-shadow .18s;
}
.blog-nav-cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #322B1F 0%, #4A4334 100%);
  box-shadow:
    0 10px 22px -4px rgba(33, 28, 20, 0.40),
    0 0 0 1.5px rgba(255, 255, 255, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.blog-nav-cta svg { width: 14px; height: 14px; flex-shrink: 0; }

/* 内页导航链接（首页 / 套餐 / 博客）— 与首页 .nav 完全一致(含滑动指示器) */
.blog-nav { display: flex; align-items: center; gap: 2px; position: relative; }
.blog-nav-indicator {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 0; height: 32px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(19, 138, 117, 0.10), rgba(222, 138, 27, 0.10));
  border: 1px solid rgba(19, 138, 117, 0.18);
  opacity: 0; pointer-events: none;
  transition:
    transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
    width 380ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 240ms ease;
  z-index: 0;
}
.blog-nav-indicator.is-visible { opacity: 1; }
.blog-nav a {
  position: relative; z-index: 1;
  padding: 8px 14px; border-radius: 999px;
  font-size: 0.92rem; font-weight: 500;
  color: var(--ink-3) !important; text-decoration: none !important;
  transition: color 220ms ease, transform 220ms ease;
}
.blog-nav a:hover { color: var(--ink-1) !important; transform: translateY(-1px); }
.blog-nav a.is-active { color: var(--blue-700) !important; font-weight: 600; }
.blog-nav-right { display: flex; align-items: center; gap: 10px; }
.blog-menu-toggle { display: none; }
@media (max-width: 768px) {
  /* 手机端:只保留带 nav-key 的入口(博客),隐藏首页(logo 可回首页)和套餐锚点 */
  .blog-nav a:not(.nav-key) { display: none; }
  .blog-nav { gap: 2px; }
  .blog-nav a { padding: 7px 12px; font-size: 0.9rem; }
}

/* 面包屑 */
.breadcrumb { font-size: 0.84rem; color: var(--ink-4); margin: 28px 0 0; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb span { margin: 0 6px; }

/* 文章 */
.article { padding: 24px 0 60px; }
.article-header { margin: 16px 0 32px; }
.article-tag {
  display: inline-block; padding: 4px 12px; margin-bottom: 14px;
  background: var(--blue-50); color: var(--blue-700);
  border-radius: 999px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
}
.article h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800; line-height: 1.3; letter-spacing: -0.02em;
  color: var(--ink-1); margin: 0 0 14px;
}
.article-meta { font-size: 0.86rem; color: var(--ink-4); }
.article-meta span { margin-right: 14px; }

.article-body { font-size: 1.02rem; }
.article-body h2 {
  font-size: 1.4rem; font-weight: 800; color: var(--ink-1);
  margin: 40px 0 14px; padding-top: 8px; letter-spacing: -0.01em;
  scroll-margin-top: 80px;
}
.article-body h3 {
  font-size: 1.12rem; font-weight: 700; color: var(--ink-1);
  margin: 28px 0 10px;
}
.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--ink-1); font-weight: 700; }
.article-body a { font-weight: 600; }

/* 提示框 */
.callout {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 20px; margin: 24px 0;
  background: linear-gradient(135deg, rgba(19,138,117,0.06), rgba(222,138,27,0.06));
  border: 1px solid rgba(222,138,27,0.15); border-radius: 14px;
  font-size: 0.95rem;
}
.callout-icon { flex-shrink: 0; font-size: 1.3rem; line-height: 1.5; }

/* 表格 */
.article-body table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: 0.92rem; background: var(--bg-card);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.article-body th, .article-body td {
  padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line-1);
}
.article-body th { background: var(--blue-50); font-weight: 700; color: var(--ink-1); }
.article-body tr:last-child td { border-bottom: 0; }

/* 文末 CTA */
.article-cta {
  margin: 40px 0 0; padding: 32px;
  background: linear-gradient(135deg, rgba(201,184,255,0.18), rgba(168,200,255,0.18));
  border: 1px solid rgba(222,138,27,0.15); border-radius: var(--radius-lg);
  text-align: center;
}
.article-cta h3 { font-size: 1.25rem; font-weight: 800; color: var(--ink-1); margin: 0 0 8px; }
.article-cta p { font-size: 0.95rem; color: var(--ink-2); margin: 0 0 20px; }
.article-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 999px;
  background: linear-gradient(180deg, #3D8AF7, var(--blue-600));
  background-clip: padding-box; -webkit-background-clip: padding-box;
  color: #fff !important; font-weight: 700; font-size: 1rem;
  text-decoration: none !important;
  box-shadow: 0 6px 16px -2px rgba(19, 138, 117, 0.4);
  transition: transform 160ms ease;
}
.article-cta-btn:hover { transform: translateY(-2px); }

/* 相关文章 */
.related { margin: 48px 0 0; }
.related h2 { font-size: 1.2rem; font-weight: 800; color: var(--ink-1); margin: 0 0 16px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.related-card {
  display: block; padding: 18px 20px;
  background: var(--bg-card); border: 1px solid var(--line-1);
  border-radius: 14px; box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.related-card-title { font-size: 0.98rem; font-weight: 700; color: var(--ink-1); margin-bottom: 4px; }
.related-card-desc { font-size: 0.84rem; color: var(--ink-3); }

/* 博客列表页 */
.bloglist { padding: 32px 0 60px; }
/* ---------- 博客列表：两列卡片（封面 + 文字 + 标签） ---------- */
.bloglist-head { text-align: center; margin: 30px 0 36px; }
.bloglist-head h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; color: var(--ink-1); margin: 0 0 10px; letter-spacing: -0.02em; }
.bloglist-head p { color: var(--ink-3); font-size: 1rem; max-width: 640px; margin: 0 auto; }

.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--line-1);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease; text-decoration: none !important;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card:hover h2 { color: var(--blue-700); }

.post-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-cover-ph {
  width: 100%; height: 100%;
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 26px;
  /* 统一暗色系：深松墨底 + 细微绿/金纵深光晕 */
  background:
    radial-gradient(115% 90% at 8% -12%, rgba(20,150,124,0.30) 0%, transparent 56%),
    radial-gradient(110% 95% at 108% 112%, rgba(201,138,43,0.18) 0%, transparent 54%),
    linear-gradient(140deg, #182721 0%, #0B130F 100%);
}
.post-cover-badge {
  position: absolute; top: 18px; left: 24px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em;
  color: #CFE2DA;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px; padding: 5px 13px;
}
.post-cover-title {
  color: #F4F1E9; font-weight: 800; letter-spacing: -0.012em;
  font-family: var(--font-display);
  font-size: 1.46rem; line-height: 1.32;
  text-shadow: 0 1px 12px rgba(0,0,0,0.25);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-cover-brand {
  position: absolute; left: 24px; bottom: 18px;
  font-weight: 800; font-size: 0.98rem; color: #ECE8DE; letter-spacing: -0.01em;
}
.post-cover-brand em {
  font-style: normal; font-weight: 900;
  background: linear-gradient(90deg, #34B095 0%, #E3BE7F 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.post-card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.post-tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--blue-700); background: var(--blue-50);
  border-radius: 6px; padding: 3px 9px;
}
.post-card h2 {
  font-size: 1.12rem; font-weight: 800; color: var(--ink-1);
  margin: 0 0 8px; line-height: 1.45; letter-spacing: -0.01em; transition: color 0.18s;
}
.post-card p {
  font-size: 0.9rem; color: var(--ink-3); margin: 0 0 14px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-meta { font-size: 0.8rem; color: var(--ink-4); margin-top: auto; }

/* ---------- 分页 ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 40px 0 10px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; font-size: 0.9rem; font-weight: 600;
  border: 1px solid var(--line-2); background: var(--bg-card);
  color: var(--ink-2); text-decoration: none !important;
}
.pagination a:hover { border-color: var(--blue-500); color: var(--blue-700); }
.pagination .is-current { background: linear-gradient(180deg, #3D8AF7, var(--blue-600)); border-color: transparent; color: #fff; }
.pagination .is-disabled { opacity: 0.4; pointer-events: none; }

/* 文章目录 TOC（可复用） */
.toc {
  background: var(--bg-card); border: 1px solid var(--line-1);
  border-left: 3px solid var(--blue-500);
  border-radius: var(--radius-lg); padding: 18px 22px; margin: 26px 0;
  box-shadow: var(--shadow-sm);
}
.toc-title { font-weight: 800; color: var(--ink-1); font-size: 0.98rem; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; list-style: decimal; }
.toc li { margin: 5px 0; }
.toc a { color: var(--ink-2); font-size: 0.94rem; }
.toc a:hover { color: var(--blue-700); }

/* 文章内 FAQ 列表(卡片式) */
.article-body .faq-item {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line-1);
  border-radius: 14px;
  padding: 18px 22px 18px 56px;
  margin: 12px 0;
  box-shadow: 0 2px 10px -6px rgba(33, 28, 20, 0.08);
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.article-body .faq-item:hover {
  border-color: rgba(19, 138, 117, 0.35);
  box-shadow: 0 10px 26px -12px rgba(19, 138, 117, 0.22);
  transform: translateY(-1px);
}
.article-body .faq-q {
  font-weight: 700;
  color: var(--ink-1);
  font-size: 1.04rem;
  line-height: 1.5;
  margin: 0 0 8px;
}
/* Q 徽章(圆形,渐变) */
.article-body .faq-q::before {
  content: "Q";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #138A75 0%, #0F6B56 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.84rem;
  border-radius: 8px;
  box-shadow: 0 3px 8px -2px rgba(19, 138, 117, 0.45);
}
.article-body .faq-a {
  position: relative;
  color: var(--ink-2);
  line-height: 1.75;
  padding-left: 26px;
}
/* A 标识 */
.article-body .faq-a::before {
  content: "A";
  position: absolute;
  left: 0; top: 1px;
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-50, #EFF6FF);
  color: var(--blue-600);
  font-weight: 800;
  font-size: 0.74rem;
  border-radius: 6px;
}

/* 锚点跳转时给标题留出顶栏高度 */
.article-body h2[id] { scroll-margin-top: 80px; }

/* 页脚 */
.blog-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line-1); background: rgba(241, 245, 249, 0.6);
  padding: 28px 0; text-align: center; font-size: 0.84rem; color: var(--ink-4);
}
.blog-footer a { color: var(--ink-3); }
.blog-footer .disclaimer { max-width: 760px; margin: 12px auto 0; font-size: 0.76rem; line-height: 1.7; }

@media (max-width: 720px) {
  .post-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 600px) {
  .related-grid { grid-template-columns: 1fr; }
  .article-cta { padding: 24px 20px; }
}

/* ===================================================================
   文章两栏布局:正文 + 右侧粘性「购买/客服」侧栏(v5.19)
   解决宽屏下内页两侧留白过多;窄屏自动收起侧栏。
   =================================================================== */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}
.article-layout .article { min-width: 0; }

.article-aside { position: sticky; top: 84px; }
.aside-card {
  background: var(--bg-card);
  border: 1px solid var(--line-1);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.aside-card-title { margin: 0 0 6px; font-size: 1.05rem; font-weight: 800; color: var(--ink-1); }
.aside-card-sub { margin: 0 0 16px; font-size: 0.85rem; color: var(--ink-3); line-height: 1.6; }
.aside-redeem { display: inline-block; margin-top: 10px; font-size: 0.84rem; color: var(--ink-3); text-decoration: none; }
.aside-redeem:hover { color: var(--blue-600); text-decoration: underline; }
.aside-qr { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-1); }
.aside-qr-frame {
  width: 148px; height: 148px; margin: 0 auto; padding: 8px;
  background: #fff; border: 1px solid var(--line-1); border-radius: 12px;
}
.aside-qr-frame img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 6px; }
.aside-qr-cap { margin: 8px 0 0; font-size: 0.8rem; color: var(--ink-2); line-height: 1.5; }
.aside-qr-cap small { color: var(--ink-4); font-size: 0.74rem; }

@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .article-aside { display: none; }
}

/* ===================================================================
   品牌页(hub)标题:去掉「01 / PRICING」装饰,改用普通标题 (v5.22)
   =================================================================== */
.hub-head { margin-bottom: 40px; }
.hub-title {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink-1);
  margin: 0 0 14px;
}
.hub-title-sm { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-bottom: 0; }
