/**
 * Page Builder blocks — default styling มาตรฐาน
 * รากสาธารณะ: .gjs-home-content (หน้าแรก) + .gjs-page-content (หน้าภายใน) — PB-5.2 ใช้ :is(...) ครอบคู่ราก
 * โหลดใน canvas iframe — body ต้องมี min-height เพื่อรับ drop
 */
body {
  min-height: 100%;
}

/* Dynamic block placeholders — มองเห็นใน Page Builder (หนังสือราชการ, สถิติ, ข่าว ฯลฯ) */
.nh-pb-dynamic[data-block] {
  min-height: 100px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem 1.5rem !important;
  border: 2px dashed rgba(15, 76, 129, 0.4) !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}
.nh-pb-dynamic[data-block] span {
  text-align: center !important;
  line-height: 1.5 !important;
  font-weight: 500 !important;
}
/* หลังโหลดพรีวิวจากเซิร์ฟเวอร์ — เอาเส้นประ/กลางจอออก ให้เหมือนหน้าเว็บ */
.nh-pb-dynamic[data-block][data-pb-preview-loaded] {
  display: block !important;
  min-height: 0 !important;
  align-items: unset !important;
  justify-content: unset !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}
.nh-pb-dynamic[data-block][data-pb-preview-loaded] span {
  text-align: inherit !important;
  font-weight: inherit !important;
}
/* Civic Horizon — กลุ่มลากวางทีละส่วน (canvas) */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-civic-stack {
  min-height: 0;
}
/* Siam Civic Modern — กลุ่มลากวางทีละส่วน */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-scm-stack {
  min-height: 0;
}
/* Page Builder: คลิกผ่านไปที่ wrapper — ไม่ให้เลือก h2/a ภายในพรีวิว (จะได้เปิด Traits ของ nh-pb-dynamic) */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-dynamic[data-block="news"][data-news-layout="highlights"][data-pb-preview-loaded] * {
  pointer-events: none !important;
}
/* section ที่มี dynamic block — รักษาความสูงใน editor */
section:has(.nh-pb-dynamic[data-block]) {
  min-height: 140px !important;
}
section:has(.nh-pb-dynamic[data-block][data-pb-preview-loaded]) {
  min-height: 0 !important;
}

