/* =========================================================================
   TAJONG GOV — Design System & Stylesheet
   ธีม ทต.ตาจง — ออกแบบใหม่ทั้งหมด (Mobile First)
   ========================================================================= */

/* -------------------------------------------------------------------------
   1) DESIGN TOKENS
   ------------------------------------------------------------------------- */
:root {
	/* สีหลัก: ม่วงเข้ม (โทนสีตามที่กำหนด #710193 สื่อถึงความสง่างามและเป็นทางการ) */
	--tj-primary-900: #3E0151;
	--tj-primary-700: #710193;
	--tj-primary-600: #8001A7;
	--tj-primary-500: #9C01CB;
	--tj-primary-100: #F4E8F7;
	--tj-primary-50:  #F9F4FA;

	/* สีรอง: ทองสัมฤทธิ์ (สื่อถึงความเป็นทางการ ราชการไทย) */
	--tj-gold-700: #8C6412;
	--tj-gold-600: #B7862C;
	--tj-gold-500: #C89A3E;
	--tj-gold-100: #FBF1DE;

	/* สถานะ */
	--tj-danger:  #B3261E;
	--tj-danger-100: #FBEAE9;
	--tj-warning: #A6650C;
	--tj-warning-100: #FCF1E1;
	--tj-success: #1E7A46;
	--tj-success-100: #E9F6EE;
	--tj-info:    #1F5FA8;
	--tj-info-100: #EAF2FB;

	/* กลาง/ตัวอักษร/พื้นหลัง */
	--tj-ink:     #16211D;
	--tj-body:    #3A473F;
	--tj-muted:   #66766E;
	--tj-border:  #DDE6E1;
	--tj-border-strong: #C3D0C9;
	--tj-bg:      #F6F8F7;
	--tj-surface: #FFFFFF;

	/* Typography */
	--tj-font: 'Sarabun', 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--tj-fs-xs: 0.8125rem;
	--tj-fs-sm: 0.9375rem;
	--tj-fs-base: 1rem;
	--tj-fs-md: 1.125rem;
	--tj-fs-lg: 1.375rem;
	--tj-fs-xl: 1.75rem;
	--tj-fs-2xl: 2.25rem;
	--tj-fs-3xl: 2.75rem;

	/* Spacing scale */
	--tj-space-1: 4px;
	--tj-space-2: 8px;
	--tj-space-3: 12px;
	--tj-space-4: 16px;
	--tj-space-5: 24px;
	--tj-space-6: 32px;
	--tj-space-7: 48px;
	--tj-space-8: 64px;

	/* Layout — มุมเหลี่ยม/เงาบาง ให้ความรู้สึกเป็นทางการแบบเว็บไซต์ราชการ */
	--tj-container: 1240px;
	--tj-radius-sm: 3px;
	--tj-radius: 4px;
	--tj-radius-lg: 6px;
	--tj-radius-pill: 3px;
	--tj-radius-full: 999px; /* ใช้เฉพาะจุดที่ต้องการปุ่ม/องค์ประกอบทรงแคปซูลเต็มรูปแบบ เช่นปุ่ม "ดูทั้งหมด" ของบล็อกกิจกรรม */
	--tj-shadow-sm: 0 1px 2px rgba(16, 32, 27, 0.08);
	--tj-shadow: 0 2px 6px rgba(16, 32, 27, 0.10);
	--tj-shadow-lg: 0 8px 20px rgba(16, 32, 27, 0.16);
	--tj-header-height: 64px;
	--tj-topbar-height: 40px;
	--tj-accent-height: 5px;
	--tj-transition: 180ms ease;
	/* หน่วงเวลาก่อนเริ่มจางหายไปของเมนู dropdown (เมนูหลัก/E-Service) เมื่อเมาส์ออกจากเมนู
	   เพื่อให้ผู้ใช้มีเวลาขยับเมาส์จากปุ่มเมนูไปยังรายการเมนูย่อยโดยไม่ปิดเมนูก่อนเวลา */
	--tj-dropdown-close-delay: 400ms;

	/* ขนาดตัวอักษรที่ผู้ใช้ปรับได้ (Accessibility) */
	--tj-font-scale: 1;
}

html[data-tj-font-scale="lg"]  { --tj-font-scale: 1.125; }
html[data-tj-font-scale="xl"]  { --tj-font-scale: 1.25; }

@media (prefers-color-scheme: dark) {
	:root:not([data-tj-theme="light"]) {
		--tj-ink: #EAF1EC;
		--tj-body: #C9D6CF;
		--tj-muted: #93A69C;
		--tj-border: #223832;
		--tj-border-strong: #2E4A42;
		--tj-bg: #0F1814;
		--tj-surface: #16221D;
		--tj-primary-100: #361141;
		--tj-primary-50: #280C31;
		--tj-gold-100: #2B2412;
	}
}
:root[data-tj-theme="dark"] {
	--tj-ink: #EAF1EC;
	--tj-body: #C9D6CF;
	--tj-muted: #93A69C;
	--tj-border: #223832;
	--tj-border-strong: #2E4A42;
	--tj-bg: #0F1814;
	--tj-surface: #16221D;
	--tj-primary-100: #361141;
	--tj-primary-50: #280C31;
	--tj-gold-100: #2B2412;
}

