/* ==========================================================================
   CWIE public website — "Clean academic" skin
   โหลดต่อจาก cwie-site.css เฉพาะใน website/views/z_template/header.php
   (training · webmodule · crud ไม่โหลดไฟล์นี้ จึงไม่กระทบ)

   แนวทาง: พื้นขาว สีหลักกรมท่าสีเดียว ไม่มีไล่เฉด/แสงเรือง/ลายจุด/เอียง 3D
   ลำดับชั้นของหน้าเกิดจากขนาดตัวอักษรและระยะห่าง ไม่ใช่สีหรือเงา
   ========================================================================== */

/* tokens อยู่ที่ assets/css/cwie-academic-tokens.css (ใช้ร่วมกับหลังบ้าน) */

body { font-size: 16px; line-height: 1.7; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; letter-spacing: 0; }
::selection { background: rgba(23, 52, 110, .14); }

/* Canvas ระบาย span ในหัวข้อทุกระดับเป็นเขียวอมฟ้า #1ABC9C (สีตั้งต้นของธีม) — คืนเป็นสีหัวข้อ */
h1 > span:not(.nocolor):not(.badge),
h2 > span:not(.nocolor):not(.badge),
h3 > span:not(.nocolor):not(.badge),
h4 > span:not(.nocolor):not(.badge),
h5 > span:not(.nocolor):not(.badge),
h6 > span:not(.nocolor):not(.badge) { color: inherit; }

/* ---------- ปิดของตกแต่งจากสกินเดิม ---------- */
.cwie-band::before,
.cwie-band::after,
.cwie-band-dark::before,
.cwie-section-title::after,
.cwie-hero-glow,
.cwie-glare { display: none !important; }

/* การ์ด: ไม่เอียง 3D — ลอยขึ้นเล็กน้อยตอนชี้แทน (ดูชั้น "สีสันและลูกเล่น" ท้ายไฟล์) */
.cwie-tilt { transform: none !important; }
.posts-carousel .entry:hover,
.entry.cwie-card:hover,
.cwie-info-card:hover,
.cwie-people-card:hover,
.cwie-award-card:hover,
.cwie-doc-item:hover { border-color: #c4ccd9 !important; }

/* ---------- top bar ---------- */
#top-bar {
	background: var(--cwie-blue-deep);
	border-bottom: 0;
}
#top-bar .top-links-item > a { color: #fff !important; }

/* ---------- header / nav ---------- */
#header { border-bottom: 1px solid var(--cwie-line); box-shadow: none; }
#header-wrap { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
#header.sticky-header #header-wrap { box-shadow: 0 1px 0 var(--cwie-line); }

.primary-menu .menu-link { font-weight: 500; color: var(--cwie-ink); border-radius: 6px; }
.primary-menu .menu-item:hover > .menu-link { background: var(--cwie-blue-tint); }
.primary-menu > .menu-container > .menu-item.current > .menu-link::after { background: var(--cwie-blue); }
.primary-menu .sub-menu-container { border-radius: 8px; box-shadow: 0 6px 20px rgba(17, 26, 46, .08); }

/* เมนู 6 รายการ + โลโก้ 3 ตัวล้นจอช่วง 992–1399px — ย่อระยะแทนการตัดรายการทิ้ง */
@media (min-width: 992px) and (max-width: 1399.98px) {
	.primary-menu .menu-container > .menu-item > .menu-link { padding-left: 9px; padding-right: 9px; font-size: .9rem; }
	.primary-menu.with-arrows > .menu-container > .menu-item > .menu-link > div > i.icon-angle-down { display: none; }
	#logo.me-lg-4 { margin-right: .75rem !important; }
	:root { --cwie-logo-mhesi: 44px; --cwie-logo-crru: 42px; --cwie-logo-clli: 34px; --cwie-logo-gap: 12px; }
}

/* ---------- ปุ่มพื้นฐาน ---------- */
.ac-btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	min-height: 46px;
	padding: 0 1.4rem;
	border-radius: 6px;
	border: 1px solid var(--cwie-blue);
	background: var(--cwie-blue);
	color: #fff !important;
	font-weight: 600;
	font-size: .98rem;
	line-height: 1;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.ac-btn:hover { background: var(--cwie-blue-bright); border-color: var(--cwie-blue-bright); }
