/* Thành phần nội dung trang đơn — tách khỏi heza-gov.css (PLAN-20261011-51 D9: chỉ nạp khi cần) */
/* ==========================================================================
   Nội dung chuyển từ Elementor (PLAN-20261011-48 GĐ3) — block chuẩn, không phụ thuộc Elementor
   ========================================================================== */
.heza-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 24px 0; padding: 0; list-style: none; }
.heza-stat { margin: 0; padding: 16px; border: 1px solid #e2e8f0; border-left: 4px solid var(--heza-c-blue, #0071bd); border-radius: var(--heza-radius, 6px); background: #f8fafc; }
.heza-stat strong { display: block; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; color: var(--heza-c-blue, #0071bd); }
.heza-stat span { display: block; margin-top: 4px; font-size: 15px; color: #334155; }
.heza-feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 24px 0; padding: 0; list-style: none; }
.heza-feature { margin: 0; padding: 14px; border: 1px solid #e2e8f0; border-radius: var(--heza-radius, 6px); }
.heza-feature img { display: block; max-width: 100%; height: auto; margin: 0 0 10px; border-radius: 4px; }
.heza-feature__title { display: block; font-weight: 600; color: #001832; }
.heza-feature__desc { margin: 6px 0 0; font-size: 15px; }
.heza-feature__link { display: inline-block; margin-top: 8px; font-weight: 600; }
.wp-block-details { margin: 12px 0; padding: 12px 16px; border: 1px solid #e2e8f0; border-radius: var(--heza-radius, 6px); background: #fff; }
.wp-block-details > summary { cursor: pointer; font-weight: 600; color: #001832; }
.wp-block-details[open] > summary { margin-bottom: 10px; }
.heza-posts { margin: 16px 0; padding: 0; list-style: none; }
.heza-posts--list .heza-posts__item { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #cbd5e1; }
.heza-posts--cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.heza-posts--cards .heza-posts__item { display: flex; flex-direction: column; gap: 8px; }
.heza-posts__thumb img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--heza-radius, 6px); }
.heza-posts__title { font-weight: 600; color: #001832; text-decoration: none; }
.heza-posts__date { flex-shrink: 0; font-size: 13px; color: #64748b; }
.heza-map iframe, .heza-embed iframe { width: 100%; min-height: 360px; border: 0; border-radius: var(--heza-radius, 6px); }


/* ==========================================================================
   Trang nội dung chuyển từ Elementor — thiết kế v2 (PLAN-20261011-49)
   Chỉ áp cho class MỚI do elementor_tree_convert.php (v3) sinh ra, nên trang chưa duyệt không đổi giao diện.
   Design read: cổng thông tin công quyền, trust-first. Dials 3 / 2 / 5. Một màu nhấn (xanh HEZA var(--heza-c-blue, #0071bd)),
   bo góc 6px thống nhất, chỉ sáng (theme không có dark mode).
   ========================================================================== */
.heza-page-main, .heza-single-kcn-main { --heza-c-ink: #1e293b; --heza-c-muted: #475569; --heza-c-line: #e2e8f0; --heza-c-tint: #f1f6fa; }

/* Tiêu đề mục trong thân trang */
.heza-page-main .wp-block-post-content > h2.wp-block-heading,
.heza-single-kcn-main .wp-block-post-content > h2.wp-block-heading { margin: 56px 0 18px; color: var(--heza-c-navy); font-size: clamp(22px, 2.1vw, 28px); line-height: 1.25; }

/* Dải số liệu (các counter gộp lại) — một khối, vạch ngăn mảnh thay vì 5 thẻ rời */
.heza-stats--band { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 24px 0 32px; border-radius: var(--heza-radius, 6px); overflow: hidden; background: var(--heza-c-blue, #0071bd); }
.heza-stats--band .heza-stat { padding: 22px 20px; border: 0; border-left: 1px solid rgba(255, 255, 255, .28); border-radius: 0; background: transparent; }
.heza-stats--band .heza-stat:first-child { border-left: 0; }
.heza-stats--band .heza-stat strong { color: #fff; font-family: var(--heza-font__main); font-size: clamp(24px, 2.3vw, 32px); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.heza-stats--band .heza-stat span { color: rgba(255, 255, 255, .88); font-size: 14px; }
/* Tiêu đề ngay trước dải số liệu → ghép thành một khối như PROD */
.wp-block-post-content > h2.wp-block-heading:has(+ .heza-stats--band) { margin-bottom: 0; padding: 22px 20px 4px; border-radius: var(--heza-radius, 6px) var(--heza-radius, 6px) 0 0; background: var(--heza-c-blue, #0071bd); color: #fff; font-size: clamp(18px, 1.6vw, 22px); text-transform: uppercase; }
.wp-block-post-content > h2.wp-block-heading:has(+ .heza-stats--band) + .heza-stats--band { margin-top: 0; border-radius: 0 0 var(--heza-radius, 6px) var(--heza-radius, 6px); }

/* Danh sách icon / văn bản đính kèm: hàng gọn, icon cố định 48px */
.heza-feature-list--icon { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.heza-feature-list--icon .heza-feature { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; transition: border-color .2s ease; }
.heza-feature-list--icon .heza-feature:hover { border-color: var(--heza-c-blue, #0071bd); }
.heza-feature-list--icon .heza-feature img { flex: 0 0 48px; width: 48px; height: 48px; margin: 0; object-fit: contain; }
.heza-feature-list--icon .heza-feature__title { font-size: 16px; line-height: 1.35; }
.heza-feature-list--icon .heza-feature__title a { color: var(--heza-c-navy, #0f3a66); text-decoration: none; }
.heza-feature-list--icon .heza-feature__title a:hover { color: var(--heza-c-blue, #0071bd); text-decoration: underline; }
.heza-feature-list--icon a[href$=".pdf"]::after { content: "PDF"; display: inline-block; margin-left: 8px; padding: 1px 6px; border: 1px solid currentColor; border-radius: 3px; font-size: 11px; font-weight: 700; letter-spacing: .04em; vertical-align: 2px; opacity: .75; }
/* Icon-box đứng đầu một cột nội dung (ưu đãi…) → đóng vai tiêu đề cột */
.wp-block-column > .heza-feature-list--icon:first-child { margin: 0 0 12px; }
.wp-block-column > .heza-feature-list--icon:first-child .heza-feature { padding: 0 0 12px; border: 0; border-bottom: 2px solid var(--heza-c-blue, #0071bd); border-radius: 0; }
.wp-block-column > .heza-feature-list--icon:first-child .heza-feature__title { color: var(--heza-c-blue, #0071bd); font-family: var(--heza-font__main); font-size: 19px; font-weight: 700; text-transform: uppercase; }

/* Dải nền sáng thay ảnh nền trang trí (khi bên trong là thẻ / danh sách bài) */
.heza-band { margin: 48px 0; padding: clamp(20px, 3vw, 32px); border-radius: var(--heza-radius, 6px); background: var(--heza-c-tint, #f1f6fa); }
.heza-band > h2.wp-block-heading:first-child { margin-top: 0; color: var(--heza-c-navy, #0f3a66); font-size: clamp(22px, 2.1vw, 28px); }
.heza-band .heza-posts--cards .heza-posts__item { padding: 10px 10px 14px; border: 1px solid var(--heza-c-line, #e2e8f0); border-radius: var(--heza-radius, 6px); background: #fff; }
.heza-band .heza-posts__title { line-height: 1.35; }
.heza-band .heza-posts__title:hover { color: var(--heza-c-blue, #0071bd); }

/* Thẻ dự án: ảnh + tên + thông tin, đi cùng nhau */
.heza-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin: 24px 0; padding: 0; list-style: none; }
.heza-card { display: flex; flex-direction: column; margin: 0; overflow: hidden; border: 1px solid var(--heza-c-line, #e2e8f0); border-radius: var(--heza-radius, 6px); background: #fff; }
.heza-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; margin: 0 0 4px; object-fit: cover; background: var(--heza-c-tint, #f1f6fa); }
.heza-card__title { display: block; padding: 12px 16px 6px; color: var(--heza-c-navy, #0f3a66); font-size: 17px; line-height: 1.35; }
.heza-card__meta { display: block; padding: 0 16px; color: var(--heza-c-muted, #475569); font-size: 14px; line-height: 1.55; }
.heza-card__meta:last-child { padding-bottom: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .heza-card { transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s ease; }
  .heza-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 58, 102, .10); }
}

@media (max-width: 781px) {
  .heza-stats--band { grid-template-columns: repeat(2, 1fr); }
  .heza-stats--band .heza-stat { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .28); padding: 16px; }
  .heza-stats--band .heza-stat:nth-child(even) { border-left: 1px solid rgba(255, 255, 255, .28); }
  .heza-stats--band .heza-stat:nth-child(-n+2) { border-top: 0; }
  .heza-stats--band .heza-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .heza-page-main .wp-block-post-content > h2.wp-block-heading,
  .heza-single-kcn-main .wp-block-post-content > h2.wp-block-heading { margin-top: 40px; }
  .heza-cards { grid-template-columns: 1fr; }
}
/* Ngoại lệ cho quy tắc "căn giữa mọi ảnh trong bài" (MEM-20261009-25, dùng !important): ảnh trong thành phần v2 tự căn */
.wp-block-post-content .heza-feature-list--icon .heza-feature img:not(.emoji):not(.wp-smiley):not([width="16"]):not([height="16"]) { margin: 0 !important; }
.wp-block-post-content .heza-card img:not(.emoji):not(.wp-smiley):not([width="16"]):not([height="16"]) { margin: 0 0 4px !important; }
.wp-block-post-content > h2.wp-block-heading:first-child { margin-top: 8px; }


/* Nội dung kế thừa có phần tử rộng cố định (iframe Facebook 500px, bảng dữ liệu ẩn của biểu đồ, chữ chạy) */
.heza-page-main .wp-block-post-content, .heza-single-kcn-main .wp-block-post-content { overflow-x: clip; }
.wp-block-post-content iframe { max-width: 100%; }
/* Plugin biểu đồ (m-chart) ép caption ẩn rộng 100%: neo vào khung biểu đồ để không tràn ngang trang */
.wp-block-post-content figure.m-chart-container { position: relative; overflow: hidden; }
.wp-block-post-content figure.m-chart-container .screen-reader-text { width: 1px !important; }

/* Bảng ưu đãi thuế TNDN (thay ảnh sơ đồ) */
.wp-block-post-content .heza-tax-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.wp-block-post-content .heza-tax-table th, .wp-block-post-content .heza-tax-table td { padding: 12px 14px; border: 1px solid #e2e8f0; vertical-align: top; text-align: left; }
.wp-block-post-content .heza-tax-table thead th { background: var(--heza-c-navy, #0f3a66); color: #fff; font-weight: 600; }
.wp-block-post-content .heza-tax-table tbody th { width: 18%; color: var(--heza-c-navy, #0f3a66); white-space: nowrap; }
.wp-block-post-content .heza-tax-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wp-block-post-content .heza-tax-steps li { padding: 4px 10px; border-radius: var(--heza-radius, 6px); background: #f1f6fa; }
.wp-block-post-content .heza-tax-steps strong { color: var(--heza-c-blue, #0071bd); }
.wp-block-post-content .heza-source-figure { margin-top: 8px; }
@media (max-width: 640px) { .wp-block-post-content .heza-tax-table thead { display: none; } .wp-block-post-content .heza-tax-table tr, .wp-block-post-content .heza-tax-table th, .wp-block-post-content .heza-tax-table td { display: block; width: auto; border: 0; padding: 6px 0; } .wp-block-post-content .heza-tax-table tr { padding: 12px 0; border-bottom: 1px solid #e2e8f0; } }

/* ==========================================================================
   Mẫu khối & block style dựng sẵn (patterns/heza-*.php, inc/block-styles.php) — PLAN-20261011-51 D2/D8
   ========================================================================== */
/* Dải số liệu dạng core/list: <li><strong>số</strong> nhãn</li> */
.heza-stats--band > li:not(.heza-stat) { margin: 0; padding: 22px 20px; border-left: 1px solid rgba(255, 255, 255, .28); color: rgba(255, 255, 255, .88); font-size: 14px; line-height: 1.4; }
.heza-stats--band > li:not(.heza-stat):first-child { border-left: 0; }
.heza-stats--band > li:not(.heza-stat) strong { display: block; margin-bottom: 4px; color: #fff; font-family: var(--heza-font__main); font-size: clamp(24px, 2.3vw, 32px); font-variant-numeric: tabular-nums; line-height: 1.2; }
/* Danh sách văn bản (block style core/list) */
.is-style-heza-doclinks, .heza-doclinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 24px 0; padding: 0; list-style: none; }
.is-style-heza-doclinks > li, .heza-doclinks > li { margin: 0; padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: var(--heza-radius, 6px); background: #fff; font-weight: 600; }
.is-style-heza-doclinks > li a, .heza-doclinks > li a { color: var(--heza-c-navy, #0f3a66); text-decoration: none; }
.is-style-heza-doclinks > li a:hover, .heza-doclinks > li a:hover { color: var(--heza-c-blue, #0071bd); text-decoration: underline; }
.is-style-heza-doclinks a[href$=".pdf"]::after { content: "PDF"; display: inline-block; margin-left: 8px; padding: 1px 6px; border: 1px solid currentColor; border-radius: 3px; font-size: 11px; font-weight: 700; vertical-align: 2px; opacity: .75; }
/* Dải nền sáng (block style core/group) */
.is-style-heza-band { margin: 48px 0; padding: clamp(20px, 3vw, 32px) !important; border-radius: var(--heza-radius, 6px); background: var(--heza-c-tint, #f1f6fa); }
.is-style-heza-band > h2:first-child { margin-top: 0 !important; }
/* Dải kêu gọi */
.is-style-heza-cta { margin: 48px 0; padding: clamp(24px, 4vw, 40px) !important; border-radius: var(--heza-radius, 6px); background: var(--heza-c-navy, #0f3a66); color: #fff; }
.is-style-heza-cta h2, .is-style-heza-cta h3 { margin-top: 0 !important; color: #fff !important; }
.is-style-heza-cta p { max-width: 65ch; color: rgba(255, 255, 255, .88); }
.is-style-heza-cta .wp-block-button__link { border-radius: var(--heza-radius, 6px); background: var(--heza-c-cta, #d0322f); color: #fff; font-weight: 700; white-space: nowrap; }
/* Thẻ dạng group (pattern Thẻ) */
.heza-cards-grid { gap: 20px !important; margin: 24px 0; }
.heza-cards-grid > .heza-card { gap: 0 !important; height: 100%; padding: 0 0 16px; }
.heza-card > .wp-block-image { margin: 0 !important; }
.wp-block-post-content .heza-card > .wp-block-image img:not(.emoji) { width: 100% !important; aspect-ratio: 16 / 10; margin: 0 !important; object-fit: cover; border-radius: 0 !important; }
.heza-card > h3, .heza-card > p { margin: 12px 16px 0 !important; }
.heza-card > h3 { color: var(--heza-c-navy, #0f3a66); font-size: 17px !important; line-height: 1.35; }
.heza-card > p { color: #475569; font-size: 14px; }
/* Slider nhẹ: gallery trượt ngang bằng scroll-snap, 0 JS */
.wp-block-gallery.is-style-heza-snap { display: flex !important; flex-wrap: nowrap !important; gap: 12px !important; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.wp-block-gallery.is-style-heza-snap > figure.wp-block-image { flex: 0 0 min(82%, 520px) !important; width: min(82%, 520px) !important; min-width: 0; max-width: none; margin: 0 !important; scroll-snap-align: start; }
.wp-block-post-content .wp-block-gallery.is-style-heza-snap img:not(.emoji) { width: 100% !important; aspect-ratio: 16 / 10; margin: 0 !important; object-fit: cover; border-radius: var(--heza-radius, 6px); }
/* Bảng HEZA (block style core/table) */
.is-style-heza-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.is-style-heza-table th, .is-style-heza-table td { padding: 12px 14px; border: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
.is-style-heza-table thead th { background: var(--heza-c-navy, #0f3a66); color: #fff; font-weight: 600; }
.is-style-heza-table tbody tr:nth-child(even) { background: #f8fafc; }
@media (max-width: 781px) {
  .heza-stats--band > li:not(.heza-stat) { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .28); padding: 16px; }
  .is-style-heza-table { overflow-x: auto; }
}
/* Gallery lõi (core/gallery): gỡ ảnh hưởng của quy tắc toàn cục "figure căn giữa, cột dọc, rộng 100%" (MEM-20261009-25)
   → lưới ảnh đúng số cột, cắt ảnh đều; kiểu trượt ngang giữ một hàng. */
.wp-block-post-content .wp-block-gallery.has-nested-images { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; align-items: stretch !important; justify-content: flex-start !important; gap: 12px !important; margin: 24px 0 !important; text-align: left !important; }
.wp-block-post-content .wp-block-gallery.has-nested-images > figure.wp-block-image { flex-grow: 0; margin: 0 !important; width: calc(33.333% - 8px) !important; max-width: none !important; }
.wp-block-post-content .wp-block-gallery.has-nested-images.columns-2 > figure.wp-block-image { width: calc(50% - 6px) !important; }
.wp-block-post-content .wp-block-gallery.has-nested-images.columns-4 > figure.wp-block-image { width: calc(25% - 9px) !important; }
.wp-block-post-content .wp-block-gallery.has-nested-images.columns-5 > figure.wp-block-image { width: calc(20% - 9.6px) !important; }
.wp-block-post-content .wp-block-gallery.has-nested-images.is-cropped > figure.wp-block-image img:not(.emoji) { width: 100% !important; height: 100% !important; aspect-ratio: 4 / 3; margin: 0 !important; object-fit: cover; border-radius: var(--heza-radius, 6px); }
.wp-block-post-content .wp-block-gallery.has-nested-images.is-style-heza-snap { flex-wrap: nowrap !important; overflow-x: auto; }
.wp-block-post-content .wp-block-gallery.has-nested-images.is-style-heza-snap > figure.wp-block-image { flex: 0 0 min(82%, 520px) !important; width: min(82%, 520px) !important; min-width: 0; }
.wp-block-post-content .wp-block-gallery.has-nested-images.is-style-heza-snap > figure.wp-block-image img:not(.emoji) { aspect-ratio: 16 / 10; }
@media (max-width: 640px) {
  .wp-block-post-content .wp-block-gallery.has-nested-images:not(.is-style-heza-snap) > figure.wp-block-image { width: calc(50% - 6px) !important; }
}
