/* P21 - Danh sách bài viết (/bai-viet/, chuyên mục, thẻ). Thẻ bài .blog-card + lưới .blog-grid + .blog-pager dùng lại ở chi tiết bài và trang tác giả. */
.fc-wrap.blog { padding-top: 40px; display: flex; flex-direction: column; gap: 40px; }
.blog-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; }
.blog-head__tx { display: flex; flex-direction: column; gap: 12px; max-width: 760px; min-width: 0; }
.blog-head h1 { font-size: 72px; line-height: 1.02; overflow-wrap: anywhere; }
.blog-head p { font-size: 18px; line-height: 28.8px; font-weight: 300; color: var(--text-muted); }
.blog-search { flex: 0 1 300px; min-width: 0; position: relative; }
.blog-search input { width: 100%; height: 48px; border: 1.5px solid var(--line-strong); border-radius: 99px; padding: 0 18px; font: inherit; font-size: 16px; background: var(--bg-raised); color: var(--text-strong); }
.blog-search input::placeholder { color: var(--text-muted); }
.blog-cats { gap: 8px; }
.blog-cats .fc-chip { display: inline-flex; align-items: center; text-decoration: none; }
.blog-cats--sub { margin-top: -30px; } /* hàng chuyên mục con sát hàng trên */
.blog-found { font-size: 16px; line-height: 24px; color: var(--text-muted); }
.blog-found a { margin-left: 8px; font-weight: 600; color: var(--text-strong); }

.blog-feat { min-width: 0; }
.blog-feat__link { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px 40px; align-items: center; color: inherit; text-decoration: none; }
.blog-feat__media { position: relative; aspect-ratio: 16 / 10; border-radius: 38px; background: var(--bg-sunken); overflow: hidden; }
.blog-feat__media img, .blog-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--as-slow) var(--as-ease); }
.blog-feat__link:hover img, .blog-card__link:hover img { transform: scale(1.04); }
.blog-feat__tx { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.blog-feat__tx .as-tag { align-self: flex-start; }
.blog-feat__title { font-size: 44px; line-height: 1.1; font-weight: 600; letter-spacing: -0.8px; color: var(--text-strong); overflow-wrap: anywhere; text-wrap: balance; }
.blog-feat__text { font-size: 18px; line-height: 28.8px; font-weight: 300; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-feat__meta { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 20px; color: var(--text-muted); }
.blog-feat__avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--accent-alt); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; }

.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 24px; }
.blog-card { min-width: 0; }
.blog-card__link { display: flex; flex-direction: column; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.blog-card__media { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: 28px; background: var(--bg-sunken); overflow: hidden; }
.blog-card__media .as-tag { position: absolute; left: 16px; top: 16px; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blog-card__title { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.4px; color: var(--text-strong); overflow-wrap: anywhere; }
.blog-card__meta { font-size: 14px; line-height: 20px; color: var(--text-muted); }

.blog-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.blog-pager .page-numbers { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; color: var(--text-strong); font-size: 16px; font-weight: 600; text-decoration: none; }
.blog-pager a.page-numbers:hover { background: var(--bg-raised); }
.blog-pager .page-numbers.current { background: var(--bg-inverse); color: var(--text-inverse); }
.blog-pager .page-numbers.dots { border-color: transparent; }
.blog-empty { padding: 24px 0 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; color: var(--text-muted); }

@media (max-width: 1100px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .blog-head h1 { font-size: 56px; } }
@media (max-width: 860px) {
  .blog { padding-top: 24px; }
  .blog-head h1 { font-size: 44px; }
  .blog-search { flex-basis: 100%; }
  .blog-cats { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
  .blog-cats::-webkit-scrollbar { display: none; }
  .blog-cats--sub { margin-top: -30px; }
  .blog-feat__link { grid-template-columns: minmax(0, 1fr); }
  .blog-feat__media { border-radius: 28px; }
  .blog-feat__title { font-size: 28px; }
  .blog-grid { grid-template-columns: minmax(0, 1fr); }
}