.ac-btn-outline { background: #fff; color: var(--cwie-blue) !important; border-color: #c4ccd9; }
.ac-btn-outline:hover { background: var(--cwie-blue-tint); border-color: var(--cwie-blue); }

.ac-link {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	font-weight: 600;
	color: var(--cwie-blue);
}
.ac-link:hover { color: var(--cwie-blue-bright); text-decoration: underline; text-underline-offset: 3px; }

.button.button-border.button-rounded { border-radius: 6px; }

/* ---------- หัวข้อหมวด ---------- */
.cwie-section-head { margin-bottom: 2.2rem; }
.cwie-eyebrow {
	color: var(--cwie-muted);
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.cwie-eyebrow::before { background: var(--cwie-blue); width: 24px; }
.cwie-section-title { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; padding-bottom: 0; }
.cwie-section-sub { color: var(--cwie-muted); }

.ac-head-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: .5rem 1.5rem;
	margin-bottom: 1.6rem;
}
.ac-head-row .cwie-section-head { margin-bottom: 0; }

/* ---------- แถบเนื้อหา ---------- */
.cwie-band { padding: 4.5rem 0; overflow: visible; }
.cwie-band-soft { background: var(--cwie-bg-soft); border-color: var(--cwie-line); }
/* แถบเข้มเดิม (วิดีโอ) กลับเป็นพื้นอ่อน — หน้าเว็บมีพื้นทึบแค่ฟุตเตอร์ที่เดียว */
.cwie-band-dark { background: var(--cwie-bg-soft); border-top: 1px solid var(--cwie-line); }
.cwie-band-dark .cwie-section-title { color: var(--cwie-ink); }
.cwie-band-dark .cwie-section-sub { color: var(--cwie-muted); }
.cwie-band-dark .cwie-eyebrow { color: var(--cwie-muted); }
.cwie-band-dark .cwie-eyebrow::before { background: var(--cwie-blue); }
.cwie-band-dark .portfolio-desc span { color: var(--cwie-ink); }
.cwie-band-dark .portfolio-desc small { color: var(--cwie-muted); }
.cwie-band-dark .portfolio-item:hover { transform: none; }

/* ==========================================================================
   หน้าแรก
   ========================================================================== */

/* ---------- hero ---------- */
.ac-hero {
	padding: 4.5rem 0 4rem;
	background: #fff;
	border-bottom: 1px solid var(--cwie-line);
}
.ac-hero-eyebrow {
	display: inline-block;
	font-size: .85rem;
	font-weight: 600;
	color: var(--cwie-muted);
	letter-spacing: .04em;
	margin-bottom: 1rem;
}
.ac-hero-title {
	font-size: clamp(2rem, 4.2vw, 3.1rem);
	line-height: 1.25;
	font-weight: 700;
	color: var(--cwie-ink);
	margin-bottom: 1.1rem;
	text-wrap: balance;
}
.ac-hero .ac-hero-title .ac-hl { color: var(--cwie-blue); }
/* ตัดบรรทัดไทยตามวลี ไม่ให้เบราว์เซอร์หั่นกลางคำ (เช่น "บูรณ|าการ") */
.ac-nw { white-space: nowrap; }
.ac-hero-en {
	font-size: 1.02rem;
	font-weight: 500;
	color: var(--cwie-blue);
	margin-bottom: .6rem;
}
.ac-hero-sub {
	font-size: 1.05rem;
	color: var(--cwie-text);
	max-width: 54ch;
	margin-bottom: 1.8rem;
}
.ac-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.ac-hero-facts {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.6rem;
	margin: 2rem 0 0;
	padding: 1.2rem 0 0;
	border-top: 1px solid var(--cwie-line);
	list-style: none;
	font-size: .92rem;
	color: var(--cwie-text);
}
.ac-hero-facts li { display: inline-flex; align-items: center; gap: .5rem; }
.ac-hero-facts i { color: var(--cwie-blue); }

@media (max-width: 991.98px) {
	.ac-hero { padding: 2.6rem 0 2.8rem; }
}

/* ---------- แบนเนอร์ประกาศ (จากระบบหลังบ้าน): ย่อจากเต็มจอเป็นกรอบในคอนเทนเนอร์ ---------- */
.ac-banner-band { padding: 3rem 0 0; }
.ac-banner-band .cwie-banner { height: auto !important; background: none; }
.ac-banner-band .cwie-banner-viewport {
	flex: none;
	aspect-ratio: 8 / 3;
	border-radius: 8px;
	background: var(--cwie-bg-soft);
}
.ac-banner-band .cwie-banner-slide img { object-fit: contain; }
.ac-banner-band .cwie-banner-thumbs { background: none; padding-left: 0; padding-right: 0; }

/* ---------- ข่าว: 1 ข่าวเด่น + รายการ ---------- */
.ac-news { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.6rem; }
@media (max-width: 767.98px) { .ac-news { grid-template-columns: 1fr; } }

.ac-news-feature { display: block; color: inherit; }
.ac-news-feature img,
.ac-news-item img {
	display: block;
	width: 100%;
	object-fit: cover;
	background: var(--cwie-bg-soft);
	border-radius: 6px;
}
.ac-news-feature img { aspect-ratio: 16 / 10; margin-bottom: 1rem; }
.ac-news-feature h3 { font-size: 1.25rem; line-height: 1.5; margin-bottom: .5rem; color: var(--cwie-ink); }
.ac-news-feature:hover h3,
.ac-news-item:hover h4 { color: var(--cwie-blue); text-decoration: underline; text-underline-offset: 3px; }
.ac-news-feature p { color: var(--cwie-text); font-size: .95rem; margin: 0; }

.ac-news-list { list-style: none; margin: 0; padding: 0; }
.ac-news-list li + li { border-top: 1px solid var(--cwie-line); }
.ac-news-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 1rem; padding: 1rem 0; color: inherit; }
.ac-news-list li:first-child .ac-news-item { padding-top: 0; }
.ac-news-item img { aspect-ratio: 4 / 3; }
.ac-news-item h4 {
	font-size: 1rem;
	line-height: 1.5;
	margin: 0 0 .3rem;
	color: var(--cwie-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ac-meta { font-size: .84rem; color: var(--cwie-muted); margin-bottom: .4rem; }
.ac-news-item .ac-meta { margin: 0; }

/* ---------- กิจกรรมที่กำลังจะมาถึง ---------- */
.ac-events { list-style: none; margin: 0; padding: 0; }
.ac-event {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 1rem;
	padding: 1rem 0;
	border-bottom: 1px solid var(--cwie-line);
}
.ac-event:first-child { padding-top: 0; }
.ac-event-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 64px;
	border: 1px solid var(--cwie-line);
	border-radius: 6px;
	line-height: 1.1;
	text-align: center;
}
.ac-event-date b { font-size: 1.45rem; font-weight: 700; color: var(--cwie-blue); font-variant-numeric: tabular-nums; }
.ac-event-date span { font-size: .78rem; color: var(--cwie-muted); }
.ac-event h4 { font-size: 1rem; line-height: 1.5; margin: 0 0 .2rem; }
.ac-event p { font-size: .85rem; color: var(--cwie-muted); margin: 0; }
.ac-event p i { width: 1em; margin-right: .3rem; color: var(--cwie-blue); }
.ac-events-empty { color: var(--cwie-muted); font-size: .95rem; padding: 1rem 0; }

/* ---------- เส้นทาง CWIE 3 ขั้น (การ์ดฝั่งขวาของ hero) ---------- */
.ac-path {
	border: 1px solid var(--cwie-line);
	border-radius: 8px;
	background: var(--cwie-bg-soft);
	padding: 1.6rem 1.6rem 1.4rem;
}
.ac-path-title {
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .06em;
	color: var(--cwie-muted);
	margin-bottom: 1.2rem;
}
.ac-path-steps { list-style: none; margin: 0; padding: 0; }
.ac-path-steps li {
	position: relative;
	display: grid;
	grid-template-columns: 32px minmax(0, 1fr);
	gap: 1rem;
	padding-bottom: 1.3rem;
}
.ac-path-steps li:last-child { padding-bottom: 0; }
/* เส้นเชื่อมระหว่างขั้น */
.ac-path-steps li:not(:last-child)::before {
	content: "";
	position: absolute;
	left: 15px;
	top: 34px;
	bottom: 4px;
	width: 2px;
	background: var(--cwie-line);
}
.ac-path-no {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--cwie-blue);
	color: #fff;
	font-weight: 600;
	font-size: .9rem;
	font-variant-numeric: tabular-nums;
}
.ac-path-steps h3 { font-size: 1.02rem; line-height: 1.45; margin: .2rem 0 .25rem; }
.ac-path-steps p { font-size: .9rem; color: var(--cwie-text); margin: 0; line-height: 1.6; }
@media (max-width: 991.98px) { .ac-path { margin-top: 2.2rem; } }