/* โหมดปรับสีการแสดงผล (Accessibility) — สลับผ่านปุ่ม 3 แบบที่แถบบนของ Header */
:root[data-tj-contrast="dark"] {
	--tj-ink: #FFFFFF;
	--tj-body: #F0F0F0;
	--tj-muted: #CCCCCC;
	--tj-border: #444444;
	--tj-border-strong: #666666;
	--tj-bg: #000000;
	--tj-surface: #111111;
}
:root[data-tj-contrast="dark"] a { color: #7EC8FF; }
:root[data-tj-contrast="yellow"] {
	--tj-ink: #FFE600;
	--tj-body: #FFE600;
	--tj-muted: #CCB800;
	--tj-border: #4D4400;
	--tj-border-strong: #806F00;
	--tj-bg: #000000;
	--tj-surface: #000000;
}
:root[data-tj-contrast="yellow"] a { color: #FFE600; text-decoration: underline; }

/* -------------------------------------------------------------------------
   2) RESET & BASE
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--tj-font);
	font-size: calc(var(--tj-fs-base) * var(--tj-font-scale));
	line-height: 1.7;
	color: var(--tj-body);
	background: var(--tj-bg);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tj-primary-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 {
	color: var(--tj-ink);
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 var(--tj-space-3);
}
h1 { font-size: calc(var(--tj-fs-2xl) * var(--tj-font-scale)); }
h2 { font-size: calc(var(--tj-fs-xl) * var(--tj-font-scale)); }
h3 { font-size: calc(var(--tj-fs-lg) * var(--tj-font-scale)); }
p { margin: 0 0 var(--tj-space-4); }
ul, ol { padding-left: 1.4em; }
table { border-collapse: collapse; width: 100%; }
button { font-family: inherit; }

/* Focus visibility (Accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--tj-gold-600);
	outline-offset: 2px;
	border-radius: 2px;
}

.tj-container {
	max-width: var(--tj-container);
	margin: 0 auto;
	padding: 0 var(--tj-space-4);
}
@media (min-width: 768px) {
	.tj-container { padding: 0 var(--tj-space-5); }
}

.tj-section { padding: var(--tj-space-7) 0; }
.tj-section--tight { padding: var(--tj-space-6) 0; }
.tj-section--alt { background: var(--tj-surface); }
.tj-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--tj-space-4);
	margin-bottom: var(--tj-space-5);
	flex-wrap: wrap;
}
.tj-section-head h2 { margin: 0; }
.tj-section-head .tj-eyebrow {
	display: block;
	color: var(--tj-gold-600);
	font-weight: 600;
	font-size: var(--tj-fs-sm);
	letter-spacing: 0.04em;
	margin-bottom: var(--tj-space-1);
}
.tj-more-link {
	font-weight: 600;
	white-space: nowrap;
}

/* Skip link */
.tj-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 10000;
	background: var(--tj-primary-900);
	color: #fff;
	padding: 12px 20px;
	border-radius: 0 0 8px 0;
	font-weight: 700;
}
.tj-skip-link:focus {
	left: 0;
}

/* -------------------------------------------------------------------------
   3) BUTTONS
   ------------------------------------------------------------------------- */
.tajong-btn, .tj-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: var(--tj-radius-sm);
	font-weight: 600;
	font-size: var(--tj-fs-sm);
	border: 2px solid transparent;
	cursor: pointer;
	transition: background var(--tj-transition), color var(--tj-transition), border-color var(--tj-transition), transform var(--tj-transition);
	text-decoration: none;
}
.tajong-btn--primary, .tj-btn--primary {
	background: var(--tj-primary-700);
	color: #fff;
}
.tajong-btn--primary:hover, .tj-btn--primary:hover {
	background: var(--tj-primary-900);
	text-decoration: none;
	color: #fff;
}
.tj-btn--gold {
	background: var(--tj-gold-600);
	color: #fff;
}
.tj-btn--gold:hover { background: var(--tj-gold-700); color: #fff; text-decoration: none; }
.tj-btn--outline {
	background: transparent;
	border-color: currentColor;
	color: var(--tj-primary-700);
}
.tj-btn--outline:hover { background: var(--tj-primary-100); text-decoration: none; }
.tj-btn--ghost-light {
	background: rgba(255,255,255,0.12);
	border-color: rgba(255,255,255,0.6);
	color: #fff;
}
.tj-btn--ghost-light:hover { background: rgba(255,255,255,0.24); color: #fff; text-decoration: none; }
.tajong-btn--small { padding: 6px 14px; font-size: var(--tj-fs-xs); }
.tj-btn--pill { border-radius: var(--tj-radius-full); padding: 12px 32px; }

/* -------------------------------------------------------------------------
   4) TOPBAR + HEADER + MEGA MENU
   ------------------------------------------------------------------------- */
/* แถบเส้นทองบาง ๆ บนสุดของหน้า — สัญลักษณ์ความเป็นทางการแบบเว็บไซต์ราชการ */
.tj-top-accent {
	height: var(--tj-accent-height);
	background: linear-gradient(90deg, var(--tj-gold-700), var(--tj-gold-500) 50%, var(--tj-gold-700));
}
.tj-topbar {
	background: var(--tj-primary-900);
	color: #EAF3EF;
	font-size: var(--tj-fs-xs);
}
.tj-topbar .tj-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--tj-topbar-height);
	gap: var(--tj-space-4);
}
.tj-topbar-left { display: flex; align-items: center; gap: var(--tj-space-4); flex-wrap: wrap; }
.tj-topbar-left a { color: #EAF3EF; }
.tj-topbar-right { display: flex; align-items: center; gap: var(--tj-space-2); }
.tj-topbar-right button {
	background: transparent;
	border: 1px solid rgba(255,255,255,0.4);
	color: #EAF3EF;
	border-radius: 4px;
	padding: 3px 9px;
	cursor: pointer;
	font-size: var(--tj-fs-xs);
	line-height: 1.6;
}
.tj-topbar-right button:hover { background: rgba(255,255,255,0.15); }
.tj-topbar-hide-mobile { display: none; }
@media (min-width: 640px) { .tj-topbar-hide-mobile { display: inline; } }

.tj-header {
	background: var(--tj-surface);
	border-bottom: 3px solid var(--tj-primary-900);
	position: sticky;
	top: 0;
	z-index: 500;
	box-shadow: var(--tj-shadow-sm);
}
.tj-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tj-space-3);
	min-height: var(--tj-header-height);
}
.tj-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--tj-ink);
	min-width: 0;
}
.tj-brand:hover { text-decoration: none; }
.tj-brand-logo { width: 44px; height: 44px; flex-shrink: 0; border-radius: 8px; }
.tj-brand-logo-fallback {
	width: 44px; height: 44px; border-radius: 8px; flex-shrink: 0;
	background: linear-gradient(155deg, var(--tj-primary-700), var(--tj-primary-500));
	display: flex; align-items: center; justify-content: center;
	color: #fff; font-weight: 700; font-size: 16px;
}
.tj-brand-text { min-width: 0; }
.tj-brand-title {
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.tj-brand-sub {
	font-size: var(--tj-fs-xs);
	color: var(--tj-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: none;
}
@media (min-width: 480px) { .tj-brand-sub { display: block; } }

.tj-header-actions { display: flex; align-items: center; gap: 8px; }
.tj-icon-btn {
	width: 40px; height: 40px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--tj-border);
	background: var(--tj-surface);
	color: var(--tj-primary-700);
	cursor: pointer;
}
.tj-icon-btn:hover { background: var(--tj-primary-100); }
.tj-eservice-dropdown { position: relative; display: none; align-items: stretch; }
@media (min-width: 1024px) {
	.tj-eservice-dropdown { display: inline-flex; }
}
.tj-eservice-dropdown .tj-eservice-header-btn {
	border-top-right-radius: 0; border-bottom-right-radius: 0;
}
.tj-eservice-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; flex-shrink: 0;
	background: var(--tj-primary-700); color: #fff;
	border: 2px solid var(--tj-primary-700); border-left: 1px solid rgba(255,255,255,0.4);
	border-top-right-radius: var(--tj-radius-sm); border-bottom-right-radius: var(--tj-radius-sm);
	cursor: pointer;
	transition: background var(--tj-transition);
}
.tj-eservice-toggle svg { width: 14px; height: 14px; transition: transform var(--tj-transition); }
.tj-eservice-dropdown:hover .tj-eservice-toggle,
.tj-eservice-dropdown.tj-submenu-open .tj-eservice-toggle { background: var(--tj-primary-900); border-color: var(--tj-primary-900); }
.tj-eservice-dropdown:hover .tj-eservice-toggle svg,
.tj-eservice-dropdown.tj-submenu-open .tj-eservice-toggle svg { transform: rotate(180deg); }

.tj-eservice-menu {
	list-style: none; margin: 6px 0 0; padding: 8px;
	position: absolute; top: 100%; right: 0; min-width: 240px;
	background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius);
	box-shadow: var(--tj-shadow-lg);
	/* ใช้ visibility เพียงอย่างเดียวในการควบคุมทั้งการมองเห็นและการโต้ตอบ (คลิก/ชี้เมาส์) ของเมนู
	   ไม่ใช้ pointer-events ร่วมด้วย เพราะเบราว์เซอร์ไม่รองรับการหน่วงเวลา (transition-delay) ของ
	   pointer-events อย่างถูกต้อง (จะเปลี่ยนค่าทันทีโดยไม่รอ) ขณะที่ visibility รองรับการหน่วงเวลา
	   ตามมาตรฐาน CSS อยู่แล้ว (เปลี่ยนเป็นมองเห็นทันทีตอนเปิด แต่รอจนครบเวลาหน่วงตอนปิด) และเมื่อ
	   visibility เป็น hidden องค์ประกอบนั้นจะไม่สามารถคลิกหรือชี้เมาส์ได้อยู่แล้วโดยธรรมชาติ */
	visibility: hidden; opacity: 0;
	transition: opacity var(--tj-transition), visibility var(--tj-transition);
	transition-delay: var(--tj-dropdown-close-delay);
	z-index: 600;
}
.tj-eservice-dropdown:hover .tj-eservice-menu,
.tj-eservice-dropdown.tj-submenu-open .tj-eservice-menu,
.tj-eservice-menu:hover,
.tj-eservice-menu:focus-within {
	visibility: visible; opacity: 1;
	transition-delay: 0s;
}
.tj-eservice-menu li + li { margin-top: 2px; }
.tj-eservice-menu a {
	display: block; padding: 10px 12px; border-radius: var(--tj-radius-sm);
	color: var(--tj-ink); font-weight: 500; font-size: var(--tj-fs-sm);
}
.tj-eservice-menu a:hover { background: var(--tj-primary-50); color: var(--tj-primary-700); text-decoration: none; }

.tj-hamburger {
	display: inline-flex;
	width: 40px; height: 40px;
	align-items: center; justify-content: center;
	border-radius: 8px;
	border: 1px solid var(--tj-border);
	background: var(--tj-surface);
	cursor: pointer;
}
.tj-hamburger span, .tj-hamburger span::before, .tj-hamburger span::after {
	content: ""; display: block; width: 20px; height: 2px; background: var(--tj-ink);
	position: relative; transition: transform var(--tj-transition);
}
.tj-hamburger span::before { position: absolute; top: -6px; }
.tj-hamburger span::after { position: absolute; top: 6px; }
@media (min-width: 1024px) { .tj-hamburger { display: none; } }

