/* ==========================================================================
   หน้าแรก CLLI — แนว "หรูเรียบ มืออาชีพ"
   พื้นขาวสะอาด สีเว็บไล่โทน linear-gradient(135deg, #4DA1A9, #2fb226) ใช้เป็นจุดเน้นและไล่โทนนุ่ม ๆ
   ตัวอักษร Prompt ขนาดพอดี การ์ดมุมโค้ง มีมิติ + ลูกเล่น (เข้าฉาก, ลอย, เอียง 3D ผ่าน clli-tilt.js)
   โหลดเฉพาะหน้าแรก (views/index.php) ต่อจาก site.css ที่ทุกหน้าใช้ร่วมกัน
   ========================================================================== */
/* โทเคนสี/ระยะ อยู่ใน site.css (โหลดทุกหน้า) */

/* แถบเมนู/ปุ่มลอย/ท้ายหน้า อยู่ใน site.css — หน้าแรกซ่อนปุ่มลอยซ้ายเพราะมีแถบ "บริการ" แล้ว */
.njs-sticky-side, .njs-sticky-side2 { display: none !important; }

/* ==========================================================================
   1 · ส่วนเปิด
   ========================================================================== */
.hm-hero { position: relative; overflow: hidden; background: var(--hm-bg); padding-block: clamp(48px, 7vw, 96px) clamp(64px, 8vw, 112px); }
.hm-hero::before, .hm-hero::after {   /* แสงสีเว็บจาง ๆ ด้านหลัง ลอยช้า ๆ */
	content: ""; position: absolute; border-radius: 50%; pointer-events: none; will-change: transform;   /* radial-gradient แทน blur ให้ลื่น */
	animation: hm-blob 16s ease-in-out infinite alternate !important;
}
.hm-hero::before { width: 820px; height: 820px; background: radial-gradient(circle, #cbe9eb 0%, rgba(255,255,255,0) 68%); top: -310px; right: -230px; }
.hm-hero::after { width: 680px; height: 680px; background: radial-gradient(circle, #d2f1cc 0%, rgba(255,255,255,0) 68%); bottom: -310px; left: -250px; animation-delay: -6s !important; }
@keyframes hm-blob { to { transform: translate3d(-40px, 30px, 0) scale(1.08); } }
.hm-hero .hm-container { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hm-hero h1 { font-size: clamp(36px, 4.4vw, 58px); font-weight: 700; line-height: 1.22; letter-spacing: -0.015em; }
.hm-hero h1 > span { display: block; }
.hm-hero .hm-lead { font-size: 18px; margin-top: 20px; max-width: 34em; }
.hm-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hm-tags span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; background: #fff; font-size: 14px; font-weight: 500; color: var(--hm-ink); box-shadow: var(--hm-shadow); }
.hm-tags i { color: var(--hm-green); }
.hm-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hm-hero-visual { position: relative; }
.hm-hero-media { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 11; box-shadow: var(--hm-shadow-up); background: var(--hm-ink); }
.hm-hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hm-float {
	position: absolute; z-index: 2; background: rgba(255, 255, 255, .96); border-radius: 16px; box-shadow: var(--hm-shadow-up);
	padding: 14px 18px; display: flex; align-items: center; gap: 12px;
	animation: hm-bob 6s ease-in-out infinite !important;
}
@keyframes hm-bob { 50% { transform: translateY(-10px); } }
.hm-float-status { left: -28px; bottom: 32px; }
[data-open="1"] .hm-dot { background: #22b45a; color: #22b45a; }
.hm-float b { display: block; font-size: 15px; color: var(--hm-ink); line-height: 1.3; }
.hm-float small { display: block; font-size: 13px; color: var(--hm-muted); line-height: 1.3; }

@media (max-width: 991.98px) {
	.hm-hero .hm-container { grid-template-columns: 1fr; }
	.hm-float-status { left: 12px; bottom: 12px; }
}
@media (max-width: 575.98px) {
	.hm-hero-actions .hm-btn { flex: 1 1 100%; }
}

/* ---------- บริการด่วน (ลอยทับขอบล่างของส่วนเปิด) ---------- */
.hm-services { position: relative; z-index: 2; margin-top: -48px; }
.hm-services ul { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; background: #fff; border-radius: 20px; padding: 12px; box-shadow: var(--hm-shadow-up); }
.hm-services a, .hm-services button {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 100%;
	padding: 18px 10px; border: 0; border-radius: 14px; background: transparent; cursor: pointer; text-align: center;
	font: 500 15px/1.35 "Prompt", sans-serif; color: var(--hm-ink);
	transition: background-color .25s ease, transform .25s var(--hm-ease) !important;
}
.hm-services a:hover, .hm-services button:hover { background: var(--hm-bg); transform: translateY(-3px); }
.hm-ico {
	width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; color: #fff;
	background: var(--hm-grad); box-shadow: 0 8px 18px rgba(47, 178, 38, .25);
	transition: transform .35s var(--hm-ease) !important;
}
.hm-services a:hover .hm-ico, .hm-services button:hover .hm-ico { transform: rotate(-8deg) scale(1.08); }
@media (max-width: 991.98px) { .hm-services ul { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575.98px) { .hm-services ul { grid-template-columns: repeat(2, 1fr); } .hm-services { margin-top: -32px; } }

/* ---------- แบนเนอร์เว็บ (บนสุด เต็มความกว้าง เหมือนเดิม) ---------- */
.hm-board { background: var(--hm-ink); }
.hm-board-stage { position: relative; display: grid; overflow: hidden; }
.hm-slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: scale(1.03); transition: opacity 1s ease, transform 6s ease, visibility 0s 1s !important; }
.hm-slide.is-on { opacity: 1; visibility: visible; transform: scale(1); transition: opacity 1s ease, transform 6s ease !important; }
.hm-board-stage img { width: 100%; height: auto; max-height: 82vh; object-fit: cover; }
.hm-board-arrow {
	position: absolute; top: 50%; z-index: 3; width: 52px; height: 52px; margin-top: -26px; border: 0; border-radius: 50%; cursor: pointer;
	display: grid; place-items: center; color: #fff; font-size: 18px; background: rgba(15, 34, 54, .35); backdrop-filter: blur(8px);
	opacity: 0; transition: opacity .3s ease, background-color .25s ease, transform .25s var(--hm-ease) !important;
}
.hm-board-arrow.is-prev { left: clamp(12px, 2vw, 28px); }
.hm-board-arrow.is-next { right: clamp(12px, 2vw, 28px); }
.hm-board:hover .hm-board-arrow, .hm-board-arrow:focus-visible { opacity: 1; }
.hm-board-arrow:hover { background: var(--hm-blue); transform: scale(1.08); }
.hm-board-dots { position: absolute; left: 50%; bottom: clamp(12px, 3vw, 24px); z-index: 3; transform: translateX(-50%); display: flex; gap: 8px; padding: 6px 10px; border-radius: 99px; background: rgba(15, 34, 54, .3); backdrop-filter: blur(6px); }
.hm-board-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .55); cursor: pointer; transition: width .35s var(--hm-ease), background-color .3s ease !important; }
.hm-board-dots button.is-on { width: 28px; background: #fff; }
.hm-board-progress { position: absolute; left: 0; bottom: 0; z-index: 3; height: 4px; width: 100%; background: var(--hm-grad); transform-origin: left; animation: hm-progress 6s linear forwards !important; }
@keyframes hm-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (hover: none) { .hm-board-arrow { opacity: 1; } }
@media (max-width: 575.98px) { .hm-board-arrow { display: none; } }

/* ==========================================================================
   2 · เกี่ยวกับ
   ========================================================================== */
.hm-about .hm-container { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.hm-collage { position: relative; padding: 0; width: 100%; max-width: 400px; justify-self: end; } /* ชิดฝั่งข้อความ ลดช่องว่างกลางหน้า */
.hm-collage img { height: auto; object-position: center top; filter: drop-shadow(0 18px 24px rgba(15, 40, 60, .18)); } /* ภาพตัดพื้นหลัง (PNG โปร่งใส) — ไม่มีพื้น/กรอบ เงาตามรูปร่างคน */
.hm-collage .hm-c1 { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; -webkit-mask-image: linear-gradient(180deg, #000 68%, transparent 99%); mask-image: linear-gradient(180deg, #000 68%, transparent 99%); } /* ล่างรูปค่อยๆ จางหาย */
.hm-collage .hm-c2 { position: absolute; right: 0; bottom: 0; width: 52%; aspect-ratio: 4 / 3; object-fit: cover; border: 6px solid #fff; }
.hm-about p + p { margin-top: 16px; }
.hm-checks { display: grid; gap: 12px; margin-top: 24px; }
.hm-checks li { display: flex; gap: 12px; align-items: center; font-weight: 500; color: var(--hm-ink); }
.hm-checks i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: #fff; background: var(--hm-grad); flex: none; }
.hm-about .hm-btn { margin-top: 32px; }
@media (max-width: 991.98px) { .hm-about .hm-container { grid-template-columns: 1fr; } .hm-collage { max-width: 320px; justify-self: center; } }

/* ==========================================================================
   5 · วิดีโอ — พื้นเข้ม
   ========================================================================== */
.hm-video { background: var(--hm-ink); color: #fff; overflow: hidden; }
.hm-video::before { content: ""; position: absolute; width: 700px; height: 700px; border-radius: 50%; background: radial-gradient(circle, rgba(77, 161, 169, .35), transparent 65%); top: -280px; right: -200px; pointer-events: none; }
.hm-video .hm-title, .hm-video h3 { color: #fff; }
.hm-video .hm-lead { color: #b9c7d6; }
.hm-video .hm-kicker { color: #8fd0d5; }
.hm-player { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 30px 70px rgba(0, 0, 0, .45); }
.hm-player video { width: 100%; height: 100%; object-fit: cover; }
.hm-player-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 60px 24px 20px; background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent); }
.hm-player-bar h3 { font-size: 20px; font-weight: 600; }
.hm-player-bar .hm-btn { min-height: 44px; padding: 0 18px; font-size: 14px; background: rgba(255, 255, 255, .16); color: #fff !important; backdrop-filter: blur(8px); }
.hm-player-bar .hm-btn:hover { background: rgba(255, 255, 255, .28); }
.hm-vthumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-top: 18px; }
.hm-vtab {
	position: relative; border: 0; padding: 0; cursor: pointer; border-radius: 14px; overflow: hidden; background: var(--hm-ink-2); text-align: left;
	aspect-ratio: 16 / 9; opacity: .6; transition: opacity .25s ease, transform .25s var(--hm-ease), box-shadow .25s ease !important;
}
.hm-vtab img, .hm-vtab video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.hm-vtab span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font: 500 13px/1.3 "Prompt", sans-serif; color: #fff; background: linear-gradient(to top, rgba(0, 0, 0, .75), transparent); }
.hm-vtab:hover { opacity: .9; transform: translateY(-3px); }
.hm-vtab[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 3px var(--hm-teal); }
@media (max-width: 575.98px) { .hm-player-bar { padding: 40px 14px 12px; } .hm-player-bar h3 { font-size: 16px; } .hm-vthumbs { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   6 · ถาม-ตอบ คลังหน่วยกิต — accordion
   ========================================================================== */
.hm-faq .hm-container { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.hm-faq-side { position: sticky; top: 110px; }
.hm-faq-side .hm-btn { margin-top: 28px; }
.hm-acc { display: grid; gap: 12px; }
.hm-acc details { background: #fff; border-radius: 16px; box-shadow: var(--hm-shadow); transition: box-shadow .3s ease !important; }
.hm-acc details[open] { box-shadow: var(--hm-shadow-up); }
.hm-acc summary {
	list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding: 20px 22px; font-weight: 600; font-size: 17px; line-height: 1.5; color: var(--hm-ink);
}
.hm-acc summary::-webkit-details-marker { display: none; }
.hm-acc summary::after {
	content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
	font-size: 22px; font-weight: 400; color: var(--hm-blue); background: var(--hm-bg);
	transition: transform .3s var(--hm-ease), background-color .3s ease, color .3s ease !important;
}
.hm-acc details[open] summary::after { transform: rotate(45deg); background: var(--hm-grad); color: #fff; }
.hm-acc dd { padding: 0 22px 22px; color: var(--hm-muted); font-size: 16px; animation: hm-open .35s var(--hm-ease) !important; }
@keyframes hm-open { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 991.98px) { .hm-faq .hm-container { grid-template-columns: 1fr; } .hm-faq-side { position: static; } }

/* ==========================================================================
   7 · ภาพกิจกรรมเลื่อน + ติดต่อ
   ========================================================================== */
.hm-strip { overflow: hidden; padding-block: 8px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.hm-strip-track { display: flex; gap: 14px; width: max-content; animation: hm-marquee 70s linear infinite !important; }
.hm-strip:hover .hm-strip-track { animation-play-state: paused !important; }
.hm-strip img { height: 180px; width: auto; border-radius: 14px; }
@keyframes hm-marquee { to { transform: translateX(-50%); } }

.hm-contact { padding-block: clamp(56px, 7vw, 88px) clamp(72px, 9vw, 120px); }
.hm-cta {
	position: relative; overflow: hidden; border-radius: 28px; padding: clamp(32px, 5vw, 64px); color: #fff;
	background: var(--hm-grad); box-shadow: 0 30px 60px rgba(47, 178, 38, .22);
	display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 4vw, 56px); align-items: center;
}
.hm-cta::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(255, 255, 255, .1); right: -120px; top: -160px; }
.hm-cta .hm-title { color: #fff; }
.hm-cta .hm-lead { color: rgba(255, 255, 255, .9); }
.hm-cta-status { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 8px 16px; border-radius: 99px; background: rgba(255, 255, 255, .18); font-size: 15px; font-weight: 500; }
.hm-cta-status small { opacity: .85; font-size: 14px; }
.hm-cta-status .hm-dot { background: #dfe7ef; }
.hm-cta-status[data-open="1"] .hm-dot { background: #b6ffcb; }
.hm-cta-status[data-open="1"] .hm-dot::after { border-color: #b6ffcb; }
.hm-cta-cards { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hm-cc {
	display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 16px; background: #fff; color: var(--hm-ink);
	transition: transform .25s var(--hm-ease), box-shadow .25s ease !important;
}
a.hm-cc:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(15, 34, 54, .2); }
.hm-cc i { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--hm-blue); background: #e7f4f0; font-size: 17px; }
.hm-cc b { display: block; font-size: 16px; line-height: 1.4; }
.hm-cc small { display: block; font-size: 14px; color: var(--hm-muted); line-height: 1.5; margin-top: 2px; }
.hm-cc-wide { grid-column: 1 / -1; }
@media (max-width: 991.98px) { .hm-cta { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .hm-cta-cards { grid-template-columns: 1fr; } .hm-strip img { height: 120px; } }

.hm-cta-status small::before { content: "· "; }
@media (max-width: 575.98px) { .hm-feature h3 { font-size: 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } }
.hm .hm-cc { color: var(--hm-ink); }   /* .hm a { color: inherit } จะดึงสีขาวจากกล่องไล่สี */
/* การ์ดเว็บไซต์หน่วยงาน: รูปวาดเดิมเต็มกรอบ 3:2 + ไอคอนลอยทับขอบรูป */
.hm-card-pic { aspect-ratio: 3 / 2; }
.hm-card-ico { margin-top: -48px; border: 4px solid #fff; box-sizing: content-box; position: relative; z-index: 1; }
.hm-card .hm-card-cat { display: inline-flex; align-items: center; gap: 6px; }
/* วิดีโอ: ปุ่มเล่นกลางจอ + ป้ายชื่อคลิป (ตามของเดิม) */
.hm-play {
	position: absolute; left: 50%; top: 50%; z-index: 2; width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 0; border-radius: 50%;
	display: grid; place-items: center; font-size: 26px; color: #fff; background: var(--hm-grad); cursor: pointer;
	box-shadow: 0 0 0 10px rgba(255, 255, 255, .18), 0 18px 40px rgba(0, 0, 0, .35);
	transition: transform .3s var(--hm-ease), opacity .3s ease !important;
}
.hm-play:hover { transform: scale(1.08); }
.hm-play.is-playing { opacity: 0; }
.hm-player:hover .hm-play.is-playing, .hm-play.is-playing:focus-visible { opacity: 1; }
.hm-play i.fa-play { margin-left: 4px; }
.hm-vtag { display: inline-block; margin-bottom: 8px; padding: 4px 12px; border-radius: 99px; background: var(--hm-grad); font-size: 13px; font-weight: 600; color: #fff; }
.hm-video { padding-block: clamp(56px, 7vw, 96px); }
@media (max-width: 575.98px) { .hm-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; font-size: 20px; } .hm-vtag { display: none; } }

/* จุดสถานะเปิด-ปิดในกล่องติดต่อ (กะพริบเมื่อเปิดทำการ) */
.hm-dot { width: 12px; height: 12px; border-radius: 50%; background: #9aa8b6; flex: none; position: relative; }
[data-open="1"] .hm-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid currentColor; animation: hm-ping 1.8s ease-out infinite !important; }
@keyframes hm-ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

/* ปฏิทินกิจกรรม (Google Calendar) + Facebook — ของเดิม ตกแต่งใหม่ */
.hm-cal-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.hm-cal-box { background: #fff; border-radius: var(--hm-radius); box-shadow: var(--hm-shadow); padding: 12px; overflow: hidden; }
.hm-cal-box iframe { display: block; width: 100%; height: 600px; border: 0; border-radius: 12px; }
@media (max-width: 991.98px) { .hm-cal-grid { grid-template-columns: 1fr; } .hm-cal-box iframe { height: 520px; } }

/* กล่อง Facebook: iframe เดิม จัดกึ่งกลางในกล่อง */
.hm-fb { display: flex; justify-content: center; }