/* ---------- ตัวเลขผลการดำเนินงาน ---------- */
.cwie-metric-grid { gap: 0; border: 1px solid var(--cwie-line); border-radius: 8px; overflow: hidden; background: #fff; }
.cwie-metric-card {
	/* inline style ใส่ --accent สีต่างกันรายใบ — ทับให้เหลือกรมท่าสีเดียว */
	--accent: #17346e !important;
	--accent-soft: rgba(23, 52, 110, .07) !important;
	border: 0 !important;
	border-radius: 0 !important;
	padding: 1.6rem 1.5rem !important;
	background: #fff;
	box-shadow: inset -1px -1px 0 var(--cwie-line) !important;
}
.cwie-metric-card::before { display: none; }
.cwie-metric-card:hover,
.cwie-metric-card:focus-visible { background: var(--cwie-bg-soft); }
.cwie-metric-card:focus-visible { outline: 2px solid var(--cwie-blue); outline-offset: -2px; }
.cwie-metric-icon {
	width: auto;
	height: auto;
	background: none;
	box-shadow: none;
	color: var(--cwie-blue);
	font-size: 1.15rem;
	margin-bottom: .8rem;
}
.cwie-metric-card .counter span[data-to],
.cwie-metric-card .counter span[data-from] { font-size: 2.3rem; font-weight: 700; color: var(--cwie-ink); }
.cwie-metric-card .counter h2 { font-size: 1.6rem; font-weight: 700; color: var(--cwie-ink); }
.cwie-metric-card .counter h3 { font-weight: 500; color: var(--cwie-muted); }
.cwie-metric-caption { color: var(--cwie-text); }
.cwie-metric-arrow { background: none; color: var(--cwie-muted); }
.cwie-metric-card:hover .cwie-metric-arrow { background: none; color: var(--cwie-blue); }

@media (max-width: 560px) {
	.cwie-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cwie-metric-card { padding: 1.2rem 1rem !important; }
	.cwie-metric-card .counter span[data-to],
	.cwie-metric-card .counter span[data-from] { font-size: 1.8rem; }
	.cwie-metric-card .counter h2 { font-size: 1.3rem; }
	.cwie-metric-arrow { display: none; }
}

.cwie-metric-chart-card { border-radius: 8px; margin-top: 1.6rem; }
.ac-chart-box { position: relative; height: 340px; }
@media (max-width: 575.98px) { .ac-chart-box { height: 280px; } }

/* ---------- หน่วยงาน: โลโก้ + ชื่อ แสดงตลอด (ไม่ซ่อนชื่อไว้หลัง hover) ---------- */
.ac-faculty { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.ac-faculty a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .8rem;
	height: 100%;
	padding: 1.3rem 1rem 1.1rem;
	border: 1px solid var(--cwie-line);
	border-radius: 8px;
	background: #fff;
	text-align: center;
	color: var(--cwie-ink);
	font-size: .9rem;
	font-weight: 500;
	line-height: 1.45;
	transition: border-color .15s ease;
}
.ac-faculty a:hover { border-color: var(--cwie-blue); color: var(--cwie-blue); }
.ac-faculty img { width: 72px; height: 72px; object-fit: contain; }

/* ---------- วิดีโอ ---------- */
.cwie-video-fallback { background: #dfe4ec; color: #8a95a8; }
.portfolio-carousel .portfolio-desc { padding-top: .8rem; }
.portfolio-carousel .portfolio-desc span { font-weight: 600; font-size: .95rem; line-height: 1.5; }
.portfolio-carousel .portfolio-desc small { font-weight: 400; }

/* ==========================================================================
   หน้าชั้นใน
   ========================================================================== */
#page-title,
.page-title {
	background: var(--cwie-bg-soft);
	border-bottom: 1px solid var(--cwie-line);
	padding: 2.6rem 0 2.2rem;
}
#page-title::before { display: none; }
#page-title h1,
.page-title h1 { color: var(--cwie-ink) !important; font-weight: 700; }
#page-title span,
#page-title .breadcrumb li,
#page-title .breadcrumb .active,
.page-title span,
.page-title .breadcrumb li,
.page-title .breadcrumb .active { color: var(--cwie-muted) !important; }
#page-title .breadcrumb a,
.page-title .breadcrumb a { color: var(--cwie-blue) !important; opacity: 1; }
#page-title .breadcrumb-item + .breadcrumb-item::before { color: #a9b2c2; }

/* cwie-site.css ตั้ง .content-wrap ไม่มีระยะบน แต่ .row.col-mb-* ของธีมดึงขึ้นด้วย margin ติดลบ
   เนื้อหาหน้าชั้นในจึงมุดใต้แถบหัวเรื่อง — คืนระยะบน (หน้าแรกใช้ .p-0 ซึ่ง !important จึงไม่โดน) */
.content-wrap { padding: 5rem 0 4.5rem; }

/* heading-block ของธีมใส่ขีดสีใต้หัวข้อ — ใช้ขีดกรมท่าสั้นแทน */
.heading-block h2 { font-weight: 600; }
.heading-block::after { border-top-color: var(--cwie-blue) !important; }
.heading-block > span:not(.before-heading) { color: var(--cwie-muted); }
.divider.divider-center i { color: #c4ccd9; }

.cwie-info-card .cwie-info-icon { width: 44px; height: 44px; font-size: 1rem; }
.cwie-quote { border-left-width: 3px; border-radius: 0 8px 8px 0; background: var(--cwie-bg-soft); }
.cwie-people-card img { border-color: #fff; box-shadow: 0 0 0 1px var(--cwie-line); }
.cwie-doc-icon { background: var(--cwie-blue-tint); border-radius: 6px; }
.cwie-doc-action { border-radius: 6px; }
.cwie-doc-action:hover { transform: none; box-shadow: none; background: var(--cwie-blue-bright); }
/* รูปคู่: ธีมตั้ง img กว้าง 100% ทั้งสองรูป รูปที่สองจึงล้นทับข้อความ — แบ่งครึ่งกรอบ */
.cwie-award-card .cwie-award-media.is-dual img { flex: 1 1 0; min-width: 0; object-fit: cover; }
.cwie-award-card h3 > span.subtitle { color: var(--cwie-muted); }
.cwie-year-badge { background: var(--cwie-blue); color: #fff !important; box-shadow: none; border-radius: 6px; }
.cwie-gallery-grid .grid-item,
.portfolio-image { border-radius: 6px; }
.cwie-gallery-grid .grid-item:hover img,
.portfolio-item:hover .portfolio-image img { transform: scale(1.03); }
.faq-marketplace.toggle { box-shadow: none; border-radius: 8px !important; }

/* ---------- footer ---------- */
#footer,
.dark #footer,
#footer.dark { background: var(--cwie-blue-deep); }
/* โลโก้สีบนพื้นกรมท่าอ่านไม่ออก — วางบนแผ่นขาว */
.cwie-footer .cwie-logo-lockup {
	display: inline-flex !important;
	background: #fff;
	border-radius: 6px;
	padding: .55rem .8rem;
	margin-bottom: 1.1rem;
}
.cwie-footer-contact li i { color: rgba(255, 255, 255, .55); }
#copyrights,
.dark #copyrights,
#copyrights.dark { background: var(--cwie-blue-darkest); }

#gotoTop { border-radius: 6px; box-shadow: none; }

/* ==========================================================================
   ไมโครไซต์คณะ (webmodule) — ใช้ hero/แถบ/การ์ดชุดเดียวกับหน้าแรก
   ========================================================================== */
.ac-faculty-hero .ac-hero-title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.ac-faculty-cover {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
}
.ac-faculty-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	aspect-ratio: 4 / 3;
	padding: 2rem;
	border: 1px solid var(--cwie-line);
	border-radius: 8px;
	background: var(--cwie-bg-soft);
	text-align: center;
	font-weight: 600;
	color: var(--cwie-ink);
}
.ac-faculty-card img { width: 128px; height: 128px; object-fit: contain; }
.ac-faculty-card i { font-size: 3.2rem; color: var(--cwie-blue); }
@media (max-width: 991.98px) {
	.ac-faculty-cover { margin-top: 2rem; }
	/* การ์ดโลโก้เป็นแค่ตัวแทนเมื่อไม่มีรูปปก บนมือถือมันกินทั้งจอโดยไม่ให้ข้อมูลเพิ่ม (ชื่อคณะอยู่ในหัวเรื่องแล้ว) */
	.ac-faculty-card { display: none; }
}

/* เมนู one-page: onepage.css ตั้งตัวพิมพ์ใหญ่ + เว้นช่องไฟ 2-3px ซึ่งทำให้อักษรไทยแตกเป็นตัว ๆ */
.one-page-menu .menu-link,
.one-page-menu .menu-link div {
	text-transform: none !important;
	letter-spacing: 0 !important;
	font-size: .95rem !important;
	font-weight: 500 !important;
}
.one-page-menu .menu-item.current > .menu-link { color: var(--cwie-blue) !important; }
#header.full-header #header-wrap { border-bottom: 1px solid var(--cwie-line); }
#header.full-header #logo { border-right-color: var(--cwie-line); }
#footer .footer-site-links li,
#footer .widget p { color: rgba(255, 255, 255, .72); }
/* ขีดสั้นที่ธีมวางไว้หน้า h5 ลอยกลางการ์ดสถิติหน้าคณะโดยไม่สื่ออะไร */
.cwie-metric-card h5.cwie-metric-caption::before { display: none !important; }
/* หัวข้อ widget ฟุตเตอร์: ธีมตั้งเว้นช่องไฟ 2px + ตัวพิมพ์ใหญ่ อักษรไทยจึงห่างกันเป็นตัว ๆ */
#footer .widget h4 { letter-spacing: 0; text-transform: none; font-weight: 600; }
.ac-major-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.ac-major-list li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: .55rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, .12);
	color: rgba(255, 255, 255, .78);
	font-size: .92rem;
	line-height: 1.5;
}
.ac-major-list li span:last-child { flex-shrink: 0; color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   สีสันและลูกเล่น — 4 สีแบรนด์ C·W·I·E (token ใน cwie-academic-tokens.css)
   หลัก: กรมท่ายังเป็นสี "กดได้" / 4 สีใช้เป็นเส้น ไอคอน ชิป และจังหวะของหน้า
   ========================================================================== */

/* ---------- แถบ 4 สีแบบโลโก้: ใต้แถบบน, ใต้หัวเรื่องหน้าชั้นใน, บนฟุตเตอร์ ---------- */
#top-bar { position: relative; }
#top-bar::after,
#page-title::after,
.page-title::after,
#footer::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--ac-stripe);
	pointer-events: none;
}
#top-bar::after { bottom: 0; }
#page-title,
.page-title { position: relative; }
#page-title::after,
.page-title::after { bottom: -1px; }
#footer { position: relative; }
#footer::before { top: 0; height: 4px; }

/* ป้ายกำกับหมวด: ขีดนำหน้าเป็นแถบ 4 สีสั้น ๆ — ลายเซ็นของเว็บ */
.cwie-eyebrow::before {
	width: 28px;
	height: 3px;
	border-radius: 2px;
	background: var(--ac-stripe) !important;
}

/* ---------- hero ---------- */
.ac-hero { position: relative; overflow: hidden; }
.ac-hero > .container { position: relative; z-index: 1; }
/* วงสีจาง ๆ 4 สีด้านหลัง — มีชีวิตแต่ไม่แย่งตัวหนังสือ */
.ac-hero::before,
.ac-hero::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
}
.ac-hero::before {
	width: 520px;
	height: 520px;
	right: -140px;
	top: -220px;
	background:
		radial-gradient(circle at 30% 70%, var(--ac-w-tint) 0 34%, transparent 35%),
		radial-gradient(circle at 70% 40%, var(--ac-c-tint) 0 42%, transparent 43%);
}
.ac-hero::after {
	width: 360px;
	height: 360px;
	left: -160px;
	bottom: -200px;
	background:
		radial-gradient(circle at 60% 40%, var(--ac-e-tint) 0 40%, transparent 41%),
		radial-gradient(circle at 30% 30%, var(--ac-i-tint) 0 26%, transparent 27%);
}
.ac-hero-eyebrow::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ac-w);
	margin-right: .55rem;
	vertical-align: middle;
	box-shadow: 0 0 0 4px var(--ac-w-tint);
}
/* คำเน้นในหัวเรื่อง: ขีดเส้นใต้ 4 สี — เพิ่มระยะบรรทัดให้ขีดอยู่ในช่องว่างระหว่างบรรทัด
   ไม่งั้นชนสระบน/วรรณยุกต์ของบรรทัดถัดไป (เช่น "ชิ" "บู") */
