/* ==========================================================================
   Danh mục thủ tục / văn bản (cat_tt, /tt/) — bảng như heza.gov.vn (PLAN-20261013-LAYOUT-CLONE)
   Màu theo bảng PROD (biến --heza-c-* trong heza-gov.css): tiêu đề bảng #007BB0, chữ #001832, hover #D0322F.
   ========================================================================== */
.heza-archive-tt-main { padding-inline: clamp(20px, 3.8vw, 44px); }
.heza-tt-archive { width: 100%; max-width: 1240px; margin-inline: auto; }

/* Breadcrumb + vạch nhấn trên tiêu đề — số đo thật từ heza.gov.vn: crumb 11px #717171, H1 24px/600 lh30, pad 31/21, vạch 63×3 #007BB0 */
.heza-tt-archive, .heza-news-archive { font-family: var(--heza-font__main); }
.heza-tt-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: 11px; line-height: 16.5px; color: var(--heza-c-dark); }
.heza-tt-crumbs li + li::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 14px 1px 10px; border-right: 1.5px solid var(--heza-c-gray); border-top: 1.5px solid var(--heza-c-gray); transform: rotate(45deg); }
.heza-tt-crumbs a { color: var(--heza-c-gray); text-decoration: none; }
.heza-tt-crumbs a:hover { color: var(--heza-c-primary); }
.heza-tt-heading { position: relative; margin: 0 0 12px; padding: 31px 0 21px; color: var(--heza-c-dark); font-family: var(--heza-font__main); font-size: 24px; font-weight: 600; line-height: 30px; }
.heza-tt-heading::before { content: ''; position: absolute; top: 0; left: 0; width: 63px; height: 3px; background: var(--heza-c-blue); }
.heza-tt-crumbs { margin-bottom: 25px; }