/* Primary nav: mobile = off-canvas drawer, desktop = horizontal mega menu */
.tj-primary-nav {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(88vw, 360px);
	background: var(--tj-surface);
	transform: translateX(100%);
	transition: transform 220ms ease;
	z-index: 900;
	overflow-y: auto;
	box-shadow: var(--tj-shadow-lg);
}
.tj-primary-nav.is-open { transform: translateX(0); }
.tj-nav-drawer-head {
	display: flex; justify-content: space-between; align-items: center;
	padding: var(--tj-space-4);
	border-bottom: 1px solid var(--tj-border);
}
.tj-nav-drawer-close {
	width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--tj-border);
	background: none; cursor: pointer; font-size: 18px;
}
.tj-nav-backdrop {
	position: fixed; inset: 0; background: rgba(9, 20, 16, 0.5);
	opacity: 0; pointer-events: none; transition: opacity 220ms ease; z-index: 890;
}
.tj-nav-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* ปุ่มควบคุมการเข้าถึง + สมัครสมาชิก/เข้าสู่ระบบ ในเมนูมือถือ (Off-canvas) */
.tj-nav-drawer-a11y {
	display: flex; flex-wrap: wrap; align-items: center; gap: var(--tj-space-3);
	padding: var(--tj-space-3) var(--tj-space-4);
	border-bottom: 1px solid var(--tj-border);
	background: var(--tj-primary-900);
}
.tj-nav-drawer-a11y .tj-a11y-label { color: rgba(255,255,255,0.85); }
.tj-nav-drawer-a11y .tj-a11y-font-btn { color: #fff; }
.tj-nav-drawer-a11y .tj-a11y-font-btn[aria-pressed="true"] { color: var(--tj-gold-500); }
.tj-nav-drawer-utility {
	display: flex; gap: var(--tj-space-4);
	padding: var(--tj-space-3) var(--tj-space-4);
	border-bottom: 1px solid var(--tj-border);
}
.tj-nav-drawer-utility a { font-weight: 600; font-size: var(--tj-fs-sm); color: var(--tj-primary-700); }

.tj-menu { list-style: none; margin: 0; padding: var(--tj-space-2) var(--tj-space-3); display: flex; flex-direction: column; gap: 6px; }
.tj-menu .menu-item { border-bottom: none; }
.tj-menu a {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 12px var(--tj-space-4);
	color: var(--tj-ink); font-weight: 600; font-size: var(--tj-fs-sm);
	border: 1.5px solid var(--tj-border-strong); border-radius: var(--tj-radius);
	background: var(--tj-surface);
	transition: background var(--tj-transition), border-color var(--tj-transition), color var(--tj-transition);
}
.tj-menu a:hover { color: var(--tj-primary-700); text-decoration: none; background: var(--tj-primary-50); border-color: var(--tj-primary-500); }
.tj-menu li.tj-current > .tj-menu-item-row > a { background: var(--tj-primary-700); border-color: var(--tj-primary-700); color: #fff; }
.tj-menu .sub-menu { list-style: none; margin: 6px 0 4px; padding: 0; display: none; background: transparent; }
.tj-menu .sub-menu .menu-item { margin: 4px 0; }
.tj-menu .sub-menu .sub-menu { padding-left: var(--tj-space-4); }
.tj-menu .sub-menu a { font-weight: 500; padding: 10px var(--tj-space-4); background: var(--tj-primary-50); border-color: transparent; }
.tj-menu .sub-menu .sub-menu a { background: var(--tj-bg); }
.tj-menu li.tj-submenu-open > .sub-menu { display: block; }
.tj-submenu-toggle {
	flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
	border: 1px solid var(--tj-border); background: var(--tj-surface);
	display: inline-flex; align-items: center; justify-content: center;
	cursor: pointer; transition: transform var(--tj-transition);
}
.tj-submenu-toggle svg { width: 14px; height: 14px; }
li.tj-submenu-open > .tj-menu-item-row > .tj-submenu-toggle { transform: rotate(180deg); }
.tj-menu-item-row { display: flex; align-items: center; }
.tj-menu-item-row > a { flex: 1; }

@media (min-width: 1024px) {
	/* เมนู Off-canvas (มือถือ) ไม่ใช้งานบนเดสก์ท็อปอีกต่อไป — เดสก์ท็อปใช้ .tj-header-v2-nav แทน (ดูหมวด 4B) */
	.tj-primary-nav { display: none; }
	.tj-nav-backdrop { display: none; }
}

/* -------------------------------------------------------------------------
   4A) UTILITY BAR — แถบวันที่/เวลาสด + ข้อมูลติดต่อด่วน (เหนือ Header หลัก)
   ------------------------------------------------------------------------- */
.tj-utility-bar {
	background: var(--tj-primary-900);
	color: rgba(255,255,255,0.88);
	font-size: var(--tj-fs-xs);
	display: none;
}
@media (min-width: 768px) {
	.tj-utility-bar { display: block; }
}
.tj-utility-bar-inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: var(--tj-space-4);
	min-height: 34px;
	padding-top: 5px; padding-bottom: 5px;
}
.tj-utility-bar-clock {
	display: flex; align-items: center; gap: 6px;
	min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tj-utility-bar-clock .dashicons { font-size: 15px; width: 15px; height: 15px; flex-shrink: 0; color: rgba(255,255,255,0.7); }
.tj-utility-bar-contact {
	display: flex; align-items: center; flex-wrap: wrap;
	gap: 4px var(--tj-space-4);
	flex-shrink: 0;
}
.tj-utility-bar-contact a {
	display: inline-flex; align-items: center; gap: 5px;
	color: rgba(255,255,255,0.88);
	white-space: nowrap;
}
.tj-utility-bar-contact a:hover { color: #fff; text-decoration: underline; }
.tj-utility-bar-contact .dashicons { font-size: 15px; width: 15px; height: 15px; color: rgba(255,255,255,0.7); }
.tj-utility-bar-social { display: flex; align-items: center; gap: 10px; }
.tj-utility-bar-social a { display: inline-flex; color: rgba(255,255,255,0.88); }
.tj-utility-bar-social a:hover { color: #fff; }
.tj-utility-bar-social .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* -------------------------------------------------------------------------
   4B) HEADER V2 — พื้นหลังม่วงเต็มความสูง 2 แถว (ออกแบบใหม่ตามภาพอ้างอิง)
   ------------------------------------------------------------------------- */
.tj-header-v2 {
	background: var(--tj-primary-700);
	color: #fff;
	position: sticky; top: 0; z-index: 500;
	box-shadow: var(--tj-shadow);
}
.tj-header-v2-inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: var(--tj-space-4);
	min-height: 72px;
}
.tj-header-v2-brand {
	display: flex; align-items: center; gap: 12px; color: #fff; min-width: 0;
}
.tj-header-v2-brand:hover { text-decoration: none; color: #fff; }
.tj-header-v2-logo { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: #fff; object-fit: contain; padding: 3px; }
.tj-header-v2-logo-fallback {
	width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
	background: #fff; color: var(--tj-primary-700);
	display: flex; align-items: center; justify-content: center;
	font-weight: 800; font-size: 16px;
}
.tj-header-v2-brand-text { min-width: 0; }
.tj-header-v2-brand-title {
	display: block; font-weight: 800; font-size: 1rem; line-height: 1.3;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tj-header-v2-brand-sub {
	display: none; font-size: var(--tj-fs-xs); color: rgba(255,255,255,0.8);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (min-width: 480px) { .tj-header-v2-brand-sub { display: block; } }

.tj-header-v2-right { display: none; }
.tj-header-v2-vdiv { display: none; }

/* แถวบน: ขนาดอักษร / โหมดสี / ภาษา / สมัครสมาชิก / เข้าสู่ระบบ */
.tj-a11y-fontsize, .tj-a11y-contrast {
	display: flex; align-items: center; gap: 6px;
}
.tj-a11y-label { font-size: var(--tj-fs-xs); color: rgba(255,255,255,0.85); margin-right: 2px; }
.tj-a11y-font-btn {
	background: transparent; border: none; color: #fff; cursor: pointer; line-height: 1;
	padding: 2px 3px; font-family: var(--tj-font);
}
.tj-a11y-font-btn--sm { font-size: 12px; }
.tj-a11y-font-btn--md { font-size: 16px; }
.tj-a11y-font-btn--lg { font-size: 20px; }
.tj-a11y-font-btn[aria-pressed="true"] { color: var(--tj-gold-500); text-decoration: underline; }
.tj-contrast-swatch {
	width: 22px; height: 22px; border-radius: 4px; cursor: pointer; font-size: 11px; font-weight: 700; line-height: 1;
	display: inline-flex; align-items: center; justify-content: center;
}
.tj-contrast-swatch--normal { background: #fff; color: #111; border: 1px solid #ccc; }
.tj-contrast-swatch--dark { background: #111; color: #fff; border: 1px solid #111; }
.tj-contrast-swatch--yellow { background: #111; color: #ffe600; border: 1px solid #111; }
.tj-contrast-swatch[aria-pressed="true"] { outline: 2px solid var(--tj-gold-500); outline-offset: 1px; }

.tj-lang-switch { position: relative; }
.tj-lang-switch-btn {
	display: inline-flex; align-items: center; gap: 4px;
	background: transparent; border: none; color: #fff; cursor: pointer;
	font-size: var(--tj-fs-xs); font-weight: 700; padding: 2px;
}
.tj-lang-switch-btn svg { width: 12px; height: 12px; }
.tj-lang-switch-menu {
	list-style: none; margin: 6px 0 0; padding: 6px;
	position: absolute; top: 100%; right: 0; min-width: 120px;
	background: #fff; border-radius: var(--tj-radius-sm); box-shadow: var(--tj-shadow-lg);
	visibility: hidden; opacity: 0; pointer-events: none;
	transition: opacity var(--tj-transition), visibility var(--tj-transition);
	z-index: 600;
}
.tj-lang-switch.is-open .tj-lang-switch-menu,
.tj-lang-switch-menu:hover { visibility: visible; opacity: 1; pointer-events: auto; }
.tj-lang-switch-menu a { display: block; padding: 6px 8px; border-radius: var(--tj-radius-sm); color: var(--tj-ink); font-size: var(--tj-fs-xs); }
.tj-lang-switch-menu a:hover { background: var(--tj-primary-50); }

.tj-header-v2-link { color: #fff; font-size: var(--tj-fs-xs); font-weight: 600; }
.tj-header-v2-link:hover { color: #fff; text-decoration: underline; }
.tj-header-v2-login {
	display: inline-flex; align-items: center; gap: 6px;
	color: #fff; font-size: var(--tj-fs-xs); font-weight: 600;
}
.tj-header-v2-login:hover { color: #fff; text-decoration: underline; }
.tj-header-v2-login-icon {
	width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
	background: #F8D6EA; color: var(--tj-primary-700);
	display: inline-flex; align-items: center; justify-content: center;
}
.tj-header-v2-login-icon .dashicons { font-size: 14px; width: 14px; height: 14px; }

/* แถวล่าง: เมนูหลัก + ค้นหา */
.tj-header-v2-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex-wrap: wrap; }
.tj-header-v2-menu > li { position: relative; }
.tj-header-v2-menu > li:not(:first-child) { border-left: 1px solid rgba(255,255,255,0.35); }
.tj-header-v2-menu .tj-menu-item-row { display: flex; align-items: center; }
.tj-header-v2-menu > li > .tj-menu-item-row > a {
	display: flex; align-items: center; gap: 6px;
	padding: 10px 16px; color: #fff; font-weight: 600; font-size: var(--tj-fs-sm);
}
.tj-header-v2-menu > li > .tj-menu-item-row > a:hover,
.tj-header-v2-menu > li.tj-submenu-open > .tj-menu-item-row > a {
	text-decoration: underline; text-underline-offset: 4px;
}
.tj-header-v2-menu > li.tj-current > .tj-menu-item-row > a { color: var(--tj-gold-500); }
.tj-header-v2-menu .tj-submenu-toggle { display: none; }
.tj-header-v2-menu .sub-menu {
	list-style: none; margin: 0; padding: 8px;
	position: absolute; top: 100%; left: 0; margin-top: 10px; min-width: 240px;
	background: var(--tj-surface); border-radius: var(--tj-radius); box-shadow: var(--tj-shadow-lg);
	/* ใช้ visibility เพียงอย่างเดียวในการควบคุมทั้งการมองเห็นและการโต้ตอบ (คลิก/ชี้เมาส์) ของเมนู
	   ไม่ใช้ pointer-events ร่วมด้วย เพราะเบราว์เซอร์ไม่รองรับการหน่วงเวลา (transition-delay) ของ
	   pointer-events อย่างถูกต้อง (จะเปลี่ยนค่าทันทีโดยไม่รอ) ขณะที่ visibility รองรับการหน่วงเวลา
	   ตามมาตรฐาน CSS อยู่แล้ว (เปลี่ยนเป็นมองเห็นทันทีตอนเปิด แต่รอจนครบเวลาหน่วงตอนปิด) และเมื่อ
	   visibility เป็น hidden องค์ประกอบนั้นจะไม่สามารถคลิกหรือชี้เมาส์ได้อยู่แล้วโดยธรรมชาติ */
	visibility: hidden; opacity: 0;
	transition: opacity var(--tj-transition), visibility var(--tj-transition);
	transition-delay: var(--tj-dropdown-close-delay);
	z-index: 600;
}
.tj-header-v2-menu li:hover > .sub-menu,
.tj-header-v2-menu li.tj-submenu-open > .sub-menu,
.tj-header-v2-menu .sub-menu:hover {
	/* เดิมใช้ตัวเลือก "> li" (เจาะจงเฉพาะ li ระดับบนสุด) ทำให้เมนูย่อยชั้นที่ 3 (เมนูซ้อนในเมนูย่อย
	   เช่น "บุคลากร" และ "ข่าวประชาสัมพันธ์") ไม่แสดงเมื่อชี้เมาส์ค้าง เปลี่ยนเป็น "li" เฉยๆ เพื่อให้ใช้ได้
	   ทุกระดับความลึก (สถานะ :hover จะไล่ขึ้นไปยัง li แม่ทุกชั้นตามธรรมชาติของ CSS อยู่แล้ว) */
	visibility: visible; opacity: 1;
	transition-delay: 0s;
}
.tj-header-v2-menu .sub-menu .menu-item + .menu-item { margin-top: 2px; }
.tj-header-v2-menu .sub-menu a { display: block; padding: 8px 10px; border-radius: var(--tj-radius-sm); color: var(--tj-ink); font-weight: 500; font-size: var(--tj-fs-sm); }
.tj-header-v2-menu .sub-menu a:hover { background: var(--tj-primary-50); }
.tj-header-v2-menu .sub-menu .sub-menu { top: 0; left: 100%; margin: 0 0 0 4px; }
.tj-header-v2-menu .sub-menu li.menu-item-has-children > a::after {
	content: ''; display: inline-block; width: 6px; height: 6px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(-45deg); margin-left: auto; margin-right: 2px; opacity: 0.6;
}
.tj-header-v2-menu .sub-menu li.menu-item-has-children > a { display: flex; align-items: center; gap: 8px; }

.tj-header-v2-search {
	width: 34px; height: 34px; flex-shrink: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%; border: none; background: transparent; color: #fff; cursor: pointer;
}
.tj-header-v2-search:hover { background: rgba(255,255,255,0.16); }

.tj-header-v2-mobile-actions { display: flex; align-items: center; gap: 8px; }

@media (min-width: 1024px) {
	.tj-header-v2-inner { height: 150px; align-items: stretch; }
	.tj-header-v2-brand { gap: 14px; }
	.tj-header-v2-logo, .tj-header-v2-logo-fallback { width: 60px; height: 60px; font-size: 20px; }
	.tj-header-v2-brand-title { font-size: 1.2rem; }
	.tj-header-v2-brand-sub { display: block; font-size: var(--tj-fs-sm); }

	.tj-header-v2-mobile-actions { display: none; }

	.tj-header-v2-right {
		display: flex; flex-direction: column; flex: 1; min-width: 0;
		height: 100%; margin-left: var(--tj-space-6);
	}
	.tj-header-v2-vdiv { display: block; width: 1px; align-self: stretch; background: rgba(255,255,255,0.35); }
	.tj-header-v2-row { display: flex; align-items: center; }
	.tj-header-v2-row--top { flex: 0 0 auto; justify-content: flex-end; gap: 16px; padding: 12px 0; }
	.tj-header-v2-hr { height: 1px; background: rgba(255,255,255,0.35); }
	.tj-header-v2-row--nav { flex: 1; justify-content: space-between; gap: var(--tj-space-4); }
}
.tj-search-overlay {
	position: fixed; inset: 0; background: rgba(9,20,16,0.55);
	display: none; align-items: flex-start; justify-content: center; padding: 10vh 16px; z-index: 1000;
}
.tj-search-overlay.is-open { display: flex; }
.tj-search-panel { background: #fff; border-radius: var(--tj-radius); width: min(640px, 100%); padding: var(--tj-space-5); box-shadow: var(--tj-shadow-lg); }
.tj-search-panel form { display: flex; gap: 8px; }
.tj-search-panel input[type="search"] {
	flex: 1; padding: 12px 14px; border: 2px solid var(--tj-border); border-radius: var(--tj-radius-sm); font-size: var(--tj-fs-md);
}
.tj-search-close { background: none; border: none; float: right; font-size: 20px; cursor: pointer; margin-bottom: 8px; }
.tj-search-suggestions { margin-top: 14px; list-style: none; padding: 0; }
.tj-search-suggestions li a { display: flex; justify-content: space-between; padding: 10px 6px; border-bottom: 1px solid var(--tj-border); }
.tj-search-suggestions .tj-suggest-type { color: var(--tj-muted); font-size: var(--tj-fs-xs); }

.tj-searchform { display: flex; gap: 8px; }
.tj-searchform input[type="search"] {
	flex: 1; padding: 10px 14px; border: 1.5px solid var(--tj-border); border-radius: var(--tj-radius-sm);
}
.tj-searchform button {
	background: var(--tj-primary-700); color: #fff; border: none; border-radius: var(--tj-radius-sm); padding: 0 18px; cursor: pointer;
}

/* -------------------------------------------------------------------------
   4C) NEWS TICKER — แถบข่าวล่าสุดเลื่อนอัตโนมัติ ใต้เมนูหลัก
   ------------------------------------------------------------------------- */
.tj-news-ticker {
	background: var(--tj-surface);
	border-bottom: 1px solid var(--tj-border);
}
.tj-news-ticker-inner {
	display: flex; align-items: center; gap: var(--tj-space-3);
	min-height: 44px;
	padding-top: 6px; padding-bottom: 6px;
}
.tj-news-ticker-label {
	display: flex; align-items: center; gap: 6px; flex-shrink: 0;
	font-weight: 700; font-size: var(--tj-fs-sm); color: var(--tj-primary-700);
	padding-right: var(--tj-space-3);
	border-right: 1px solid var(--tj-border);
}
.tj-news-ticker-label .dashicons { color: var(--tj-gold-600); font-size: 18px; width: 18px; height: 18px; }
.tj-news-ticker-viewport {
	flex: 1; min-width: 0; overflow: hidden;
}
.tj-news-ticker-track {
	display: flex; align-items: center; width: max-content;
	list-style: none; margin: 0; padding: 0;
	animation: tj-news-ticker-scroll 32s linear infinite;
}
.tj-news-ticker:hover .tj-news-ticker-track,
.tj-news-ticker:focus-within .tj-news-ticker-track {
	animation-play-state: paused;
}
.tj-news-ticker-track li {
	flex-shrink: 0;
	padding: 0 var(--tj-space-4);
	border-right: 1px solid var(--tj-border);
	font-size: var(--tj-fs-sm);
	white-space: nowrap;
}
.tj-news-ticker-track li:first-child { padding-left: 0; }
.tj-news-ticker-track a { color: var(--tj-body); }
.tj-news-ticker-track a:hover { color: var(--tj-primary-700); text-decoration: underline; }
.tj-news-ticker-more {
	flex-shrink: 0; font-size: var(--tj-fs-xs); font-weight: 700; color: var(--tj-primary-700);
	white-space: nowrap; display: none;
}
@media (min-width: 640px) { .tj-news-ticker-more { display: inline-block; } }
@keyframes tj-news-ticker-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.tj-news-ticker-track { animation: none; }
	.tj-news-ticker-viewport { overflow-x: auto; }
	.tj-news-ticker-track li[aria-hidden="true"] { display: none; }
}

/* -------------------------------------------------------------------------
   6) HERO / BANNER SLIDER
   ------------------------------------------------------------------------- */
.tj-hero { position: relative; overflow: hidden; background: var(--tj-primary-900); }
.tj-hero-slides { position: relative; height: 340px; }
@media (min-width: 768px)  { .tj-hero-slides { height: 420px; } }
@media (min-width: 1024px) { .tj-hero-slides { height: 480px; } }

.tj-hero-slide {
	position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 500ms ease;
	display: flex; align-items: center;
	background: linear-gradient(120deg, var(--tj-primary-900) 0%, var(--tj-primary-700) 55%, var(--tj-primary-500) 100%);
}
.tj-hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.tj-hero-slide::before {
	content: ""; position: absolute; inset: 0;
	background-image: radial-gradient(circle at 85% 20%, rgba(200,154,62,0.35), transparent 45%),
		radial-gradient(circle at 10% 90%, rgba(255,255,255,0.08), transparent 40%);
}
.tj-hero-slide-media { position: absolute; inset: 0; }
.tj-hero-slide-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.tj-hero-slide-content { position: relative; z-index: 2; color: #fff; max-width: 640px; padding: var(--tj-space-4); }
.tj-hero-slide-content .tj-eyebrow { color: var(--tj-gold-500); font-weight: 700; letter-spacing: 0.06em; display: block; margin-bottom: 8px; font-size: var(--tj-fs-sm); }
.tj-hero-slide-content h2 { color: #fff; font-size: calc(var(--tj-fs-xl) * var(--tj-font-scale)); margin-bottom: 10px; }
@media (min-width: 768px) { .tj-hero-slide-content h2 { font-size: calc(var(--tj-fs-3xl) * var(--tj-font-scale)); } }
.tj-hero-slide-content p { color: rgba(255,255,255,0.88); margin-bottom: var(--tj-space-4); font-size: var(--tj-fs-md); }

.tj-hero-nav {
	position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
	width: 40px; height: 40px; border-radius: 50%; border: none;
	background: rgba(255,255,255,0.18); color: #fff; cursor: pointer; display: none; align-items: center; justify-content: center;
}
.tj-hero-nav:hover { background: rgba(255,255,255,0.32); }
.tj-hero-nav--prev { left: 16px; }
.tj-hero-nav--next { right: 16px; }
@media (min-width: 640px) { .tj-hero-nav { display: inline-flex; } }

.tj-hero-dots { position: absolute; z-index: 3; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.tj-hero-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,0.45); cursor: pointer; padding: 0; }
.tj-hero-dots button.is-active { background: var(--tj-gold-500); width: 22px; border-radius: 5px; }

/* -------------------------------------------------------------------------
   7) QUICK SERVICE
   ------------------------------------------------------------------------- */
.tj-quick-service {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tj-space-3);
	margin-top: var(--tj-space-5); position: relative; z-index: 5;
	background: var(--tj-surface); border-radius: var(--tj-radius-lg); padding: var(--tj-space-4);
	box-shadow: var(--tj-shadow-lg);
}
@media (min-width: 640px)  { .tj-quick-service { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .tj-quick-service { grid-template-columns: repeat(6, 1fr); } }
/* ลอยทับขอบล่างของ Hero Banner เฉพาะตอนที่มีการตั้งค่าภาพ Hero จริง (ป้องกันการทับซ้อนกับแถบข่าว/เมนูเมื่อยังไม่มี Hero) */
.tj-hero + .tj-container .tj-quick-service { margin-top: -40px; }
@media (min-width: 1024px) { .tj-hero + .tj-container .tj-quick-service { margin-top: -44px; } }
.tj-quick-service-item {
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
	padding: var(--tj-space-3) var(--tj-space-2); border-radius: var(--tj-radius); color: var(--tj-ink);
}
.tj-quick-service-item:hover { background: var(--tj-primary-50); text-decoration: none; }
.tj-quick-service-icon {
	width: 52px; height: 52px; border-radius: 50%; background: var(--tj-primary-100); color: var(--tj-primary-700);
	display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.tj-quick-service-label { font-size: var(--tj-fs-xs); font-weight: 600; line-height: 1.3; }

/* -------------------------------------------------------------------------
   8) CARDS (News / Activity / Generic)
   ------------------------------------------------------------------------- */
.tj-card-grid { display: grid; grid-template-columns: 1fr; gap: var(--tj-space-4); }
@media (min-width: 640px)  { .tj-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tj-card-grid { grid-template-columns: repeat(3, 1fr); } }
.tj-card-grid--4 { }
@media (min-width: 1024px) { .tj-card-grid--4 { grid-template-columns: repeat(4, 1fr); } }

.tj-card {
	background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius);
	overflow: hidden; display: flex; flex-direction: column; transition: box-shadow var(--tj-transition), transform var(--tj-transition);
	height: 100%;
}
.tj-card:hover { box-shadow: var(--tj-shadow); transform: translateY(-2px); }
.tj-card-media { aspect-ratio: 16 / 10; overflow: hidden; position: relative; background: var(--tj-primary-100); }
.tj-card-media img { width: 100%; height: 100%; object-fit: cover; }
.tj-card-media-fallback {
	width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
	background: linear-gradient(150deg, var(--tj-primary-100), var(--tj-gold-100));
	color: var(--tj-primary-700); font-size: 28px; font-weight: 700;
}
.tj-card-badge {
	position: absolute; top: 10px; left: 10px; background: var(--tj-primary-900); color: #fff;
	font-size: var(--tj-fs-xs); font-weight: 700; padding: 4px 10px; border-radius: var(--tj-radius-pill);
}
.tj-card-badge--urgent { background: var(--tj-danger); }
.tj-card-body { padding: var(--tj-space-4); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tj-card-meta { font-size: var(--tj-fs-xs); color: var(--tj-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.tj-card-title { font-size: var(--tj-fs-md); margin: 0; line-height: 1.4; }
.tj-card-title a { color: var(--tj-ink); }
.tj-card-title a:hover { color: var(--tj-primary-700); text-decoration: none; }
.tj-card-desc { color: var(--tj-muted); font-size: var(--tj-fs-sm); margin: 0; flex: 1; }
.tj-card-link { font-weight: 600; font-size: var(--tj-fs-sm); margin-top: 4px; }

.tj-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--tj-space-4); }
.tj-tabs button {
	padding: 8px 16px; border-radius: var(--tj-radius-pill); border: 1.5px solid var(--tj-border); background: var(--tj-surface);
	cursor: pointer; font-weight: 600; font-size: var(--tj-fs-sm); color: var(--tj-body);
}
.tj-tabs button.is-active, .tj-tabs button[aria-selected="true"] { background: var(--tj-primary-700); border-color: var(--tj-primary-700); color: #fff; }

/* -------------------------------------------------------------------------
   8A) NEWS CAROUSEL — ข่าวประชาสัมพันธ์แบบวนอัตโนมัติ เน้นการ์ดตรงกลาง
   ------------------------------------------------------------------------- */
.tj-news-carousel { position: relative; margin-top: var(--tj-space-5); }
.tj-news-carousel-viewport { overflow: hidden; padding: var(--tj-space-2) 0 var(--tj-space-3); }
.tj-news-carousel-track {
	display: flex; align-items: stretch;
	will-change: transform;
	transition: transform 550ms cubic-bezier(0.22, 1, 0.36, 1);
}
.tj-news-carousel-slide {
	flex: 0 0 auto;
	width: min(78vw, 300px);
	margin: 0 var(--tj-space-2);
	opacity: 0.4;
	transform: scale(0.84);
	transition: opacity 550ms ease, transform 550ms ease;
}
.tj-news-carousel-slide .tj-card { height: 100%; }
.tj-news-carousel-slide.is-active { opacity: 1; transform: scale(1); }
.tj-news-carousel-slide.is-adjacent { opacity: 0.7; transform: scale(0.92); }
@media (min-width: 640px)  { .tj-news-carousel-slide { width: 320px; margin: 0 var(--tj-space-3); } }
@media (min-width: 1024px) { .tj-news-carousel-slide { width: 360px; } }

.tj-news-carousel-nav {
	position: absolute; z-index: 3; top: 42%; transform: translateY(-50%);
	width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--tj-border-strong);
	background: var(--tj-surface); color: var(--tj-primary-700); box-shadow: var(--tj-shadow);
	cursor: pointer; display: none; align-items: center; justify-content: center;
}
.tj-news-carousel-nav:hover { background: var(--tj-primary-100); }
.tj-news-carousel-nav--prev { left: -4px; }
.tj-news-carousel-nav--next { right: -4px; }
@media (min-width: 640px)  { .tj-news-carousel-nav { display: inline-flex; } }
@media (min-width: 1024px) { .tj-news-carousel-nav--prev { left: -20px; } .tj-news-carousel-nav--next { right: -20px; } }

.tj-news-carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: var(--tj-space-2); }
.tj-news-carousel-dots button {
	width: 9px; height: 9px; border-radius: 50%; border: none; background: var(--tj-border-strong);
	cursor: pointer; padding: 0;
}
.tj-news-carousel-dots button.is-active { background: var(--tj-gold-500); width: 22px; border-radius: 5px; }

@media (prefers-reduced-motion: reduce) {
	.tj-news-carousel-track { transition: none; }
	.tj-news-carousel-slide { transition: none; }
}

/* -------------------------------------------------------------------------
   8B) ACTIVITY GALLERY — กิจกรรม ทต.ตาจง (หัวข้อกึ่งกลาง + แท็บหมวดหมู่ + การ์ดเลื่อน 3 คอลัมน์)
   ------------------------------------------------------------------------- */
.tj-activity-gallery-head { text-align: center; margin-bottom: var(--tj-space-5); }
.tj-activity-gallery-head h2 { margin: 0 0 6px; font-size: var(--tj-fs-2xl); }
@media (min-width: 768px) { .tj-activity-gallery-head h2 { font-size: var(--tj-fs-3xl); } }
.tj-activity-gallery-subtitle { margin: 0; color: var(--tj-muted); font-size: var(--tj-fs-md); }

.tj-activity-tabs {
	display: flex; justify-content: center; align-items: center; flex-wrap: wrap;
	gap: var(--tj-space-2) var(--tj-space-6); margin-bottom: var(--tj-space-5);
	border-bottom: 1px solid var(--tj-border);
}
.tj-activity-tab {
	background: none; border: none; cursor: pointer;
	padding: var(--tj-space-2) 2px var(--tj-space-3);
	font-family: inherit; font-weight: 600; font-size: var(--tj-fs-sm); color: var(--tj-muted);
	border-bottom: 3px solid transparent; margin-bottom: -1px;
	transition: color var(--tj-transition), border-color var(--tj-transition);
}
.tj-activity-tab:hover { color: var(--tj-primary-700); }
.tj-activity-tab.is-active { color: var(--tj-primary-700); border-bottom-color: var(--tj-gold-500); }

.tj-activity-panel { display: none; }
.tj-activity-panel.is-active { display: block; }

.tj-activity-carousel { position: relative; }
.tj-activity-carousel-viewport {
	overflow-x: auto; overflow-y: hidden;
	scroll-snap-type: x mandatory; scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; -ms-overflow-style: none;
}
.tj-activity-carousel-viewport::-webkit-scrollbar { display: none; height: 0; }
.tj-activity-carousel-track { display: flex; gap: var(--tj-space-4); }
.tj-activity-card {
	scroll-snap-align: start;
	flex: 0 0 100%;
	background: var(--tj-surface);
	border: 1px solid var(--tj-border);
	border-radius: var(--tj-radius-lg);
	overflow: hidden;
	box-shadow: var(--tj-shadow-sm);
	transition: box-shadow var(--tj-transition), transform var(--tj-transition);
}
.tj-activity-card:hover { box-shadow: var(--tj-shadow); transform: translateY(-2px); }
@media (min-width: 640px)  { .tj-activity-card { flex-basis: calc( ( 100% - var(--tj-space-4) ) / 2 ); } }
@media (min-width: 1024px) { .tj-activity-card { flex-basis: calc( ( 100% - 2 * var(--tj-space-4) ) / 3 ); } }

.tj-activity-card-media {
	display: block; position: relative; width: 100%;
	aspect-ratio: 4 / 3; overflow: hidden; background: var(--tj-primary-100);
	margin: 0; padding: 0; border: none; font: inherit;
}
button.tj-activity-card-media { cursor: pointer; }
.tj-activity-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 400ms ease; }
.tj-activity-card:hover .tj-activity-card-media img { transform: scale(1.05); }
.tj-activity-card-zoom {
	position: absolute; right: var(--tj-space-2); bottom: var(--tj-space-2);
	width: 34px; height: 34px; border-radius: 50%;
	background: rgba(20, 10, 24, 0.55); color: #fff;
	display: flex; align-items: center; justify-content: center;
	opacity: 0; transform: scale(0.85);
	transition: opacity var(--tj-transition), transform var(--tj-transition);
}
.tj-activity-card-zoom .dashicons { font-size: 18px; width: 18px; height: 18px; }
.tj-activity-card:hover .tj-activity-card-zoom,
button.tj-activity-card-media:focus-visible .tj-activity-card-zoom { opacity: 1; transform: scale(1); }
.tj-activity-card-body { padding: var(--tj-space-4); }
.tj-activity-card-meta {
	display: flex; align-items: center; justify-content: space-between;
	font-size: var(--tj-fs-xs); margin-bottom: 8px; gap: var(--tj-space-2);
}
.tj-activity-card-date { color: var(--tj-gold-700); font-weight: 600; }
.tj-activity-card-views { color: var(--tj-muted); display: inline-flex; align-items: center; gap: 4px; }
.tj-activity-card-views .dashicons { font-size: 16px; width: 16px; height: 16px; }
.tj-activity-card-title {
	margin: 0; font-size: var(--tj-fs-md); line-height: 1.5; font-weight: 600;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tj-activity-card-title a { color: var(--tj-ink); }
.tj-activity-card-title a:hover { color: var(--tj-primary-700); text-decoration: none; }

.tj-activity-carousel-nav {
	position: absolute; z-index: 3; top: 38%; transform: translateY(-50%);
	width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--tj-border-strong);
	background: var(--tj-surface); color: var(--tj-primary-700); box-shadow: var(--tj-shadow);
	cursor: pointer; display: none; align-items: center; justify-content: center;
}
.tj-activity-carousel-nav:hover { background: var(--tj-primary-100); }
.tj-activity-carousel-nav--prev { left: -4px; }
.tj-activity-carousel-nav--next { right: -4px; }
@media (min-width: 640px)  { .tj-activity-carousel-nav { display: inline-flex; } }
@media (min-width: 1024px) { .tj-activity-carousel-nav--prev { left: -20px; } .tj-activity-carousel-nav--next { right: -20px; } }

.tj-activity-gallery-footer { display: flex; justify-content: center; margin-top: var(--tj-space-5); }

@media (prefers-reduced-motion: reduce) {
	.tj-activity-carousel-viewport { scroll-behavior: auto; }
	.tj-activity-card { transition: none; }
	.tj-activity-card-media img { transition: none; }
}

/* -------------------------------------------------------------------------
   8C) ACTIVITY GALLERY LIGHTBOX — popup แสดงภาพกิจกรรมขนาดเต็ม
   ------------------------------------------------------------------------- */
.tj-lightbox {
	position: fixed; inset: 0; z-index: 2000;
	display: flex; align-items: center; justify-content: center;
	padding: var(--tj-space-5);
	visibility: hidden; opacity: 0;
	transition: opacity var(--tj-transition), visibility var(--tj-transition);
}
.tj-lightbox.is-open { visibility: visible; opacity: 1; }
.tj-lightbox-backdrop {
	position: absolute; inset: 0; background: rgba(15, 10, 17, 0.88);
}
.tj-lightbox-dialog {
	position: relative; z-index: 1;
	display: flex; flex-direction: column; align-items: center;
	max-width: min(92vw, 1000px); max-height: 90vh;
	transform: scale(0.96); transition: transform var(--tj-transition);
}
.tj-lightbox.is-open .tj-lightbox-dialog { transform: scale(1); }
.tj-lightbox-media {
	background: var(--tj-surface); border-radius: var(--tj-radius-lg);
	padding: var(--tj-space-2); box-shadow: var(--tj-shadow-lg);
	max-width: 100%; max-height: calc(90vh - 60px);
	display: flex; align-items: center; justify-content: center;
	overflow: hidden;
}
.tj-lightbox-img {
	display: block; max-width: 100%; max-height: calc(90vh - 76px);
	width: auto; height: auto; border-radius: var(--tj-radius-sm);
}
.tj-lightbox-caption {
	margin: var(--tj-space-3) 0 0; color: #fff; font-size: var(--tj-fs-sm);
	text-align: center; max-width: 100%;
}

.tj-lightbox-close,
.tj-lightbox-nav {
	position: absolute; z-index: 3;
	width: 44px; height: 44px; border-radius: 50%; border: none;
	background: rgba(20, 10, 24, 0.55); color: #fff;
	cursor: pointer; display: flex; align-items: center; justify-content: center;
	transition: background var(--tj-transition);
}
.tj-lightbox-close:hover,
.tj-lightbox-nav:hover { background: rgba(20, 10, 24, 0.8); }
.tj-lightbox-close { top: -4px; right: -4px; }
@media (min-width: 640px) { .tj-lightbox-close { top: -16px; right: -52px; } }
.tj-lightbox-nav { top: 50%; transform: translateY(-50%); }
.tj-lightbox-nav--prev { left: var(--tj-space-2); }
.tj-lightbox-nav--next { right: var(--tj-space-2); }
@media (min-width: 900px) {
	.tj-lightbox-nav--prev { left: -64px; }
	.tj-lightbox-nav--next { right: -64px; }
}
.tj-lightbox-nav[hidden] { display: none; }

html.tj-lightbox-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.tj-lightbox, .tj-lightbox-dialog { transition: none; }
}

/* -------------------------------------------------------------------------
   8D) ปุ่มรูปภาพแกลเลอรี (ใช้ในหน้ารายละเอียดกิจกรรม single.php)
   เปิด Lightbox กลางแบบเดียวกับข้อ 8C
   ------------------------------------------------------------------------- */
.tj-gallery-photo {
	display: block; position: relative; width: 100%;
	aspect-ratio: 4 / 3; overflow: hidden; background: var(--tj-primary-100);
	margin: 0; padding: 0; border: none; font: inherit; cursor: pointer;
	border-radius: var(--tj-radius); box-shadow: var(--tj-shadow-sm);
	transition: box-shadow var(--tj-transition), transform var(--tj-transition);
}
.tj-gallery-photo:hover,
.tj-gallery-photo:focus-visible { box-shadow: var(--tj-shadow); transform: translateY(-2px); }
.tj-gallery-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 400ms ease; }
.tj-gallery-photo:hover img,
.tj-gallery-photo:focus-visible img { transform: scale(1.05); }
.tj-gallery-photo-zoom {
	position: absolute; right: var(--tj-space-2); bottom: var(--tj-space-2);
	width: 34px; height: 34px; border-radius: 50%;
	background: rgba(20, 10, 24, 0.55); color: #fff;
	display: flex; align-items: center; justify-content: center;
	opacity: 0; transform: scale(0.85);
	transition: opacity var(--tj-transition), transform var(--tj-transition);
}
.tj-gallery-photo-zoom .dashicons { font-size: 18px; width: 18px; height: 18px; }
.tj-gallery-photo:hover .tj-gallery-photo-zoom,
.tj-gallery-photo:focus-visible .tj-gallery-photo-zoom { opacity: 1; transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
	.tj-gallery-photo, .tj-gallery-photo img { transition: none; }
}

/* -------------------------------------------------------------------------
   9) PROCUREMENT / DOCUMENT TABLE
   ------------------------------------------------------------------------- */
.tj-doc-panel { background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius); padding: var(--tj-space-4); }
.tajong-document-table, .tj-table {
	width: 100%; border-collapse: collapse; font-size: var(--tj-fs-sm);
}
.tajong-document-table th, .tajong-document-table td,
.tj-table th, .tj-table td {
	padding: 12px 10px; border-bottom: 1px solid var(--tj-border); text-align: left; vertical-align: middle;
}
.tajong-document-table th, .tj-table th { color: var(--tj-muted); font-weight: 600; font-size: var(--tj-fs-xs); text-transform: uppercase; letter-spacing: 0.04em; }
.tj-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tajong-document-table .dashicons { color: var(--tj-primary-700); vertical-align: middle; margin-right: 4px; }

/* -------------------------------------------------------------------------
   10) ANNOUNCEMENT PANEL
   ------------------------------------------------------------------------- */
.tj-announcement-panel {
	background: linear-gradient(160deg, var(--tj-primary-900), var(--tj-primary-700));
	border-radius: var(--tj-radius-lg); padding: var(--tj-space-5); color: #fff;
}
.tj-announcement-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tj-announcement-list li a {
	display: flex; justify-content: space-between; gap: 12px; padding: 12px 10px; border-radius: 8px; color: #fff;
}
.tj-announcement-list li a:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.tj-announcement-list .tj-tag {
	flex-shrink: 0; font-size: var(--tj-fs-xs); background: var(--tj-gold-600); padding: 2px 10px; border-radius: var(--tj-radius-pill); height: fit-content;
}

/* -------------------------------------------------------------------------
   11) E-SERVICE GRID
   ------------------------------------------------------------------------- */
.tajong-eservice-grid {
	display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--tj-space-4);
}
@media (min-width: 640px)  { .tajong-eservice-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .tajong-eservice-grid { grid-template-columns: repeat(4, 1fr); } }
.tajong-eservice-card {
	background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius);
	padding: var(--tj-space-4); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
	color: var(--tj-ink); transition: box-shadow var(--tj-transition), transform var(--tj-transition), border-color var(--tj-transition);
}
.tajong-eservice-card:hover { box-shadow: var(--tj-shadow); transform: translateY(-2px); border-color: var(--tj-primary-500); text-decoration: none; }
.tajong-eservice-card .dashicons { font-size: 30px; width: 30px; height: 30px; color: var(--tj-primary-700); }
.tajong-eservice-title { font-weight: 700; font-size: var(--tj-fs-sm); }
.tajong-eservice-desc { font-size: var(--tj-fs-xs); color: var(--tj-muted); }
.tajong-eservice-cta { font-size: var(--tj-fs-xs); font-weight: 700; color: var(--tj-gold-700); margin-top: auto; }

/* -------------------------------------------------------------------------
   12) ITA/OIT SECTION + PARTNER BANNERS + VISITOR COUNTER
   ------------------------------------------------------------------------- */
.tj-ita-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--tj-space-3); }
@media (min-width: 768px) { .tj-ita-grid { grid-template-columns: repeat(4, 1fr); } }
.tj-ita-card {
	background: var(--tj-surface); border: 1px solid var(--tj-border); border-left: 4px solid var(--tj-gold-600);
	border-radius: var(--tj-radius-sm); padding: var(--tj-space-4); color: var(--tj-ink);
}
.tj-ita-card:hover { text-decoration: none; box-shadow: var(--tj-shadow-sm); }
.tj-ita-card strong { display: block; margin-bottom: 4px; }
.tj-ita-card span { font-size: var(--tj-fs-xs); color: var(--tj-muted); }

.tj-partner-strip { display: flex; flex-wrap: wrap; gap: var(--tj-space-4); align-items: center; justify-content: center; }
.tj-partner-strip a {
	display: flex; align-items: center; justify-content: center; width: 140px; height: 72px;
	background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius-sm);
	color: var(--tj-body); font-size: var(--tj-fs-xs); text-align: center; padding: 8px; font-weight: 600;
}
.tj-partner-strip a:hover { text-decoration: none; border-color: var(--tj-primary-500); color: var(--tj-primary-700); }
.tj-partner-strip img { max-width: 100%; max-height: 40px; }

.tajong-visitor-counter {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tj-space-3); text-align: center;
}
@media (min-width: 768px) { .tajong-visitor-counter { grid-template-columns: repeat(6, 1fr); } }
.tajong-counter-item {
	background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius-sm); padding: var(--tj-space-3);
}
.tajong-counter-number { display: block; font-size: var(--tj-fs-lg); font-weight: 700; color: var(--tj-primary-700); }
.tajong-counter-label { display: block; font-size: var(--tj-fs-xs); color: var(--tj-muted); margin-top: 2px; }

/* -------------------------------------------------------------------------
   13) FOOTER
   ------------------------------------------------------------------------- */
.tj-footer { background: var(--tj-primary-900); color: rgba(255,255,255,0.82); }
.tj-footer a { color: #fff; }
.tj-footer-top { padding: var(--tj-space-7) 0 var(--tj-space-6); }
.tj-footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--tj-space-6); }
@media (min-width: 768px) { .tj-footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.tj-footer-brand { display: flex; gap: 12px; margin-bottom: var(--tj-space-3); }
.tj-footer-brand img, .tj-footer-brand .tj-brand-logo-fallback { width: 52px; height: 52px; }
.tj-footer h3 { color: #fff; font-size: var(--tj-fs-sm); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--tj-space-3); }
.tj-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: var(--tj-fs-sm); }
.tj-footer address { font-style: normal; font-size: var(--tj-fs-sm); line-height: 1.9; }
.tj-footer-social { display: flex; gap: 10px; margin-top: var(--tj-space-3); }
.tj-footer-social a {
	width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.1);
	display: flex; align-items: center; justify-content: center;
}
.tj-footer-social a:hover { background: var(--tj-gold-600); text-decoration: none; }
.tj-footer-map iframe { width: 100%; height: 100%; min-height: 180px; border: 0; border-radius: var(--tj-radius-sm); }
.tj-footer-bottom { border-top: 1px solid rgba(255,255,255,0.14); padding: var(--tj-space-4) 0; }
.tj-footer-bottom .tj-container { display: flex; flex-direction: column; gap: var(--tj-space-2); align-items: center; text-align: center; }
@media (min-width: 768px) { .tj-footer-bottom .tj-container { flex-direction: row; justify-content: space-between; text-align: left; } }
.tj-footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: center; font-size: var(--tj-fs-xs); }
.tj-footer-copyright { font-size: var(--tj-fs-xs); color: rgba(255,255,255,0.6); }

