/* =========================================================================
   ClashManual — blog
   Shared by blog/index.html (list, cards rendered from articles-data.js)
   and blog/articles/*.html (reuses .doc typography from manual.css for the
   article body, plus the bits below for the post header/cover/pager).
   ========================================================================= */

/* ---------- List page ---------- */
.blog-hero { padding: 96px 0 40px; text-align: center; }
.blog-hero .doc-crumb { justify-content: center; margin-bottom: 18px; }
.blog-hero h1 {
  font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.blog-hero p { font-size: 16.5px; color: var(--gray); max-width: 46em; margin: 0 auto; line-height: 1.7; }

.blog-shell { max-width: 1080px; padding: 10px 0 100px; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-card {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 20px;
  padding: 26px 24px 24px; background: #fff; transition: transform .25s, box-shadow .25s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(0,0,0,.08); }
.blog-card .bc-ic {
  width: 44px; height: 44px; border-radius: 12px; font-size: 21px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,179,64,.14); margin-bottom: 16px;
}
.blog-card .bc-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--amber-deep);
  text-transform: uppercase; margin-bottom: 8px;
}
.blog-card h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; margin-bottom: 8px; }
.blog-card p { font-size: 13.5px; color: var(--gray); line-height: 1.65; margin-bottom: 16px; flex: 1; }
.blog-card .bc-meta { display: flex; gap: 12px; font-size: 12px; color: var(--gray-light); }

.blog-empty { text-align: center; padding: 60px 0; color: var(--gray-light); font-size: 14px; }

@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .blog-hero { padding-top: 76px; }
  .blog-grid { grid-template-columns: 1fr; }
}

/* ---------- Article page ---------- */
/* Single-column post, no docs sidebar/TOC -- reuses .doc typography from
   manual.css for headings/paragraphs/code/callouts inside .doc-sec. */
.blog-post { max-width: 720px; margin: 0 auto; padding: 96px 24px 100px; }
.blog-post .doc-crumb { margin-bottom: 16px; }
.blog-post-tag {
  display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--amber-deep);
  background: rgba(255,179,64,.14); padding: 4px 11px; border-radius: 980px; margin-bottom: 16px;
}
.blog-post h1.doc-title { margin-bottom: 16px; }
.blog-post .doc-intro { margin-bottom: 22px; }

.blog-related { padding-top: 40px; margin-top: 50px; border-top: 1px solid var(--line); }
.blog-related h2 { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.blog-related .hub-grid { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 900px) { .blog-post { padding-top: 60px; } }
@media (max-width: 640px) { .blog-related .hub-grid { grid-template-columns: 1fr; } }

/* ---------- End-of-article download CTA (injected by blog-post.js) ---------- */
.blog-dl-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: var(--ink); color: #fff; border-radius: 20px;
  padding: 28px 30px; margin: 46px 0 6px;
}
.blog-dl-card h3 { color: #fff; font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.blog-dl-card p { color: rgba(255,255,255,.65); font-size: 13.5px; margin: 0; max-width: 40em; }
.blog-dl-card .btn-fill { flex: none; background: #fff; color: var(--ink); }
.blog-dl-card .btn-fill:hover { opacity: .88; }
@media (max-width: 640px) {
  .blog-dl-card { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* ---------- Floating download widget (injected by blog-post.js) ---------- */
.blog-float-cta {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 980px;
  padding: 10px 16px 10px 10px; box-shadow: 0 16px 36px rgba(0,0,0,.16);
  transform: translateY(0); opacity: 1; transition: opacity .25s, transform .25s;
}
.blog-float-cta.hide { opacity: 0; transform: translateY(12px); pointer-events: none; }
.blog-float-cta .bfc-link { display: flex; align-items: center; gap: 10px; }
.blog-float-cta .bfc-ic {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.blog-float-cta .bfc-text { display: flex; flex-direction: column; line-height: 1.3; }
.blog-float-cta .bfc-text b { font-size: 13px; color: var(--ink); }
.blog-float-cta .bfc-text small { font-size: 11px; color: var(--gray-light); }
.blog-float-cta .bfc-close {
  flex: none; width: 20px; height: 20px; border-radius: 50%; border: none;
  background: var(--bg-alt); color: var(--gray-light); font-size: 13px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.blog-float-cta .bfc-close:hover { color: var(--ink); }
@media (max-width: 640px) {
  .blog-float-cta { left: 16px; right: 16px; bottom: 16px; }
  .blog-float-cta .bfc-text small { display: none; }
}
