/* Blog / Cẩm nang styles for congtydaiton.com.
   Loaded AFTER styles.css on /cam-nang pages; reuses the site design tokens
   (--navy, --blue, --gold, --ink, --surface, radii, shadows, fonts). The home
   renderer is untouched — these classes are blog-only. */

.section-inner--narrow { width: min(760px, 100%); margin: 0 auto; padding: 0 22px; }
.blog-list .section-inner,
.blog-head .section-inner { padding-left: 22px; padding-right: 22px; }

/* --- Listing header (clears fixed topbar + header) --- */
.blog-head {
  padding-top: calc(var(--header-h) + 34px);
  padding-bottom: 8px;
  background:
    radial-gradient(1200px 340px at 50% -140px, rgba(10, 91, 214, 0.10), transparent 70%),
    var(--surface-cream);
  border-bottom: 1px solid var(--line);
}
.blog-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.12;
  color: var(--ink);
  margin: 10px 0 14px;
  letter-spacing: -0.01em;
}
.blog-head__lead { color: var(--muted); font-size: 1.06rem; max-width: 60ch; }
.blog-list { padding-top: 40px; }

/* --- Card grid --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold-soft); }
.blog-card__media { display: block; aspect-ratio: 5 / 3; background: var(--surface-alt); overflow: hidden; }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.blog-card:hover .blog-card__media img { transform: scale(1.05); }
.blog-card__ph { display: block; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--navy-tint), var(--gold-tint)); }
.blog-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.blog-card__cat {
  align-self: flex-start;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--blue-strong); background: var(--blue-tint);
  padding: 4px 10px; border-radius: var(--radius-pill);
}
.blog-card__title { font-size: 1.16rem; line-height: 1.32; margin: 0; }
.blog-card__title a { color: var(--ink); text-decoration: none; }
.blog-card__title a:hover { color: var(--blue-strong); }
.blog-card__excerpt { color: var(--muted); font-size: 0.95rem; margin: 0; }
.blog-card__more {
  margin-top: auto; display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: 0.9rem; color: var(--blue-strong); padding-top: 6px;
}
.blog-card__more svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.blog-empty { color: var(--muted); text-align: center; padding: 30px 0; }

/* --- Article --- */
.blog-article { padding-top: calc(var(--header-h) + 30px); }
.blog-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; }
.blog-crumb a { color: var(--muted); text-decoration: none; }
.blog-crumb a:hover { color: var(--blue-strong); }
.blog-crumb span[aria-current] { color: var(--ink-soft); font-weight: 600; }
.blog-article__head { margin-bottom: 22px; }
.blog-article__cat {
  display: inline-block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--gold-deep); background: var(--gold-tint); padding: 5px 12px; border-radius: var(--radius-pill); margin-bottom: 14px;
}
.blog-article__head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.16; color: var(--ink); margin: 0 0 14px; letter-spacing: -0.01em;
}
.blog-article__lead { font-size: 1.12rem; color: var(--ink-soft); line-height: 1.6; margin: 0 0 16px; }
.blog-article__meta { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; color: var(--muted); }
.blog-article__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.blog-cover { margin: 6px 0 30px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.blog-cover img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; }

/* --- Prose typography --- */
.blog-prose { font-size: 1.07rem; line-height: 1.78; color: var(--ink-soft); }
.blog-prose > :first-child { margin-top: 0; }
.blog-prose p { margin: 0 0 1.15em; }
.blog-prose h2 {
  font-family: var(--font-display); font-size: 1.6rem; line-height: 1.25; color: var(--ink);
  margin: 1.9em 0 0.6em; padding-top: 0.3em; letter-spacing: -0.005em;
}
.blog-prose h3 { font-size: 1.24rem; color: var(--navy); margin: 1.5em 0 0.5em; font-weight: 700; }
.blog-prose ul, .blog-prose ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.blog-prose li { margin: 0.4em 0; }
.blog-prose ul li::marker { color: var(--gold); }
.blog-prose a { color: var(--blue-strong); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.blog-prose a:hover { color: var(--blue); }
.blog-prose strong { color: var(--ink); font-weight: 700; }
.blog-prose blockquote {
  margin: 1.4em 0; padding: 14px 22px; border-left: 4px solid var(--gold);
  background: var(--surface-cream); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-soft); font-style: italic;
}
.blog-prose figure, .article-figure { margin: 1.6em 0; }
.blog-prose img, .article-figure img { width: 100%; height: auto; border-radius: var(--radius-md); display: block; box-shadow: var(--shadow-sm); }
.blog-prose figcaption, .article-figure figcaption { text-align: center; font-size: 0.86rem; color: var(--muted); margin-top: 8px; }
.blog-prose table {
  width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.96rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
}
.blog-prose thead { background: var(--navy); color: #fff; }
.blog-prose th, .blog-prose td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.blog-prose tbody tr:nth-child(even) { background: var(--surface-cream); }
.blog-prose tbody tr:last-child td { border-bottom: 0; }

/* --- In-article CTA --- */
.blog-cta {
  margin: 40px 0; padding: 28px 30px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #eaf1fb; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px;
  box-shadow: var(--shadow);
}
.blog-cta .eyebrow { color: var(--gold-soft); }
.blog-cta h2 { font-family: var(--font-display); font-size: 1.5rem; margin: 6px 0 8px; color: #fff; line-height: 1.2; }
.blog-cta p { margin: 0; color: rgba(234, 241, 251, 0.82); font-size: 0.98rem; max-width: 46ch; }
.blog-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.blog-cta .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --- FAQ --- */
.blog-faq { margin: 40px 0 10px; }
.blog-faq h2 { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); margin: 0 0 16px; }
.blog-faq details { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 4px 18px; margin-bottom: 12px; background: var(--surface); }
.blog-faq summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 14px 0; list-style: none; position: relative; padding-right: 30px; }
.blog-faq summary::-webkit-details-marker { display: none; }
.blog-faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--gold-deep); font-weight: 400; }
.blog-faq details[open] summary::after { content: "−"; }
.blog-faq details p { margin: 0 0 16px; color: var(--muted); }

/* --- Related --- */
.blog-related { margin: 48px 0 20px; }
.blog-related h2 { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); margin: 0 0 20px; }

@media (max-width: 620px) {
  .blog-cta { flex-direction: column; align-items: flex-start; padding: 24px 22px; }
  .blog-article { padding-top: calc(var(--header-h) + 20px); }
  .blog-prose { font-size: 1.03rem; }
}