/* -------------------------------------------------------------------------
   14) FORMS (complaint form etc.)
   ------------------------------------------------------------------------- */
.tajong-form, .tj-form { max-width: 720px; }
.tajong-form-row, .tj-form-row { margin-bottom: var(--tj-space-4); }
.tajong-form-row--half { display: grid; grid-template-columns: 1fr; gap: var(--tj-space-4); }
@media (min-width: 560px) { .tajong-form-row--half { grid-template-columns: 1fr 1fr; } }
.tajong-form label, .tj-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: var(--tj-fs-sm); }
.tajong-form .req { color: var(--tj-danger); }
.tajong-form input[type="text"],
.tajong-form input[type="email"],
.tajong-form input[type="tel"],
.tajong-form input[type="url"],
.tajong-form input[type="file"],
.tajong-form textarea,
.tj-form input[type="text"],
.tj-form input[type="email"],
.tj-form textarea,
.tj-form select {
	width: 100%; padding: 12px 14px; border: 1.5px solid var(--tj-border-strong); border-radius: var(--tj-radius-sm);
	font-family: var(--tj-font); font-size: var(--tj-fs-base); background: var(--tj-surface); color: var(--tj-ink);
}
.tajong-form textarea { resize: vertical; }
.tajong-form-row--consent { font-size: var(--tj-fs-sm); font-weight: 400; }
.tajong-form-row--consent label { display: flex; gap: 10px; font-weight: 400; align-items: flex-start; }
.tajong-form-row--consent input { margin-top: 4px; }

