/* CSS riêng cho bài viết / danh mục / tìm kiếm / blog. Nạp sau bla.css nên ghi đè được. */

/* Hero tiêu đề */
/* Hero các trang bài viết/danh mục/blog: nền NHẠT (ánh đỏ-vàng rất nhẹ), chữ đen, chỉ một điểm nhấn đỏ nhỏ dưới tiêu đề.
   Ba màu BLA đều mạnh nên không dùng nền đậm/đỏ/vàng đặc ở khối lớn (chói mắt, "lòe loẹt"). */
.bla-hero { background: linear-gradient(135deg, #fff7f6 0%, #fffbee 100%); color: var(--bla-black); padding: 36px 0 40px; border-bottom: 1px solid var(--bla-line); }
.bla-hero .bla-breadcrumb, .bla-hero .bla-breadcrumb a { color: var(--bla-text-muted); }
.bla-hero .bla-breadcrumb a:hover { color: var(--bla-red-dark); }
.bla-hero__title { font-size: clamp(26px, 4.5vw, 40px); font-weight: 800; line-height: 1.25; margin: 8px 0 0; max-width: 900px; }
.bla-hero__title::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 14px; background: var(--bla-red-dark); border-radius: 2px; }
.bla-hero__title span { color: var(--bla-red-dark); }
.bla-hero__desc { color: var(--bla-text-muted); margin: 12px 0 0; max-width: 760px; }
.bla-hero__cat { display: inline-block; background: #fde8e8; color: var(--bla-red-dark); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 4px 12px; border-radius: 20px; text-decoration: none; margin-top: 8px; }
.bla-hero__cat:hover { background: var(--bla-red-dark); color: #fff; }
/* Ngày giờ + thời gian đọc: 16px, chữ đen nhạt trên nền hero sáng (đủ tương phản AA) */
.bla-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: #3d3541; font-size: 16px; margin: 16px 0 0; }
.bla-meta i { color: var(--bla-red-dark); margin-right: 6px; }
/* Đường dẫn (breadcrumb) trong hero: 16px, đậm hơn để dễ đọc */
.bla-hero .bla-breadcrumb { font-size: 16px; color: #3d3541; margin-bottom: 12px; }
.bla-hero .bla-breadcrumb a { color: #3d3541; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(61,53,65,.35); }
.bla-hero .bla-breadcrumb i { font-size: 11px; margin: 0 6px; }
.bla-post-wrap { padding-top: 0; padding-bottom: 48px; }

/* Thẻ bài viết */
.bla-card__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bla-grey); }
.bla-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.bla-card:hover .bla-card__img img { transform: scale(1.05); }
.bla-card__ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 36px; color: #c5c7cc; }
.bla-card__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.bla-card__cat { color: var(--bla-red); font-weight: 700; text-transform: uppercase; font-size: 14px; }
.bla-card .card-title { font-weight: 700; line-height: 1.4; }
.bla-card .card-text { color: #555; font-size: 14.5px; }
.bla-card__more { color: var(--bla-red); font-weight: 600; font-size: 14px; text-decoration: none; }
.bla-card__more i { font-size: 11px; transition: margin .15s; }
.bla-card__more:hover i { margin-left: 4px; }

/* Bài chi tiết */
.bla-article { max-width: none; margin: var(--bs-gutter-y, 0) 0 0; } /* giữ lề trên của Bootstrap .row > * để không lệch so với hàng âm của .row */
/* Ảnh đại diện nổi lên, chồng vào phần tiêu đề (hero) cho có chiều sâu; hero bài viết chừa chỗ phía dưới */
.bla-hero.bla-hero--post { padding-bottom: 72px; } /* 2 class để thắng quy tắc .bla-hero của màn hình hẹp */
.bla-article__thumb { position: relative; z-index: 2; margin: -44px 0 24px; }
.bla-article__thumb img { box-shadow: 0 14px 34px rgba(29, 14, 31, .22); border: 4px solid #fff; border-radius: 14px; }
@media (min-width: 992px) { .bla-hero.bla-hero--post { padding-bottom: 110px; } .bla-article__thumb { margin-top: -84px; } }
/* Ảnh đại diện bài viết: luôn 16:9 (cắt giữa, không méo) để đồng bộ với thẻ bài viết/sự kiện */
.bla-article__thumb img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; display: block; }
.bla-sapo { font-size: 1.1rem; font-weight: 500; color: #333; background: var(--bla-grey); border-left: 4px solid var(--bla-red); padding: 16px 20px; border-radius: 0 8px 8px 0; border-bottom: 0; }
.bla-content { font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; }
.bla-content h2 { font-size: 1.55rem; margin-top: 1.8em; padding-left: 12px; border-left: 4px solid var(--bla-yellow); scroll-margin-top: 90px; }
.bla-content h3 { font-size: 1.25rem; scroll-margin-top: 90px; }
.bla-content img { border-radius: 8px; height: auto; }
.bla-content blockquote { border-left: 4px solid var(--bla-red); background: var(--bla-grey); margin: 1.4em 0; padding: 12px 20px; border-radius: 0 8px 8px 0; }
.bla-content table { width: 100%; display: block; overflow-x: auto; }
.bla-content table td, .bla-content table th { border: 1px solid var(--bla-line); padding: 8px 12px; }

/* Mục lục có thu gọn (<details>): thẻ viền mảnh, tiêu đề bấm được, số lượng mục, mũi tên xoay khi mở */
.bla-toc { border: 1px solid var(--bla-line); border-left: 4px solid var(--bla-red-dark); border-radius: 10px; margin: 24px 0; background: #fff; }
.bla-toc[hidden] { display: none; }
.bla-toc__title { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 16px; font-size: 17px; font-weight: 700; cursor: pointer; list-style: none; }
.bla-toc__title::-webkit-details-marker { display: none; }
.bla-toc__title span i { color: var(--bla-red-dark); margin-right: 8px; }
.bla-toc__count { font-size: 15px; font-weight: 400; color: var(--bla-text-muted); }
.bla-toc__chev { flex: none; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bla-grey); font-size: 13px; transition: transform .2s; }
.bla-toc[open] .bla-toc__chev { transform: rotate(180deg); }
.bla-toc__title:focus-visible { outline: 3px solid #1d0e1f; outline-offset: -3px; border-radius: 8px; }
.bla-toc nav { padding: 0 16px 14px; border-top: 1px solid var(--bla-line); }
.bla-toc__list { margin: 12px 0 0; padding-left: 22px; max-height: 60vh; overflow-y: auto; font-size: 16px; }
.bla-toc__list li { margin: 2px 0; padding-left: 2px; }
.bla-toc__list li::marker { color: var(--bla-red-dark); font-weight: 700; }
.bla-toc__list .is-sub { margin-left: 18px; list-style: circle; font-size: 16px; }
.bla-toc__list a { display: inline-block; padding: 6px 0; color: var(--bla-black); text-decoration: none; }
.bla-toc__list a:hover, .bla-toc__list a:focus-visible { color: var(--bla-red-dark); text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .bla-toc__chev { transition: none; } }

/* Chia sẻ */
.bla-share { display: flex; align-items: center; gap: 10px; margin: 32px 0; padding-top: 20px; border-top: 1px solid var(--bla-line); font-weight: 600; }
.bla-share a, .bla-share button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--bla-black); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; transition: background .15s; }
.bla-share a:hover, .bla-share button:hover { background: var(--bla-red); }
.bla-share .is-done { background: #198754; }

/* Bài trước / sau */
.bla-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bla-postnav a { display: block; border: 1px solid var(--bla-line); border-radius: 10px; padding: 14px 16px; color: var(--bla-black); text-decoration: none; font-weight: 600; line-height: 1.4; }
.bla-postnav a:hover { border-color: var(--bla-red); color: var(--bla-red); }
.bla-postnav small { display: block; color: #888; font-weight: 400; margin-bottom: 4px; }
.bla-postnav__next { text-align: right; grid-column: 2; }
.bla-postnav__prev { grid-column: 1; }

/* Sidebar + CTA (thẻ .bla-sidecta; tên cũ .bla-cta trùng với nút header và trang chủ nên đã đổi).
   Thẻ trắng, viền mảnh, icon tròn nền đỏ nhạt + danh sách lợi ích có icon, máy bay vàng nhạt làm hình nền; không dùng nền gradient đậm. */
.bla-sidebar { position: sticky; top: 90px; margin-top: 32px; } /* chừa khoảng với hero phía trên, tránh hai khối dính sát nhau */
.bla-sidecta { position: relative; overflow: hidden; background: #fff; color: var(--bla-black); border: 1px solid var(--bla-line); border-top: 4px solid var(--bla-red-dark); border-radius: 14px; padding: 24px 22px; box-shadow: 0 6px 20px rgba(29, 14, 31, .07); }
.bla-sidecta::after { content: "\f072"; font: 900 150px/1 "Font Awesome 6 Free"; position: absolute; right: -28px; top: -22px; color: #fff3d1; transform: rotate(12deg); pointer-events: none; z-index: 0; }
.bla-sidecta > * { position: relative; z-index: 1; }
.bla-sidecta__icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 12px; border-radius: 50%; background: #fde8e8; color: var(--bla-red-dark); font-size: 24px; }
.bla-sidecta__title { font-size: 1.3rem; font-weight: 800; line-height: 1.3; margin: 0 0 8px; }
.bla-sidecta__text { color: #3d3541; font-size: 16px; margin: 0 0 14px; }
.bla-sidecta__list { list-style: none; margin: 0 0 18px; padding: 0; }
.bla-sidecta__list li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; font-size: 16px; line-height: 1.4; border-top: 1px dashed var(--bla-line); }
.bla-sidecta__list i { flex: none; width: 22px; margin-top: 2px; text-align: center; color: var(--bla-red-dark); }
.bla-sidecta__btn { margin: 0 0 14px; }
.bla-sidecta__tel { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border-radius: 10px; background: #fff8e1; color: var(--bla-black); text-decoration: none; font-size: 18px; font-weight: 800; }
.bla-sidecta__tel i { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bla-yellow); color: var(--bla-black); font-size: 16px; }
.bla-sidecta__tel small { display: block; font-size: 14px; font-weight: 400; color: #3d3541; line-height: 1.2; }
.bla-sidecta__tel:hover { background: #ffefb5; }

/* Bài liên quan */
.bla-related { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--bla-line); }
.bla-related__title { font-size: 1.5rem; font-weight: 800; margin-bottom: 20px; }

/* Ô tìm kiếm trong thân trang */
.bla-searchbox { display: flex; max-width: 520px; margin: 20px 0 0; background: #fff; border-radius: 8px; overflow: hidden; }
.bla-searchbox input { flex: 1; min-width: 0; border: 0; padding: 12px 16px; font: inherit; color: var(--bla-black); outline: 0; }
.bla-searchbox button { border: 0; background: var(--bla-red); color: #fff; font-weight: 700; padding: 0 20px; cursor: pointer; }
.bla-searchbox button:hover { background: var(--bla-red-dark); }

/* Trạng thái rỗng */
.bla-empty { text-align: center; padding: 32px 0 16px; }
.bla-empty .bla-searchbox { margin: 20px auto; border: 1px solid var(--bla-line); }
.bla-empty__icon { font-size: 48px; color: #c5c7cc; margin-bottom: 12px; }
.bla-chips { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.bla-chips a { display: inline-block; padding: 6px 14px; border: 1px solid var(--bla-line); border-radius: 20px; color: var(--bla-black); text-decoration: none; font-size: 14px; }
.bla-chips a:hover { background: var(--bla-red); border-color: var(--bla-red); color: #fff; }

/* Phân trang */
.bla-pagination { display: flex; justify-content: center; margin-top: 40px; }
.bla-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; margin: 0 3px; padding: 0 10px; border: 1px solid var(--bla-line); border-radius: 8px; color: var(--bla-black); text-decoration: none; font-weight: 500; }
.bla-pagination a.page-numbers:hover { border-color: var(--bla-red); color: var(--bla-red); }
.bla-pagination .current { background: var(--bla-red); border-color: var(--bla-red); color: #fff; }

@media (max-width: 991.98px) { .bla-sidebar { position: static; } }
@media (max-width: 575.98px) {
  .bla-hero { padding: 24px 0 28px; }
  .bla-content { font-size: 16px; }
  .bla-postnav { grid-template-columns: 1fr; }
  .bla-postnav__next, .bla-postnav__prev { grid-column: 1; text-align: left; }
}

/* ---------- Trang Blog: chia theo chuyên mục ---------- */
.bla-blog-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; margin: 0 0 8px; scrollbar-width: thin; }
.bla-blog-chip { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--bla-line); border-radius: 999px; background: #fff; color: var(--bla-black); font-weight: 500; text-decoration: none; white-space: nowrap; }
.bla-blog-chip:hover, .bla-blog-chip:focus-visible { border-color: var(--bla-red-dark); color: var(--bla-red-dark); background: #fff7f6; }
.bla-blog-sec { padding: 28px 0 8px; }
.bla-blog-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--bla-line); }
.bla-blog-sec__title { margin: 0; font-size: clamp(20px, 3vw, 26px); font-weight: 800; line-height: 1.3; }
.bla-blog-sec__title a { color: inherit; text-decoration: none; }
.bla-blog-sec__title::before { content: ""; display: inline-block; width: 6px; height: .9em; margin-right: 10px; background: var(--bla-red-dark); border-radius: 2px; vertical-align: -2px; }
.bla-blog-sec__more { flex: none; color: var(--bla-red-dark); font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.bla-blog-sec__more:hover { text-decoration: underline; }