/* Base: section และ container แสดงผลถูกต้อง */
:is(.gjs-home-content,.gjs-page-content) section {
  display: block;
  width: 100%;
  box-sizing: border-box;
}
:is(.gjs-home-content,.gjs-page-content) section + section {
  margin-top: 2rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-section--full {
  width: 100%;
}

/* รูปภาพจัดขนาดพอดี container (มาตรฐาน Elementor/Divi: object-fit) */
/* ใช้ทั้งใน editor canvas และหน้าเว็บ */
.nh-pb-img-container,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-img-container {
  overflow: hidden;
  position: relative;
}
.nh-pb-img-container img,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-img-container img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
:is(.gjs-home-content,.gjs-page-content) img {
  max-width: 100%;
  height: auto;
}

:is(.gjs-home-content,.gjs-page-content) .nh-pb-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  border-radius: 12px;
  overflow: hidden;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-card:hover {
  box-shadow: 0 8px 24px rgba(15, 76, 129, 0.15) !important;
  transform: translateY(-2px);
}

/* ปุ่ม pill-btn ใน Page Builder — สไตล์สม่ำเสมอ */
:is(.gjs-home-content,.gjs-page-content) .pill-btn,
:is(.gjs-home-content,.gjs-page-content) a.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  min-height: 42px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: filter 0.2s ease, box-shadow 0.2s ease;
}
:is(.gjs-home-content,.gjs-page-content) .pill-btn--green,
:is(.gjs-home-content,.gjs-page-content) a.pill-btn--green {
  background: linear-gradient(135deg, #0f5b3a 0%, #0a7a4b 100%);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(15, 91, 58, 0.35);
}
:is(.gjs-home-content,.gjs-page-content) .pill-btn--green:hover,
:is(.gjs-home-content,.gjs-page-content) a.pill-btn--green:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 14px rgba(15, 91, 58, 0.45);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-card a {
  color: #0f4c81 !important;
  text-decoration: none !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-card a:hover {
  color: #0c3d6b !important;
}
/* คอลัมน์ — เมื่อมี content ลบ border/background (hint ถูกลบออกแล้ว) */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column:has(> *),
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column-2col:has(> *),
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column-3col:has(> *) {
  border: none;
  background: transparent;
  padding: 0;
}

:is(.gjs-home-content,.gjs-page-content) .nh-pb-section-title {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #0f4c81;
  display: inline-block;
}

/* ========== Wave Divider — แยก section แบบ wave ========== */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-wave-divider {
  height: 48px;
  width: 100%;
  margin: 0;
  flex-shrink: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-wave-divider--light {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 24 Q300 0 600 24 T1200 24 L1200 48 L0 48 Z' fill='white'/%3E%3C/svg%3E") center center / 100% 100% no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 24 Q300 0 600 24 T1200 24 L1200 48 L0 48 Z' fill='white'/%3E%3C/svg%3E") center center / 100% 100% no-repeat;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-wave-divider--dark {
  background: linear-gradient(180deg, #0f4c81 0%, #0c3d6b 100%);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 24 Q300 0 600 24 T1200 24 L1200 48 L0 48 Z' fill='white'/%3E%3C/svg%3E") center center / 100% 100% no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 24 Q300 0 600 24 T1200 24 L1200 48 L0 48 Z' fill='white'/%3E%3C/svg%3E") center center / 100% 100% no-repeat;
}

/* ========== Container มาตรฐาน — ความกว้างสม่ำเสมอทั้งหน้า ========== */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-container,
.nh-pb-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-container,
  .nh-pb-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
@media (min-width: 1024px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-container,
  .nh-pb-container {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

/* ========== Section Layout: ความกว้าง (เต็มจอ / กลาง) ========== */
/* เลือกได้จาก trait "ความกว้าง" เมื่อคลิก section ใน Page Builder */
:is(.gjs-home-content,.gjs-page-content) section.nh-pb-section--full,
section.nh-pb-section--full {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
/* ไม่ใส่ max-width:none กับ wrapper มาตรฐานของ Civic/Siam/บล็อก — ไม่งั้น canvas จะดึงกว้างเต็มจอและเละ */
:is(.gjs-home-content,.gjs-page-content) section.nh-pb-section--full > div:not(.nh-pb-scm-container):not(.nh-pb-civic-container):not(.nh-pb-container),
section.nh-pb-section--full > div:not(.nh-pb-scm-container):not(.nh-pb-civic-container):not(.nh-pb-container) {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
/* nh-pb-dynamic ลูกตรงของ section--full (เช่น หนังสือราชการ / ข่าวจาก sidebar) — ไม่ใช่ hero media ที่ต้องเต็มจอ */
:is(.gjs-home-content,.gjs-page-content) section.nh-pb-section--full > div.nh-pb-dynamic[data-block]:not([data-news-layout="ticker"]),
section.nh-pb-section--full > div.nh-pb-dynamic[data-block]:not([data-news-layout="ticker"]) {
  max-width: min(80rem, 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
/* section มาตรฐาน (ไม่ใช่ --full) + dynamic จาก Block Manager — ให้แนวเดียวกับ Siam container */
:is(.gjs-home-content,.gjs-page-content) section.nh-pb-section:not(.nh-pb-section--full) > div.nh-pb-dynamic[data-block]:not([data-news-layout="ticker"]),
section.nh-pb-section:not(.nh-pb-section--full) > div.nh-pb-dynamic[data-block]:not([data-news-layout="ticker"]) {
  max-width: min(80rem, 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
:is(.gjs-home-content,.gjs-page-content) section.nh-pb-section--full .nh-pb-services-line-eservice,
section.nh-pb-section--full .nh-pb-services-line-eservice {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
:is(.gjs-home-content,.gjs-page-content) section.nh-pb-section--full .outside-links__inner,
section.nh-pb-section--full .outside-links__inner {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* บล็อกผู้บริหาร: ชนะกฎ section.nh-pb-section--full > div ด้านบน (canvas เคยไม่มี wrapper ราก builder บน body) */
section.nh-pb-exec-leadership.nh-pb-section--full > .nh-pb-exec-leadership__inner.nh-pb-container {
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: clamp(1.25rem, 4vw, 2.5rem) !important;
  padding-right: clamp(1.25rem, 4vw, 2.5rem) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ========== Container หลัก — กล่องลากวางสำหรับหน้าหลัก ========== */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-container-inner {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-container--contained .nh-pb-container-inner {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-container--full .nh-pb-container-inner {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-container-inner:has(> *:not(.nh-pb-container-hint)) {
  border: none;
  background: transparent;
  padding: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-container-inner:has(> *:not(.nh-pb-container-hint)) .nh-pb-container-hint {
  display: none;
}
/* ซ่อน placeholder เมื่อมี content — ใช้ได้ทั้งใน canvas และหน้าเว็บ */
.nh-pb-container-inner:has(> *:not(.nh-pb-container-hint)) .nh-pb-container-hint,
.nh-pb-column:has(> *:not(.nh-pb-column-hint)) .nh-pb-column-hint {
  display: none !important;
}

/* Column/Layout ใน canvas — override inline align-items:center ที่ทำให้ carousel ในคอลัมน์มองไม่เห็น */
.nh-pb-cols,
.nh-pb-cols-2,
.nh-pb-cols-3 {
  display: grid !important;
  align-items: stretch !important;
}
.nh-pb-column,
.nh-pb-column-2col,
.nh-pb-column-3col {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  overflow: visible !important;
  min-width: 0;
}
.nh-pb-column .nh-pb-carousel,
.nh-pb-column .nh-banner-slider,
.nh-pb-column-2col .nh-pb-carousel,
.nh-pb-column-2col .nh-banner-slider,
.nh-pb-column-3col .nh-pb-carousel,
.nh-pb-column-3col .nh-banner-slider {
  min-width: 0;
  width: 100%;
  flex-shrink: 0;
}
/* Section ภายใน Container — ใช้ความกว้างเต็ม container ไม่ overflow */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-container-inner .nh-pb-section,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-container-inner .nh-pb-section-inner {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-container-inner .nh-pb-section {
  width: 100%;
  min-width: 0; /* ป้องกัน grid overflow ใน flex */
}

/* Section padding — ไม่ให้ติดขอบ */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-section {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-section {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-section-inner {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Section ที่มี background สีอ่อน — เพิ่ม padding ไม่ติดขอบ */
:is(.gjs-home-content,.gjs-page-content) section[style*="background: #f8fafc"],
:is(.gjs-home-content,.gjs-page-content) section[style*="background:#f8fafc"] {
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

/* ========== Layout แก้ไขปัญหาแสดงผลแปลก ========== */

/* Grid 2/3 คอลัมน์ — ความสูงเท่ากัน แนวตรง */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-cols,
:is(.gjs-home-content,.gjs-page-content) section[style*="grid-template-columns"] {
  display: grid !important;
  align-items: stretch !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-cols,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-cols-2,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-cols-3 {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-cols,
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-cols-2,
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-cols-3 {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
}

/* คอลัมน์ — ความสูงเต็ม padding ภายใน และซ่อนเส้นขอบ dashed บนหน้าเว็บ */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column-2col,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column-3col {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  padding: 1.25rem !important;
  min-height: 120px;
  border: none !important;
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-column {
    padding: 1.5rem !important;
  }
}

/* Section ภายในคอลัมน์ — ไม่ใช้ max-width คงที่ ใช้เต็มความกว้างคอลัมน์ */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column .nh-pb-section,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column .nh-pb-section-inner,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column-2col .nh-pb-section,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column-2col .nh-pb-section-inner,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column-3col .nh-pb-section,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column-3col .nh-pb-section-inner {
  max-width: 100% !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column .nh-pb-section-inner,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column-2col .nh-pb-section-inner,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-column-3col .nh-pb-section-inner {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* Grid 2 คอลัมน์ (ข่าว+เมนูลัด) — ความสูงเท่ากัน padding ไม่ติดขอบ */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-grid-2col,
:is(.gjs-home-content,.gjs-page-content) div[style*="grid-template-columns: 2fr"] {
  display: grid !important;
  align-items: stretch !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-grid-cell,
:is(.gjs-home-content,.gjs-page-content) div[style*="grid-template-columns: 2fr"] > div {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  min-width: 0;
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-grid-cell,
  :is(.gjs-home-content,.gjs-page-content) div[style*="grid-template-columns: 2fr"] > div {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
}

/* Section-inner ปกติ — เพิ่ม padding ไม่ติดขอบ */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-section-inner {
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-section-inner {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

/* Wrapper หลัก — full width ไม่จำกัด */
:is(.gjs-home-content,.gjs-page-content) {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
/* หน้า Page Builder: กัน parent constrain content */
.nh-home .gjs-home-content {
  max-width: none !important;
}

/* บริการประชาชน 4–8 รายการ — responsive */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-services-grid {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 1rem !important;
}
@media (min-width: 640px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-services-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.25rem !important;
  }
}

/* บริการประชาชน + LINE + E-Service — responsive 2 คอลัมน์ */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-services-line-eservice {
  grid-template-columns: 1fr !important;
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-services-line-eservice {
    grid-template-columns: 1fr 320px !important;
  }
}

/* ========== Carousel (แบนเนอร์สไลด์) — arrows + dots + content slides ========== */
/* ใช้ !important เพื่อ override inline styles จาก Page Builder (display: grid/flex) และ home-tuning.css */
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider {
  position: relative;
  overflow: hidden;
}
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__track {
  position: relative;
  width: 100%;
  min-height: 180px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__slide {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  width: 100% !important;
  z-index: 1;
}
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__prev,
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__prev:hover,
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__next:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.05);
}
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__prev {
  left: 12px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__next {
  right: 12px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__dot.is-active {
  background: #fff;
  transform: scale(1.2);
}
:is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__dot:hover {
  background: rgba(255, 255, 255, 0.85);
}
@media (max-width: 640px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-banner-slider__slide[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    padding: 1.5rem 1.25rem !important;
  }
}

/* Carousel ใน Page Builder canvas — ไม่มี wrapper ราก .gjs-home-content / .gjs-page-content (กฎเต็มอยู่ด้านบน) */
.nh-banner-slider {
  position: relative;
  overflow: hidden;
  background: #e2e8f0; /* fallback เมื่อสไลด์ยังไม่โหลด */
}
.nh-banner-slider__track {
  position: relative;
  width: 100%;
  min-height: 180px;
  background: #f1f5f9; /* พื้นหลังให้มองเห็นพื้นที่ carousel */
}
.nh-banner-slider__slide {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  width: 100% !important;
  z-index: 1;
}
.nh-banner-slider__slide.is-active {
  opacity: 1 !important;
  pointer-events: auto;
  z-index: 2;
  visibility: visible !important;
}
.nh-banner-slider__prev,
.nh-banner-slider__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.nh-banner-slider__prev:hover,
.nh-banner-slider__next:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.05);
}
.nh-banner-slider__prev {
  left: 12px;
}
.nh-banner-slider__next {
  right: 12px;
}
.nh-banner-slider__dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.nh-banner-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.nh-banner-slider__dot.is-active {
  background: #fff;
  transform: scale(1.2);
}
.nh-banner-slider__dot:hover {
  background: rgba(255, 255, 255, 0.85);
}
@media (max-width: 640px) {
  .nh-banner-slider__slide[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    padding: 1.5rem 1.25rem !important;
  }
}

/* นายก/ปลัด + วิดีโอ — responsive stack บนมือถือ */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-leader-grid {
  display: grid !important;
}
@media (max-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-leader-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}

/* OTOP / แหล่งท่องเที่ยว — responsive */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-tourism-grid {
  display: grid !important;
}
@media (max-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-tourism-grid {
    grid-template-columns: 1fr !important;
  }
}

/* หน่วยงานภายนอก carousel — ซ่อน scrollbar */
:is(.gjs-home-content,.gjs-page-content) .outside-links__track-wrap,
:is(.gjs-home-content,.gjs-page-content) .outside-links__track {
  scrollbar-width: none;
}
:is(.gjs-home-content,.gjs-page-content) .outside-links__track::-webkit-scrollbar {
  display: none;
}

/* แบนเนอร์ร้องเรียน — responsive */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-petition-banner {
  grid-template-columns: 1fr !important;
  text-align: center;
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-petition-banner {
    grid-template-columns: 1fr auto 1fr !important;
    text-align: left;
  }
}

/* ========== Tabs (อ้างอิง Elementor nested-tabs) ========== */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-tabs-wrapper {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-tabs-heading {
  display: flex !important;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-tab-btn {
  padding: 0.5rem 1rem;
  background: #e2e8f0;
  color: #475569;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-tab-btn:hover {
  background: #cbd5e1;
  color: #334155;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-tab-btn.active {
  background: #0f4c81 !important;
  color: white !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-tab-panel {
  display: none;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-tab-panel:not(.hidden) {
  display: block !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-tab-panel.hidden {
  display: none !important;
}

/* ========== Accordion (อ้างอิง Elementor nested-accordion, ใช้ details/summary) ========== */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-accordion-wrapper {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-accordion-item {
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-accordion-item:last-child {
  margin-bottom: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-accordion-title {
  padding: 1rem 1.25rem !important;
  font-weight: 600;
  cursor: pointer;
  background: #f8fafc;
  list-style: none !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-accordion-title::-webkit-details-marker {
  display: none;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-accordion-title:hover {
  background: #f1f5f9;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-accordion-item[open] .nh-pb-accordion-title {
  background: #e0f2fe;
  border-bottom: 1px solid #e2e8f0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-accordion-content {
  padding: 1rem 1.25rem !important;
  background: white;
  border-top: 1px solid #e2e8f0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-accordion-icon {
  font-size: 1.25rem;
  color: #64748b;
}
/* สลับไอคอน +/− ตามสถานะ open */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-accordion-item:not([open]) .nh-pb-accordion-icon .e-opened {
  display: none;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-accordion-item:not([open]) .nh-pb-accordion-icon .e-closed {
  display: inline;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-accordion-item[open] .nh-pb-accordion-icon .e-opened {
  display: inline;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-accordion-item[open] .nh-pb-accordion-icon .e-closed {
  display: none;
}

/* ========== Announcement Card (ประชาสัมพันธ์ / ประกาศงานคลัง) — ตาม main design ========== */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__inner {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  padding: 1.5rem 1.75rem;
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__inner {
    padding: 1.75rem 2.25rem;
  }
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  margin: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__icon {
  font-size: 1.5em;
  line-height: 1;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__viewall {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__viewall:hover {
  background: #c8e6c9;
  color: #1b5e20;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__divider {
  height: 1px;
  background: #eee;
  margin: 1rem 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__item:last-child {
  border-bottom: none;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__link {
  flex: 1;
  min-width: 0;
  color: #333 !important;
  font-weight: 400;
  text-decoration: none !important;
  line-height: 1.5;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__link:hover {
  color: #0f4c81 !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-date-pill {
  flex-shrink: 0;
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  white-space: nowrap;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-date-pill--green {
  background: #2e7d32;
  color: white;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__footer {
  margin: 1.25rem 0 0;
  padding: 1rem 0 0.5rem;
  text-align: center;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 999px;
  text-decoration: none !important;
  transition: filter 0.2s, box-shadow 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__btn--yellow {
  background: #fec002;
  color: #333 !important;
  box-shadow: 0 2px 8px rgba(254, 192, 2, 0.4);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__btn--yellow:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 12px rgba(254, 192, 2, 0.5);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__btn--orange {
  background: #ff9800;
  color: white !important;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__btn--orange:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.5);
}
/* Tabs ประกาศงานคลัง — pill style, ตัวอักษรขาวบนพื้นเขียว (contrast ชัด) */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-procurement-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-procurement-tab {
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-procurement-tab:hover {
  background: #e2e8f0;
  color: #334155;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-procurement-tab--active {
  background: #0f5b3a !important;
  color: #fff !important;
  border-color: #0f5b3a !important;
}

/* Stitch bidding_announcements — ประกาศจัดซื้อจัดจ้าง (Na Wang Hin Digital Excellence / primary blue) */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements {
  --nh-bid-primary: #003c94;
  --nh-bid-primary-dim: #1a53ba;
  --nh-bid-on-surface: #191c1d;
  --nh-bid-on-variant: #434653;
  --nh-bid-outline: rgba(195, 198, 213, 0.35);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-announcement-card__section-title {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--nh-bid-on-surface);
  margin: 0 0 1rem;
  line-height: 1.2;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-announcement-card__inner {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 24px rgba(0, 60, 148, 0.07);
  border: 1px solid var(--nh-bid-outline);
  padding: 1.5rem 1.75rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-announcement-card__title {
  color: var(--nh-bid-on-surface);
  font-size: 1.125rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-announcement-card__viewall {
  background: transparent;
  color: var(--nh-bid-primary);
  font-weight: 700;
  padding: 0.25rem 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-announcement-card__viewall:hover {
  background: transparent;
  color: var(--nh-bid-primary-dim);
  text-decoration: underline !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-announcement-card__divider {
  background: rgba(0, 60, 148, 0.12);
  height: 1px;
  margin: 0.75rem 0 1rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-procurement-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 1rem;
  background: #f3f4f5;
  border-radius: 999px;
  flex-wrap: wrap;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-procurement-tab {
  border: none !important;
  background: transparent !important;
  color: var(--nh-bid-on-variant) !important;
  border-radius: 999px !important;
  padding: 0.5rem 1rem !important;
  font-weight: 600;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-procurement-tab:hover {
  color: var(--nh-bid-primary) !important;
  background: rgba(255, 255, 255, 0.55) !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-procurement-tab--active {
  background: linear-gradient(135deg, var(--nh-bid-primary) 0%, var(--nh-bid-primary-dim) 100%) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 60, 148, 0.25);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-announcement-card__link {
  color: var(--nh-bid-on-surface) !important;
  font-weight: 500;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-announcement-card__link:hover {
  color: var(--nh-bid-primary) !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-announcement-card__plus {
  color: var(--nh-bid-primary-dim);
  font-weight: 700;
  margin-right: 0.15em;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-date-pill--green {
  background: linear-gradient(135deg, var(--nh-bid-primary) 0%, var(--nh-bid-primary-dim) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-announcement-card__btn--bidding {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--nh-bid-primary) 0%, var(--nh-bid-primary-dim) 100%);
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(0, 60, 148, 0.22);
  border-radius: 999px;
  padding: 0.65rem 2rem;
  font-weight: 700;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-announcement-card__btn--bidding:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 20px rgba(0, 60, 148, 0.28);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-announcement-card__egp-link {
  background: linear-gradient(135deg, var(--nh-bid-primary) 0%, var(--nh-bid-primary-dim) 100%);
  border-radius: 999px;
  border: none;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card--procurements .nh-pb-announcement-card__egp-link:hover {
  filter: brightness(1.06);
}

/* ประกาศงานคลัง tabs — canvas ไม่มี wrapper ราก builder: ใช้เฉพาะบล็อกจัดซื้อ */
.nh-pb-announcement-card--procurements .nh-pb-procurement-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 1rem;
  background: #f3f4f5;
  border-radius: 999px;
  flex-wrap: wrap;
}
.nh-pb-announcement-card--procurements .nh-pb-procurement-tab {
  border: none;
  background: transparent;
  color: #434653;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.nh-pb-announcement-card--procurements .nh-pb-procurement-tab:hover {
  color: #003c94;
  background: rgba(255, 255, 255, 0.55);
}
.nh-pb-announcement-card--procurements .nh-pb-procurement-tab--active {
  background: linear-gradient(135deg, #003c94 0%, #1a53ba 100%) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 60, 148, 0.25);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-procurement-panel {
  margin-bottom: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-procurement-panel--hidden {
  display: none !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__empty {
  color: #64748b;
  font-size: 0.875rem;
  padding: 1rem 0;
  margin: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__egp-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #0f4c81;
  color: white !important;
  font-size: 0.875rem;
  border-radius: 8px;
  text-decoration: none !important;
  margin-bottom: 1rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-announcement-card__egp-link:hover {
  background: #0c3d6b;
}

/* News ภายใน container — ใช้ความกว้างเต็มของ container */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-container .nh-pb-news__inner:not(.nh-pb-news__inner--ticker) {
  max-width: 100%;
}

/* ========== News Section (pb-news) — 3 layouts: list | card-grid | featured-list ========== */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__inner {
  max-width: 1120px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  padding: 1.75rem 2rem;
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-news__inner {
    padding: 2rem 2.75rem;
  }
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__icon {
  font-size: 1.4em;
  line-height: 1;
  opacity: 0.9;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__title-link {
  color: inherit !important;
  text-decoration: none !important;
  transition: color 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__title-link:hover {
  color: #0f4c81 !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__viewall {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: linear-gradient(135deg, #0f4c81 0%, #0c3d6b 100%);
  color: white !important;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(15, 76, 129, 0.3);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__viewall:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 76, 129, 0.4);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__divider {
  height: 2px;
  background: linear-gradient(90deg, #0f4c81 0%, transparent 100%);
  margin: 1.25rem 0;
  opacity: 0.2;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
  transition: background 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__list-item:hover {
  background: #f8fafc;
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__list-item:last-child {
  border-bottom: none;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__list-link {
  flex: 1;
  min-width: 0;
  color: #334155 !important;
  font-weight: 500;
  text-decoration: none !important;
  line-height: 1.5;
  transition: color 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__list-link:hover {
  color: #0f4c81 !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__badge {
  flex-shrink: 0;
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__badge--date,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__badge--small {
  background: linear-gradient(135deg, #0f5b3a 0%, #0a7a4b 100%);
  color: white;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__badge--card {
  background: linear-gradient(135deg, #0f4c81 0%, #0c3d6b 100%);
  color: white;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__badge--featured {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: white;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__footer {
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0.5rem;
  text-align: center;
  border-top: 1px solid #f1f5f9;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 999px;
  text-decoration: none !important;
  transition: filter 0.2s, box-shadow 0.2s, transform 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__btn {
  background: #fec002;
  color: #1e293b !important;
  box-shadow: 0 2px 8px rgba(254, 192, 2, 0.4);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__btn:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 14px rgba(254, 192, 2, 0.5);
  transform: translateY(-1px);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__btn--primary {
  background: linear-gradient(135deg, #0f4c81 0%, #0c3d6b 100%);
  color: white !important;
  box-shadow: 0 2px 10px rgba(15, 76, 129, 0.35);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__btn--primary:hover {
  box-shadow: 0 4px 16px rgba(15, 76, 129, 0.45);
}

/* Card Grid layout */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__grid--cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
@media (min-width: 640px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-news__grid--cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-news__grid--cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-card {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid #e2e8f0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 76, 129, 0.12);
  border-color: rgba(15, 76, 129, 0.2);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-card__img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-card:hover .nh-pb-news-card__img img {
  transform: scale(1.05);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-card__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  color: rgba(255, 255, 255, 0.6);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-card__img-placeholder svg {
  width: 48px;
  height: 48px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-card__body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-card:hover .nh-pb-news-card__title {
  color: #0f4c81;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-card__excerpt {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Latest Highlights — ข่าว 3 รายการ (2/3 + 1/3) */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__header--highlights {
  align-items: flex-start;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__header-titles {
  flex: 1;
  min-width: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__title--highlights .nh-pb-news__title-en {
  font-weight: 500;
  font-size: 0.85em;
  color: #64748b;
  margin-left: 0.35rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__accent--highlights {
  display: block;
  width: 2.75rem;
  height: 3px;
  border-radius: 2px;
  background: #003c94;
  margin-top: 0.5rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 0.5rem;
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__grid {
    grid-template-columns: 2fr 1fr;
    align-items: stretch;
    min-height: min(420px, 70vh);
  }
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__feature {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  min-height: 260px;
  background: #1e293b;
  text-decoration: none !important;
  color: #fff;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__feature-media {
  position: absolute;
  inset: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__feature-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #64748b 0%, #334155 100%);
  color: rgba(255, 255, 255, 0.35);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__feature-placeholder svg {
  width: 4rem;
  height: 4rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__feature-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.35rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.4) 50%, transparent 72%);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__badge {
  align-self: flex-start;
  display: inline-block;
  padding: 0.28rem 0.65rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #003c94;
  color: #fff;
  border-radius: 6px;
  margin-bottom: 0.65rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__feature-title {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__feature-excerpt {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(248, 250, 252, 0.92);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__side-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.15rem 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  text-decoration: none !important;
  color: #0f172a;
  transition: box-shadow 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__side-card:hover {
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__side-kicker {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #003c94;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__side-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: #0f172a;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__side-meta {
  margin-top: auto;
  padding-top: 0.35rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-highlights__side-date {
  font-size: 0.8125rem;
  color: #94a3b8;
}

/* Featured + List layout */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured {
  margin-top: 1.25rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__main {
  display: block;
  text-decoration: none !important;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  margin-bottom: 1.25rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__main:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15, 76, 129, 0.1);
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__main {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 0;
  }
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__img {
    aspect-ratio: auto;
    min-height: 180px;
  }
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__main:hover .nh-pb-news-featured__img img {
  transform: scale(1.03);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  color: rgba(255, 255, 255, 0.5);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__img-placeholder svg {
  width: 64px;
  height: 64px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__body {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.4;
  transition: color 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__main:hover .nh-pb-news-featured__title {
  color: #0f4c81;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__excerpt {
  font-size: 0.9375rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
  transition: background 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__list-item:hover {
  background: #f8fafc;
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 8px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__list-item:last-child {
  border-bottom: none;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__list-link {
  flex: 1;
  min-width: 0;
  color: #334155 !important;
  font-weight: 500;
  text-decoration: none !important;
  line-height: 1.5;
  transition: color 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-featured__list-link:hover {
  color: #0f4c81 !important;
}

/* Ticker layout — ข่าวล่าสุด แถบเลื่อนแนวนอน */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news__inner--ticker {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  max-width: none !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-ticker {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: white;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-ticker__label {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  white-space: nowrap;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-ticker__track-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-ticker__track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-ticker__track::-webkit-scrollbar {
  display: none;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-ticker__item {
  flex-shrink: 0;
  scroll-snap-align: start;
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none !important;
  padding: 4px 0;
  transition: color 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-ticker__item:hover {
  color: #fec002 !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-ticker__item::after {
  content: '•';
  margin-left: 1.5rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-ticker__item:last-child::after {
  display: none;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-ticker__more {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.2);
  color: white !important;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news-ticker__more:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ========== Visit Stats (สถิติผู้เข้าชม) — dynamic + animate ========== */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-visit-stats {
  padding: 40px 20px;
  background: linear-gradient(135deg, #0f4c81 0%, #0c3d6b 100%);
  color: white;
  text-align: center;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-visit-stats__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-visit-stats__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-visit-stats__item {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-visit-stats__item.is-visible {
  opacity: 1;
  transform: translateY(0);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-visit-stats__label {
  display: block;
  font-size: 0.875rem;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-visit-stats__value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ========== Section 3 คอลัมน์ — ข่าว+Gallery ซ้าย | เนื้อหาหลักกลาง | ลิงค์หน่วยงานภายใน ขวา (ตามรูปอ้างอิง) ========== */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-three-col__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 768px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-three-col__grid {
    grid-template-columns: 260px 1fr 240px;
    gap: 1.75rem;
    align-items: start;
  }
}
@media (min-width: 1024px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-three-col__grid {
    grid-template-columns: 280px 1fr 260px;
    gap: 2rem;
  }
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-three-col__left {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-three-col__left .nh-pb-news__inner {
  max-width: 100%;
  width: 100%;
  padding: 1rem 1rem !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-three-col__left .nh-pb-news__header {
  flex-wrap: wrap;
  gap: 0.5rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-three-col__left .nh-pb-news__viewall {
  font-size: 0.75rem;
  padding: 4px 10px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-three-col__left .nh-pb-gallery {
  width: 100%;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-three-col__center {
  min-width: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-three-col__right {
  min-width: 0;
  width: 100%;
}

/* Gallery — ใน section 3 คอลัมน์ (แก้ไขได้ วางรูปได้) */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-gallery {
  background: white;
  border-radius: 12px;
  padding: 1rem 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  width: 100%;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-gallery__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f4c81;
  margin: 0 0 0.75rem;
  letter-spacing: 0.05em;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-gallery__track-wrap {
  overflow: hidden;
  border-radius: 8px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-gallery__track {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-gallery__track::-webkit-scrollbar {
  display: none;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-gallery__item {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 90px;
  height: 90px;
  min-width: 90px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-gallery__item:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-gallery__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  min-height: 90px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-gallery__dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 0.5rem;
}

/* Internal links — ลิงค์หน่วยงานภายใน (แก้ไขได้ วางรูปได้) */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-internal-links {
  background: linear-gradient(135deg, #0f4c81 0%, #0c3d6b 100%);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  box-shadow: 0 4px 16px rgba(15, 76, 129, 0.25);
  width: 100%;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-internal-links__title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin: 0 0 1rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-internal-links__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-internal-links__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  color: white !important;
  text-decoration: none !important;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-internal-links__item:hover {
  background: rgba(255,255,255,0.2);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-internal-links__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-internal-links__icon .nh-pb-img-container {
  width: 100%;
  height: 100%;
  min-width: 40px;
  min-height: 40px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-internal-links__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-internal-links__icon-placeholder {
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,0.4);
  border-radius: 4px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-internal-links__label {
  flex: 1;
  min-width: 0;
}

/* ========== Micro-animations: scroll-in ========== */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-animate-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Template Edomi — pixel-perfect layout ตาม design ========== */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-stats {
  padding: 48px 24px !important;
  background: #FFFFFF !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-categories-section {
  padding: 56px 24px !important;
  background: #FFFFFF !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}
/* Statistics — white bg, colored icons */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-stats__grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 32px !important;
  align-items: center;
  text-align: center;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-stat {
  display: block;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-stat__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 12px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-stat__icon--purple {
  background: #E8E8FA !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-stat__icon--cyan {
  background: #E0F7FA !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-stat__icon--green {
  background: #E8F5E9 !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-stat__label {
  margin: 0;
  font-size: 14px;
  color: #666666 !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-stat__value {
  margin: 4px 0 0;
  font-size: 32px;
  font-weight: 600;
  color: #333333 !important;
}
/* Categories header */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-categories-header {
  display: flex !important;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-title {
  margin: 0 0 8px !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #333333 !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-subtitle {
  margin: 0 !important;
  font-size: 14px !important;
  color: #666666 !important;
  line-height: 1.5;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-viewmore {
  font-size: 14px !important;
  color: #999999 !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-viewmore:hover {
  text-decoration: underline !important;
}
/* Categories grid */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-categories {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
}
/* Category cards */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout a.nh-pb-edomi-card {
  display: block !important;
  background: #FFFFFF !important;
  padding: 24px !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02) !important;
  border: 1px solid #E0E0E0 !important;
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 0.2s, box-shadow 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card:hover,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout a.nh-pb-edomi-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card__icon--blue { background: #DBEAFE !important; }
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card__icon--orange { background: #FFEDD5 !important; }
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card__icon--brown { background: #FEF3C7 !important; }
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card__icon--purple { background: #EDE9FE !important; }
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card__icon--red { background: #FEE2E2 !important; }
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card__icon--cyan { background: #CFFAFE !important; }
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card__icon--gold { background: #FEF9C3 !important; }
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card__icon--sky { background: #E0F2FE !important; }
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card__title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #333333 !important;
  margin: 0 0 8px !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card__subtitle {
  font-size: 14px !important;
  color: #666666 !important;
  margin: 0 0 12px !important;
  line-height: 1.5;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-card__link {
  color: #6A3EE2 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}
@media (max-width: 1024px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-stats__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-categories {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 640px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-stats__grid {
    grid-template-columns: 1fr !important;
  }
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-categories {
    grid-template-columns: 1fr !important;
  }
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero__grid,
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero > div {
    grid-template-columns: 1fr !important;
  }
}

/* Edomi Hero — Online Classes section (light bg, purple border, droppable video) */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-layout .nh-pb-edomi-hero {
  padding: 4rem 2rem !important;
  background: #f5f5f5 !important;
  min-height: 380px;
  display: flex;
  align-items: center;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero__inner {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  width: 100%;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero__grid {
  display: grid !important;
  grid-template-columns: 1.5fr 1fr !important;
  gap: 3rem;
  align-items: center;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero-video {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 320px;
  border-left: 6px solid #6A3EE2;
  border-bottom: 6px solid #6A3EE2;
  background: #e8e8e8;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero-video .nh-pb-edomi-hero-video__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 1;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero-video:has(img) .nh-pb-edomi-hero-video__placeholder,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero-video:has(video) .nh-pb-edomi-hero-video__placeholder {
  display: none;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero-video .nh-pb-edomi-hero-video__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #6A3EE2;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 10;
  pointer-events: none;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero-video .nh-pb-edomi-hero-video__hint {
  font-size: 0.875rem;
  color: #666;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero-video .nh-pb-img-container {
  position: absolute !important;
  inset: 0 !important;
  overflow: hidden;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero-video img,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero-video video,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero-video .nh-pb-img-container img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero__label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #6A3EE2;
  text-transform: uppercase;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero__title {
  margin: 0 0 16px;
  font-size: 36px;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero__desc {
  margin: 0 0 24px;
  font-size: 16px;
  color: #666;
  line-height: 1.6;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #6A3EE2;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-edomi-hero__btn:hover {
  background: #5b2dd4;
}

/* ========== Template Directory — single-column list (e-Gov style) ========== */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-directory-hero .nh-pb-container,
:is(.gjs-home-content,.gjs-page-content) .nh-pb-directory-list .nh-pb-container {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-directory-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-directory-item,
:is(.gjs-home-content,.gjs-page-content) a.nh-pb-directory-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-directory-item:hover,
:is(.gjs-home-content,.gjs-page-content) a.nh-pb-directory-item:hover {
  background: #c8e6c9 !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-directory-item > div:first-of-type {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-directory-item > div:nth-of-type(2) {
  flex: 1;
  min-width: 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-directory-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-directory-item p {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280;
}

/* ========== Executive Leadership — ผู้บริหาร (บล็อกลากวาง) ========== */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership {
  padding: 2rem 1.25rem;
  background: #f8fafc;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__inner.nh-pb-container {
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: clamp(1.25rem, 4vw, 2.5rem) !important;
  padding-right: clamp(1.25rem, 4vw, 2.5rem) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__header {
  margin-bottom: 1rem;
}
/* ชนะ pb-critical h2 — ให้สเกลใกล้หัวข้อส่วนอื่น (เช่น Civic section) ไม่โตเกินบล็อกรอบข้าง */
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__title {
  margin: 0 0 0.35rem !important;
  padding: 0 !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #0f172a;
  line-height: 1.25;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__title-en {
  font-weight: 500;
  font-size: 0.8125rem;
  color: #64748b;
  letter-spacing: 0.02em;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__accent {
  display: block;
  width: 2.5rem;
  height: 3px;
  border-radius: 2px;
  background: #003c94;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__featured {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: stretch;
  padding: 1.25rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 1.25rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__featured-media {
  flex: 0 0 40%;
  max-width: 320px;
  min-width: 220px;
  border-radius: 10px;
  overflow: hidden;
  background: #e2e8f0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__img--featured {
  width: 100%;
  height: auto;
  min-height: 280px;
  max-height: 420px;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__featured-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #003c94;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__name {
  margin: 0 0 0.5rem;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__quote {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #64748b;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__btn--primary {
  background: #003c94;
  color: #fff !important;
  border: 1px solid #003c94;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__btn--primary:hover {
  background: #002a6b;
  border-color: #002a6b;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__btn--secondary {
  background: #f1f5f9;
  color: #0f172a !important;
  border: 1px solid #e2e8f0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__btn--secondary:hover {
  background: #e2e8f0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 767px) {
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__grid {
    grid-template-columns: 1fr;
  }
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__featured-media {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }
  :is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__img--featured {
    min-height: 220px;
    max-height: 360px;
    aspect-ratio: 3/4;
  }
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__deputy {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__deputy-photo {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  background: #e2e8f0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__deputy-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__deputy-name {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__deputy-role {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__deputy-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #003c94 !important;
  text-decoration: none;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-exec-leadership__deputy-link:hover {
  text-decoration: underline;
}

/* —— Page Builder: link-grid card presets + generic card shell (ใช้ --pb-radius-card / --pb-color-primary) —— */
.nh-pb-link-grid__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.nh-pb-link-grid__a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  box-sizing: border-box;
}
.nh-pb-link-grid__a.nh-pb-card-preset--default {
  background: #f1f5f9;
  border-radius: var(--pb-radius-card, 8px);
  color: #0f172a;
  border: 1px solid transparent;
}
.nh-pb-link-grid__a.nh-pb-card-preset--default:hover {
  background: #e2e8f0;
}
.nh-pb-link-grid__a.nh-pb-card-preset--flat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--pb-radius-card, 8px);
  color: #0f172a;
  box-shadow: none;
}
.nh-pb-link-grid__a.nh-pb-card-preset--flat:hover {
  background: #f1f5f9;
}
.nh-pb-link-grid__a.nh-pb-card-preset--raised {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--pb-radius-card, 8px);
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}
.nh-pb-link-grid__a.nh-pb-card-preset--raised:hover {
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}
.nh-pb-link-grid__a.nh-pb-card-preset--outline {
  background: transparent;
  border: 2px solid var(--pb-color-primary, #0f4c81);
  border-radius: var(--pb-radius-card, 8px);
  color: var(--pb-color-primary, #0f4c81);
}
.nh-pb-link-grid__a.nh-pb-card-preset--outline:hover {
  background: rgba(15, 76, 129, 0.06);
}
.nh-pb-link-grid__a.nh-pb-card-preset--pill {
  background: #f1f5f9;
  border-radius: 9999px;
  color: #0f172a;
  border: 1px solid transparent;
}
.nh-pb-link-grid__a.nh-pb-card-preset--pill:hover {
  background: #e2e8f0;
}

.nh-pb-card {
  box-sizing: border-box;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.nh-pb-card.nh-pb-card--default {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--pb-radius-card, 8px);
}
.nh-pb-card.nh-pb-card--flat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--pb-radius-card, 8px);
  box-shadow: none;
}
.nh-pb-card.nh-pb-card--raised {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--pb-radius-card, 8px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}
.nh-pb-card.nh-pb-card--outline {
  background: transparent;
  border: 2px solid var(--pb-color-primary, #0f4c81);
  border-radius: var(--pb-radius-card, 8px);
}
.nh-pb-card.nh-pb-card--pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  box-shadow: none;
}

/* ========== Phase 5 — block variants (data-variant on nh-pb-dynamic) ========== */
:is(.gjs-home-content,.gjs-page-content) .hero.fullbleed.nh-pb-variant--hero-centered .hero__welcome,
.hero.fullbleed.nh-pb-variant--hero-centered .hero__welcome {
  text-align: center;
  align-items: center;
}
:is(.gjs-home-content,.gjs-page-content) .hero.fullbleed.nh-pb-variant--hero-centered .hero__welcome-title,
:is(.gjs-home-content,.gjs-page-content) .hero.fullbleed.nh-pb-variant--hero-centered .hero__welcome-desc,
.hero.fullbleed.nh-pb-variant--hero-centered .hero__welcome-title,
.hero.fullbleed.nh-pb-variant--hero-centered .hero__welcome-desc {
  margin-left: auto;
  margin-right: auto;
  max-width: 40rem;
}
:is(.gjs-home-content,.gjs-page-content) .hero.fullbleed.nh-pb-variant--hero-compact .hero__welcome,
.hero.fullbleed.nh-pb-variant--hero-compact .hero__welcome {
  padding: 1.25rem 1rem;
}
:is(.gjs-home-content,.gjs-page-content) .hero.fullbleed.nh-pb-variant--hero-compact .hero__welcome-title,
.hero.fullbleed.nh-pb-variant--hero-compact .hero__welcome-title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}
:is(.gjs-home-content,.gjs-page-content) .hero.fullbleed.nh-pb-variant--hero-compact .hero__welcome-desc,
.hero.fullbleed.nh-pb-variant--hero-compact .hero__welcome-desc {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news.nh-pb-variant--news-compact .nh-pb-news__header,
.nh-pb-news.nh-pb-variant--news-compact .nh-pb-news__header {
  margin-bottom: 0.5rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news.nh-pb-variant--news-compact .nh-pb-news__title,
.nh-pb-news.nh-pb-variant--news-compact .nh-pb-news__title {
  font-size: 1rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news.nh-pb-variant--news-compact .nh-pb-news__list-item,
.nh-pb-news.nh-pb-variant--news-compact .nh-pb-news__list-item {
  padding: 0.35rem 0;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-news.nh-pb-variant--news-emphasis,
.nh-pb-news.nh-pb-variant--news-emphasis {
  border: 1px solid rgba(15, 76, 129, 0.2);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, rgba(15, 76, 129, 0.04) 0%, transparent 100%);
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-link-grid.nh-pb-variant--link-grid-compact .nh-pb-link-grid__list,
.nh-pb-link-grid.nh-pb-variant--link-grid-compact .nh-pb-link-grid__list {
  gap: 0.5rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-link-grid.nh-pb-variant--link-grid-compact .nh-pb-link-grid__a,
.nh-pb-link-grid.nh-pb-variant--link-grid-compact .nh-pb-link-grid__a {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-link-grid.nh-pb-variant--link-grid-spacious .nh-pb-link-grid__list,
.nh-pb-link-grid.nh-pb-variant--link-grid-spacious .nh-pb-link-grid__list {
  gap: 1.25rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-link-grid.nh-pb-variant--link-grid-spacious .nh-pb-link-grid__a,
.nh-pb-link-grid.nh-pb-variant--link-grid-spacious .nh-pb-link-grid__a {
  padding: 1rem 1.25rem;
}

/* activities block — base + variants (data-block="activities" data-variant) */
.nh-pb-activities__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.nh-pb-activities__card {
  display: block;
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
}
.nh-pb-activities__media {
  height: 140px;
  background: #e2e8f0;
}
.nh-pb-activities__body {
  padding: 1rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-activities.nh-pb-variant--activities-compact .nh-pb-activities__grid,
.nh-pb-activities.nh-pb-variant--activities-compact .nh-pb-activities__grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-activities.nh-pb-variant--activities-compact .nh-pb-activities__title,
.nh-pb-activities.nh-pb-variant--activities-compact .nh-pb-activities__title {
  font-size: 1.25rem !important;
  margin-bottom: 0.5rem !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-activities.nh-pb-variant--activities-compact .nh-pb-activities__media,
.nh-pb-activities.nh-pb-variant--activities-compact .nh-pb-activities__media {
  height: 100px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-activities.nh-pb-variant--activities-compact .nh-pb-activities__body,
.nh-pb-activities.nh-pb-variant--activities-compact .nh-pb-activities__body {
  padding: 0.65rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-activities.nh-pb-variant--activities-compact .nh-pb-activities__excerpt,
.nh-pb-activities.nh-pb-variant--activities-compact .nh-pb-activities__excerpt {
  font-size: 0.8125rem !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-activities.nh-pb-variant--activities-spacious .nh-pb-activities__grid,
.nh-pb-activities.nh-pb-variant--activities-spacious .nh-pb-activities__grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-activities.nh-pb-variant--activities-spacious .nh-pb-activities__title,
.nh-pb-activities.nh-pb-variant--activities-spacious .nh-pb-activities__title {
  font-size: 1.625rem !important;
  margin-bottom: 1.25rem !important;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-activities.nh-pb-variant--activities-spacious .nh-pb-activities__media,
.nh-pb-activities.nh-pb-variant--activities-spacious .nh-pb-activities__media {
  height: 180px;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-activities.nh-pb-variant--activities-spacious .nh-pb-activities__body,
.nh-pb-activities.nh-pb-variant--activities-spacious .nh-pb-activities__body {
  padding: 1.25rem;
}
:is(.gjs-home-content,.gjs-page-content) .nh-pb-activities.nh-pb-variant--activities-spacious .nh-pb-activities__footer,
.nh-pb-activities.nh-pb-variant--activities-spacious .nh-pb-activities__footer {
  margin-top: 1.5rem;
}