/* Ô tìm kiếm bên phải */
.heza-tt-search { position: relative; display: flex; align-items: center; width: min(100%, 300px); height: 40px; margin: 0 0 24px auto; background: #fff; border: 1px solid #E6E6E6; border-radius: 100px; overflow: hidden; }
.heza-tt-search:focus-within { border-color: var(--heza-c-gray); }
.heza-tt-search input[type="search"] { flex: 1 1 auto; min-width: 0; height: 38px; padding: 0 4px 0 22px; border: 0; background: transparent; color: var(--heza-c-text); font-family: var(--heza-font__main); font-size: 12px; outline: none; }
.heza-tt-search button { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px 0 8px; border: 0; background: transparent; color: var(--heza-c-gray); cursor: pointer; }
.heza-tt-search button:hover { color: var(--heza-c-primary); }

/* Bảng */
.heza-tt-tablewrap { border: 1px solid var(--heza-c-border); }
.heza-tt-table { width: 100%; margin: 0; border-collapse: collapse; table-layout: auto; font-size: 15px; }
.heza-tt-table thead th { padding: 22px 16px; background: var(--heza-c-blue); color: #fff; font-family: var(--heza-font__main); font-size: 15px; font-weight: 600; text-align: left; white-space: nowrap; }
.heza-tt-table tbody td { padding: 18px 16px; border-top: 1px solid #EDEDED; color: var(--heza-c-text); vertical-align: middle; }
.heza-tt-table tbody tr:first-child td { border-top: 0; }
.heza-tt-table tbody tr:hover td { background: #FAFAFA; }
.heza-tt-table .heza-tt-stt { width: 72px; font-variant-numeric: tabular-nums; }
.heza-tt-table .heza-tt-date { width: 150px; white-space: nowrap; font-family: var(--heza-font__main); font-size: 16px; }
.heza-tt-table .heza-tt-file { width: 90px; text-align: center; }
.heza-tt-table thead .heza-tt-file { text-align: center; }
.heza-tt-title { margin: 0; font-family: var(--heza-font__main); font-size: 15px; font-weight: 500; line-height: 1.5; }
.heza-tt-title a { color: var(--heza-c-text); text-decoration: none; }
.heza-tt-title a:hover { color: var(--heza-c-primary); }
.heza-tt-download { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--heza-c-blue); }
.heza-tt-download:hover { color: var(--heza-c-primary); }
.heza-tt-mobile { display: none; }
.heza-tt-empty { padding: 32px 0; color: var(--heza-c-gray); }

/* Phân trang tròn — PROD: ô 50×50, cách 14px, viền #BDBDBD, hiện tại nền #E0E0E0, chữ #333 đậm 16px */
.heza-tt-pager { margin-top: 39px; }
.heza-tt-pager ul.page-numbers { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; list-style: none; border: 0; background: none; min-width: 0; height: auto; border-radius: 0; }
.heza-tt-pager li { margin: 0; padding: 0; }
.heza-tt-pager li > .page-numbers { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 50px; height: 50px; min-width: 50px; padding: 0; border: 1px solid #BDBDBD; border-radius: 100px; color: #333; font-family: var(--heza-font__main); font-size: 16px; font-weight: 700; line-height: 48px; text-decoration: none; background: transparent; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.heza-tt-pager li > a.page-numbers:hover { border-color: var(--heza-c-primary); color: var(--heza-c-primary); }
.heza-tt-pager li > .page-numbers.current { background: #E0E0E0; border-color: #E0E0E0; }
.heza-tt-pager li > .page-numbers.dots { border-color: transparent; }

@media (max-width: 767px) {
  .heza-tt-search { width: 100%; }
  .heza-tt-table thead .heza-tt-date, .heza-tt-table thead .heza-tt-file, .heza-tt-table tbody .heza-tt-date, .heza-tt-table tbody .heza-tt-file { display: none; }
  .heza-tt-table .heza-tt-stt { width: 44px; padding-inline: 10px; }
  .heza-tt-table thead th { padding: 16px 10px; }
  .heza-tt-table tbody td { padding: 14px 10px; }
  .heza-tt-mobile { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; color: var(--heza-c-gray); font-size: 13px; }
  .heza-tt-mobile span { display: flex; align-items: center; gap: 6px; }
  .heza-tt-pager ul.page-numbers { gap: 8px; }
  .heza-tt-pager li > .page-numbers { width: 42px; min-width: 42px; height: 42px; line-height: 40px; }
}

/* Danh mục cha: lưới danh mục con có icon (PROD .children-cats) */
.heza-tt-children { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 20px; margin: 8px 0 0; }
.heza-tt-child { display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 16px 20px; border: 1px solid var(--heza-c-border); background: #fff; color: var(--heza-c-dark); font-family: var(--heza-font__main); font-size: 17px; font-weight: 600; line-height: 1.35; text-decoration: none; transition: border-color .2s ease, color .2s ease; }
.heza-tt-child:hover { border-color: var(--heza-c-blue); color: var(--heza-c-primary); }
.heza-tt-child img { flex: 0 0 auto; width: 56px; height: 56px; object-fit: contain; margin: 0 !important; }

/* Tiện ích công: gom tiêu đề và tìm kiếm thành một đầu mục rõ ràng, giúp quét
   danh sách văn bản nhanh hơn trên cả danh mục có nhiều bản ghi. */
.heza-tt-archive {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
  column-gap: clamp(24px, 4vw, 56px);
  align-items: end;
}
.heza-tt-crumbs,
.heza-tt-tablewrap,
.heza-tt-children,
.heza-tt-empty,
.heza-tt-pager { grid-column: 1 / -1; }
.heza-tt-heading { margin-bottom: 24px; }
.heza-tt-search { margin: 0 0 24px auto; box-shadow: 0 1px 0 rgba(0, 24, 50, .03); }
.heza-tt-search:focus-within { border-color: var(--heza-c-blue); box-shadow: 0 0 0 3px rgba(0, 123, 176, .12); }

.heza-tt-tablewrap {
  overflow: hidden;
  border-color: #dce6eb;
  box-shadow: 0 7px 24px rgba(0, 41, 76, .055);
}
.heza-tt-table thead th {
  padding-block: 18px;
  background: #007bb0;
  font-size: 14px;
  letter-spacing: .01em;
}
.heza-tt-table tbody td { padding-block: 20px; border-color: #e6edf1; }
.heza-tt-table tbody tr { transition: background-color .18s ease; }
.heza-tt-table tbody tr:hover td { background: #f2f8fb; }
.heza-tt-table .heza-tt-stt { color: #607582; font-weight: 600; text-align: center; }
.heza-tt-title { font-size: 16px; font-weight: 600; line-height: 1.55; }
.heza-tt-title a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.heza-tt-title a:hover { text-decoration: underline; }
.heza-tt-table .heza-tt-date { color: #49616e; font-size: 15px; font-variant-numeric: tabular-nums; }
.heza-tt-download {
  border-radius: 50%;
  background: #eaf5fa;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.heza-tt-download:hover { background: var(--heza-c-primary); color: #fff; transform: translateY(-1px); }

.heza-tt-pager { margin-top: 32px; }
.heza-tt-pager li > .page-numbers { border-color: #c7d5dc; color: #31505f; }
.heza-tt-pager li > a.page-numbers:hover { border-color: var(--heza-c-blue); background: #eaf5fa; color: var(--heza-c-blue); }
.heza-tt-pager li > .page-numbers.current { background: var(--heza-c-blue); border-color: var(--heza-c-blue); color: #fff; }

/* Danh mục thủ tục: card ảnh lớn và nhãn nền xanh theo mẫu thông tin chuyên đề. */
.heza-tt-children {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.2vw, 36px);
  margin-top: 8px;
}
.heza-tt-child {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: 0 3px 12px rgba(0, 41, 76, .07);
  overflow: hidden;
}
.heza-tt-child img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  border-radius: 0;
  object-fit: cover;
  box-shadow: none;
  transition: transform .28s ease;
}
.heza-tt-child span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  padding: 14px 16px;
  background: #003d52;
  color: #fff;
  font-size: clamp(15px, 1.3vw, 20px);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}
.heza-tt-child:hover { border-color: transparent; background: transparent; color: #fff; box-shadow: 0 9px 22px rgba(0, 41, 76, .17); }
.heza-tt-child:hover img { transform: scale(1.045); }
.heza-tt-child:focus-visible { outline: 3px solid var(--heza-c-blue); outline-offset: 3px; }

@media (max-width: 960px) {
  .heza-tt-children { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .heza-tt-archive { display: block; }
  .heza-tt-heading { margin-bottom: 16px; padding-bottom: 16px; }
  .heza-tt-search { width: 100%; margin-bottom: 20px; }
  .heza-tt-tablewrap { box-shadow: none; }
  .heza-tt-table { table-layout: fixed; }
  .heza-tt-table tbody td { padding-block: 16px; }
  .heza-tt-table .heza-tt-summary { min-width: 0; }
  .heza-tt-title { font-size: 15px; line-height: 1.5; }
  .heza-tt-title a { overflow-wrap: anywhere; }
  .heza-tt-mobile { color: #59707d; }
  .heza-tt-mobile .heza-tt-download { width: 30px; height: 30px; }
  .heza-tt-children { grid-template-columns: 1fr; gap: 20px; }
  .heza-tt-child span { min-height: 64px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .heza-tt-table tbody tr,
  .heza-tt-download,
  .heza-tt-child img { transition: none; }
}
