/* ==========================================================================
   MỤC "THÔNG BÁO" – CSS riêng (tiền tố tb-), không ảnh hưởng phần đã có.
   Màu/phông kế thừa từ biến của trang nếu có, nếu không dùng giá trị dự phòng.
   ========================================================================== */
.tb-section {
  --tb-blue: var(--blue, #075da8);
  --tb-blue-dark: var(--blue-dark, #034a89);
  --tb-navy: var(--navy, #123b68);
  --tb-teal: var(--teal, #13a6bd);
  --tb-ink: var(--ink, #193957);
  --tb-muted: var(--muted, #566f87);
  --tb-line: var(--line, #d9eaf7);
  --tb-soft: var(--bg-soft, #f4faff);
  --tb-mono: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  padding: 80px 0;
  background: #fff;
  color: var(--tb-ink);
  font-family: var(--font, "Be Vietnam Pro", system-ui, sans-serif);
  scroll-margin-top: 90px;
}
.tb-section *, .tb-section *::before, .tb-section *::after,
.tb-modal *, .tb-modal *::before, .tb-modal *::after { box-sizing: border-box; }
.tb-section h2, .tb-section h3, .tb-section p, .tb-modal h2, .tb-modal h4, .tb-modal p, .tb-modal ul { margin: 0; }
.tb-section ul, .tb-modal ul { padding: 0; list-style: none; }
.tb-section a, .tb-modal a { text-decoration: none; }
.tb-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tb-wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

/* ----- đầu mục ----- */
.tb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--tb-line); }
.tb-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--tb-blue); }
.tb-title { margin-top: 10px !important; font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: var(--tb-navy); }
.tb-lead { max-width: 640px; margin-top: 12px !important; font-size: 15px; line-height: 1.6; color: var(--tb-muted); }

/* ----- nút ----- */
.tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px;
  font-family: inherit; font-weight: 700; font-size: 13.5px; line-height: 1.2; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; border-radius: 10px; transition: background .2s, transform .2s, border-color .2s;
}
.tb-btn:hover { transform: translateY(-1px); }
.tb-btn--solid { color: #fff; background: var(--tb-blue); }
.tb-btn--solid:hover { background: var(--tb-blue-dark); }
.tb-btn--soft { color: var(--tb-navy); background: #eaf3fb; }
.tb-btn--soft:hover { background: #d9eafa; }
.tb-btn--accent { color: #06323a; background: #19c3c8; font-size: 15px; padding: 14px 18px; }
.tb-btn--accent:hover { background: #38d4d8; }
.tb-btn--glass { color: #fff; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); }
.tb-btn--glass:hover { background: rgba(255, 255, 255, .18); }
.tb-btn--block { width: 100%; }

/* ----- nhãn dùng chung ----- */
.tb-no { display: inline-block; padding: 3px 9px; font-family: var(--tb-mono); font-weight: 700; font-size: 12px; line-height: 1.4; color: #0b7f93; background: #fff; border: 1px solid #8fd3dd; border-radius: 5px; }
.tb-no--light { color: #b8f0f5; background: rgba(255, 255, 255, .08); border-color: rgba(184, 240, 245, .4); }
.tb-date { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--tb-muted); }
.tb-date--light { color: #cfe6f8; }

/* ----- thông báo nổi bật ----- */
.tb-hero {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; align-items: center;
  margin-top: 36px; padding: 36px; color: #fff; border-radius: 24px;
  background: radial-gradient(120% 140% at 100% 0%, #0f6a96 0%, transparent 55%), linear-gradient(135deg, #0d4a82 0%, #123b68 55%, #0b2a4a 100%);
  box-shadow: 0 24px 50px rgba(18, 59, 104, .22);
}
.tb-hero__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tb-pin { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; font-size: 11.5px; font-weight: 800; color: #3a2a00; background: #ffc21a; border-radius: 6px; }
.tb-hero__title { margin-top: 20px !important; font-size: clamp(22px, 2.8vw, 32px); font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.tb-hero__lead { margin-top: 16px !important; font-size: 14.5px; line-height: 1.65; color: #d4e7f7; }
.tb-hero__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.tb-hero__facts > div { padding: 12px 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; }
.tb-hero__facts span { display: block; font-size: 11.5px; color: #9fe6ee; }
.tb-hero__facts strong { display: block; margin-top: 2px; font-size: 14px; }
.tb-hero__sign { margin-top: 18px !important; font-size: 12.5px; color: #cfe6f8; }
.tb-hero__sign b { margin-right: 6px; color: #9fe6ee; }
.tb-hero__actions { padding: 22px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; }
.tb-hero__actions-title { margin-bottom: 14px !important; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: #9fe6ee; }
.tb-hero__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.tb-hero__link { display: block; width: 100%; margin-top: 16px; padding: 14px 0 0; font-family: inherit; font-weight: 700; font-size: 13.5px; line-height: 1.2; color: #ffc21a; text-align: center; background: none; border: 0; border-top: 1px solid rgba(255, 255, 255, .16); cursor: pointer; }
.tb-hero__link:hover { text-decoration: underline; }

/* ----- bộ lọc ----- */
.tb-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin: 40px 0 24px; }
.tb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tb-chip { padding: 8px 16px; font-family: inherit; font-weight: 600; font-size: 13.5px; line-height: 1.2; color: #3f5b75; background: #eef4f9; border: 0; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.tb-chip:hover { background: #dfecf7; }
.tb-chip[aria-pressed="true"] { color: #fff; background: var(--tb-blue); }
.tb-search { position: relative; flex: 0 1 300px; min-width: 220px; }
.tb-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8399ad; pointer-events: none; }
.tb-search input { width: 100%; padding: 10px 12px 10px 36px; font-family: inherit; font-weight: 400; font-size: 14px; line-height: 1.4; color: var(--tb-ink); background: #fff; border: 1px solid var(--tb-line); border-radius: 10px; outline: none; }
.tb-search input:focus { border-color: var(--tb-blue); box-shadow: 0 0 0 3px rgba(7, 93, 168, .14); }

/* ----- danh sách thẻ ----- */
.tb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tb-item { display: flex; min-width: 0; }      /* không transform ở đây để popup position:fixed hoạt động đúng */
.tb-card {
  display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 12px; padding: 20px 22px; color: inherit;
  background: #fff; border: 1px solid var(--tb-line); border-radius: 16px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tb-card:hover { transform: translateY(-3px); border-color: #8fd3dd; box-shadow: 0 12px 28px rgba(18, 59, 104, .09); }
.tb-card.is-featured { background: #f2fbfd; border-color: #8fd3dd; box-shadow: 0 0 0 1px #8fd3dd; }
.tb-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tb-card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15.5px; font-weight: 800; line-height: 1.4; color: var(--tb-navy); }
.tb-card__lead { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.6; color: var(--tb-muted); }
.tb-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--tb-line); }
.tb-card__author { min-width: 0; overflow: hidden; font-size: 12.5px; font-weight: 600; color: #34506b; text-overflow: ellipsis; white-space: nowrap; }
.tb-card__more { flex: none; padding: 7px 12px; font-size: 13px; font-weight: 700; color: var(--tb-blue); background: #eaf3fb; border-radius: 8px; }
.tb-card:hover .tb-card__more { background: var(--tb-blue); color: #fff; }
.tb-empty { padding: 40px 0; text-align: center; color: var(--tb-muted); }
.tb-item[hidden] { display: none; }

/* ----- popup nội dung văn bản ----- */
.tb-modal { position: fixed; inset: 0; z-index: 1100; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 39, 70, .62); backdrop-filter: blur(3px); }
.tb-modal.is-open { display: flex; }
.tb-dialog { display: flex; flex-direction: column; width: 100%; max-width: 800px; max-height: calc(100vh - 32px); overflow: hidden; background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(8, 39, 70, .4); animation: tb-in .22s ease; }
@keyframes tb-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.tb-mhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: var(--tb-soft); border-bottom: 1px solid var(--tb-line); }
.tb-mhead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tb-cat { padding: 3px 10px; font-size: 12px; font-weight: 700; color: var(--tb-blue); background: #e0f1ff; border-radius: 999px; }
.tb-close { display: grid; flex: none; place-items: center; width: 36px; height: 36px; padding: 0; color: var(--tb-navy); background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.tb-close:hover { background: #dfecf7; }
.tb-mbody { flex: 1; overflow-y: auto; padding: 28px 32px; }
.tb-doc__title { font-size: clamp(19px, 2.4vw, 24px); font-weight: 800; line-height: 1.35; color: var(--tb-navy); }
.tb-doc__content { margin-top: 20px; font-size: 15px; line-height: 1.75; color: #2c4660; }
.tb-doc__content p { margin: 0 0 12px; }
.tb-doc__content h4 { margin: 20px 0 8px; font-size: 15px; font-weight: 800; color: var(--tb-navy); }
.tb-doc__content ul { margin: 0 0 12px; padding-left: 20px; list-style: disc; }
.tb-doc__content li { margin-bottom: 4px; }
.tb-doc__content a { color: var(--tb-blue); font-weight: 600; text-decoration: underline; }
.tb-doc__sign { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-top: 28px; padding-top: 18px; border-top: 1px dashed var(--tb-line); text-align: right; }
.tb-doc__sign span { font-size: 12.5px; color: var(--tb-muted); }
.tb-doc__sign strong { font-size: 15px; color: var(--tb-navy); }
.tb-doc__sign em { font-size: 13px; font-style: normal; color: var(--tb-muted); }
.tb-mfoot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--tb-line); background: #fff; }

/* ----- responsive ----- */
@media (max-width: 1000px) {
  .tb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-hero { grid-template-columns: minmax(0, 1fr); padding: 28px; }
}
@media (max-width: 720px) {
  .tb-section { padding: 56px 0; }
  .tb-head { flex-direction: column; align-items: flex-start; }
  .tb-grid { grid-template-columns: minmax(0, 1fr); }
  .tb-hero { padding: 22px; border-radius: 18px; }
  .tb-hero__facts { grid-template-columns: minmax(0, 1fr); }
  .tb-search { flex-basis: 100%; }
  .tb-modal { padding: 0; align-items: flex-end; }
  .tb-dialog { max-height: 94vh; border-radius: 20px 20px 0 0; }
  .tb-mbody { padding: 20px; }
  .tb-mfoot .tb-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .tb-dialog { animation: none; } .tb-card, .tb-btn { transition: none; } }

/* ----- (tùy chọn) thêm 1 mục menu nên thanh menu hơi chật: giữ mỗi mục trên 1 dòng, thu hẹp khoảng cách ----- */
@media (min-width: 1081px) {
  .nav { gap: 14px; }
  .brand, .links a, .nav-actions .btn { white-space: nowrap; }
  .links { gap: 0; }
  .links a { padding-inline: 9px; font-size: 13.5px; }
  .links a[aria-current="true"]::after { left: 9px; right: 9px; }
}
@media (min-width: 1081px) and (max-width: 1159px) {
  .links a { padding-inline: 6px; font-size: 13px; }
  .links a[aria-current="true"]::after { left: 6px; right: 6px; }
}
