/* ==========================================================================
   CLLI เว็บไซต์หน้าบ้าน — หน้าตาร่วมทุกหน้า (โหลดท้ายสุดใน website/views/z_template/header.php)
   สีเว็บ linear-gradient(135deg, #4DA1A9, #2fb226) · พื้นขาว · การ์ดมุมโค้งมีเงา · Prompt
   เนื้อหาแต่ละหน้าคงของเดิม ไฟล์นี้ปรับแค่หน้าตา; หน้าแรกมี home.css เพิ่มเฉพาะส่วนของตัวเอง
   ========================================================================== */
:root {
	--hm-blue: #2b7f86;   /* ข้อความ/ลิงก์สีหลัก (เข้มกว่า #4DA1A9 ให้อ่านบนพื้นขาวได้) */
	--hm-blue-2: #4DA1A9;
	--hm-teal: #4DA1A9;
	--hm-green: #2fb226;
	--hm-ink: #0f2236;
	--hm-ink-2: #15304b;
	--hm-text: #24364a;
	--hm-muted: #5b6b7c;
	--hm-bg: #f5f8fb;
	--hm-line: #e4ebf2;
	--hm-white: #ffffff;
	--hm-grad: linear-gradient(135deg, #4DA1A9, #2fb226);   /* สีเว็บ */
	--hm-grad-soft: linear-gradient(135deg, rgba(77, 161, 169, .14), rgba(47, 178, 38, .12));
	--hm-radius: 18px;
	--hm-shadow: 0 1px 2px rgba(15, 34, 54, .04), 0 8px 24px rgba(15, 34, 54, .07);
	--hm-shadow-up: 0 2px 4px rgba(15, 34, 54, .05), 0 22px 48px rgba(15, 34, 54, .14);
	--hm-ease: cubic-bezier(.2, .7, .2, 1);
	--hm-max: 1240px;
	--hm-pad: clamp(16px, 4vw, 32px);

	/* ทับโทเคนของ clli-ui.css / สกินเดิม เฉพาะหน้าบ้าน (หลังบ้านไม่โหลดไฟล์นี้) */
	--clli-grad: var(--hm-grad);
	--clli-grad-deep: linear-gradient(135deg, #2b7f86, #23901b);
	--clli-grad-soft: var(--hm-grad-soft);
	--ca-grad: var(--hm-grad);
}
body { font-family: "Prompt", system-ui, sans-serif; }
::selection { background: rgba(77, 161, 169, .22); }

/* ---------- แถบบนสุด + เมนู ---------- */
#top-bar.transparent-topbar { position: relative; background: var(--hm-ink) !important; border: 0 !important; }
/* แถบบนสุด: ธีมเดิมเว้นขอบบน 15px (เห็นเป็นแถบขาว) และลิงก์มี mt-1 ทำให้ไม่อยู่กึ่งกลาง — จัดให้สูง 44px ตรงกลางทุกชิ้น */
#top-bar.transparent-topbar { margin: 0 !important; min-height: 44px; }
#top-bar .top-links-container { display: flex; align-items: center; min-height: 44px; margin: 0; }
#top-bar .top-links-container > li { display: flex; align-items: center; margin-top: 0 !important; margin-bottom: 0 !important; }
#top-bar .top-links-container > li > a, #top-bar .top-links-item > span { margin: 0 !important; padding: 0 10px !important; line-height: 44px !important; display: inline-flex; align-items: center; gap: 6px; }
#top-bar .lang-img { height: 16px; width: auto; margin: 0 !important; border-radius: 3px; }
#top-bar .top-links-sub-menu { top: 100% !important; border-radius: 12px; overflow: hidden; box-shadow: var(--hm-shadow-up); border: 0; }
#top-bar .top-links-sub-menu a { display: flex !important; align-items: center; gap: 8px; padding: 10px 14px !important; line-height: 1.2 !important; }
#top-bar .top-links-sub-menu img { height: 14px; width: auto; }
#top-social { display: flex; align-items: center; min-height: 44px; margin: 0; }
#top-bar .container, #header .container { max-width: var(--hm-max); padding-inline: var(--hm-pad); }
#top-bar .top-links-container > li > a, #top-bar .top-links-item > span { color: rgba(255, 255, 255, .86) !important; font: 400 14px/1 "Prompt", sans-serif !important; }
#top-bar .top-links-container > li > a:hover { color: #fff !important; }
#top-bar .top-links-sub-menu a { color: var(--hm-ink) !important; }
#top-social li, #top-social li a { border: 0 !important; background: transparent !important; color: rgba(255, 255, 255, .86) !important; }
#top-social li a:hover { background: rgba(255, 255, 255, .12) !important; color: #fff !important; }
#header.transparent-header { position: relative; background: #fff !important; border: 0 !important; z-index: 299; }
#header #header-wrap, #header.floating-header #header-wrap .container {
	background: #fff !important; border: 0 !important; box-shadow: none !important;
	transition: box-shadow .3s ease !important;
}
#header.sticky-header #header-wrap { position: fixed; top: 0; left: 0; right: 0; box-shadow: 0 6px 24px rgba(15, 34, 54, .08) !important; }
#header .menu-container > .menu-item > .menu-link,
#header .menu-container > .menu-item > .menu-link > div { color: var(--hm-ink) !important; font: 500 15px/1.2 "Prompt", sans-serif !important; }
#header .menu-container > .menu-item:hover > .menu-link > div,
#header .menu-container > .menu-item.current > .menu-link > div { color: var(--hm-blue) !important; }
#header .svg-trigger path { stroke: var(--hm-ink) !important; }
#header .mega-menu-content { border-radius: 0 0 18px 18px; box-shadow: var(--hm-shadow-up) !important; border: 0 !important; }
#header .mega-menu-content .sub-menu-container { border-color: var(--hm-line) !important; transition: background-color .2s ease !important; }
#header .mega-menu-content .sub-menu-container:hover { background: var(--hm-bg) !important; }
@media (max-width: 991.98px) { #top-bar.transparent-topbar { display: none; } }

/* ปุ่มลอย "จองห้องประชุม" / "สินค้าเซรามิก" — ย้ายจากแท็บแนวตั้งขอบซ้าย มาเป็นปุ่มชุดเดียวกับ "แบบประเมิน" ที่มุมขวาล่าง */
html .njs-sticky-side.image_button_cover, html .njs-sticky-side2.image_button_cover { left: auto !important; right: 28px; top: auto !important; z-index: 9989; }
html .njs-sticky-side.image_button_cover { bottom: 136px; }   /* หน้าแรกซ่อนสองปุ่มนี้ (มีแถบบริการ) จึงไม่ชนปุ่มแบบประเมิน */
html .njs-sticky-side2.image_button_cover { bottom: 84px; }
html .njs-sticky-side.image_button_cover a, html .njs-sticky-side2.image_button_cover a {
	writing-mode: horizontal-tb !important; transform: none !important; min-height: 0 !important;
	display: inline-flex !important; align-items: center; gap: 8px; padding: 12px 18px !important; border-radius: 99px !important;
	background: #fff !important; color: var(--hm-ink) !important; font: 600 14px/1 "Prompt", sans-serif !important; letter-spacing: 0 !important;
	box-shadow: 0 8px 22px rgba(15, 34, 54, .16) !important; filter: none !important;
	transition: transform .25s var(--hm-ease), box-shadow .25s ease !important;
}
html .njs-sticky-side.image_button_cover a::before, html .njs-sticky-side2.image_button_cover a::before {
	font: 900 14px/1 "Font Awesome 6 Free"; color: var(--hm-blue);
}
html .njs-sticky-side.image_button_cover a::before { content: "\f52b"; }   /* door-open */
html .njs-sticky-side2.image_button_cover a::before { content: "\f54e"; }  /* store */
html .njs-sticky-side.image_button_cover a:hover, html .njs-sticky-side2.image_button_cover a:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 34, 54, .22) !important; }
/* ให้สามปุ่มเรียงชิดขวาเท่ากัน */
html .njs-sticky-side.image_button_cover, html .njs-sticky-side2.image_button_cover { display: flex; justify-content: flex-end; }
@media (max-width: 767.98px) { html .njs-sticky-side.image_button_cover, html .njs-sticky-side2.image_button_cover { display: none !important; } }