.tajong-alert { padding: var(--tj-space-4); border-radius: var(--tj-radius-sm); margin-bottom: var(--tj-space-4); }
.tajong-alert--success { background: var(--tj-success-100); border: 1px solid var(--tj-success); color: #164d2c; }
.tajong-alert--error   { background: var(--tj-danger-100); border: 1px solid var(--tj-danger); color: #7a1c17; }
.tajong-ticket-number { font-size: var(--tj-fs-lg); color: var(--tj-primary-700); }

/* -------------------------------------------------------------------------
   15) BREADCRUMB / PAGE HEADER / CONTENT AREA
   ------------------------------------------------------------------------- */
.tj-page-header { background: var(--tj-surface); border-bottom: 1px solid var(--tj-border); padding: var(--tj-space-5) 0; }
.tj-page-header h1 { margin: 6px 0 0; }
.tj-breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: var(--tj-fs-xs); color: var(--tj-muted); }
.tj-breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 6px; }
.tj-breadcrumb a { color: var(--tj-muted); }

.tj-content-layout { display: grid; grid-template-columns: 1fr; gap: var(--tj-space-6); padding: var(--tj-space-6) 0 var(--tj-space-8); align-items: start; }
@media (min-width: 960px) { .tj-content-layout--with-aside { grid-template-columns: 2.4fr 1fr; } }
.tj-article { background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius); padding: var(--tj-space-5); }
/* การ์ดโปรไฟล์บุคคลเมื่อแสดงเดี่ยวในหน้ารายละเอียด (single.php) — จำกัดความกว้างไว้ ไม่ให้รูปภาพ
   (aspect-ratio 3/4) ยืดสูงเกินสัดส่วนตามความกว้างเต็มคอลัมน์บทความ */
