/* =====================================================================
 * Kho bài viết — dùng chung bảng màu với style.css
 * ===================================================================== */
.blog .site-header { position: sticky; }
.site-nav .nav-active { color: var(--cyan); }

.blog-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px clamp(20px, 5vw, 32px) 40px;
}

/* ------------------------------------------------ Danh sách bài -- */
.blog-intro { margin-bottom: 36px; }
.blog-intro .section-sub { margin-top: 12px; }

.post-list { list-style: none; display: grid; gap: 18px; }
.post-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
.post-item:hover { border-color: rgba(30, 227, 227, .5); transform: translateY(-2px); }
.post-item-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.post-item h2 { font-size: 1.3rem; font-weight: 800; line-height: 1.3; margin: 4px 0 6px; }
.post-item p { color: var(--text-dim); line-height: 1.6; }
.post-item-text { min-width: 0; }

.post-empty {
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-dim);
}
.post-empty h2 { color: var(--text); font-size: 1.3rem; margin-bottom: 8px; }
.post-empty .btn { margin-top: 18px; }

/* ------------------------------------------------------ Một bài -- */
.post-back { color: var(--text-dim); text-decoration: none; font-weight: 600; font-size: .92rem; }
.post-back:hover { color: var(--cyan); }

.post-head { margin: 22px 0 28px; }
.post-meta {
  color: var(--mint);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.post-title {
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 10px 0 14px;
  text-wrap: balance;
}
.post-lede { color: var(--text-dim); font-size: 1.15rem; line-height: 1.65; }

.post-player {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  margin-bottom: 36px;
  background: #000;
}
.post-player iframe { width: 100%; height: 100%; border: 0; display: block; }

.post-body {
  font-size: 1.08rem;
  line-height: 1.85;
  color: #d9e9ec;
}
.post-body > * + * { margin-top: 1.1em; }
.post-body h2 {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 2.2em;
  color: var(--text);
}
.post-body h3 { font-size: 1.2rem; font-weight: 800; margin-top: 1.8em; color: var(--text); }
.post-body a { color: var(--cyan); text-underline-offset: 3px; }
.post-body strong { color: var(--text); }
.post-body blockquote {
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--cyan);
  color: var(--text-dim);
  font-style: italic;
}
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li + li { margin-top: .4em; }
.post-body img { max-width: 100%; height: auto; border-radius: 12px; display: block; }
.post-body figure figcaption, .post-body em.caption { color: var(--text-dim); font-size: .9rem; }
.post-body hr { border: 0; border-top: 1px solid var(--glass-border); margin: 2.4em 0; }
.post-body code { background: rgba(30, 227, 227, .08); padding: 1px 6px; border-radius: 5px; font-size: .92em; }
.post-body table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.post-body th, .post-body td { border-bottom: 1px solid var(--glass-border); padding: 8px 10px; text-align: left; }

/* Mục nguồn tham khảo: chữ nhỏ hơn */
.post-body h2#nguon-tham-khao ~ ol,
.post-body h2#nguon-tham-khao ~ ul { font-size: .92rem; color: var(--text-dim); line-height: 1.6; }

.post-cta {
  margin-top: 56px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.post-cta p { color: var(--text-dim); flex: 1 1 280px; line-height: 1.6; }

@media (max-width: 640px) {
  .post-item { grid-template-columns: 1fr; }
  .blog .site-nav a:not(.nav-cta):not(.nav-active):not(.nav-apps) { display: none; }
}

/* Nền chuyển màu phủ kín cả trang dài */
body.blog { background-attachment: fixed; min-height: 100vh; }

/* ------------------------------------------- Hồ sơ video ---------- */
.post-fix { margin: 0 0 28px; padding: 14px 18px; border-left: 3px solid var(--cinnabar, #e8452e); background: rgba(232, 69, 46, .08); font-size: .95rem; line-height: 1.6; }
.post-fix-k, .post-chapters-k { font: 600 .68rem var(--mono, monospace); letter-spacing: .16em; text-transform: uppercase; color: var(--cinnabar, #e8452e); margin-bottom: 6px; }
.post-fix p + p { margin-top: .6em; }
.post-chapters { margin: -16px 0 24px; padding: 14px 18px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-border); }
.post-chapters-k { color: var(--brass, #c9a650); }
.post-chapters ol { list-style: none; display: grid; gap: 2px; }
.post-chapters a { display: block; padding: 4px 6px; color: var(--text); text-decoration: none; font-size: .95rem; }
.post-chapters a b { display: inline-block; min-width: 58px; font: 600 .82rem var(--mono, monospace); color: var(--cyan); }
.post-chapters a:hover { background: rgba(55, 240, 207, .08); }
.post-short { margin: 0 0 28px; font: 500 .78rem var(--mono, monospace); color: var(--text-dim); }
.post-short a { color: var(--cyan); }

.tool-item { margin-bottom: 28px; }
.tool-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.tool-head h2 { font-size: 1.1rem; }
.tool-item textarea { width: 100%; padding: 12px; font: 500 .85rem/1.55 var(--mono, monospace); color: var(--text); background: rgba(6, 7, 11, .8); border: 1px solid var(--glass-border); resize: vertical; }
.post-note { margin: 0 0 28px; padding: 14px 18px; border-left: 3px solid var(--brass, #c9a650); background: rgba(201, 166, 80, .07); font-size: .92rem; line-height: 1.6; color: var(--text-dim); border-radius: 14px; }
.post-note .post-fix-k { color: var(--brass, #c9a650); }
.post-credits { margin-top: 40px; font-size: .85rem; line-height: 1.6; color: var(--text-dim); }
.post-credits h2 { font-size: 1rem; color: var(--text); margin-bottom: 8px; }
.post-credits ul { padding-left: 1.2em; }
.post-credits a { color: var(--text-dim); }
.post-comments { margin-top: 48px; }
.post-comments h2 { font: 700 1.3rem var(--display, sans-serif); margin-bottom: 14px; }