/* ปุ่มลอยมุมขวา */
#btn-survey { background: var(--hm-grad) !important; animation: none !important; font: 600 14px/1 "Prompt", sans-serif !important; }
#back-to-top { background: var(--hm-ink) !important; }
#scroll-progress { background: var(--hm-grad) !important; }
@media (max-width: 767.98px) { #btn-survey { display: none !important; } }

/* ---------- ส่วนประกอบทั่วไป ---------- */
#content { background: var(--hm-bg); }
#content .section { background: transparent; }
#content .button, #content .btn-primary, #content .btn-success {
	border: 0 !important; border-radius: 12px !important; background: var(--hm-grad) !important; color: #fff !important; text-shadow: none !important;
	font-family: "Prompt", sans-serif; font-weight: 600; box-shadow: 0 8px 20px rgba(77, 161, 169, .28);
	transition: transform .25s var(--hm-ease), box-shadow .25s ease !important;
}
#content .button:hover, #content .btn-primary:hover, #content .btn-success:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(47, 178, 38, .3); }
/* ตาราง DataTables (ดาวน์โหลดเอกสาร / ครุภัณฑ์) */
#content .dataTables_wrapper .page-item.active .page-link, #content .paginate_button.current, #content .paginate_button.current:hover {
	background: var(--hm-grad) !important; border-color: transparent !important; color: #fff !important;
}
#content .page-link { border-radius: 10px !important; margin: 0 2px; border-color: var(--hm-line) !important; color: var(--hm-blue) !important; }
#content table.dataTable thead th, #content .table thead th { background: var(--hm-grad); color: #fff; border: 0; }
#content .dataTables_filter input, #content .dataTables_length select { border-radius: 10px; border: 1.5px solid var(--hm-line); padding: 6px 12px; }
#content .dataTables_filter input:focus { border-color: var(--hm-teal); outline: 0; box-shadow: 0 0 0 3px rgba(77, 161, 169, .2); }
#content .nav-tabs { border-bottom: 0; gap: 6px; }
#content .nav-tabs .nav-link { border: 0 !important; border-radius: 12px !important; color: var(--hm-muted) !important; font-weight: 500; }
#content .nav-tabs .nav-link.active { background: var(--hm-grad) !important; color: #fff !important; }