.tj-article > .tj-profile-card { max-width: 340px; margin: 0 auto var(--tj-space-5); }
.tj-article .tj-article-meta { color: var(--tj-muted); font-size: var(--tj-fs-sm); margin-bottom: var(--tj-space-4); display: flex; gap: 14px; flex-wrap: wrap; }
.tj-article-body { line-height: 1.9; }
.tj-article-body img { border-radius: var(--tj-radius-sm); }
.tj-article-body img.tj-content-lightbox-img {
	cursor: zoom-in;
	transition: opacity var(--tj-transition), box-shadow var(--tj-transition);
}
.tj-article-body img.tj-content-lightbox-img:hover,
.tj-article-body img.tj-content-lightbox-img:focus-visible { opacity: 0.9; }
.tj-article-body img.tj-content-lightbox-img:focus-visible {
	outline: 2px solid var(--tj-primary-500); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	.tj-article-body img.tj-content-lightbox-img { transition: none; }
}
.tj-article-attachment {
	display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--tj-border); border-radius: var(--tj-radius-sm);
	margin-top: var(--tj-space-4); background: var(--tj-primary-50);
}
.tj-aside-box { background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius); padding: var(--tj-space-4); margin-bottom: var(--tj-space-4); }
.tj-aside-box h2 { font-size: var(--tj-fs-md); }
.tj-aside-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tj-aside-list a { font-size: var(--tj-fs-sm); }

