﻿/* Blog / Article styles — Balon Việt Nam. Bổ sung cho styles.css, giữ kiến trúc nhẹ. */

/* ── Font overrides ───────────────────────────────────────────────────────── */
/* code / pre: monospace cho part number, dimension header, sample data */
code, pre {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.88em;
  background: rgba(64,81,90,0.07);
  border-radius: 3px;
  padding: 1px 5px;
}
pre {
  display: block;
  padding: 14px 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  line-height: 1.5;
}
pre code { background: transparent; padding: 0; }

/* Tables: sans-serif vì là dữ liệu kỹ thuật dạng tabular */
.btable { font-family: var(--font-ui); }

/* UI elements: sans-serif */
.article-meta { font-family: var(--font-ui); }
.toc { font-family: var(--font-ui); }
.callout { font-family: var(--font-ui); }

/* ── btn-fake: nút giả trong ref-card ───────────────────────────────────── */
.btn-fake {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 7px 12px;
  background: var(--green);
  color: var(--paper-2, #fffaf0);
  font-family: var(--font-ui);
  font-size: 0.80rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-align: center;
  border: 1px solid var(--green);
  transition: filter .15s;
}
.ref-card:hover .btn-fake { filter: brightness(1.1); }

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.blog-bc {
  max-width: 1100px;
  margin: 18px auto 0;
  padding: 0 22px;
  font-size: 0.82rem;
  font-family: var(--font-ui);
  color: var(--muted);
}
.blog-bc a { color: var(--steel); }
.blog-bc a:hover { color: var(--wine); }
.blog-bc span { color: var(--line); margin: 0 6px; }

.article-hero {
  max-width: 1100px;
  margin: 14px auto 0;
  padding: 0 22px;
}
.article-hero .eyebrow { margin-bottom: 8px; }
.article-hero h1 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.15;
  color: var(--green);
  margin: 0 0 14px;
  max-width: 22ch;
}
.article-hero .lead {
  font-size: 1.08rem;
  color: var(--steel);
  max-width: 70ch;
  margin: 0 0 16px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 22px;
}
.article-meta strong { color: var(--green); font-weight: 600; }

.hero-figure {
  max-width: 1100px;
  margin: 0 auto 10px;
  padding: 0 22px;
}
.hero-figure img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.hero-figure figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 8px;
}

/* Reading column */
.article-body {
  max-width: 760px;
  margin: 26px auto;
  padding: 0 22px;
  font-size: 1.03rem;
  line-height: 1.75;
  color: var(--ink);
}
.article-body h2 {
  font-size: 1.5rem;
  color: var(--green);
  margin: 38px 0 12px;
  padding-top: 6px;
  border-top: 2px solid var(--line);
}
.article-body h3 {
  font-size: 1.16rem;
  color: var(--wine);
  margin: 24px 0 8px;
}
.article-body p { margin: 0 0 16px; color: var(--steel); }
.article-body strong { color: var(--ink); }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 22px; color: var(--steel); }
.article-body li { margin-bottom: 8px; }
.article-body figure { margin: 22px 0; }
.article-body figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-2);
}
.article-body figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }

/* Table of contents */
.toc {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brass);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 0 0 26px;
}
.toc strong { display: block; color: var(--green); margin-bottom: 8px; font-size: 0.95rem; }
.toc ol { margin: 0; padding-left: 18px; }
.toc a { color: var(--steel); }
.toc a:hover { color: var(--wine); }

/* Callout / key takeaway */
.callout {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 22px 0;
}
.callout.brass { border-left-color: var(--brass); }
.callout.wine { border-left-color: var(--wine); }
.callout strong { color: var(--green); }

/* Comparison / spec table */
.btable-wrap { overflow-x: auto; margin: 20px 0; }
.btable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--paper-2);
}
.btable th, .btable td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}
.btable thead th { background: var(--green); color: var(--paper-2); font-weight: 600; }
.btable tbody tr:nth-child(even) { background: #fff; }

/* Reference products */
.ref-block { max-width: 1100px; margin: 30px auto; padding: 0 22px; }
.ref-block > .eyebrow { color: var(--wine); }
.ref-block h2 { color: var(--green); font-size: 1.5rem; margin: 4px 0 18px; }
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.ref-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.ref-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.ref-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 8px;
}
.ref-card .body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ref-card .pn { font-size: 0.78rem; letter-spacing: .04em; color: var(--wine); font-weight: 700; }
.ref-card h3 { font-size: 0.98rem; color: var(--green); margin: 0; line-height: 1.3; }
.ref-card small { color: var(--muted); font-size: 0.78rem; }
.ref-card a.button { margin-top: auto; text-align: center; font-size: 0.82rem; padding: 7px 10px; }

/* CTA band */
.article-cta {
  max-width: 1100px;
  margin: 36px auto;
  padding: 28px 26px;
  background: var(--green);
  color: var(--paper-2);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.article-cta h2 { color: #fff; font-size: 1.4rem; margin: 0 0 6px; }
.article-cta p { margin: 0; color: rgba(255,255,255,.85); max-width: 54ch; }
.article-cta .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.article-cta .button.primary { background: var(--brass); border-color: var(--brass); }
.article-cta .button.secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }

/* Related posts */
.related { max-width: 1100px; margin: 30px auto; padding: 0 22px; }
.related h2 { color: var(--green); font-size: 1.3rem; margin-bottom: 14px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 16px; }
.related-grid a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 18px;
  background: var(--paper-2);
  color: var(--green);
  font-weight: 600;
  transition: box-shadow .2s;
}
.related-grid a:hover { box-shadow: var(--shadow); color: var(--wine); }
.related-grid a span { display: block; font-size: 0.78rem; color: var(--wine); font-weight: 700; margin-bottom: 4px; }

@media (max-width: 720px) {
  .article-cta { flex-direction: column; align-items: flex-start; }
}
