/**
 * HEZA Gov Theme - Core Architectural CSS
 * Author: Ban Quản lý Khu kinh tế Hải Phòng (HEZA) & AIHA Engineering
 * Version: 1.3.0
 */

/* ==========================================================================
   OFFICIAL HEZA.GOV.VN TYPOGRAPHY SYSTEM (SVN-GILROY & ROBOTO)
   ========================================================================== */
@font-face {
  font-family: 'SVN-Gilroy';
  src: url('../fonts/SVN-GilroyXBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SVN-Gilroy';
  src: url('../fonts/SVN-GilroyBold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SVN-Gilroy';
  src: url('../fonts/SVN-GilroySemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SVN-Gilroy';
  src: url('../fonts/SVN-GilroyMedium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SVN-Gilroy';
  src: url('../fonts/SVN-Gilroy.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --heza-font__main: 'SVN-Gilroy', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --heza-font__body: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body {
  font-family: var(--heza-font__body) !important;
}

h1, h2, h3, h4, h5, h6,
.wp-block-heading,
.heza-page-title,
.heza-floating-navbar a,
.heza-brand-header h1,
.heza-brand-header .heza-site-name,
.heza-brand-header p {
  font-family: var(--heza-font__main) !important;
}

/* Bảo toàn từ ghép địa danh / danh từ riêng không bị ngắt dòng */
.heza-nobrk {
  display: inline-block !important;
  white-space: nowrap !important;
}

/* ==========================================================================
   0. BẢNG MÀU HEZA.GOV.VN (onenine + Elementor footer của PROD)
   Đổi giao diện phải xin phép cấp trên: chỉ dùng đúng các mã màu này.
   ========================================================================== */
:root {
  --heza-c-primary: #D0322F;    /* --onenine-color__primary: hover/active/nút */
  --heza-c-dark: #001832;       /* --onenine-color__primary--dark: menu, tiêu đề */
  --heza-c-text: #282C33;       /* body */
  --heza-c-link: #1D2128;       /* a */
  --heza-c-gray: #717171;       /* chữ phụ header, icon */
  --heza-c-border: #D9D9D9;     /* .header-main border-bottom */
  --heza-c-blue: #007BB0;       /* footer chính, điểm nhấn tiêu đề */
  --heza-c-blue-light: #12ACEE; /* thanh liên kết cổng dịch vụ công */
  --heza-c-navy: #001832;       /* content.css: tiêu đề/khối đậm (trước là #0f3a66) */
  --heza-c-cta: #D0322F;        /* content.css: nút CTA */
}

/* ==========================================================================
   1. NAVBAR — bê nguyên .header-bottom .main-navigation của heza.gov.vn
   Nền trắng, chữ #001832 SVN-Gilroy 600, mũi tên mờ, hover/đang xem #D0322F.
   Padding thu lại so với PROD (19px 28px) để 9 mục vừa 1240px, không tràn.
   ========================================================================== */
.wp-site-blocks > nav.wp-block-template-part {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  margin-block-start: 0 !important;
  transition: transform 0.28s ease-in-out !important;
  will-change: transform;
}

.wp-site-blocks > nav.wp-block-template-part + main {
  margin-block-start: 0 !important;
}

.wp-site-blocks > nav.wp-block-template-part.is-scroll-hidden {
  transform: translateY(-110%) !important;
}

nav.heza-floating-navbar,
.heza-floating-navbar {
  background-color: #FFFFFF !important;
  color: var(--heza-c-dark) !important;
  box-shadow: 0 1px 1px 0 #F0F0F0 !important;
  border-bottom: 0 !important;
}

.heza-navbar-inner {
  display: flex !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  min-height: 56px !important;
  width: 100% !important;
  max-width: 1240px !important;
  margin-inline: auto !important;
  padding-inline: clamp(16px, 3vw, 24px) !important;
  box-sizing: border-box !important;
}

.heza-nav-container {
  min-width: 0 !important;
  width: 100% !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}
.heza-nav-container::-webkit-scrollbar {
  display: none !important;
}

.heza-floating-navbar .heza-nav-menu-list {
  display: flex !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  height: 100% !important;
}

.heza-floating-navbar .heza-nav-menu-list > li {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  flex: 0 1 auto !important;
}

.heza-floating-navbar .heza-nav-menu-list > li > a {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 18px clamp(5px, 0.55vw, 8px) 16px !important;
  color: var(--heza-c-dark) !important;
  background: transparent !important;
  text-decoration: none !important;
  font-family: var(--heza-font__main) !important;
  font-size: clamp(14px, 1.05vw, 15px) !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  line-height: 1.375 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  transition: color 0.25s ease !important;
}

/* Mũi tên xuống của mục có menu con (PROD: caret mờ .48, hover đỏ) */
.heza-floating-navbar .heza-nav-menu-list > li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 3px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.48;
  transition: opacity 0.25s ease;
}

/* Mục Trang chủ: biểu tượng ngôi nhà như .menu-item-home của PROD.
   Desktop chỉ hiện icon (font-size 0, nhãn vẫn đọc được) để 9 mục vừa 1240px — PROD bị tràn ngang. */
.heza-floating-navbar .heza-nav-menu-list > li.menu-item-home > a {
  font-size: 0 !important;
  gap: 0 !important;
}
.heza-floating-navbar .heza-nav-menu-list > li.menu-item-home > a::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 11.5h3V21h5.5v-6h3v6H19v-9.5h3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 11.5h3V21h5.5v-6h3v6H19v-9.5h3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.heza-floating-navbar .heza-nav-menu-list > li:hover > a,
.heza-floating-navbar .heza-nav-menu-list > li > a:focus-visible,
.heza-floating-navbar .heza-nav-menu-list > li.current-menu-item > a,
.heza-floating-navbar .heza-nav-menu-list > li.current-menu-ancestor > a,
.heza-floating-navbar .heza-nav-menu-list > li.current-menu-parent > a {
  color: var(--heza-c-primary) !important;
  background: transparent !important;
}

.heza-floating-navbar .heza-nav-menu-list > li:hover > a::after {
  opacity: 1;
}

/* Menu con: nền trắng, bóng nhẹ, chữ đậm, hover đỏ (PROD ul.sub-menu) */
.heza-floating-navbar .heza-nav-menu-list .sub-menu {
  display: none !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  z-index: 1000 !important;
  min-width: 260px !important;
  margin: 0 !important;
  padding: 7px 0 !important;
  list-style: none !important;
  background-color: #FFFFFF !important;
  border: 0 !important;
  border-radius: 2px !important;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.16) !important;
}

.heza-floating-navbar .heza-nav-menu-list li:hover > .sub-menu,
.heza-floating-navbar .heza-nav-menu-list li:focus-within > .sub-menu {
  display: block !important;
}

.heza-floating-navbar .heza-nav-menu-list .sub-menu li a {
  display: block !important;
  padding: 10px 1.5em !important;
  color: var(--heza-c-dark) !important;
  background: transparent !important;
  font-family: var(--heza-font__main) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  text-transform: none !important;
  white-space: nowrap !important;
  border: 0 !important;
  transition: color 0.25s ease !important;
}

.heza-floating-navbar .heza-nav-menu-list .sub-menu li:hover > a,
.heza-floating-navbar .heza-nav-menu-list .sub-menu li > a:focus-visible,
.heza-floating-navbar .heza-nav-menu-list .sub-menu li.current-menu-item > a {
  color: var(--heza-c-primary) !important;
  background: transparent !important;
}

@media (min-width: 1200px) {
  .heza-floating-navbar,
  .heza-floating-navbar .heza-navbar-inner,
  .heza-floating-navbar .heza-nav-container,
  .heza-floating-navbar .heza-nav-menu-list {
    overflow: visible !important;
  }

  .heza-floating-navbar .heza-nav-menu-list .sub-menu li {
    position: relative !important;
  }

  .heza-floating-navbar .heza-nav-menu-list .sub-menu .sub-menu {
    display: none !important;
    top: -7px !important;
    left: 100% !important;
    margin-left: 1px !important;
  }

  .heza-floating-navbar .heza-nav-menu-list .sub-menu li:hover > .sub-menu,
  .heza-floating-navbar .heza-nav-menu-list .sub-menu li:focus-within > .sub-menu {
    display: block !important;
  }

  .heza-floating-navbar .heza-nav-menu-list > li:nth-last-child(-n + 3) > .sub-menu {
    right: 0 !important;
    left: auto !important;
  }

  .heza-floating-navbar .heza-nav-menu-list > li:nth-last-child(-n + 3) .sub-menu .sub-menu {
    right: 100% !important;
    left: auto !important;
    margin-right: 1px !important;
    margin-left: 0 !important;
  }

  .heza-floating-navbar .heza-nav-menu-list .sub-menu > .menu-item-has-children > a {
    position: relative !important;
    padding-right: 2.4em !important;
  }

  .heza-floating-navbar .heza-nav-menu-list .sub-menu > .menu-item-has-children > a::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    opacity: 0.48;
    transform: translateY(-50%) rotate(-45deg);
  }

  .heza-floating-navbar .heza-nav-menu-list > li:nth-last-child(-n + 3) .sub-menu > .menu-item-has-children > a {
    padding-right: 1.5em !important;
    padding-left: 2.4em !important;
  }

  .heza-floating-navbar .heza-nav-menu-list > li:nth-last-child(-n + 3) .sub-menu > .menu-item-has-children > a::after {
    right: auto;
    left: 14px;
    transform: translateY(-50%) rotate(135deg);
  }
}

/* ==========================================================================
   2. BRAND HEADER — bê nguyên .header-main của heza.gov.vn
   Trái: logo 100px + tên đơn vị 24px/400 + khẩu hiệu IN HOA 16px/600.
   Phải: giờ làm việc / điện thoại / email (12px #717171), dưới là ô tìm kiếm
   bo tròn + chọn ngôn ngữ. Không còn topbar navy.
   ========================================================================== */
.heza-brand-header {
  position: relative !important;
  background: #FFFFFF !important;
  border-bottom: 1px solid var(--heza-c-border) !important;
}

.heza-brand-header > .heza-brand-header__inner {
  min-height: 138px !important;
  align-items: center !important;
  gap: 24px !important;
}

.heza-brand-identity {
  gap: 27px !important;
  align-items: center !important;
  min-width: 0 !important;
}

.heza-brand-header .heza-brand-logo {
  flex: 0 0 auto !important;
  margin: 0 !important;
}

.heza-brand-header .heza-brand-logo img {
  display: block;
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.heza-brand-text {
  gap: 0 !important;
  min-width: 0 !important;
}

.heza-brand-header .heza-site-name {
  margin: 0 !important;
  color: var(--heza-c-dark) !important;
  font-family: var(--heza-font__main) !important;
  font-size: 24px !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
}

.heza-brand-header .heza-site-name a {
  color: inherit !important;
  text-decoration: none !important;
}

.heza-brand-header .heza-site-description {
  margin: 0 !important;
  color: var(--heza-c-dark) !important;
  font-family: var(--heza-font__main) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 28px !important;
  text-transform: uppercase !important;
}

.heza-404-main {
  text-align: center;
}

.heza-404-main > p {
  max-width: 540px;
}

.heza-index-title {
  border-bottom: 2px solid var(--wp--preset--color--brand-navy);
  padding-bottom: 8px;
}

.heza-archive-row {
  border-bottom-style: solid;
}

/* Header Actions: thông tin liên hệ, ô tìm kiếm, chọn ngôn ngữ & nút hamburger mobile */
.heza-header-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 17px !important;
}

.heza-header-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.heza-header-info__item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--heza-c-gray);
  font-family: var(--heza-font__main);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.heza-header-info__item svg {
  flex: 0 0 auto;
  color: var(--heza-c-gray);
}

.heza-header-info__item a {
  color: inherit;
  text-decoration: none;
}

.heza-header-info__item a:hover {
  color: var(--heza-c-primary);
}

.heza-header-search-language {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(24px, 4.5vw, 85px);
}

.heza-header-desktop-search {
  display: flex !important;
  align-items: center !important;
  position: relative !important;
  height: 40px !important;
  background: #FFFFFF !important;
  border: 1px solid #E6E6E6 !important;
  border-radius: 100px !important;
  overflow: hidden !important;
  transition: border-color 0.2s ease !important;
}

.heza-header-desktop-search:focus-within {
  border-color: var(--heza-c-gray) !important;
  box-shadow: none !important;
}

.heza-header-desktop-search input {
  height: 38px !important;
  border: none !important;
  background: transparent !important;
  padding: 0 4px 0 22px !important;
  color: var(--heza-c-text) !important;
  font-family: var(--heza-font__main) !important;
  font-size: 12px !important;
  outline: none !important;
  width: 175px !important;
}

.heza-header-desktop-search input::placeholder {
  color: var(--heza-c-dark);
  opacity: 0.85;
}

.heza-header-desktop-search button {
  border: none !important;
  background: transparent !important;
  color: var(--heza-c-gray) !important;
  padding: 0 16px 0 8px !important;
  height: 38px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.2s ease !important;
}

.heza-header-desktop-search button:hover {
  color: var(--heza-c-primary) !important;
}

/* Chọn ngôn ngữ dạng dropdown (PROD .header__language-select) */
.heza-lang-select {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 140px;
  height: 40px;
}

.heza-lang-select__current {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  color: var(--heza-c-dark);
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--heza-font__main);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

.heza-lang-select__current svg {
  margin-left: 3px;
  color: var(--heza-c-gray);
  transition: transform 0.2s ease;
}

.heza-lang-select__flag {
  font-size: 18px;
  line-height: 1;
}

.heza-lang-select__list {
  position: absolute;
  top: 40px;
  left: -12px;
  z-index: 10001;
  display: none;
  min-width: 160px;
  margin: 0;
  padding: 8px 12px;
  list-style: none;
  background: #FFFFFF;
  border-radius: 4px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.16);
}