.tj-pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--tj-space-6); justify-content: center; }
.tj-pagination a, .tj-pagination span {
	min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--tj-border); border-radius: 6px; padding: 0 10px; font-size: var(--tj-fs-sm);
}
.tj-pagination .current { background: var(--tj-primary-700); color: #fff; border-color: var(--tj-primary-700); }
.tj-pagination a:hover { background: var(--tj-primary-100); text-decoration: none; }

/* Personnel/Executive profile cards */
.tj-profile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--tj-space-4); align-items: start; }
@media (min-width: 640px)  { .tj-profile-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .tj-profile-grid { grid-template-columns: repeat(4, 1fr); } }
/* กริดของ "ทำเนียบ" แบบแบ่งกลุ่มตามระดับตำแหน่ง: จำกัดความกว้างการ์ดไว้แทนการยืดเต็ม 4 คอลัมน์เสมอ
   เพื่อไม่ให้กลุ่มที่มีสมาชิกน้อย (เช่น ปลัดเทศบาล 1 คน) ถูกยืดกว้างผิดสัดส่วนหรือดูโหว่ */
.tj-profile-grid--tiered { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); justify-content: center; }
.tj-profile-grid--tiered .tj-profile-card { max-width: 320px; margin: 0 auto; width: 100%; }
.tj-profile-card { background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius); overflow: hidden; text-align: center; height: 100%; display: flex; flex-direction: column; }
.tj-profile-photo-link { display: block; color: inherit; text-decoration: none; }
.tj-profile-photo-link:hover .tj-profile-name,
.tj-profile-photo-link:focus-visible .tj-profile-name { text-decoration: underline; }
.tj-profile-photo { aspect-ratio: 3/4; background: var(--tj-primary-100); }
.tj-profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.tj-profile-photo-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 36px; color: var(--tj-primary-700); font-weight: 700; background: linear-gradient(160deg, var(--tj-primary-100), var(--tj-gold-100)); }
.tj-profile-name { font-weight: 700; font-size: var(--tj-fs-sm); padding: var(--tj-space-3) var(--tj-space-3) 0; }
.tj-profile-body { padding: 2px var(--tj-space-3) var(--tj-space-3); flex: 1; }
.tj-profile-position { font-size: var(--tj-fs-xs); color: var(--tj-muted); margin-top: 2px; }
.tj-profile-contact { font-size: var(--tj-fs-xs); margin-top: 8px; color: var(--tj-primary-700); }
.tj-profile-contact a { color: inherit; }
.tj-profile-contact a:hover,
.tj-profile-contact a:focus-visible { text-decoration: underline; }

