/* ==========================================================================
   Cầu nối Blocksy → hệ thống Namviet.
   Ưu tiên đặt màu/phông trong Customizer (xem HUONG-DAN). File này đảm bảo đồng bộ
   kể cả khi Customizer chưa chỉnh, và tạo kiểu cho các thành phần sẵn có của Blocksy.
   ========================================================================== */
:root {
  --theme-palette-color-1: #146EF5;   /* liên kết, điểm nhấn */
  --theme-palette-color-2: #0F5AD0;   /* liên kết khi rê chuột */
  --theme-palette-color-3: #172B4D;   /* chữ chính */
  --theme-palette-color-4: #102A43;   /* tiêu đề */
  --theme-palette-color-5: #DCE3EC;   /* viền */
  --theme-palette-color-6: #F5F7FA;   /* nền phụ */
  --theme-palette-color-7: #F5F7FA;   /* nền trang */
  --theme-palette-color-8: #FFFFFF;   /* nền khối */
  --theme-font-family: "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
  --theme-headings-color: #102A43;
  --theme-text-color: #172B4D;
  --theme-link-initial-color: #0F5AD0;
  --theme-link-hover-color: #102A43;
  --theme-button-background-initial-color: #F97316;
  --theme-button-background-hover-color: #EA580C;
  --theme-button-text-initial-color: #FFFFFF;
  --theme-button-text-hover-color: #FFFFFF;
  --theme-content-vertical-spacing: 48px;
  --theme-normal-container-max-width: 1200px;
  --theme-narrow-container-max-width: 760px;
  --theme-border-radius: 10px;
}
body.nv { background: #F5F7FA; }
body.nv h1, body.nv h2, body.nv h3, body.nv h4 { font-family: var(--nv-font); text-wrap: balance; }

/* Header Blocksy: dính đầu trang, nền trắng, viền mảnh */
body.nv #header { border-bottom: 1px solid #DCE3EC; }
body.nv [data-device="desktop"] .ct-header-cta .ct-button,
body.nv [data-device="mobile"] .ct-header-cta .ct-button {
  background: #F97316; color: #fff; border-radius: 6px; font-weight: 700; min-height: 44px;
}
body.nv .ct-header-cta .ct-button:hover { background: #EA580C; }
body.nv .menu-container a, body.nv [data-menu] > ul > li > a { font-weight: 600; }
body.nv #offcanvas .ct-menu-link { min-height: 52px; font-weight: 600; }

/* Nội dung bài viết */
body.nv .entry-content { font-size: 1.0625rem; line-height: 1.7; }
body.nv .entry-content > * + * { margin-top: 1em; }
body.nv .entry-content h2 { scroll-margin-top: 96px; }
body.nv .entry-content img { border-radius: 10px; }
body.nv .entry-content table { display: block; overflow-x: auto; max-width: 100%; }
body.nv .nv-crumbs { margin-bottom: 12px; }
body.nv .nv-crumbs .rank-math-breadcrumb p { margin: 0; font-size: .8125rem; color: #52627A; }
body.nv .nv-related { margin-top: 32px; display: grid; gap: 14px; }

/* Lưới bài viết, tìm kiếm (archive Blocksy) */
body.nv .entries[data-layout] article { background: #fff; border: 1px solid #DCE3EC; border-radius: 10px; }
body.nv .entries .entry-title a { color: #102A43; }
body.nv .ct-search-form input[type="search"] { min-height: 48px; font-size: 16px; }

/* Ảnh trong trang dùng mẫu khối */
body.nv .nv-card__img img, body.nv .nv-hero__media img, body.nv .nv-project img { width: 100%; height: 100%; object-fit: cover; }
body.nv .nv-hero__media { margin: 0; }
body.nv .nv-card .wp-block-image, body.nv .nv-project .wp-block-image { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; }
body.nv .nv-points { padding: 0; }
body.nv .nv-faq details summary { padding: 16px 18px; }
body.nv .nv-faq details > p { padding: 0 18px 16px; color: #52627A; }
body.nv .nv-warn, body.nv .nv-callout { display: block; }

/* Không để nút nổi chồng nhau: ẩn nút "lên đầu trang" của Blocksy trên điện thoại khi có thanh liên hệ */
@media (max-width: 1023px) { body.nv-has-mbar .ct-back-to-top { display: none !important; } }
body.nv ul.nv-points { list-style: none; }
body.nv ul.nv-points li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #146EF5; flex: none; }
