/* =========================================================
   ExpoMate Blog
   ========================================================= */

.blog-hero {
  padding: calc(var(--header-h) + 64px) 0 56px;
  background:
    radial-gradient(760px 420px at 92% -10%, #e8f1ff 0%, rgba(232, 241, 255, 0) 62%),
    #fff;
  border-bottom: 1px solid var(--line-soft);
}
.blog-hero .eyebrow { margin-bottom: 12px; }
.blog-hero h1 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.blog-hero p {
  margin-top: 16px;
  max-width: 44em;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--slate);
}
.blog-hero-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px; font-size: .82rem; color: var(--muted); }
.blog-hero-meta strong { color: var(--ink); font-weight: 700; }

.blog-list { padding: 64px 0 88px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #cfdcee; }
.post-card-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card-thumb img { transform: scale(1.03); }
.post-card-thumb .tag { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); }
.post-card-body { display: flex; flex-direction: column; gap: 8px; padding: 22px; flex: 1; }
.post-card h2, .post-card h3 { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.5; }
.post-card p { font-size: .86rem; color: var(--slate); line-height: 1.65; flex: 1; }
.post-card-meta { display: flex; gap: 10px; font-size: .76rem; color: var(--muted); margin-top: 4px; }
.post-card-more { font-size: .84rem; font-weight: 700; color: var(--brand); margin-top: 6px; }

.blog-note {
  margin-top: 40px;
  padding: 24px 26px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.blog-note p { font-size: .88rem; color: var(--slate); line-height: 1.7; }
.blog-note strong { color: var(--ink); }

/* ---------- Article ---------- */
.article-head { padding: calc(var(--header-h) + 44px) 0 32px; background: #fff; border-bottom: 1px solid var(--line-soft); }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--muted); margin-bottom: 18px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: #cbd5e1; }
.article-head h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.045em;
  max-width: 20em;
}
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; font-size: .82rem; color: var(--muted); align-items: center; }
.article-meta .tag { margin-right: 2px; }
.article-meta b { color: var(--ink-2); font-weight: 700; }

.article-wrap { padding: 44px 0 80px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) 260px; gap: 56px; align-items: start; }
.article-body { font-size: .98rem; line-height: 1.85; color: #334155; }
.article-body > p { margin: 0 0 18px; }
.article-body h2 {
  font-size: 1.42rem;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 46px 0 16px;
  padding-top: 8px;
  scroll-margin-top: 90px;
}
.article-body h2:first-of-type { margin-top: 0; }
.article-body h3 {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 28px 0 10px;
}
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body a:not(.btn) { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 1.25em; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 7px; }
.article-body li::marker { color: var(--brand); }
.article-body blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  border-left: 3px solid var(--brand);
  background: var(--brand-50);
  border-radius: 0 12px 12px 0;
  font-size: .95rem;
  color: #1e3a8a;
  line-height: 1.8;
}
.article-body blockquote p { margin: 0; }

.summary-box {
  margin: 0 0 34px;
  padding: 24px 26px;
  border: 1px solid #dbe7fa;
  background: linear-gradient(160deg, #f7fbff, #eef5ff);
  border-radius: 16px;
}
.summary-box h2 {
  margin: 0 0 10px !important;
  padding: 0 !important;
  font-size: .92rem !important;
  color: var(--brand) !important;
  letter-spacing: 0;
}
.summary-box ul { margin: 0 !important; padding-left: 1.1em !important; }
.summary-box li { font-size: .9rem; color: var(--ink-2); margin-bottom: 6px; }

.table-wrap { overflow-x: auto; margin: 22px 0 26px; border: 1px solid var(--line); border-radius: 12px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 520px; background: #fff; }
.table-wrap th, .table-wrap td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; line-height: 1.6; }
.table-wrap thead th { background: var(--bg-alt); color: var(--ink-2); font-weight: 700; font-size: .82rem; white-space: nowrap; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap td strong { color: var(--ink); }
.table-wrap .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.callout {
  margin: 26px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-alt);
  font-size: .9rem;
  line-height: 1.75;
  color: var(--slate);
}
.callout strong { color: var(--ink); }
.callout .callout-title { display: block; font-weight: 800; color: var(--ink); margin-bottom: 4px; font-size: .92rem; }

.article-faq { margin: 44px 0 0; }
.article-faq h2 { margin-top: 0; }
.article-faq .faq-item summary { font-size: .96rem; }

.article-cta {
  margin: 44px 0 0;
  padding: 30px;
  border-radius: 18px;
  background: linear-gradient(150deg, #1d4ed8, #2563eb 60%, #3b82f6);
  color: #fff;
  box-shadow: 0 18px 44px rgba(29, 78, 216, .22);
}
.article-cta h2 { margin: 0 0 8px !important; color: #fff !important; font-size: 1.3rem !important; }
.article-cta p { margin: 0 0 18px; font-size: .9rem; color: #dbeafe; line-height: 1.7; }
.article-cta .btn { background: #fff; color: var(--brand); box-shadow: none; }
.article-cta .btn:hover { background: #f2f7ff; }

.article-footnote { margin-top: 28px; font-size: .78rem; color: var(--muted); line-height: 1.7; }

.article-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.aside-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  background: #fff;
  margin-bottom: 16px;
}
.aside-card h3 { font-size: .9rem; font-weight: 800; margin-bottom: 10px; }
.aside-card ol { counter-reset: toc; display: grid; gap: 8px; }
.aside-card ol li { font-size: .82rem; color: var(--slate); line-height: 1.5; }
.aside-card ol a:hover { color: var(--brand); }
.aside-cta { background: var(--brand-50); border-color: #dbe7fa; }
.aside-cta p { font-size: .82rem; color: var(--slate); line-height: 1.6; margin-bottom: 12px; }
.aside-cta .btn { width: 100%; }

.related { margin-top: 64px; padding-top: 36px; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.1rem !important; margin: 0 0 18px !important; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.related-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--bg-alt); transition: background .15s, border-color .15s; }
.related-card:hover { background: #fff; border-color: #cfdcee; }
.related-card span { font-size: .72rem; font-weight: 700; color: var(--brand); }
.related-card strong { display: block; margin-top: 4px; font-size: .92rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.5; }

@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .article-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .aside-card { margin: 0; }
}
@media (max-width: 960px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
  .post-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .blog-hero { padding-top: calc(var(--header-h) + 40px); }
  .blog-list { padding: 44px 0 72px; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card:last-child { grid-column: auto; }
  .article-head { padding-top: calc(var(--header-h) + 32px); }
  .article-wrap { padding: 32px 0 64px; }
  .article-body { font-size: .95rem; }
  .article-body h2 { font-size: 1.28rem; margin-top: 38px; }
  .article-aside { grid-template-columns: 1fr; }
  .article-cta { padding: 24px 20px; }
  .related-grid { grid-template-columns: 1fr; }
  .summary-box { padding: 20px; }
  .table-wrap table { min-width: 460px; font-size: .84rem; }
}

/* prevent wide tables from expanding the mobile layout */
.article-layout > * { min-width: 0; }
.article-body { min-width: 0; }
.table-wrap { max-width: 100%; }

/* numbered TOC */
.aside-card ol { counter-reset: toc; }
.aside-card ol li { counter-increment: toc; position: relative; padding-left: 20px; }
.aside-card ol li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  font-size: .68rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0;
}
.aside-card ol a { color: var(--slate); }
.aside-card ol a:hover { color: var(--brand); }