/* ทำเนียบบุคลากร: ส่วนหัวข้อของแต่ละกลุ่มระดับตำแหน่ง (เช่น "ผู้อำนวยการสำนัก / ผู้อำนวยการกอง") */
.tj-rank-section { margin-bottom: var(--tj-space-7); }
.tj-rank-section:last-child { margin-bottom: 0; }
.tj-rank-section-header {
	background: linear-gradient(90deg, var(--tj-primary-700), var(--tj-primary-900));
	color: #fff;
	font-weight: 700;
	font-size: var(--tj-fs-md);
	text-align: center;
	padding: 12px var(--tj-space-4);
	border-radius: var(--tj-radius-lg);
	margin-bottom: var(--tj-space-4);
}

/* รายการ "ภารกิจ/หน่วยงานที่กำกับดูแล" ในการ์ดโปรไฟล์ */
.tj-profile-responsibilities { text-align: left; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--tj-border); }
.tj-profile-responsibilities-title { font-size: var(--tj-fs-xs); font-weight: 700; margin: 0 0 4px; }
.tj-profile-responsibilities ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.tj-profile-responsibilities li { font-size: var(--tj-fs-xs); color: var(--tj-muted); padding-left: 14px; position: relative; line-height: 1.5; }
.tj-profile-responsibilities li::before { content: '•'; position: absolute; left: 0; color: var(--tj-gold-600); font-weight: 700; }

/* -------------------------------------------------------------------------
   16) SITEMAP / SEARCH RESULTS
   ------------------------------------------------------------------------- */
.tajong-sitemap { display: grid; grid-template-columns: 1fr; gap: var(--tj-space-5); }
@media (min-width: 768px) { .tajong-sitemap { grid-template-columns: repeat(3, 1fr); } }
.tajong-sitemap-group ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }

.tj-search-result-item { display: flex; gap: var(--tj-space-4); padding: var(--tj-space-4) 0; border-bottom: 1px solid var(--tj-border); }
.tj-search-result-thumb { width: 96px; height: 72px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--tj-primary-100); }
.tj-search-result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tj-search-result-type { display: inline-block; background: var(--tj-primary-100); color: var(--tj-primary-700); font-size: var(--tj-fs-xs); padding: 2px 10px; border-radius: var(--tj-radius-pill); font-weight: 600; margin-bottom: 4px; }

/* -------------------------------------------------------------------------
   17) COOKIE CONSENT
   ------------------------------------------------------------------------- */
.tj-cookie-banner {
	position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2000;
	background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius);
	box-shadow: var(--tj-shadow-lg); padding: var(--tj-space-4);
	display: none; gap: var(--tj-space-4); align-items: center; flex-wrap: wrap;
	max-width: 720px; margin: 0 auto;
}
.tj-cookie-banner.is-visible { display: flex; }
.tj-cookie-banner p { margin: 0; font-size: var(--tj-fs-sm); flex: 1 1 260px; }
.tj-cookie-actions { display: flex; gap: 8px; }

/* -------------------------------------------------------------------------
   18) UTILITIES
   ------------------------------------------------------------------------- */
.tj-visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.tj-mt-0 { margin-top: 0; }
.tj-text-center { text-align: center; }
.tj-empty-state { text-align: center; padding: var(--tj-space-7) var(--tj-space-4); color: var(--tj-muted); }

/* Print */
@media print {
	.tj-header, .tj-topbar, .tj-footer, .tj-hero, .tj-cookie-banner, .tj-quick-service { display: none !important; }
}