.ac-hero .ac-hero-title { line-height: 1.42; }
.ac-hero .ac-hero-title .ac-hl {
	background: var(--ac-stripe) no-repeat left bottom / 100% .14em;
	padding-bottom: .04em;
}
.ac-hero-facts li:nth-child(4n+1) i { color: var(--ac-c); }
.ac-hero-facts li:nth-child(4n+2) i { color: var(--ac-w); }
.ac-hero-facts li:nth-child(4n+3) i { color: var(--ac-e); }
.ac-hero-facts li:nth-child(4n+4) i { color: var(--ac-i-ink); }

/* การ์ดเส้นทาง: ตัวเลขแต่ละขั้นคนละสี */
.ac-path { background: #fff; box-shadow: 0 10px 30px rgba(17, 26, 46, .06); }
.ac-path-steps li:nth-child(1) .ac-path-no { background: var(--ac-c); }
.ac-path-steps li:nth-child(2) .ac-path-no { background: var(--ac-w); }
.ac-path-steps li:nth-child(3) .ac-path-no { background: var(--ac-e); }
.ac-path-steps li:nth-child(1)::before { background: linear-gradient(var(--ac-c), var(--ac-w)) !important; }
.ac-path-steps li:nth-child(2)::before { background: linear-gradient(var(--ac-w), var(--ac-e)) !important; }

/* ---------- ปุ่ม/ลิงก์: ไอคอนขยับตอนชี้ ---------- */
.ac-btn i,
.ac-link i { transition: transform .2s var(--ac-ease); }
.ac-btn:hover i,
.ac-link:hover i { transform: translateX(3px); }
.ac-btn:not(.ac-btn-outline):hover { box-shadow: 0 6px 16px rgba(23, 52, 110, .22); }

/* ---------- เมนู: เส้นใต้ 4 สีค่อย ๆ ยืดออกตอนชี้ ---------- */
.primary-menu > .menu-container > .menu-item > .menu-link { position: relative; }
.primary-menu > .menu-container > .menu-item:not(.current) > .menu-link::after {
	content: "";
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 8px;
	height: 2px;
	background: var(--ac-stripe);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .25s var(--ac-ease);
}
.primary-menu > .menu-container > .menu-item:not(.current):hover > .menu-link::after { transform: scaleX(1); }
.primary-menu > .menu-container > .menu-item.current > .menu-link::after { background: var(--ac-stripe) !important; height: 3px !important; }

/* ---------- ข่าว ---------- */
.ac-news-feature,
.ac-news-item { overflow: hidden; }
.ac-news-feature img,
.ac-news-item img { transition: transform .45s var(--ac-ease); }
.ac-news-feature:hover > img { transform: scale(1.03); }
.ac-news-item:hover img { transform: scale(1.06); }
.ac-news-feature .ac-meta::before {
	content: "ข่าวล่าสุด";
	display: inline-block;
	margin-right: .5rem;
	padding: .1rem .55rem;
	border-radius: 4px;
	background: var(--ac-w-tint);
	color: var(--ac-w-ink);
	font-weight: 600;
	font-size: .78rem;
}

/* ---------- กิจกรรม: วันที่คนละสีวนตามลำดับ ---------- */
.ac-event-date { border-top-width: 3px; }
.ac-event:nth-child(4n+1) .ac-event-date { border-top-color: var(--ac-c); }
.ac-event:nth-child(4n+2) .ac-event-date { border-top-color: var(--ac-w); }
.ac-event:nth-child(4n+3) .ac-event-date { border-top-color: var(--ac-e); }
.ac-event:nth-child(4n+4) .ac-event-date { border-top-color: var(--ac-i); }
.ac-event:nth-child(4n+2) .ac-event-date b { color: var(--ac-w-ink); }
.ac-event:nth-child(4n+3) .ac-event-date b { color: var(--ac-e-ink); }
.ac-event:nth-child(4n+4) .ac-event-date b { color: var(--ac-i-ink); }
.ac-event { transition: background-color .2s ease; border-radius: 6px; }

/* ---------- ตัวเลขผลการดำเนินงาน: ชิปไอคอนสีวน + แถบสีบนตอนชี้ ---------- */
.cwie-metric-card { position: relative; transition: background-color .2s ease; }
.cwie-metric-card::after {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: var(--chip, var(--cwie-blue));
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .3s var(--ac-ease);
}
.cwie-metric-card:hover::after,
.cwie-metric-card:focus-visible::after { transform: scaleX(1); }
.cwie-metric-card:nth-child(4n+1) { --chip: var(--ac-c); --chip-tint: var(--ac-c-tint); }
.cwie-metric-card:nth-child(4n+2) { --chip: var(--ac-w); --chip-tint: var(--ac-w-tint); }
.cwie-metric-card:nth-child(4n+3) { --chip: var(--ac-e); --chip-tint: var(--ac-e-tint); }
.cwie-metric-card:nth-child(4n+4) { --chip: var(--ac-i-ink); --chip-tint: var(--ac-i-tint); }
.cwie-metric-icon {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 44px !important;
	height: 44px !important;
	border-radius: 10px !important;
	background: var(--chip-tint, var(--cwie-blue-tint)) !important;
	color: var(--chip, var(--cwie-blue)) !important;
	transition: transform .25s var(--ac-ease);
}
.cwie-metric-card:hover .cwie-metric-icon { transform: scale(1.08) rotate(-4deg); }

/* ---------- หน่วยงาน ---------- */
.ac-faculty a { position: relative; overflow: hidden; transition: border-color .2s ease, transform .25s var(--ac-ease), box-shadow .25s ease; }
.ac-faculty a::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: var(--ac-stripe);
	transform: scaleX(0);
	transition: transform .3s var(--ac-ease);
}
.ac-faculty a:hover::before { transform: scaleX(1); }
.ac-faculty img { transition: transform .3s var(--ac-ease); }
.ac-faculty a:hover img { transform: scale(1.08); }