/* ---------- ภาพกิจกรรม: ช่องภาพสัดส่วนเท่ากัน มุมโค้ง ขยายเมื่อชี้ ---------- */
#content .masonry-thumbs .grid-item { padding: 6px !important; }
#content .masonry-thumbs .grid-item img {
	width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; font-size: 0; color: transparent;
	background: url('../images/logo_white.png') center / 40% no-repeat, var(--hm-grad); box-shadow: var(--hm-shadow);
	transition: transform .4s var(--hm-ease), box-shadow .4s ease !important;
}
#content .masonry-thumbs .grid-item:hover img { transform: scale(1.04); box-shadow: var(--hm-shadow-up); }


/* ==========================================================================
   ส่วนประกอบร่วม (เดิมอยู่ใน home.css) — ใช้ได้ทุกหน้าภายในกล่อง .hm
   ========================================================================== */
/* ---------- พื้นฐาน ---------- */
.hm, .hm * { box-sizing: border-box; }
#content.hm { margin: 0; padding: 0; background: var(--hm-white); }
.hm { font-family: "Prompt", system-ui, sans-serif; font-size: 17px; line-height: 1.7; color: var(--hm-text); }
.hm h1, .hm h2, .hm h3, .hm p, .hm ul, .hm dl, .hm dd { margin: 0; padding: 0; }
.hm h1, .hm h2, .hm h3 { font-family: inherit; color: var(--hm-ink); text-transform: none; letter-spacing: -0.01em; }
.hm ul { list-style: none; }
.hm a { color: inherit; text-decoration: none; }
.hm img, .hm video { display: block; max-width: 100%; }
.hm .nw { display: inline-block; max-width: 100%; }   /* วลีไทยไม่ขาดกลางคำ — ห่อด้วย $nb() */
.hm-container { width: 100%; max-width: var(--hm-max); margin-inline: auto; padding-inline: var(--hm-pad); }
.hm-sec { padding-block: clamp(72px, 9vw, 120px); position: relative; }
.hm-sec-bg { background: var(--hm-bg); }

/* หัวข้อของแต่ละส่วน */
.hm-kicker {
	display: inline-flex; align-items: center; gap: 10px;
	font-size: 15px; font-weight: 600; color: var(--hm-blue); margin-bottom: 12px;
}
.hm-kicker::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--hm-grad); }
.hm-title { font-size: clamp(28px, 3vw, 40px); font-weight: 700; line-height: 1.3; }
.hm-lead { font-size: 18px; color: var(--hm-muted); margin-top: 12px; max-width: 60ch; }
.hm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 44px; }
.hm-head-center { text-align: center; margin-inline: auto; max-width: 720px; margin-bottom: 48px; }
.hm-head-center .hm-lead { margin-inline: auto; }
.hm-grad-text { background: var(--hm-grad); -webkit-background-clip: text; background-clip: text; color: transparent !important; }

/* ปุ่ม */
.hm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 52px; padding: 0 26px; border-radius: 12px; border: 0; cursor: pointer;
	font: 600 16px/1 "Prompt", sans-serif; white-space: nowrap;
	transition: transform .25s var(--hm-ease), box-shadow .25s ease, background-color .25s ease, color .25s ease !important;
}
.hm-btn i { transition: transform .25s var(--hm-ease) !important; }
.hm-btn:hover i { transform: translateX(4px); }
.hm-btn:active { transform: scale(.97); }
.hm-btn-primary { background: var(--hm-grad); color: #fff !important; box-shadow: 0 8px 20px rgba(77, 161, 169, .32); }
.hm-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(47, 178, 38, .34); }
.hm-btn-ghost { background: #fff; color: var(--hm-ink) !important; box-shadow: inset 0 0 0 1.5px var(--hm-line); }
.hm-btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--hm-blue); color: var(--hm-blue) !important; transform: translateY(-2px); }
.hm-btn-light { background: #fff; color: var(--hm-ink) !important; }
.hm-btn-light:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 0, 0, .18); }
.hm-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--hm-blue) !important; }
.hm-link i { transition: transform .25s var(--hm-ease) !important; }
.hm-link:hover i { transform: translateX(4px); }
.hm a:focus-visible, .hm button:focus-visible, .hm summary:focus-visible { outline: 3px solid var(--hm-blue-2); outline-offset: 3px; }