.heza-lang-select:hover .heza-lang-select__list,
.heza-lang-select:focus-within .heza-lang-select__list {
  display: block;
}

.heza-lang-select:hover .heza-lang-select__current svg,
.heza-lang-select:focus-within .heza-lang-select__current svg {
  transform: rotate(180deg);
}

.heza-lang-select__list a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  color: var(--heza-c-dark);
  font-family: var(--heza-font__main);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.heza-lang-select__list a:hover,
.heza-lang-select__list a:focus-visible {
  color: var(--heza-c-primary);
}

@media (min-width: 1200px) {
  /* Dropdown ngôn ngữ phải nổi trên navbar sticky (z-index 9999) */
  .wp-site-blocks > header.wp-block-template-part {
    position: relative;
    z-index: 10000;
  }
}

.heza-header-hamburger {
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  background: transparent !important;
  color: var(--heza-c-dark) !important;
  border: none !important;
  border-radius: 2px !important;
  box-shadow: none !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease !important;
}

.heza-header-hamburger:hover {
  background: rgba(0, 24, 50, 0.06) !important;
  color: var(--heza-c-primary) !important;
}

.heza-header-hamburger:active {
  background: rgba(0, 24, 50, 0.12) !important;
  transform: scale(0.95) !important;
}

.heza-header-hamburger:focus-visible {
  outline: 2px solid var(--heza-c-primary) !important;
  outline-offset: 2px !important;
}

.heza-header-hamburger svg {
  width: 24px !important;
  height: 24px !important;
  display: block !important;
  stroke: currentColor !important;
  pointer-events: none !important;
}

/* ==========================================================================
   BUTTONS CONTACT (CHUẨN HEZA.GOV.VN)
   - Desktop: Cột dọc bên phải (Facebook, Zalo, Hotline, Lên đầu trang).
   ========================================================================== */
.buttons-contact {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  right: 0;
  bottom: 12%;
  padding: 0 14px;
  z-index: 999;
}

.buttons-contact .button-contact {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 100px;
  width: 38px;
  height: 38px;
  color: #ffffff !important;
  margin-bottom: 10px;
  background-color: #e60808;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.buttons-contact .button-contact:hover {
  transform: scale(1.12);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.3);
}

.buttons-contact .button-contact.button-contact__zalo {
  background-color: #2196F3;
}

.buttons-contact .button-contact__zalo-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.buttons-contact .button-contact.button-contact__facebook {
  background-color: #1877f2;
}

.buttons-contact .button-contact.button-contact__hotline {
  background-color: #e60808;
}

.buttons-contact .button-contact.scrolltop {
  background-color: #007BB0;
}

.buttons-contact .button-contact.scrolltop svg {
  transform: rotate(90deg);
}

.buttons-contact .button-contact:last-child {
  margin-bottom: 0;
}

/* Nút Trợ lý AI (VNPT SmartBot) trên Desktop: góc phải dưới độc lập theo chuẩn heza.gov.vn */
#vnpt_ai_livechat_button,
#vnpt_ai_livechat_button_dynamic {
  position: fixed !important;
  right: 20px !important;
  bottom: 20px !important;
  z-index: 10000 !important;
}

/* Container giao diện chat VNPT SmartBot khi mở: luôn nằm trên cùng không bị che */
#vnpt_ai_livechat_display_container,
#vnpt_ai_livechat_display_container iframe {
  z-index: 99999999 !important;
}

#vnpt_ai_livechat_display_container,
#vnpt_ai_div_container {
  z-index: 99999999 !important;
}