/* ---------- หน้าชั้นใน ---------- */
.cwie-info-card .cwie-info-icon { background: var(--ac-c); }
.col-sm-6:nth-child(4n+2) .cwie-info-card .cwie-info-icon { background: var(--ac-w); }
.col-sm-6:nth-child(4n+3) .cwie-info-card .cwie-info-icon { background: var(--ac-e); }
.cwie-doc-item:nth-child(4n+1) .cwie-doc-icon { background: var(--ac-c-tint); color: var(--ac-c-ink); }
.cwie-doc-item:nth-child(4n+2) .cwie-doc-icon { background: var(--ac-w-tint); color: var(--ac-w-ink); }
.cwie-doc-item:nth-child(4n+3) .cwie-doc-icon { background: var(--ac-e-tint); color: var(--ac-e-ink); }
.cwie-doc-item:nth-child(4n+4) .cwie-doc-icon { background: var(--ac-i-tint); color: var(--ac-i-ink); }
.cwie-quote { border-left: 4px solid transparent; border-image: linear-gradient(var(--ac-c) 0 25%, var(--ac-w) 25% 50%, var(--ac-i) 50% 75%, var(--ac-e) 75% 100%) 1; border-radius: 0; }
.cwie-year-badge { background: var(--ac-w-tint); color: var(--ac-w-ink) !important; }
.cwie-year-badge i { color: var(--ac-w); }
#gotoTop { transition: background-color .2s ease, transform .2s var(--ac-ease); }
#gotoTop:hover { background: var(--ac-w); }