/* ==========================================================================
   3 · สิ่งที่เราทำ — การ์ดรูป 3 คอลัมน์
   ========================================================================== */
.hm-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hm-card {
	position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--hm-radius); overflow: hidden;
	box-shadow: var(--hm-shadow); transition: transform .35s var(--hm-ease), box-shadow .35s ease !important;
}
.hm-card:hover { transform: translateY(-6px); box-shadow: var(--hm-shadow-up); }
.hm-card-pic { aspect-ratio: 16 / 10; overflow: hidden; background: var(--hm-bg); }
.hm-card-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--hm-ease) !important; }
.hm-card:hover .hm-card-pic img { transform: scale(1.06); }
.hm-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hm-card-cat { font-size: 13px; font-weight: 600; color: #0b7178; }
.hm-card h3 { font-size: 20px; font-weight: 600; line-height: 1.35; }
.hm-card .hm-link { margin-top: auto; padding-top: 10px; font-size: 15px; }
@media (max-width: 991.98px) { .hm-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .hm-cards { grid-template-columns: 1fr; } }

/* ==========================================================================
   4 · ข่าวสาร — ข่าวเด่น + รายการ
   ========================================================================== */
.hm-news-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; }
.hm-feature { position: relative; display: flex; flex-direction: column; border-radius: var(--hm-radius); overflow: hidden; background: #fff; box-shadow: var(--hm-shadow); transition: transform .35s var(--hm-ease), box-shadow .35s ease !important; }
.hm-feature:hover { transform: translateY(-4px); box-shadow: var(--hm-shadow-up); }
.hm-feature .hm-thumb { aspect-ratio: 16 / 9; }
.hm-feature-body { padding: 24px 26px 28px; }
.hm-feature h3 { font-size: 22px; font-weight: 600; line-height: 1.45; margin-top: 8px; }
.hm-feature p { color: var(--hm-muted); margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hm-list { display: grid; gap: 12px; align-content: start; }
.hm-item {
	display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; padding: 10px; border-radius: 16px; background: #fff;
	box-shadow: var(--hm-shadow); transition: transform .3s var(--hm-ease), box-shadow .3s ease !important;
}
.hm-item:hover { transform: translateX(6px); box-shadow: var(--hm-shadow-up); }
.hm-item .hm-thumb { aspect-ratio: 4 / 3; border-radius: 12px; }
.hm-item h3 { font-size: 16px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--hm-muted); }
.hm-date i { color: var(--hm-teal); }
.hm-thumb { overflow: hidden; background: var(--hm-grad); display: grid; place-items: center; }
.hm-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--hm-ease) !important; }
.hm-thumb .hm-ph { width: 46%; height: auto; opacity: .9; object-fit: contain; }   /* ไม่มีรูป: โลโก้บนพื้นไล่สี */
.hm-feature:hover .hm-thumb img:not(.hm-ph), .hm-item:hover .hm-thumb img:not(.hm-ph) { transform: scale(1.06); }
@media (max-width: 991.98px) { .hm-news-grid { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .hm-item { grid-template-columns: 104px 1fr; } }

/* ==========================================================================
   ลูกเล่นเข้าฉาก: ขึ้นทีละชิ้นเมื่อเลื่อนถึง (ครั้งเดียว)
   ซ่อนเฉพาะเมื่อ JS ทำงาน (.hm-js) — สคริปต์ล้มเนื้อหายังอยู่ครบ
   ไม่ปิดตาม prefers-reduced-motion (เครื่องผู้ใช้ตั้ง reduce ไว้ แต่ต้องการเห็นลูกเล่น)
   ประกาศ !important ทับ clli-ui.css ที่ตัดทรานซิชันทั้งเว็บเมื่อ reduce
   ========================================================================== */
.hm-js [data-rv] {
	opacity: 0; transform: translateY(28px);
	transition: opacity .7s var(--hm-ease), transform .8s var(--hm-ease), box-shadow .35s ease !important;
	transition-delay: calc(var(--i, 0) * 90ms) !important;
}
.hm-js [data-rv="left"] { transform: translateX(-36px); }
.hm-js [data-rv="right"] { transform: translateX(36px); }
.hm-js [data-rv="zoom"] { transform: scale(.94); }
.hm-js [data-rv].is-in { opacity: 1; transform: none; }
/* การ์ดที่ขึ้นแล้วกลับไปใช้ทรานซิชันของตัวเอง (hover/เอียง) โดยไม่มีหน่วง */
.hm-js .hm-card[data-rv].is-in, .hm-js .hm-item[data-rv].is-in, .hm-js .hm-feature[data-rv].is-in { transition-delay: 0s !important; }
.hm-js .hm-card[data-rv].is-in:hover { transform: translateY(-6px); }
.hm-js .hm-item[data-rv].is-in:hover { transform: translateX(6px); }
.hm-js .hm-feature[data-rv].is-in:hover { transform: translateY(-4px); }

/* ==========================================================================
   ท้ายหน้า (footComp) — ใช้ร่วมทุกหน้ารวมหน้าแรก
   ========================================================================== */
.hm-foot { background: var(--hm-ink); color: #c4d0dc; padding-top: clamp(56px, 7vw, 80px); font: 400 15px/1.7 "Prompt", sans-serif; position: relative; }
.hm-foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--hm-grad); }
.hm-foot .hm-container { width: 100%; max-width: var(--hm-max); margin-inline: auto; padding-inline: var(--hm-pad); }
.hm-foot-grid { display: grid; grid-template-columns: 1.5fr .8fr .8fr 1.4fr; gap: 40px; }
.hm-foot-brand img { height: 56px; width: auto; }
.hm-foot-brand > p { margin: 18px 0 0; color: #fff; font-weight: 600; }
.hm-foot ul { list-style: none; margin: 0; padding: 0; }
.hm-foot-info { margin-top: 12px !important; }
.hm-foot-info li { display: flex; gap: 10px; }
.hm-foot-info i { color: var(--hm-teal); margin-top: 6px; width: 14px; flex: none; }
.hm-foot h3 { color: #fff; font: 600 16px/1.3 "Prompt", sans-serif; margin: 0 0 14px; letter-spacing: 0; text-transform: none; }
.hm-foot li + li { margin-top: 8px; }
.hm-foot a { color: #c4d0dc; transition: color .2s ease !important; }
.hm-foot a:hover { color: #fff; }
.hm-social { display: flex; gap: 10px; margin-top: 20px; }
.hm-social a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #fff; transition: background-color .2s ease, transform .2s var(--hm-ease) !important; }
.hm-social a:hover { background: var(--hm-teal); transform: translateY(-3px); }
.hm-lang { display: flex; gap: 6px; margin-top: 16px; }
.hm-lang a { padding: 6px 12px; border-radius: 8px; background: rgba(255, 255, 255, .08); font-size: 14px; }
.hm-lang a[aria-current="true"] { background: #fff; color: var(--hm-ink); }
.hm-foot-map iframe { width: 100%; height: 230px; border: 0; border-radius: 16px; display: block; }
.hm-foot-last { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14px; color: #8fa1b3; }
@media (max-width: 991.98px) { .hm-foot-grid { grid-template-columns: 1fr 1fr; } .hm-foot-brand, .hm-foot-map { grid-column: 1 / -1; } }
#footer.hm-foot { background: var(--hm-ink); border-top: 0; margin: 0; }   /* ทับ #footer ของธีม Canvas */
#footer #copyrights.hm-foot-last { background: transparent; padding-inline: 0; }   /* ทับ #copyrights ของธีม */
/* หัวตาราง: ไล่สีทั้งแถวเดียว ไม่ใช่แยกทีละช่อง */
#content table.dataTable thead tr, #content .table thead tr { background: var(--hm-grad) !important; }
#content table.dataTable thead th, #content .table thead th { background: transparent !important; color: #fff !important; border: 0 !important; }
/* เมนูไม่ลอยทับแล้ว (position: relative) — ยกเลิกการดึงแถบหัวเรื่องขึ้นไปใต้เมนูของธีม */
#page-title.include-header { margin-top: 0 !important; }
/* แถบหัวเรื่องพื้นอ่อน: ทับสีขาวของ .page-title-dark ในธีม */
#page-title.page-title-dark h1, #page-title.page-title-dark h1 * { color: var(--hm-ink) !important; }
/* ภาพกิจกรรม: ทุกช่องกว้างเท่ากัน (ยกเลิกช่องใหญ่ช่องแรกของธีม ที่ทับช่องข้าง ๆ เมื่อภาพสัดส่วนเท่ากัน) */
#content .masonry-thumbs.grid-5 .grid-item { width: 20% !important; }
@media (max-width: 991.98px) { #content .masonry-thumbs.grid-5 .grid-item { width: 33.333% !important; } }
@media (max-width: 575.98px) { #content .masonry-thumbs.grid-5 .grid-item { width: 50% !important; } }

/* ==========================================================================
   ส่วนหัวของหน้าย่อย (pageHeadComp.php) — โทนเดียวกับส่วนเปิดของหน้าแรก
   ========================================================================== */
.hm-phead { position: relative; overflow: hidden; background: var(--hm-bg); padding-block: clamp(40px, 6vw, 80px); }
.hm-phead::before, .hm-phead::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; will-change: transform; animation: hm-blob 16s ease-in-out infinite alternate !important; }   /* radial-gradient แทน blur ให้ลื่น */
.hm-phead::before { width: 760px; height: 760px; background: radial-gradient(circle, #cbe9eb 0%, rgba(255,255,255,0) 68%); top: -340px; right: -200px; }
.hm-phead::after { width: 620px; height: 620px; background: radial-gradient(circle, #d2f1cc 0%, rgba(255,255,255,0) 68%); bottom: -340px; left: -220px; animation-delay: -6s !important; }
@keyframes hm-blob { to { transform: translate3d(-40px, 30px, 0) scale(1.08); } }
.hm-phead .hm-container { position: relative; z-index: 1; display: grid; gap: 0; }
.hm-phead.is-center .hm-container { grid-template-columns: 1fr; text-align: center; }
.hm-phead.is-center .hm-crumbs, .hm-phead.is-center .hm-kicker { justify-content: center; }
.hm-phead.is-center .hm-lead { margin-inline: auto; }
.hm-phead h1 { font-size: clamp(30px, 3.6vw, 48px); font-weight: 700; line-height: 1.25; }
.hm-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--hm-muted); margin-bottom: 18px; }
.hm-crumbs a { color: var(--hm-blue) !important; font-weight: 500; }
.hm-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hm-crumbs > i { font-size: 10px; opacity: .6; }

/* หัวข้อภายในหน้าเดิม (ประวัติความเป็นมา, ผู้บริหาร ฯลฯ) ให้เป็นสไตล์เดียวกับหน้าแรก */
#content .heading-block h3, #content h2.nott { font-family: "Prompt", sans-serif; color: var(--hm-ink) !important; letter-spacing: -0.01em; }
#content .badge-default { background: #fff !important; color: var(--hm-blue) !important; border: 0 !important; box-shadow: var(--hm-shadow); font-weight: 600; }

/* ==========================================================================
   หน้าข่าวสาร (newsPage.php) + รายละเอียดข่าว (newsDetail.php)
   ========================================================================== */
.hm-newspage, .hm-article-page { background: #fff; }
.hm-empty { text-align: center; color: var(--hm-muted); padding: 40px 0; }
.hm-badge { display: inline-block; padding: 5px 12px; border-radius: 99px; background: var(--hm-grad); color: #fff; font-size: 13px; font-weight: 600; margin-right: 10px; }
.hm-feature-wide { display: grid !important; grid-template-columns: 1.1fr 1fr; align-items: stretch; }
.hm-feature-wide .hm-thumb { aspect-ratio: auto; min-height: 320px; }
.hm-feature-wide .hm-feature-body { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 4vw, 44px); }
.hm-feature-wide h2 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; line-height: 1.4; margin-top: 14px; }
.hm-feature-wide p { color: var(--hm-muted); margin-top: 12px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hm-feature-wide .hm-link { margin-top: 20px; }
.hm-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 48px 0 24px; }
.hm-search { position: relative; flex: 1 1 320px; max-width: 460px; margin: 0; }
.hm-search i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--hm-muted); }
.hm-search input { width: 100%; height: 52px; padding: 0 18px 0 46px; border-radius: 14px; border: 1.5px solid var(--hm-line); background: var(--hm-bg); font: 400 16px "Prompt", sans-serif; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease !important; }
.hm-search input:focus { outline: 0; border-color: var(--hm-teal); background: #fff; box-shadow: 0 0 0 4px rgba(77, 161, 169, .18); }
.hm-count { color: var(--hm-muted); font-size: 15px; }
.hm-count b { color: var(--hm-ink); }
.hm-ngrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hm-ncard[hidden] { display: none !important; }
.hm-ncard .hm-thumb { position: relative; aspect-ratio: 16 / 10; }
.hm-ncard h3 { font-size: 17px !important; line-height: 1.5 !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; }
.hm-ncard:hover .hm-thumb img:not(.hm-ph) { transform: scale(1.06); }
.hm-pcount { position: absolute; right: 10px; bottom: 10px; padding: 4px 10px; border-radius: 99px; background: rgba(15, 34, 54, .6); color: #fff; font-size: 12px; backdrop-filter: blur(4px); }
.hm-more { text-align: center; margin-top: 36px; }
@media (max-width: 991.98px) { .hm-ngrid { grid-template-columns: repeat(2, 1fr); } .hm-feature-wide { grid-template-columns: 1fr; } .hm-feature-wide .hm-thumb { min-height: 220px; aspect-ratio: 16 / 9; } }
@media (max-width: 575.98px) { .hm-ngrid { grid-template-columns: 1fr; } }

/* รายละเอียดข่าว: บทความ + แถบข้าง */
.hm-article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.hm-article-cover { border-radius: 22px; overflow: hidden; box-shadow: var(--hm-shadow-up); }
.hm-article-cover img { width: 100%; max-height: 520px; object-fit: cover; }
.hm-article-cover .hm-thumb { aspect-ratio: 16 / 9; }
.hm-article-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hm-article-meta span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; background: var(--hm-bg); font-size: 14px; color: var(--hm-muted); }
.hm-article-meta i { color: var(--hm-teal); }
.hm-article-title { font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; line-height: 1.4; margin-top: 18px !important; }
.hm-article-body { margin-top: 20px; font-size: 17px; line-height: 1.9; color: var(--hm-text); }
.hm .hm-article-body p { margin: 0 0 16px; }
.hm .hm-article-body ul, .hm .hm-article-body ol { list-style: revert; padding-left: 1.4em; margin-bottom: 16px; }
.hm .hm-article-body img { border-radius: 14px; margin: 12px 0; height: auto; }
.hm .hm-article-body a { color: var(--hm-blue); text-decoration: underline; }
.hm-article-sub { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; margin: 40px 0 16px !important; }
.hm-article-sub i { color: var(--hm-teal); }
.hm-article-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hm-article-gallery a { display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: url('../images/logo_white.png') center / 40% no-repeat, var(--hm-grad); }
.hm-article-gallery img { width: 100%; height: 100%; object-fit: cover; font-size: 0; color: transparent; transition: transform .5s var(--hm-ease) !important; }
.hm-article-gallery a:hover img { transform: scale(1.06); }
.hm-back { margin-top: 36px; }
.hm-aside { position: sticky; top: 100px; }
.hm-aside-box { background: var(--hm-bg); border-radius: 20px; padding: 22px; }
.hm-aside-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 14px !important; }
.hm-aside-box .hm-list, .hm-aside-box { display: grid; gap: 10px; }
.hm-aside .hm-item { grid-template-columns: 96px 1fr; }
.hm-aside .hm-item h4 { font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--hm-ink); margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 991.98px) { .hm-article-grid { grid-template-columns: 1fr; } .hm-aside { position: static; } }
@media (max-width: 575.98px) { .hm-article-gallery { grid-template-columns: repeat(2, 1fr); } }
.hm-feature-wide .hm-badge { align-self: flex-start; margin-bottom: 10px; }

/* ข้อมูลหน่วยงาน: การ์ดวิสัยทัศน์ — แถบสีเว็บด้านซ้าย + ไอคอน */
#content .card-seo-about { position: relative; overflow: hidden; border-radius: 22px !important; box-shadow: var(--hm-shadow-up) !important; margin-top: -40px; z-index: 2; }
#content .card-seo-about::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--hm-grad); }
#content .card-seo-about::after { content: "\f140"; font: 900 120px/1 "Font Awesome 6 Free"; position: absolute; right: 28px; top: 50%; transform: translateY(-50%); background: var(--hm-grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .16; }
#content .card-seo-about h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; }
#content .card-seo-about p { font-size: 18px; color: var(--hm-muted); }
/* ตารางเอกสาร/ครุภัณฑ์: กล่องการ์ดมุมโค้ง */
#content .section .card.border-0 { border-radius: 20px !important; box-shadow: var(--hm-shadow) !important; }
/* หัวตารางทุกตารางในหน้าบ้าน (ตารางดาวน์โหลดไม่มีคลาส dataTable/table ที่หัว) */
#content table thead tr { background: var(--hm-grad) !important; }
#content table thead th { background: transparent !important; color: #fff !important; border: 0 !important; }
/* เมนูสลับภาษาบนแถบบนสุด: พื้นขาว ตัวอักษรเข้ม (ธีม .dark ทำพื้นดำ ตัวอักษรมองไม่เห็น) */
#top-bar .top-links-sub-menu, #top-bar .top-links-sub-menu .top-links-item { background: #fff !important; border: 0 !important; }
#top-bar .top-links-sub-menu a { color: var(--hm-ink) !important; font: 500 14px/1.2 "Prompt", sans-serif !important; }
#top-bar .top-links-sub-menu .top-links-item:hover, #top-bar .top-links-sub-menu .top-links-item.active { background: var(--hm-bg) !important; }

/* ภาพกิจกรรม: แถบจำนวนรูป + ตัวแบ่งหน้า (หน้าละ 50 รูป) */
.hm-gal-bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; font: 400 15px "Prompt", sans-serif; color: var(--hm-muted); }
.hm-gal-bar b { color: var(--hm-ink); }
.hm-pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 36px; font: 500 15px/1 "Prompt", sans-serif; }
.hm-pager a, .hm-pager span { min-width: 44px; height: 44px; padding: 0 14px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.hm-pager a { background: #fff; color: var(--hm-ink) !important; box-shadow: var(--hm-shadow); transition: transform .2s var(--hm-ease), color .2s ease !important; }
.hm-pager a:hover { transform: translateY(-2px); color: var(--hm-blue) !important; }
.hm-pager .is-on { background: var(--hm-grad); color: #fff; box-shadow: 0 8px 18px rgba(47, 178, 38, .25); }
.hm-pager .is-off { color: #b3bfcb; }
.hm-pager .is-gap { min-width: 24px; padding: 0; color: var(--hm-muted); }
@media (max-width: 575.98px) { .hm-pager a[rel], .hm-pager .is-off { font-size: 0; gap: 0; } .hm-pager a[rel] i, .hm-pager .is-off i { font-size: 14px; } }

/* ==========================================================================
   แอนิเมชันทั้งเว็บ (คู่กับ assets/js/site-motion.js)
   ประกาศ !important เพราะ clli-ui.css ตัดแอนิเมชัน/ทรานซิชันทั้งเว็บเมื่อเครื่องตั้ง reduced-motion
   ========================================================================== */
/* วงคลื่นเมื่อคลิกปุ่ม */
.hm-ripple-host { overflow: hidden; isolation: isolate; }
.hm-ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .22; transform: scale(0); pointer-events: none; z-index: 0; animation: hm-ripple .6s cubic-bezier(.2, .7, .2, 1) forwards !important; }
@keyframes hm-ripple { to { transform: scale(1); opacity: 0; } }

/* จางออกก่อนเปลี่ยนหน้า + ค่อย ๆ ปรากฏตอนเข้า */
#wrapper { transition: opacity .22s ease, transform .22s ease !important; }
body.hm-leaving #wrapper { opacity: 0; transform: translateY(6px); }

/* เมนูหลัก: ขีดเส้นใต้สีเว็บเลื่อนออกจากกลางเมื่อชี้ / หน้าปัจจุบัน */
#header .menu-container > .menu-item > .menu-link > div { position: relative; }
#header .menu-container > .menu-item > .menu-link > div::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 3px; border-radius: 3px; background: var(--hm-grad);
	transform: scaleX(0); transition: transform .3s cubic-bezier(.2, .7, .2, 1) !important;
}
#header .menu-container > .menu-item:hover > .menu-link > div::after,
#header .menu-container > .menu-item.current > .menu-link > div::after { transform: scaleX(1); }
@media (max-width: 991.98px) { #header .menu-container > .menu-item > .menu-link > div::after { display: none; } }
/* เมนูย่อยค่อย ๆ เลื่อนลง */
#header .mega-menu-content { transform-origin: top center; }
#header .menu-item:hover > .mega-menu-content { animation: hm-drop .28s cubic-bezier(.2, .7, .2, 1) both !important; }
@keyframes hm-drop { from { opacity: 0; transform: translateY(-8px); } }

/* โลโก้หดลงเนียน ๆ เมื่อแถบเมนูติดด้านบน */
#header #logo img { transition: height .3s cubic-bezier(.2, .7, .2, 1), margin .3s ease !important; }
#header.sticky-header #logo img { height: 46px !important; margin-block: 6px !important; }

/* ปุ่มลอยมุมขวา: เลื่อนเข้าจากขวาตอนเปิดหน้า */
.njs-sticky-side, .njs-sticky-side2, #btn-survey { animation: hm-dock .6s cubic-bezier(.2, .7, .2, 1) .5s both !important; }
.njs-sticky-side { animation-delay: .62s !important; }
@keyframes hm-dock { from { opacity: 0; transform: translateX(40px); } }

/* ไอคอนในปุ่ม/ลิงก์เด้งเล็กน้อยเมื่อชี้ */
.hm-social a:hover i, .hm-foot a:hover > i { animation: hm-wiggle .5s ease !important; }
@keyframes hm-wiggle { 30% { transform: rotate(-10deg) scale(1.1); } 60% { transform: rotate(8deg) scale(1.1); } }

/* ชิ้นที่เข้าฉาก (รวมที่ site-motion.js ใส่ให้อัตโนมัติ) — ไม่ซ่อนรูปภาพกิจกรรมจนกว่าจะเข้าฉาก */
.hm-js [data-rv-auto] { will-change: opacity, transform; }