.heza-gov-sidebar { display: grid; gap: 24px; }
.heza-sidebar-card { padding: 16px; border: 1px solid var(--wp--preset--color--neutral-border); border-radius: 6px; }
.heza-sidebar-card--light { background: var(--wp--preset--color--neutral-light); }
.heza-sidebar-card--primary { color: #fff; background: var(--wp--preset--color--brand-navy); }
.heza-sidebar-card h3 { margin: 0 0 12px; color: var(--wp--preset--color--brand-navy); font-family: var(--wp--preset--font-family--gilroy); font-size: 16px; line-height: 1.3; text-transform: uppercase; }
.heza-sidebar-card--light h3 { padding-left: 8px; border-left: 4px solid var(--wp--preset--color--accent-red); }
.heza-sidebar-card--primary h3 { color: var(--wp--preset--color--accent-gold); }
.heza-sidebar-card p, .heza-sidebar-card li { font-size: 13px; line-height: 1.55; }
.heza-sidebar-card .heza-notice-item { display: grid; grid-template-columns: 1.25em minmax(0, 1fr); align-items: start; gap: 6px; }
.heza-notice-item__icon { display: inline-block; line-height: 1.55; text-align: center; }
.heza-notice-item__icon img.emoji { display: inline-block !important; width: 1em !important; height: 1em !important; margin: 0 !important; vertical-align: -0.1em !important; }
.heza-sidebar-card p:last-child, .heza-sidebar-card ul { margin-bottom: 0; }
.heza-sidebar-card ul { padding-left: 18px; }
.heza-sidebar-button { display: inline-flex; min-height: 44px; align-items: center; margin-top: 10px; padding: 10px 16px; color: #fff !important; background: var(--wp--preset--color--accent-red); font-size: 12px; font-weight: 700; text-decoration: none; text-transform: uppercase; }

/* ==========================================================================
   3. ACCESSIBILITY & FOCUS VISIBLE (WCAG AAA)
   ========================================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--wp--preset--color--accent-red, #D0322F) !important;
  outline-offset: 2px !important;
}

/* ========================================================================== 
   4. SOURCE-BACKED HOMEPAGE
   ========================================================================== */
.heza-front-page-main { background: #fff; }
.heza-home { color: #172033; }
.heza-home *, .heza-home *::before, .heza-home *::after { box-sizing: border-box; }
.heza-home-shell { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
.heza-home-section { padding: 72px 0 82px; }
.heza-home-section:nth-of-type(even) { background: #f4f7fa; }
.heza-home-section-heading { margin-bottom: 30px; }
.heza-home-section-heading--row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.heza-home-eyebrow, .heza-home-kicker { margin: 0 0 7px; color: #c3292d; font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.heza-home-section-heading h2 { margin: 0; color: #0a2b4c; font-size: clamp(28px, 3vw, 42px); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
.heza-home-arrow-link { display: inline-flex; gap: 10px; align-items: center; color: #0a2b4c; font-size: 14px; font-weight: 800; text-decoration: none; }
.heza-home-arrow-link span { color: #c3292d; transition: transform .2s ease; }
.heza-home-arrow-link:hover span { transform: translateX(4px); }
.heza-home-arrow-link--light { color: #fff; }
.heza-home-arrow-link--light span { color: #ffd166; }

.heza-home-hero { position: relative; min-height: 520px; display: grid; align-items: end; overflow: hidden; background: #071c30; }
.heza-home-hero__media { position: absolute; inset: 0; background: url('/wp-content/uploads/2023/07/cang-bien2-scaled.jpg') center 58%/cover no-repeat; transform: scale(1.015); }
.heza-home-hero__veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,20,36,.92) 0%, rgba(3,20,36,.68) 46%, rgba(3,20,36,.18) 100%); }
.heza-home-hero__content { position: relative; z-index: 1; padding-bottom: 74px; }
.heza-home-hero .heza-home-kicker { color: #ffd166; }
.heza-home-hero h1 { max-width: 780px; margin: 0 0 24px; color: #fff; font-size: clamp(38px, 6vw, 70px); line-height: .99; letter-spacing: -.04em; text-wrap: balance; }

.heza-home-spotlight-grid { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: repeat(2, 220px); gap: 14px; }
.heza-home-story { position: relative; overflow: hidden; color: #fff; text-decoration: none; background: #0a2b4c; }
.heza-home-story--lead { grid-row: 1 / 3; }
.heza-home-story img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.heza-home-story::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 34%, rgba(3,20,36,.92) 100%); }
.heza-home-story span { position: absolute; z-index: 1; inset: auto 24px 22px; display: grid; gap: 5px; }
.heza-home-story small { color: #ffd166; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.heza-home-story strong { max-width: 660px; font-size: clamp(17px, 2vw, 25px); line-height: 1.25; text-wrap: balance; }
.heza-home-story:not(.heza-home-story--lead) strong { font-size: 17px; }
.heza-home-story:hover img { transform: scale(1.035); }

.heza-home-news-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 24px; }
.heza-home-news-card { min-width: 0; border-top: 1px solid #cbd5df; }
.heza-home-news-card--lead { grid-row: span 2; }
.heza-home-news-card__image { display: block; aspect-ratio: 16/9; overflow: hidden; margin-top: 12px; background: #dbe3ea; }
.heza-home-news-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.heza-home-news-card:hover img { transform: scale(1.03); }
.heza-home-news-card__body { padding-top: 15px; }
.heza-home-news-card time { color: #68758a; font-size: 12px; font-variant-numeric: tabular-nums; }
.heza-home-news-card h3 { margin: 7px 0 0; font-size: 18px; line-height: 1.35; text-wrap: pretty; }
.heza-home-news-card--lead h3 { font-size: 25px; }
.heza-home-news-card h3 a { color: #0a2b4c; text-decoration: none; }
.heza-home-news-card h3 a:hover { color: #c3292d; }
.heza-home-news-card p { color: #566276; font-size: 14px; line-height: 1.65; }

.heza-home-economy { background: #081f36 !important; }
.heza-home-economy .heza-home-eyebrow { color: #ffd166; }
.heza-home-economy .heza-home-section-heading h2 { color: #fff; }
.heza-home-economy-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; grid-template-rows: repeat(2, 230px); gap: 2px; }
.heza-home-economy-grid a { position: relative; display: flex; align-items: end; overflow: hidden; padding: 24px; color: #fff; text-decoration: none; background-image: linear-gradient(180deg, rgba(5,24,43,.05), rgba(5,24,43,.88)), var(--heza-card-image); background-size: cover; background-position: center; }
.heza-home-economy-grid a:first-child { grid-row: 1 / 3; }
.heza-home-economy-grid a:last-child { grid-column: 2 / 4; }
.heza-home-economy-grid span { position: relative; font-size: 19px; font-weight: 800; line-height: 1.25; }
.heza-home-economy-grid a:hover span { color: #ffd166; }

.heza-home-topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #cfd8e2; border-left: 1px solid #cfd8e2; }
.heza-home-topic-grid a { min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; border-right: 1px solid #cfd8e2; border-bottom: 1px solid #cfd8e2; color: #0a2b4c; font-size: 16px; font-weight: 800; text-decoration: none; transition: background .2s, color .2s; }
.heza-home-topic-grid a span { color: #c3292d; font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.heza-home-topic-grid a:hover { color: #fff; background: #0a2b4c; }
.heza-home-topic-grid a:hover span { color: #ffd166; }
.heza-home-data-band { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; align-items: center; margin-top: 32px; padding: 34px 40px; color: #fff; background: #0a2b4c; }
.heza-home-data-band .heza-home-eyebrow { color: #ffd166; }
.heza-home-data-band h3 { margin: 0 0 8px; color: #fff; font-size: 28px; }
.heza-home-data-band p:last-child { margin: 0; color: #dbe5ee; }
.heza-home-data-actions { display: grid; gap: 8px; }
.heza-home-data-actions a { padding: 13px 16px; color: #fff; border: 1px solid rgba(255,255,255,.25); text-decoration: none; font-weight: 700; }
.heza-home-data-actions a:hover { color: #071c30; background: #ffd166; border-color: #ffd166; }

.heza-home-access { background: #f4f7fa !important; }
.heza-home-access-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 18px; }
.heza-home-access-panel { padding: 28px; background: #fff; border-top: 4px solid #0a2b4c; }
.heza-home-access-panel--primary { color: #fff; background: #0a2b4c; border-color: #c3292d; }
.heza-home-access-panel h3 { margin: 0 0 18px; color: inherit; font-size: 21px; }
.heza-home-access-panel ul { margin: 0; padding: 0; list-style: none; }
.heza-home-access-panel li + li { border-top: 1px solid #e0e6ec; }
.heza-home-access-panel--primary li + li { border-color: rgba(255,255,255,.16); }
.heza-home-access-panel a { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; color: inherit; text-decoration: none; }
.heza-home-access-panel a::after { content: '↗'; color: #c3292d; }
.heza-home-access-panel--primary a::after { color: #ffd166; }

.heza-home-resource-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.heza-home-resource-card { min-height: 280px; position: relative; overflow: hidden; display: flex; align-items: end; padding: 22px; color: #fff; background: #0a2b4c; text-decoration: none; }
.heza-home-resource-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .72; transition: transform .35s ease; }
.heza-home-resource-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(4,25,45,.94)); }
.heza-home-resource-card span { position: relative; z-index: 1; display: grid; gap: 6px; }
.heza-home-resource-card small { color: #ffd166; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.heza-home-resource-card strong { font-size: 20px; line-height: 1.25; }
.heza-home-resource-card--text { background: #c3292d; }
.heza-home-resource-card--document { background: #173f62; }
.heza-home-resource-card:hover img { transform: scale(1.035); }

.heza-home-partners { padding-bottom: 32px; }
.heza-home-logo-row { display: grid; grid-template-columns: repeat(6, 1fr); align-items: center; border: 1px solid #d9e0e7; }
.heza-home-logo-row img { width: 100%; height: 104px; padding: 20px; object-fit: contain; border-right: 1px solid #d9e0e7; filter: saturate(.82); }
.heza-home-logo-row img:last-child { border-right: 0; }
.heza-home-public-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 24px; }
.heza-home-public-links a { padding: 15px 18px; color: #fff; background: #0a2b4c; text-align: center; text-decoration: none; font-weight: 700; }
.heza-home-public-links a:hover { color: #071c30; background: #ffd166; }

@media (prefers-reduced-motion: reduce) {
  .heza-home * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* ========================================================================== 
   5. RESPONSIVE BREAKPOINTS (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 1199px) {
  /* PROD @1200: logo 70px, tên 16px, khẩu hiệu 14px/22px */
  .heza-brand-header > .heza-brand-header__inner { min-height: 0 !important; padding-block: 10px !important; }
  .heza-brand-identity { gap: 10px !important; }
  .heza-brand-header .heza-brand-logo img { width: 70px !important; height: 70px !important; }
  .heza-brand-header .heza-site-name { font-size: 16px !important; }
  .heza-brand-header .heza-site-description { font-size: 14px !important; line-height: 22px !important; }
  .heza-header-info, .heza-header-search-language .heza-lang-select { display: none !important; }
  .heza-header-actions { flex-direction: row !important; align-items: center !important; }
  .heza-navbar-inner {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .heza-home-news-grid { grid-template-columns: 1.2fr 1fr; }
  .heza-home-news-card--lead { grid-row: span 4; }
  .heza-home-topic-grid, .heza-home-resource-grid { grid-template-columns: repeat(2, 1fr); }
  .heza-home-logo-row { grid-template-columns: repeat(3, 1fr); }
  .heza-home-logo-row img:nth-child(3n) { border-right: 0; }
}

@media (max-width: 768px) {
  .heza-home-shell { width: min(100% - 28px, 1240px); }
  .heza-home-section { padding: 52px 0 60px; }
  .heza-home-section-heading--row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .heza-home-hero { min-height: 440px; }
  .heza-home-hero__veil { background: linear-gradient(90deg, rgba(3,20,36,.9), rgba(3,20,36,.45)); }
  .heza-home-hero__content { padding-bottom: 48px; }
  .heza-home-spotlight-grid { grid-template-columns: 1fr; grid-template-rows: 330px repeat(2, 210px); }
  .heza-home-story--lead { grid-row: auto; }
  .heza-home-news-grid, .heza-home-economy-grid, .heza-home-access-grid, .heza-home-data-band { grid-template-columns: 1fr; }
  .heza-home-news-card--lead { grid-row: auto; }
  .heza-home-economy-grid { grid-template-rows: repeat(4, 230px); }
  .heza-home-economy-grid a:first-child, .heza-home-economy-grid a:last-child { grid-row: auto; grid-column: auto; }
  .heza-home-data-band { gap: 24px; padding: 28px 22px; }
  .heza-home-public-links { grid-template-columns: 1fr; }
  .heza-gov-footer .wp-block-columns {
    flex-direction: column !important;
    gap: 24px !important;
  }
  .heza-gov-footer .wp-block-column {
    flex-basis: 100% !important;
  }
  .heza-single-main .wp-block-columns,
  .heza-archive-main .wp-block-columns,
  main .wp-block-columns {
    flex-direction: column !important;
  }
}

@media (max-width: 480px) {
  .heza-home-topic-grid, .heza-home-resource-grid { grid-template-columns: 1fr; }
  .heza-home-logo-row { grid-template-columns: repeat(2, 1fr); }
  .heza-home-logo-row img:nth-child(3n) { border-right: 1px solid #d9e0e7; }
  .heza-home-logo-row img:nth-child(2n) { border-right: 0; }
}

/* ========================================================================== 
   6. HEZA.GOV.VN SOURCE-PARITY HOMEPAGE V2
   Typography SSOT: Đồng nhất toàn bộ màu sắc và kích cỡ của tiêu đề.
   ========================================================================== */
.heza-mobile-nav { display: none; }
.heza-nav-container { min-width: 0; }
.heza-floating-navbar .heza-nav-menu-list { flex-wrap: nowrap !important; }
.heza-source-home {
  --heza-blue: #008fc8;
  --heza-deep: #006d9f;
  --heza-red: #e51c23;
  --heza-ink: #17344b;
  --heza-line: #d9e5ec;
  --heza-title-size: clamp(26px, 2.4vw, 32px);
  --heza-subtitle-size: 21px;
  color: #243746;
  font-family: Roboto, Arial, sans-serif;
}
.heza-source-home *, .heza-source-home *::before, .heza-source-home *::after { box-sizing: border-box; }
.heza-source-shell { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }
.heza-source-section { padding: 34px 0; }

/* --- HOMEPAGE TITLES CONSOLIDATED SSOT --- */
.heza-source-title {
  margin: 0 0 24px;
  color: var(--heza-blue);
  font-family: inherit;
  font-size: var(--heza-title-size);
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.heza-source-title--light { color: #ffffff !important; }

/* Sub-section & Column Headings (Cấp 2: Cột tin tức, đầu tư, thủ tục, môi trường/thư viện/ấn phẩm) */
.heza-source-news-column h2,
.heza-source-investment-data h3,
.heza-source-access-grid h3,
.heza-source-media h2,
.heza-source-investment-chart h3 {
  margin: 0 0 15px;
  color: var(--heza-blue) !important;
  font-family: inherit;
  font-size: var(--heza-subtitle-size) !important;
  line-height: 1.3;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.heza-source-news-column h2 { padding-left: 13px; border-left: 5px solid var(--heza-red); }
.heza-source-investment-chart h3 a { color: inherit; text-decoration: none; }

.heza-source-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 9px 17px; color: #fff !important; background: var(--heza-red); font-size: 12px; font-weight: 800; text-decoration: none; text-transform: uppercase; transition: background-color .2s ease, transform .2s ease; }
.heza-source-button:hover { background: #bd171d; }
.heza-source-button:active { transform: translateY(1px); }

.heza-source-hero { overflow: hidden; background: #e9f2f5; }
.heza-source-slider { position: relative; height: clamp(320px, 39vw, 565px); overflow: hidden; background: #082d4f; }
.heza-source-slider__track, .heza-source-slide, .heza-source-slide picture { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.heza-source-slide { z-index: 0; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s; }
.heza-source-slide.is-active { z-index: 1; opacity: 1; visibility: visible; transition-delay: 0s; }
.heza-source-slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.heza-source-slider__button { position: absolute; z-index: 3; top: 50%; width: 44px; height: 52px; display: grid; place-items: center; padding: 0; color: #fff; background: rgba(4,35,61,.72); border: 1px solid rgba(255,255,255,.55); border-radius: 2px; cursor: pointer; transform: translateY(-50%); transition: background-color .2s ease; }
.heza-source-slider__button:hover, .heza-source-slider__button:focus-visible { background: #0f3a66; outline: 3px solid #ffd166; outline-offset: 2px; }
.heza-source-slider__button span { font-size: 36px; line-height: 1; transform: translateY(-2px); }
.heza-source-slider__button--prev { left: max(16px, calc((100% - 1320px) / 2)); }
.heza-source-slider__button--next { right: max(16px, calc((100% - 1320px) / 2)); }
.heza-source-slider__dots { position: absolute; z-index: 3; right: 0; bottom: 18px; left: 0; display: flex; justify-content: center; gap: 9px; }
.heza-source-slider__dot { width: 10px; height: 10px; padding: 0; background: rgba(255,255,255,.72); border: 1px solid rgba(4,35,61,.45); border-radius: 50%; cursor: pointer; }
.heza-source-slider__dot.is-active { background: #d0322f; border-color: #fff; transform: scale(1.2); }
.heza-source-slider__dot:focus-visible { outline: 3px solid #ffd166; outline-offset: 3px; }

/* Shared page and post title. The first selector is the verified page DOM. */
.heza-page-title,
#wp--skip-link--target.heza-page-main > div > h1.wp-block-post-title {
  position: relative;
  max-width: 1050px;
  margin-top: 0;
  margin-bottom: 26px;
  padding-bottom: 14px;
  color: #123f67;
  font-family: var(--wp--preset--font-family--gilroy);
  font-size: clamp(24px, 1.9vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.heza-page-title::after,
#wp--skip-link--target.heza-page-main > div > h1.wp-block-post-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 54px;
  height: 3px;
  background: #d0322f;
  border-radius: 2px;
}
.heza-page-title--archive { max-width: none; }
.heza-source-ticker { margin-top: 10px; border: 2px solid #f1a9bb; overflow: hidden; background: #fff; }
.heza-source-ticker .ticker__track { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 8px 16px; color: var(--heza-red); font-size: 16px; font-weight: 800; text-decoration: none; text-transform: uppercase; }
.heza-source-ticker .ticker__track img { width: 44px; height: auto; display: inline-block; vertical-align: middle; }
.heza-source-ticker a:not(.ticker__track) { display: block; padding: 10px 16px; color: var(--heza-red); font-size: 15px; font-weight: 800; text-decoration: none; text-transform: uppercase; }

.heza-source-focus { padding-top: 18px; }
.heza-source-focus-grid { display: flex; gap: 10px; }
.heza-source-focus-card { position: relative; overflow: hidden; color: #fff; background: #0a668f; text-decoration: none; }
.heza-source-focus-card, .heza-source-focus-card--main { min-width: 0; height: 240px; flex: 1 1 0; }
.heza-source-focus-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.heza-source-focus-card::after { content: ''; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(0,43,69,.92)); }
.heza-source-focus-card strong { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 14px; color: #fff; font-size: 15px; line-height: 1.3; text-wrap: pretty; }
.heza-source-focus-card--main strong { font-size: 15px; }
.heza-source-focus-card:hover img { transform: scale(1.025); }

.heza-source-news { padding-top: 18px; }
.heza-source-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.heza-source-news-column h2 { margin-bottom: 16px; padding-left: 13px; border-left: 5px solid var(--heza-red); }
.heza-source-news-column article { display: grid; grid-template-columns: 106px 1fr; gap: 12px; align-items: start; padding: 9px 0; }
.heza-source-news-column article + article { border-top: 1px solid var(--heza-line); }
.heza-source-news-thumb { aspect-ratio: 3 / 2; overflow: hidden; background: #e4edf2; }
.heza-source-news-column article > .heza-source-news-thumb { grid-column: 1; grid-row: 1; }
.heza-source-news-column article > h3 { grid-column: 2; grid-row: 1; }
.heza-source-news-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .2s ease; }
.heza-source-news-column article:hover img { transform: scale(1.035); }
.heza-source-news-column h3 { margin: 0; font-size: 14px; line-height: 1.35; font-weight: 700; text-wrap: pretty; }
.heza-source-news-column h3 a { color: #263f50; text-decoration: none; }
.heza-source-news-column h3 a:hover { color: var(--heza-red); }

.heza-source-zones { padding-top: 22px; }
.heza-source-zone-grid { height: 380px; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 380px; grid-auto-rows: 0; gap: 13px; overflow: hidden; }
.heza-source-zone-grid > * { min-height: 380px; display: flex; flex-direction: column; justify-content: end; padding: 0; color: #fff; background-image: linear-gradient(180deg, rgba(0,48,76,.04), rgba(0,59,91,.88)), var(--zone-image); background-position: center; background-size: cover; text-decoration: none; }
.heza-source-zone-grid > div > a { height: 100%; display: flex; flex-direction: column; justify-content: end; padding: 22px 18px 18px; color: #fff; text-decoration: none; }
.heza-source-zone-grid > div:not(:has(a)) { padding: 22px 18px 18px; }
.heza-source-zone-grid strong { margin-bottom: 17px; font-size: 18px; line-height: 1.25; text-transform: uppercase; }
.heza-source-zone-grid span { display: inline-block; width: fit-content; padding: 3px 0; border-top: 1px solid rgba(255,255,255,.35); font-size: 13px; font-weight: 700; }
.heza-source-government-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: center; justify-items: center; min-height: 112px; padding-top: 28px; }
.heza-source-government-links a { display: flex; width: 100%; height: 112px; align-items: center; justify-content: center; }
.heza-source-government-links img { width: auto; max-width: 100%; max-height: 112px; object-fit: contain; }

.heza-source-environment { color: #fff; background: #52abd0 url('/wp-content/uploads/2023/05/bg-2.png') center/cover; }
.heza-source-environment-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.heza-source-environment-grid a { min-height: 155px; display: grid; place-items: center; padding: 16px; color: #fff; background-image: linear-gradient(rgba(0,78,112,.35), rgba(0,78,112,.58)), var(--environment-image); background-position: center; background-size: cover; text-align: center; text-decoration: none; }
.heza-source-environment-grid span { font-size: 15px; font-weight: 800; text-shadow: 0 1px 3px rgba(0,45,70,.8); text-transform: uppercase; }

.heza-source-investment-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 34px; }
.heza-source-investment-grid > * { border-top: 4px solid var(--heza-red); }
.heza-source-investment-data { display: flex; flex-direction: column; padding-top: 18px; }
/* Hai nút "Xem chi tiết" luôn nằm cùng đáy hàng (nút cuối cột, kể cả khi wpautop bọc <p>). */
.heza-source-investment-grid > * > :last-child { margin-top: auto; margin-bottom: 0; }
.heza-source-investment-data > .heza-source-button, .heza-source-investment-data > p:last-child { align-self: flex-start; }
.heza-source-investment-data h3 { margin-bottom: 13px; }
.heza-source-investment-data h4 { margin: 18px 0 11px; color: var(--heza-red); font-size: 13px; text-transform: uppercase; }
.heza-source-investment-data > p { font-size: 14px; }
.heza-source-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.heza-source-metrics p { margin: 0; padding: 13px; background: #f1f6f8; }
.heza-source-metrics b, .heza-source-metrics span { display: block; color: #607482; font-size: 11px; }
.heza-source-metrics strong { display: block; margin: 3px 0; color: var(--heza-deep); font-size: 20px; font-variant-numeric: tabular-nums; }
.heza-source-investment-data ul { padding-left: 18px; font-size: 14px; line-height: 1.7; }
.heza-source-investment-chart { display: flex; flex-direction: column; align-items: center; padding-top: 18px; }
.heza-source-investment-chart h3 { align-self: stretch; }
.heza-source-investment-chart .aiha-chart { width: 100%; margin: 0 0 20px; }
.heza-source-investment-chart .aiha-chart figcaption strong { color: #333; font-size: 15px; font-weight: 700; text-align: center; }
.heza-source-investment-chart .aiha-chart__visual svg { max-height: none; }
.heza-source-investment-chart .aiha-chart__data { display: none; }
.heza-source-investment-chart > p { margin: 0; } /* wpautop bọc nút sau <figure> */
.heza-source-investment-chart .aiha-chart__tick, .heza-source-investment-chart .aiha-chart__label { font-size: 17px; }
.heza-source-investment-chart .aiha-chart__value { font-size: 17px; }

.heza-source-access { background: #f6f9fb; }
.heza-source-access-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.heza-source-access-grid > div { padding-top: 14px; border-top: 4px solid var(--heza-red); }
.heza-source-access-grid h3 { margin-bottom: 12px; }
.heza-source-access-grid a { display: block; padding: 7px 0; color: #3b5261; font-size: 14px; text-decoration: none; }
.heza-source-access-grid a::before { content: '›'; margin-right: 8px; color: var(--heza-red); font-weight: 900; }
.heza-source-access-grid a:hover { color: var(--heza-red); }

.heza-source-media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.heza-source-media article { display: flex; flex-direction: column; align-items: flex-start; padding: 18px; border: 1px solid var(--heza-line); border-top: 4px solid var(--heza-red); }
.heza-source-media h2 { margin-bottom: 15px; }
.heza-source-media-body { width: 100%; }
.heza-source-media-body > a:not(.heza-source-button) { width: 100%; height: 240px; display: block; overflow: hidden; margin-bottom: 16px; background: #0a2b4c; }
.heza-source-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.heza-source-media-body > .heza-yt { height: 240px; margin-bottom: 16px; aspect-ratio: auto; }

.heza-source-promotion { padding-top: 10px; }
.heza-source-promotion-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: center; }
.heza-source-promotion-card { display: flex; flex-direction: column; align-items: flex-start; padding: 32px; border: 1px solid var(--heza-line); border-top: 4px solid var(--heza-red); background: #fff; }
.heza-source-promotion-card > p { margin: 0; }
.heza-source-promotion-eyebrow { color: #0a2b4c; font-size: 28px; font-weight: 800; line-height: 1.15; text-transform: uppercase; }
.heza-source-promotion-kind { margin-top: 14px !important; color: var(--heza-red); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.heza-source-promotion-card h3 { margin: 10px 0 14px; color: #0a2b4c; font-size: 22px; line-height: 1.3; }
.heza-source-promotion-card > p:not([class]) { color: #384c59; font-size: 15px; line-height: 1.65; }
.heza-source-promotion-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 22px !important; color: #4b5d6b; font-size: 14px; font-variant-numeric: tabular-nums; }
.heza-source-promotion-meta span + span::before { content: "·"; margin-right: 18px; color: #9aa8b3; }
.heza-source-promotion-video { padding: 12px; background: #fff; box-shadow: 0 6px 24px rgba(10, 43, 76, .12); }

.heza-source-partners { background: #f6f9fb; }
.heza-source-logo-grid { display: grid; grid-template-columns: repeat(8, 1fr); background: #fff; border: 1px solid var(--heza-line); }
.heza-source-logo-grid img { width: 100%; height: 90px; padding: 16px; object-fit: contain; border-right: 1px solid var(--heza-line); }
.heza-source-logo-grid img:last-child { border-right: 0; }
.heza-source-portals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-top: 18px; }
.heza-source-portals a { min-height: 48px; display: grid; place-items: center; padding: 10px 15px; color: #fff; background: var(--heza-deep); font-size: 12px; font-weight: 700; text-align: center; text-decoration: none; }
.heza-source-portals a:hover { background: var(--heza-red); }

/* ==========================================================================
   GLOBAL ARTICLE & CONTENT PAGE BOUNDS (SSOT)
   Đảm bảo lề và khoảng cách đọc chuẩn trên mọi độ phân giải (Desktop, Tablet, Mobile):
   - Toàn bộ nội dung bài viết/trang có lề an toàn clamp(20px, 3.8vw, 44px).
   - Nội dung giới hạn tối đa 1240px và tự động căn giữa màn hình.
   ========================================================================== */
main:not(.heza-front-page-main),
.heza-single-main,
.heza-page-main,
.heza-archive-main {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-inline: clamp(20px, 3.8vw, 44px) !important;
  margin-inline: auto !important;
}

main:not(.heza-front-page-main) > .alignwide,
main:not(.heza-front-page-main) > div > .alignwide,
.heza-single-main > .alignwide,
.heza-page-main > .alignwide,
.heza-archive-main > .alignwide {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1240px !important;
  margin-inline: auto !important;
}

.heza-brand-header > .alignwide,
.heza-floating-navbar > .alignwide {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1240px !important;
  margin-inline: auto !important;
  padding-inline: clamp(16px, 3vw, 24px) !important;
}

@media (max-width: 992px) {
  .heza-single-main .wp-block-columns,
  .heza-page-main .wp-block-columns,
  .heza-archive-main .wp-block-columns {
    flex-direction: column !important;
    gap: 36px !important;
  }
  .heza-single-main .wp-block-column,
  .heza-page-main .wp-block-column,
  .heza-archive-main .wp-block-column {
    flex-basis: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 1199px) {
  .wp-site-blocks > nav.wp-block-template-part { display: none !important; }
  .heza-header-desktop-search { display: none !important; }
  .heza-header-hamburger { display: flex !important; }
  .heza-brand-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 9 !important; /* Luôn < 10 của VNPT SmartBot CSS để không đè SmartBot */
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  }
  .heza-navbar-inner { min-height: 52px !important; overflow: visible !important; padding-inline: max(20px, env(safe-area-inset-left)) !important; }
  .heza-nav-container, .heza-navbar-quick-action { display: none !important; }
  .heza-mobile-nav { display: none !important; }
  .heza-mobile-nav__trigger { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0; color: #fff; background: transparent; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
  .heza-mobile-nav__trigger:focus-visible, .heza-mobile-menu button:focus-visible, .heza-mobile-menu a:focus-visible { outline: 2px solid #D0322F; outline-offset: 2px; }
  .heza-mobile-nav__icon { position: relative; width: 22px; height: 22px; flex: 0 0 22px; }
  .heza-mobile-nav__icon::before, .heza-mobile-nav__icon::after { content: ''; position: absolute; top: 10px; left: 3px; width: 16px; height: 2px; background: currentColor; }
  .heza-mobile-nav__icon::after { transform: rotate(90deg); }
  .heza-mobile-menu[hidden] { display: none !important; }
  .heza-mobile-menu { position: fixed; z-index: 10050; inset: 0; display: grid; grid-template-columns: 1fr min(480px, calc(100% - 32px)); color: #001832; }
  .heza-mobile-menu *, .heza-mobile-menu *::before, .heza-mobile-menu *::after { box-sizing: border-box; }
  .heza-mobile-menu__backdrop { grid-column: 1 / -1; grid-row: 1; background: rgba(0, 24, 50, .55); opacity: 0; transition: opacity .22s ease; }
  .heza-mobile-menu__panel { min-width: 0; height: 100dvh; grid-column: 2; grid-row: 1; display: flex; flex-direction: column; overflow: hidden; background: #fff; box-shadow: -18px 0 44px rgba(0, 24, 50, .18); transform: translateX(100%); transition: transform .22s ease; }
  .heza-mobile-menu.is-open .heza-mobile-menu__backdrop { opacity: 1; }
  .heza-mobile-menu.is-open .heza-mobile-menu__panel { transform: translateX(0); }
  .heza-mobile-menu__header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: max(16px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 16px 24px; border-bottom: 1px solid #EDEDED; }
  .heza-mobile-menu__header h2 { margin: 0; color: #001832; font-size: 20px; line-height: 1.2; font-weight: 800; text-transform: uppercase; }
  .heza-mobile-menu__close { position: relative; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; color: #001832; background: #fff; border: 1px solid #D9D9D9; border-radius: 2px; cursor: pointer; }
  .heza-mobile-menu__close span::before, .heza-mobile-menu__close span::after { content: ''; position: absolute; top: 20px; left: 11px; width: 22px; height: 2px; background: currentColor; transform: rotate(45deg); }
  .heza-mobile-menu__close span::after { transform: rotate(-45deg); }
  .heza-mobile-search { display: grid; grid-template-columns: minmax(0, 1fr) 48px; margin: 16px 24px 0; background: #fff; border: 1px solid #D9D9D9; border-radius: 100px; overflow: hidden; }
  .heza-mobile-search input { min-width: 0; min-height: 46px; padding: 10px 18px; color: #282C33; background: #fff; border: 0; border-radius: 0; font: inherit; font-size: 14px; }
  .heza-mobile-search input:focus { outline: 2px solid #717171; outline-offset: -2px; }
  .heza-mobile-search button { position: relative; min-height: 46px; padding: 0; color: #717171; background: transparent; border: 0; cursor: pointer; }
  .heza-mobile-search button span { position: absolute; top: 13px; left: 14px; width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 50%; }
  .heza-mobile-search button span::after { content: ''; position: absolute; width: 8px; height: 2px; right: -6px; bottom: -3px; background: currentColor; transform: rotate(45deg); transform-origin: left center; }
  .heza-mobile-languages { padding: 16px 24px; border-bottom: 1px solid #EDEDED; color: #717171; }
  .heza-mobile-languages .heza-topbar-languages { display: flex !important; flex-wrap: wrap; gap: 8px !important; }
  .heza-mobile-menu__content { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .heza-mobile-nav-list, .heza-mobile-nav-list ul { margin: 0; padding: 0; list-style: none; }
  .heza-mobile-nav-list { padding: 8px 0; }
  .heza-mobile-nav-list a { min-height: 50px; display: flex; align-items: center; padding: 13px 24px; color: #001832; border-bottom: 1px solid #EDEDED; font-size: 14px; line-height: 1.4; text-decoration: none; }
  .heza-mobile-nav-list > li > a { font-family: var(--heza-font__main); font-weight: 600; }
  .heza-mobile-nav-list a:hover, .heza-mobile-nav-list .current-menu-item > a { color: #D0322F; }
  .heza-mobile-nav-list .sub-menu { background: #FAFAFA; }
  .heza-mobile-nav-list .sub-menu a { padding-left: 42px; color: #282C33; font-size: 13px; }
  .heza-mobile-nav-list .sub-menu .sub-menu a { padding-left: 60px; color: #717171; }
  body.heza-mobile-menu-open { overflow: hidden; }
  .heza-source-focus-grid { flex-wrap: wrap; }
  .heza-source-focus-card, .heza-source-focus-card--main { flex: 1 1 40%; }
  .heza-source-zone-grid { height: 773px; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 380px); }
  .heza-source-environment-grid { grid-template-columns: repeat(2, 1fr); }
  .heza-source-logo-grid { grid-template-columns: repeat(4, 1fr); }
  .heza-source-logo-grid img:nth-child(4n) { border-right: 0; }
}

@media (max-width: 600px) {
  .heza-navbar-inner { min-height: 46px !important; padding-inline: max(16px, env(safe-area-inset-left)) !important; }
  .heza-mobile-nav__trigger { min-height: 46px; font-size: 12px; }
  .heza-mobile-nav__icon { transform: scale(.86); }
  .heza-mobile-menu { grid-template-columns: 1fr; }
  .heza-mobile-menu__panel { grid-column: 1; width: 100%; }
  .heza-mobile-menu__header { min-height: 60px; padding: max(10px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left)); }
  .heza-mobile-menu__header h2 { font-size: 17px; }
  .heza-mobile-menu__close { width: 40px; height: 40px; flex-basis: 40px; }
  .heza-mobile-menu__close span::before, .heza-mobile-menu__close span::after { top: 18px; left: 10px; width: 20px; }
  .heza-mobile-search { grid-template-columns: minmax(0, 1fr) 46px; margin: 12px 18px 0; }
  .heza-mobile-search input, .heza-mobile-search button { min-height: 44px; }
  .heza-mobile-languages { padding: 12px 18px; }
  .heza-mobile-languages .heza-topbar-languages { gap: 6px !important; font-size: 12px; }
  .heza-mobile-nav-list { padding-block: 4px; }
  .heza-mobile-nav-list a { min-height: 44px; padding: 10px 18px; font-size: 12.5px; }
  .heza-mobile-nav-list .sub-menu a { padding-left: 34px; font-size: 12px; }
  .heza-mobile-nav-list .sub-menu .sub-menu a { padding-left: 50px; }
  /* Thanh tiện ích nhanh Contact Bar chuẩn heza.gov.vn trên màn hình di động nhỏ */
  .buttons-contact {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    padding: 8px 16px max(8px, env(safe-area-inset-bottom)) !important;
    background: #ffffff !important;
    border-top: 1px solid #ebebeb !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08) !important;
    z-index: 998 !important;
  }
  .buttons-contact .button-contact {
    margin-bottom: 0 !important;
    width: 36px !important;
    height: 36px !important;
  }
  /* Trợ lý AI VNPT trên mobile: neo ngay phía trên thanh công cụ đáy, tránh đè che icon */
  #vnpt_ai_livechat_button,
  #vnpt_ai_livechat_button_dynamic {
    right: max(16px, env(safe-area-inset-right)) !important;
    bottom: max(60px, calc(env(safe-area-inset-bottom) + 54px)) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .heza-mobile-menu__backdrop, .heza-mobile-menu__panel { transition: none !important; }
}

@media (max-width: 767px) {
  .heza-brand-header > .heza-brand-header__inner { padding-block: 6px !important; gap: 8px !important; }
  .heza-brand-header .heza-brand-logo img { width: 44px !important; height: 44px !important; }
  .heza-header-hamburger { width: 40px !important; height: 40px !important; display: inline-flex !important; }
  .heza-brand-header .heza-site-name { font-size: 12.5px !important; line-height: 1.2 !important; }
  .heza-brand-header .heza-site-description { font-size: 9.5px !important; line-height: 1.4 !important; }
  .wp-site-blocks > nav.wp-block-template-part { display: none !important; }
  .heza-floating-navbar { display: none !important; }
  main:not(.heza-front-page-main) { padding-inline: max(18px, env(safe-area-inset-left)) !important; }
  /* Ẩn floating icons khi đang mở drawer menu mobile */
  body.heza-mobile-menu-open #vnpt_ai_livechat_button,
  body.heza-mobile-menu-open #vnpt_ai_livechat_button_dynamic,
  body.heza-mobile-menu-open .buttons-contact {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .heza-source-shell { width: min(100% - 28px, 1240px); }
  .heza-source-section { padding: 28px 0; }
  .heza-source-title { margin-bottom: 18px; font-size: 22px !important; }
  .heza-source-news-column h2,
  .heza-source-investment-data h3,
  .heza-source-access-grid h3,
  .heza-source-media h2,
  .heza-source-investment-chart h3 { font-size: 18px !important; }
  .heza-source-slider { height: clamp(280px, 42svh, 420px); }
  .heza-source-slider__button { width: 36px; height: 42px; }
  .heza-source-slider__button--prev { left: 10px; }
  .heza-source-slider__button--next { right: 10px; }
  .heza-source-slider__button span { font-size: 29px; }
  .heza-source-slider__dots { bottom: 10px; gap: 7px; }
  .heza-source-slider__dot { width: 8px; height: 8px; }
  #wp--skip-link--target.heza-page-main { padding-top: 21px !important; }
  .heza-page-title,
  #wp--skip-link--target.heza-page-main > div > h1.wp-block-post-title { margin-bottom: 20px; padding-bottom: 11px; font-size: 23px; line-height: 1.35; text-wrap: pretty; }
  .heza-page-title::after,
  #wp--skip-link--target.heza-page-main > div > h1.wp-block-post-title::after { width: 42px; }
  .heza-source-ticker { width: calc(100% - 28px); }
  .heza-source-ticker a { padding: 8px 10px; font-size: 11px; }
  .heza-source-focus-grid { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 8px; }
  .heza-source-focus-card, .heza-source-focus-card--main { min-width: 84%; height: 235px; flex: none; scroll-snap-align: start; }
  .heza-source-focus-card strong, .heza-source-focus-card--main strong { font-size: 14px; }
  .heza-source-news-grid { grid-template-columns: 1fr; gap: 28px; }
  .heza-source-news-column h2 { font-size: 18px; }
  .heza-source-news-column article { grid-template-columns: 96px 1fr; }
  .heza-source-news-column h3 { font-size: 13px; }
  .heza-source-zone-grid { height: 1024px; grid-template-columns: 1fr; grid-template-rows: repeat(4, 250px); gap: 8px; }
  .heza-source-zone-grid > * { min-height: 250px; }
  .heza-source-government-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; min-height: 0; padding-top: 20px; }
  .heza-source-government-links a { height: 76px; }
  .heza-source-government-links img { max-height: 76px; }
  .heza-source-environment-grid { grid-template-columns: 1fr 1fr; }
  .heza-source-environment-grid a { min-height: 118px; }
  .heza-source-environment-grid span { font-size: 12px; }
  .heza-source-investment-grid, .heza-source-access-grid, .heza-source-media-grid, .heza-source-promotion-grid { grid-template-columns: 1fr; }
  .heza-source-promotion-grid { gap: 20px; }
  .heza-source-promotion-card { padding: 22px; }
  .heza-source-promotion-eyebrow { font-size: 22px; }
  .heza-source-promotion-card h3 { font-size: 19px; }
  .heza-source-media-body > .heza-yt { height: 210px; }
  .heza-source-metrics { grid-template-columns: 1fr 1fr; }
  .heza-source-metrics strong { font-size: 17px; }
  .heza-source-investment-chart .aiha-chart { margin-bottom: 12px; }
  .heza-source-media-body > a:not(.heza-source-button) { height: 210px; }
  .heza-source-logo-grid { grid-template-columns: repeat(2, 1fr); }
  .heza-source-logo-grid img:nth-child(4n) { border-right: 1px solid var(--heza-line); }
  .heza-source-logo-grid img:nth-child(2n) { border-right: 0; }
  .heza-source-portals { grid-template-columns: 1fr; }
  .heza-gov-footer { margin-top: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .heza-source-home img, .heza-source-home a { transition: none !important; }
  .heza-source-slide { transition: none !important; }
}

/* ==========================================================================
   7. ARTICLE & POST CONTENT MEDIA FORMATTING (HEZA SSOT)
   Chuẩn hóa hiển thị hình ảnh & dòng chữ trong toàn bộ bài viết:
   - Tất cả ảnh trong bài viết bắt buộc phải căn giữa (center-aligned).
   - Văn bản xuất hiện trước, sau hoặc bên cạnh ảnh bắt buộc phải xuống dòng riêng biệt.
   - Vô hiệu hóa triệt để float (alignleft, alignright, alignnone) ngăn văn bản bao bọc quanh ảnh.
   - Căn giữa toàn bộ khối chú thích hình ảnh (captions).
   - Tối ưu co dãn responsive trên mobile & tablet, không tràn khung.
   ========================================================================== */

/* 1. Triệt tiêu toàn bộ thuộc tính float cho mọi ảnh & container trong bài viết */
.entry-content .alignleft,
.entry-content .alignright,
.entry-content .alignnone,
.entry-content .aligncenter,
.wp-block-post-content .alignleft,
.wp-block-post-content .alignright,
.wp-block-post-content .alignnone,
.wp-block-post-content .aligncenter,
.heza-single-main .alignleft,
.heza-single-main .alignright,
.heza-single-main .alignnone,
.heza-single-main .aligncenter,
.heza-single-tt-main .alignleft,
.heza-single-tt-main .alignright,
.heza-single-tt-main .alignnone,
.heza-single-tt-main .aligncenter,
.heza-single-kcn-main .alignleft,
.heza-single-kcn-main .alignright,
.heza-single-kcn-main .alignnone,
.heza-single-kcn-main .aligncenter,
.heza-page-main .alignleft,
.heza-page-main .alignright,
.heza-page-main .alignnone,
.heza-page-main .aligncenter {
  float: none !important;
  clear: both !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

/* 2. Căn giữa khối hình ảnh Gutenberg, Figure, Gallery & Classic Captions */
.entry-content .wp-block-image,
.wp-block-post-content .wp-block-image,
.heza-single-main .wp-block-image,
.heza-single-tt-main .wp-block-image,
.heza-single-kcn-main .wp-block-image,
.heza-page-main .wp-block-image,
.entry-content figure,
.wp-block-post-content figure,
.heza-single-main figure,
.heza-single-tt-main figure,
.heza-single-kcn-main figure,
.heza-page-main figure,
.entry-content .wp-caption,
.wp-block-post-content .wp-caption,
.heza-single-main .wp-caption,
.heza-single-tt-main .wp-caption,
.heza-single-kcn-main .wp-caption,
.heza-page-main .wp-caption {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 24px !important;
  margin-bottom: 24px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

/* 3. Căn giữa mọi thẻ img trong bài viết, ngắt dòng với text trước và sau */
.entry-content img:not(.emoji):not(.wp-smiley):not([width="16"]):not([height="16"]),
.wp-block-post-content img:not(.emoji):not(.wp-smiley):not([width="16"]):not([height="16"]),
.heza-single-main img:not(.emoji):not(.wp-smiley):not([width="16"]):not([height="16"]),
.heza-single-tt-main img:not(.emoji):not(.wp-smiley):not([width="16"]):not([height="16"]),
.heza-single-kcn-main img:not(.emoji):not(.wp-smiley):not([width="16"]):not([height="16"]),
.heza-page-main img:not(.emoji):not(.wp-smiley):not([width="16"]):not([height="16"]) {
  display: block !important;
  float: none !important;
  clear: both !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 18px !important;
  margin-bottom: 18px !important;
  max-width: 100% !important;
  height: auto !important;
  box-sizing: border-box !important;
}

/* 4. Thẻ link <a> bao bọc hình ảnh cũng trở thành khối block căn giữa độc lập */
.entry-content a:has(> img:not(.emoji):not(.wp-smiley)),
.wp-block-post-content a:has(> img:not(.emoji):not(.wp-smiley)),
.heza-single-main a:has(> img:not(.emoji):not(.wp-smiley)),
.heza-single-tt-main a:has(> img:not(.emoji):not(.wp-smiley)),
.heza-single-kcn-main a:has(> img:not(.emoji):not(.wp-smiley)),
.heza-page-main a:has(> img:not(.emoji):not(.wp-smiley)),
.entry-content figure > a,
.wp-block-post-content figure > a,
.heza-single-main figure > a,
.heza-single-tt-main figure > a,
.heza-single-kcn-main figure > a,
.heza-page-main figure > a {
  display: block !important;
  float: none !important;
  clear: both !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  width: fit-content !important;
  max-width: 100% !important;
}

/* 5. Căn giữa toàn bộ Caption và chú thích ảnh */
.entry-content figcaption,
.entry-content .wp-element-caption,
.entry-content .wp-caption-text,
.entry-content .caption_image,
.wp-block-post-content figcaption,
.wp-block-post-content .wp-element-caption,
.wp-block-post-content .wp-caption-text,
.wp-block-post-content .caption_image,
.heza-single-main figcaption,
.heza-single-main .wp-element-caption,
.heza-single-main .wp-caption-text,
.heza-single-main .caption_image,
.heza-single-tt-main figcaption,
.heza-single-tt-main .wp-element-caption,
.heza-single-tt-main .wp-caption-text,
.heza-single-tt-main .caption_image,
.heza-single-kcn-main figcaption,
.heza-single-kcn-main .wp-element-caption,
.heza-single-kcn-main .wp-caption-text,
.heza-single-kcn-main .caption_image,
.heza-page-main figcaption,
.heza-page-main .wp-element-caption,
.heza-page-main .wp-caption-text,
.heza-page-main .caption_image {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  margin-top: 8px !important;
  margin-bottom: 18px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  font-style: italic !important;
  color: var(--wp--preset--color--neutral-muted, #64748B) !important;
  clear: both !important;
}

/* 6. Đảm bảo text trước hoặc sau ảnh trong cùng thẻ <p> hoặc <div> tách dòng rõ ràng */
.entry-content p,
.wp-block-post-content p {
  clear: both;
}

.entry-content p:has(> img:not(.emoji):not(.wp-smiley)),
.wp-block-post-content p:has(> img:not(.emoji):not(.wp-smiley)),
.heza-single-main p:has(> img:not(.emoji):not(.wp-smiley)),
.heza-single-tt-main p:has(> img:not(.emoji):not(.wp-smiley)),
.heza-single-kcn-main p:has(> img:not(.emoji):not(.wp-smiley)),
.heza-page-main p:has(> img:not(.emoji):not(.wp-smiley)) {
  clear: both !important;
}

/* Trường hợp thẻ p chứa cả text và ảnh, img tạo khối block ngắt đoạn */
.entry-content p > img,
.wp-block-post-content p > img,
.heza-single-main p > img,
.heza-single-tt-main p > img,
.heza-single-kcn-main p > img,
.heza-page-main p > img {
  display: block !important;
  clear: both !important;
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 18px !important;
  margin-bottom: 18px !important;
}


/* Chuẩn WordPress: ẩn trực quan nhưng giữ cho trình đọc màn hình (H1 của hero mode=none, caption của plugin biểu đồ) */
.screen-reader-text, .sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; word-wrap: normal !important; }
/* Footer: lề an toàn giống thân trang (mobile trước đây padding 0, chữ dính mép) */
.heza-gov-footer { box-sizing: border-box; padding-inline: clamp(20px, 3.8vw, 44px) !important; }

/* ==========================================================================
   Tuỳ chỉnh HEZA (inc/theme-options.php) — class trên <body>, PLAN-20261011-51 D3–D6
   ========================================================================== */
body.heza-no-topbar .heza-topbar { display: none !important; }
body.heza-no-header-search .heza-header-desktop-search { display: none !important; }
body.heza-nav-static .wp-site-blocks > nav.wp-block-template-part.is-scroll-hidden { transform: none !important; }
/* Trang danh sách dạng lưới thẻ */
body.heza-archive-grid .heza-archive-main .wp-block-post-template { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
body.heza-archive-grid .heza-archive-main .wp-block-post-template > li { margin: 0; }
body.heza-archive-grid .heza-archive-main .wp-block-post-template > li > .wp-block-group { flex-direction: column !important; height: 100%; margin: 0 !important; padding: 0 0 16px !important; overflow: hidden; border: 1px solid #e2e8f0 !important; border-radius: var(--heza-radius, 6px); background: #fff; }
body.heza-archive-grid .heza-archive-main .wp-block-post-featured-image { width: 100% !important; height: auto !important; margin: 0 !important; aspect-ratio: 16 / 10; }
body.heza-archive-grid .heza-archive-main .wp-block-post-featured-image img { width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 0 !important; }
body.heza-archive-grid .heza-archive-main .wp-block-post-template > li > .wp-block-group > .wp-block-group { padding: 0 16px; }
body.heza-archive-no-sidebar .heza-archive-main > .alignwide > .wp-block-columns > .wp-block-column:last-child { display: none; }
body.heza-archive-no-sidebar .heza-archive-main > .alignwide > .wp-block-columns > .wp-block-column:first-child { flex-basis: 100% !important; }

/* ==========================================================================
   FOOTER & CHROME — MÀU HEZA.GOV.VN (Elementor footer post-38 của PROD)
   Chỉ đổi màu, giữ nguyên bố cục footer. Nền #007BB0, tiêu đề trắng IN HOA,
   vạch ngăn #FFFFFF33, dòng bản quyền trắng mờ (PROD #FFFFFF80; nâng lên .8 cho đủ tương phản).
   ========================================================================== */
.heza-gov-footer {
  background-color: var(--heza-c-blue) !important;
  color: #FFFFFF !important;
}
.heza-gov-footer .has-accent-gold-color,
.heza-gov-footer h3,
.heza-gov-footer h4 {
  color: #FFFFFF !important;
  font-weight: 600 !important;
  text-transform: uppercase;
}
.heza-gov-footer a {
  color: #FFFFFF !important;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.heza-gov-footer a:hover {
  opacity: 0.8;
}
.heza-gov-footer .wp-block-list li::marker {
  color: #FFFFFF;
}
.heza-gov-footer hr.wp-block-separator {
  width: 100% !important;
  max-width: 1240px !important;
  height: 1px !important;
  border: 0 !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.2) !important;
  opacity: 1 !important;
}
.heza-gov-footer hr.wp-block-separator + .wp-block-group p {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Thanh liên kết cổng dịch vụ công: PROD là dải #12ACEE ngay trên footer */
.heza-source-portals a { background: var(--heza-c-blue-light); }
.heza-source-portals a:hover { background: var(--heza-c-blue); }

/* Chọn ngôn ngữ dạng dòng trong drawer mobile (nền trắng) */
.heza-mobile-languages .heza-topbar-languages a {
  color: var(--heza-c-dark);
  text-decoration: none;
}
.heza-mobile-languages .heza-topbar-languages a.is-active {
  color: var(--heza-c-primary);
  font-weight: 700;
}

/* ==========================================================================
   DẢI LIÊN KẾT CỔNG DỊCH VỤ CÔNG + HUY HIỆU TÍN NHIỆM MẠNG (mọi trang, như #site-footer của heza.gov.vn)
   PROD: section 443c9b7 nền #12ACEE ngay trên footer; huy hiệu NCSC ở hàng dưới cùng bên phải.
   Trang chủ cũng dùng dải này (đã bỏ dải riêng .heza-source-portals trong khối đối tác).
   ========================================================================== */
.heza-footer-portals {
  margin: 40px 0 0 !important;
  padding: 19px clamp(20px, 3.8vw, 44px) !important;
  background-color: var(--heza-c-blue-light);
  color: #FFFFFF;
}
.heza-footer-portals + .heza-gov-footer { margin-top: 0 !important; }
.heza-footer-portals__inner { gap: 10px 32px !important; align-items: center; }
.heza-footer-portals__item { margin: 0 !important; font-family: var(--heza-font__body); font-size: 16px; line-height: 1.5; color: #FFFFFF; }
.heza-footer-portals__item a { display: inline-flex; align-items: center; gap: 8px; color: #FFFFFF !important; text-decoration: none; }
.heza-footer-portals__item a:hover { opacity: 0.8; }
.heza-footer-portals__item::before,
.heza-footer-portals__item a::before {
  content: '';
  flex: 0 0 auto;
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.heza-footer-portals__item a::before { margin-right: 0; }
.heza-footer-portals__item:has(> a)::before { content: none; }
/* Trang chủ dùng chính dải ở footer (đã bỏ dải riêng trong khối đối tác): dải nối liền khối đối tác như PROD */
.wp-site-blocks:has(.heza-source-partners) .heza-footer-portals { margin-top: 0 !important; }

.heza-ncsc-badge { margin: 0 !important; flex: 0 0 auto; }
.heza-ncsc-badge a { display: block; line-height: 0; }
.heza-ncsc-badge img { width: 110px; height: auto; max-width: 100%; }
@media (max-width: 767px) {
  .heza-footer-portals { padding-block: 16px; }
  .heza-footer-portals__inner { flex-direction: column; align-items: flex-start; gap: 10px !important; }
  .heza-footer-portals__item { font-size: 14px; }
}
@media (min-width: 900px) {
  .heza-gov-footer .wp-block-group:has(> .heza-ncsc-badge) { flex-wrap: nowrap !important; align-items: center; gap: 24px; }
  .heza-gov-footer .wp-block-group:has(> .heza-ncsc-badge) > p { flex: 1 1 auto; min-width: 0; }
  .heza-gov-footer .wp-block-group:has(> .heza-ncsc-badge) > .heza-ncsc-badge { margin-left: auto !important; }
}

/* ==========================================================================
   CĂN LỀ HEADER / MENU / NỘI DUNG / FOOTER CÙNG MỘT HỘP 1240px
   Trước đây header & menu tự cộng thêm padding (clamp 16–24px) vào hộp 1240px nên logo lệch ~30px so với nội dung
   và footer (PROD: logo, nội dung và footer cùng một lề trái). Hộp rộng đầy chiều ngang, lề hai bên =
   max(20px, (chiều rộng − 1240px) / 2) → nội dung thật luôn đúng 1240px ở màn rộng, 20px lề ở màn hẹp.
   ========================================================================== */
.heza-brand-header > .alignwide,
.heza-floating-navbar > .alignwide,
.heza-floating-navbar .heza-navbar-inner {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: max(20px, calc((100% - 1240px) / 2)) !important; /* trùng lề .heza-source-shell của trang chủ đã nghiệm thu */
}

/* ==========================================================================
   KHỐI MÀU ĐẶC Ở ĐẦU/CUỐI TRANG: bỏ khoảng trắng thừa
   Trang kết thúc bằng khối màu đặc (xanh HEZA, dải ảnh phủ xanh, nền nhạt tràn ngang) thì nối liền với dải liên kết
   cổng dịch vụ công, không còn đệm 48px của main + 40px của dải; khối ở đầu trang sát thanh menu (PROD không có khoảng trắng).
   ========================================================================== */
.heza-layout-prod main:has(.wp-block-post-content > .heza-pc--stretch:is(.heza-pc--dark, .heza-pc--photo, .heza-pc--tint):last-child) { padding-bottom: 0 !important; }
.wp-site-blocks:has(.wp-block-post-content > .heza-pc--stretch:is(.heza-pc--dark, .heza-pc--photo, .heza-pc--tint):last-child) .heza-footer-portals { margin-top: 0 !important; }
.heza-layout-prod main:has(.wp-block-post-content > .heza-pc--stretch:is(.heza-pc--dark, .heza-pc--photo):first-child) { padding-top: 0 !important; }
.heza-layout-prod main:has(.wp-block-post-content > .heza-pc--stretch:is(.heza-pc--dark, .heza-pc--photo):first-child) > .alignwide { margin-block-start: 0 !important; }

/* Nối liền khối cuối trang với dải liên kết: bỏ thêm 40px đệm cuối của main (trang chủ) và 24px khoảng cách tự động
   WP giữa main và footer (trang chủ + trang kết thúc bằng khối màu đặc). Trang thường giữ nguyên (≈112px, PROD 117px). */
main:has(.heza-source-partners) { padding-bottom: 0 !important; }
.wp-site-blocks:has(.heza-source-partners) > footer.wp-block-template-part,
.wp-site-blocks:has(.wp-block-post-content > .heza-pc--stretch:is(.heza-pc--dark, .heza-pc--photo, .heza-pc--tint):last-child) > footer.wp-block-template-part,
.wp-site-blocks:has(.heza-org) > footer.wp-block-template-part { margin-block-start: 0 !important; }

/* Đăng nhập quản trị: thanh admin (32px / 46px ≤782px) không được đè menu sticky — chỉ ảnh hưởng người đã đăng nhập */
body.admin-bar .wp-site-blocks > nav.wp-block-template-part { top: 32px !important; }
@media (max-width: 782px) { body.admin-bar .wp-site-blocks > nav.wp-block-template-part { top: 46px !important; } }
@media (max-width: 1199px) {
  body.admin-bar .heza-brand-header { top: 32px !important; }
}
@media (max-width: 782px) {
  body.admin-bar .heza-brand-header { top: 46px !important; }
}

/* ==========================================================================
   YouTube facade (inc/youtube-facade.php) — thumbnail + Play, iframe chỉ tạo khi bấm.
   ========================================================================== */
.heza-yt { position: relative; width: 100%; aspect-ratio: 16 / 9; margin-inline: auto; overflow: hidden; background: #0a2b4c; }
.heza-yt__btn { position: absolute; inset: 0; display: block; cursor: pointer; }
.heza-yt__btn img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease, filter .35s ease; }
.heza-yt__play { position: absolute; top: 50%; left: 50%; width: 68px; height: 68px; border: 3px solid rgba(255, 255, 255, .92); border-radius: 50%; background: rgba(10, 43, 76, .35); transform: translate(-50%, -50%); transition: background-color .2s ease, transform .2s ease; }
.heza-yt__play::after { content: ""; position: absolute; top: 50%; left: 54%; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; transform: translate(-50%, -50%); }
.heza-yt__btn:hover img, .heza-yt__btn:focus-visible img { transform: scale(1.03); filter: brightness(.9); }
.heza-yt__btn:hover .heza-yt__play, .heza-yt__btn:focus-visible .heza-yt__play { background: var(--heza-red, #d0322f); transform: translate(-50%, -50%) scale(1.06); }
.heza-yt__btn:focus-visible { outline: 3px solid #ffb703; outline-offset: -3px; }
.heza-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wp-block-embed__wrapper > .heza-yt, .heza-embed .heza-yt { min-height: 0; }
@media (prefers-reduced-motion: reduce) { .heza-yt__btn img, .heza-yt__play { transition: none; } }