/* ---------- การเคลื่อนไหว ---------- */
@media all { /* ไม่ผูกกับ reduced-motion — ดู memory reduced-motion-guard */
	/* การ์ดลอยขึ้นเล็กน้อยตอนชี้ */
	.ac-faculty a:hover,
	.cwie-info-card:hover,
	.cwie-people-card:hover,
	.cwie-award-card:hover {
		transform: translateY(-3px);
		box-shadow: 0 12px 28px rgba(17, 26, 46, .08) !important;
	}
	.cwie-doc-item:hover { transform: translateX(4px); }
	.ac-event:hover { background: var(--cwie-bg-soft); }
	#gotoTop:hover { transform: translateY(-2px); }

	/* hero: ข้อความไล่ขึ้นทีละชิ้นตอนเปิดหน้า + วงสีลอยช้า ๆ */
	@keyframes acRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
	@keyframes acFloat { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-16px, 14px); } }
	.ac-hero .ac-hero-eyebrow,
	.ac-hero .ac-hero-title,
	.ac-hero .ac-hero-en,
	.ac-hero .ac-hero-sub,
	.ac-hero .ac-hero-actions,
	.ac-hero .ac-hero-facts,
	.ac-hero .ac-path,
	.ac-hero .ac-faculty-card,
	.ac-hero .ac-faculty-cover { animation: acRise .7s var(--ac-ease) backwards; }
	.ac-hero .ac-hero-title { animation-delay: .08s; }
	.ac-hero .ac-hero-en { animation-delay: .14s; }
	.ac-hero .ac-hero-sub { animation-delay: .2s; }
	.ac-hero .ac-hero-actions { animation-delay: .26s; }
	.ac-hero .ac-hero-facts { animation-delay: .32s; }
	.ac-hero .ac-path,
	.ac-hero .ac-faculty-card,
	.ac-hero .ac-faculty-cover { animation-delay: .2s; }
	.ac-hero::before { animation: acFloat 18s ease-in-out infinite; }
	.ac-hero::after { animation: acFloat 22s ease-in-out infinite reverse; }
	/* ขีดใต้คำเน้นวาดตัวเองตอนเปิดหน้า */
	@keyframes acDraw { from { background-size: 0 .14em; } to { background-size: 100% .14em; } }
	.ac-hero .ac-hero-title .ac-hl { animation: acDraw .9s .5s var(--ac-ease) backwards; }
	/* ตัวเลขในการ์ดเส้นทางเด้งเข้าทีละขั้น */
	@keyframes acPop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
	.ac-path-steps .ac-path-no { animation: acPop .5s var(--ac-ease) backwards; }
	.ac-path-steps li:nth-child(1) .ac-path-no { animation-delay: .45s; }
	.ac-path-steps li:nth-child(2) .ac-path-no { animation-delay: .6s; }
	.ac-path-steps li:nth-child(3) .ac-path-no { animation-delay: .75s; }
}

/* ==========================================================================
   โมดูลอบรม (training) — hero พื้นกรมท่า + แสง 4 สีแบรนด์ แทนไล่เฉดฟ้า-เขียวเดิม
   สไตล์ hero ของแต่ละหน้าเขียน inline ไว้ใน view (index/lecturer/gallery) จึงใช้
   "html body" เพิ่มน้ำหนัก selector ให้ชนะโดยไม่ต้องแก้ไฟล์ view
   ========================================================================== */
html body .cwie-hero,
html body .cwie-hero.cwie-hero-emerald,
html body .cwie-hero.cwie-hero-indigo,
html body .cwie-hero.cwie-hero-plum {
	background:
		radial-gradient(560px 380px at 88% -10%, var(--hero-glow-a, rgba(238, 122, 18, .30)), transparent 70%),
		radial-gradient(460px 340px at 4% 110%, var(--hero-glow-b, rgba(46, 139, 61, .32)), transparent 70%),
		radial-gradient(380px 260px at 50% 120%, rgba(242, 183, 5, .14), transparent 70%),
		var(--cwie-blue-deep) !important;
	border-bottom: 4px solid transparent;
	border-image: var(--ac-stripe) 1;
}
/* แยกหน้าด้วยสีแสง (เดิมแยกด้วยไล่เฉดคนละชุด) */
html body .cwie-hero.cwie-hero-emerald { --hero-glow-a: rgba(46, 139, 61, .38); --hero-glow-b: rgba(36, 73, 201, .35); }
html body .cwie-hero.cwie-hero-indigo { --hero-glow-a: rgba(36, 73, 201, .45); --hero-glow-b: rgba(242, 183, 5, .22); }
html body .cwie-hero.cwie-hero-plum { --hero-glow-a: rgba(238, 122, 18, .34); --hero-glow-b: rgba(36, 73, 201, .35); }
html body .cwie-hero .cwie-hero-title em { background: none; color: var(--ac-i); }
html body .cwie-hero .cwie-hero-eyebrow,
html body .cwie-hero .cwie-hero-badges span i { color: var(--ac-i); }
html body .cwie-hero-actions .btn-hero:not(.btn-hero-ghost) { color: var(--cwie-blue-deep) !important; }

/* เส้นทางการเข้าร่วมอบรม: หมุดวนตามสีแบรนด์ */
html body .cwie-j-blue .cwie-journey-marker { background: var(--ac-c) !important; }
html body .cwie-j-green .cwie-journey-marker { background: var(--ac-e) !important; }
html body .cwie-j-deep .cwie-journey-marker { background: var(--cwie-blue) !important; }
html body .cwie-j-gold .cwie-journey-marker { background: var(--ac-w) !important; }
html body .cwie-journey-marker { box-shadow: 0 8px 18px rgba(17, 26, 46, .14) !important; }

/* การ์ดประกาศรับสมัคร: ขอบบน 4 สี + ปุ่มสมัครเป็นกรมท่าเรียบ */
html body .cwie-announce-card { border-top: 4px solid transparent; border-image: var(--ac-stripe) 1; }
/* คลื่นขาวท้าย hero (จาก cwie-site.css) ซ้อนกับวงแหวนของหน้า training ออกมาเป็นก้อนขาวมุมซ้ายล่าง — ตัดคลื่นทิ้ง */
html body .cwie-hero::after { background-image: none !important; }
