/* ==========================================================================
   CWIE public website — modern skin over the Canvas theme
   โหลดเป็นไฟล์สุดท้ายใน header.php จึงทับสไตล์ธีมเดิมได้โดยไม่ต้องแก้ไฟล์ธีม
   ปรับเฉพาะการนำเสนอ (สี/ระยะ/เงา/ตัวอักษร) โครง HTML และสคริปต์เดิมไม่ถูกแตะ
   ========================================================================== */

/* จานสี "กรมท่า-ทองหม่น" — โทนสถาบันการศึกษา เน้นความน่าเชื่อถือและเป็นทางการ
   กรมท่าเป็นสีหลัก (พื้นหัวเว็บ/ฮีโร่/ฟุตเตอร์ และลิงก์/ไอคอน)
   ทองหม่นใช้เป็นจุดเน้นเล็ก ๆ เท่านั้น (ขีดใต้หัวข้อ ป้ายกำกับ ปุ่ม) ไม่ใช้เป็นพื้นกว้าง
   neutral เป็นเทาอมกรมท่า ไม่มีสีครีม/เหลืองเจือ

   แต่ละสีมี 3 บทบาท: ตัวหลัก (บนพื้นขาว) / -deep (พื้นทึบกว้าง) / -ink (ตัวอักษรบนพื้นสีนั้น)
   เลือกค่าโดยดูคอนทราสต์จริง: กรมท่า #2b5d8a บนขาวได้ ~5:1, #1e3a5f ได้ ~9.5:1
   ส่วนทอง #c9a227 สว่างเกินจะใช้เป็นตัวอักษรบนขาว จึงมี -deep #8a6d10 ไว้ใช้แทน */
:root {
	--cwie-blue: #2b5d8a;
	--cwie-blue-deep: #1e3a5f;
	--cwie-blue-darkest: #14283f;
	--cwie-blue-bright: #4a7fae;
	--cwie-gold: #c9a227;
	--cwie-gold-deep: #8a6d10;
	--cwie-gold-ink: #3a2f06;
	--cwie-green: #2f7a5f;
	--cwie-green-deep: #235c47;
	--cwie-ink: #16202e;
	--cwie-text: #46526a;
	--cwie-muted: #8593a8;
	--cwie-line: #e4e8ee;
	--cwie-bg-soft: #f6f8fb;
	--cwie-radius: 14px;
	--cwie-shadow: 0 1px 2px rgba(20, 32, 55, .05);
	--cwie-shadow-lg: 0 12px 32px rgba(20, 32, 55, .10);
}

body,
#wrapper {
	color: var(--cwie-text);
	background-color: #fff;
}

/* ---------- typography ---------- */
body,
.entry-title h3,
h1, h2, h3, h4, h5, h6 {
	font-family: 'IBM Plex Sans Thai', 'Segoe UI', sans-serif;
}

h1, h2, h3, h4, h5, h6 { color: var(--cwie-ink); letter-spacing: 0; }
h2 { font-weight: 700; }
h3 { font-weight: 600; }

/* ---------- top bar ---------- */
#top-bar {
	background: var(--cwie-ink);
	/* เส้นทองบางคั่นใต้แถบบน — รายละเอียดเล็กที่ให้ความรู้สึกเป็นสถาบัน */
	border-bottom: 2px solid var(--cwie-gold);
}

#top-bar .top-links-item > a,
#top-bar .ts-text,
#top-bar a { color: rgba(255, 255, 255, .85) !important; }

#top-bar a:hover { color: #fff !important; }

#top-bar .top-links-item > a {
	font-weight: 600;
	letter-spacing: .2px;
	color: var(--cwie-gold) !important;
}

#top-bar .top-links-item > a:hover { color: #fff !important; }

/* ---------- header / nav ---------- */
#header {
	border-bottom: 1px solid var(--cwie-line);
	box-shadow: 0 2px 14px rgba(20, 32, 55, .05);
}

#header.sticky-header #header-wrap {
	box-shadow: 0 4px 18px rgba(20, 32, 55, .09);
}

.primary-menu .menu-link {
	font-weight: 600;
	font-size: .95rem;
	color: var(--cwie-text);
	letter-spacing: 0;
	border-radius: 10px;
	transition: color .15s ease, background-color .15s ease;
}

.primary-menu .menu-item:hover > .menu-link {
	color: var(--cwie-blue) !important;
	background: rgba(43, 93, 138, .06);
}

/* เมนูที่กำลังอยู่ใช้แค่ขีดสีทองด้านล่างเป็นตัวบอก ไม่ต้องมีกล่องพื้น
   (กล่องพื้นซีดทำให้หัวเว็บดูเลอะ) */
.primary-menu .menu-item.current > .menu-link {
	color: var(--cwie-blue) !important;
	background: none;
}

/* ขีดใต้เมนูที่กำลังอยู่ */
.primary-menu > .menu-container > .menu-item.current > .menu-link::after {
	content: "";
	display: block;
	height: 2px;
	margin-top: 5px;
	background: var(--cwie-gold-deep);
}

.primary-menu .sub-menu-container {
	border: 1px solid var(--cwie-line);
	border-radius: 12px;
	box-shadow: var(--cwie-shadow);
	overflow: hidden;
	padding: 6px;
}

.primary-menu .sub-menu-container .menu-link {
	border-radius: 8px;
	font-weight: 500;
}

/* ---------- hero (แถบหัวเรื่องใต้แบนเนอร์) ---------- */
.promo.header-stick,
.cwie-hero {
	position: relative;
	background: var(--cwie-blue-deep);
	border: none;
	color: #fff;
	overflow: hidden;
}

.cwie-hero {
	background:
		radial-gradient(1100px 560px at 12% -15%, rgba(201, 162, 39, .20), transparent 60%),
		radial-gradient(900px 520px at 105% 8%, rgba(74, 127, 174, .28), transparent 58%),
		radial-gradient(800px 480px at 15% 125%, rgba(47, 122, 95, .22), transparent 58%),
		linear-gradient(135deg, var(--cwie-blue-deep) 0%, var(--cwie-blue-darkest) 45%, #16324f 100%);
	padding-bottom: calc(4.6rem + 46px);
}

.cwie-hero > .container { position: relative; z-index: 2; }

/* ตัวแปรสีพื้นหลังฮีโร่ — ใช้แยกหน้าในโมดูล training ออกจากกันด้วยสี ไม่ให้ทุกหน้าดูซ้ำเป็นสีเดียวกัน
   ทับเฉพาะ background ของ .cwie-hero ฐาน ปุ่ม/ป้ายด้านในยังใช้กติกาเดียวกันหมด
   แต่ละธีมมีไล่เฉดทแยง 3 สต็อป + แสงเรืองสีตัดกันมุมบนขวา ให้ดูมีมิติแบบพรีเมียม */

/* training (index) — มรกต/เขียวหยก */
.cwie-hero.cwie-hero-emerald {
	background:
		radial-gradient(720px 460px at 88% -18%, rgba(94, 234, 212, .38), transparent 60%),
		radial-gradient(900px 520px at 10% 120%, rgba(16, 185, 129, .28), transparent 62%),
		linear-gradient(140deg, #0f9d76 0%, #0a7256 42%, #054537 78%, #03302a 100%);
}
.cwie-hero.cwie-hero-emerald .cwie-hero-actions .btn-hero { color: #0a7256 !important; }

/* training/lecturer — ครามหลวง */
.cwie-hero.cwie-hero-indigo {
	background:
		radial-gradient(720px 460px at 88% -18%, rgba(129, 212, 250, .4), transparent 60%),
		radial-gradient(900px 520px at 8% 122%, rgba(124, 58, 237, .3), transparent 62%),
		linear-gradient(140deg, #3d5df0 0%, #3730c4 44%, #241d78 80%, #171147 100%);
}
.cwie-hero.cwie-hero-indigo .cwie-hero-actions .btn-hero { color: #3730c4 !important; }

/* training/lecturer/list — พลัม/องุ่น */
.cwie-hero.cwie-hero-plum {
	background:
		radial-gradient(720px 460px at 88% -18%, rgba(249, 168, 212, .4), transparent 60%),
		radial-gradient(900px 520px at 8% 122%, rgba(59, 130, 246, .26), transparent 62%),
		linear-gradient(140deg, #a03cc9 0%, #7d2bad 44%, #521b7d 80%, #34114f 100%);
}
.cwie-hero.cwie-hero-plum .cwie-hero-actions .btn-hero { color: #7d2bad !important; }

/* ลายจุดจาง ๆ ให้พื้นน้ำเงินมีเนื้อ แทนการพึ่งไล่เฉดหรือคลื่น */
.promo.header-stick::before,
.cwie-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px);
	background-size: 22px 22px;
	-webkit-mask-image: linear-gradient(to bottom right, #000, transparent 62%);
	mask-image: linear-gradient(to bottom right, #000, transparent 62%);
}

/* คลื่นโค้งท้ายฮีโร่ ไล่เข้าสู่พื้นขาวของแถบถัดไป แทนการตัดตรงแข็ง ๆ */
.cwie-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 46px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C240,90 480,0 720,30 C960,60 1200,10 1440,50 L1440,100 L0,100 Z' fill='%23ffffff'/%3E%3C/svg%3E");
	background-size: 100% 100%;
	background-repeat: no-repeat;
	pointer-events: none;
	z-index: 1;
}

/* จุดเรืองแสงลอยเบา ๆ ให้พื้นน้ำเงินมีชีวิตชีวาขึ้น (ไม่ผูกกับ prefers-reduced-motion —
   ผู้ใช้ขอฟีเจอร์ที่ "ดุกดิก" ไว้ตรง ๆ ดู memory reduced-motion-guard) */
.cwie-hero-glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
	opacity: .5;
	pointer-events: none;
	z-index: 0;
	animation: cwieHeroFloat 16s ease-in-out infinite;
}
.cwie-hero-glow-1 { width: 340px; height: 340px; background: var(--cwie-gold-deep); top: -120px; right: 8%; }
.cwie-hero-glow-2 { width: 280px; height: 280px; background: var(--cwie-green); bottom: -110px; left: -60px; animation-delay: -5s; }
.cwie-hero-glow-3 { width: 220px; height: 220px; background: var(--cwie-blue-bright); top: 30%; right: -70px; opacity: .35; animation-delay: -9s; }
@keyframes cwieHeroFloat {
	0%, 100% { transform: translate(0, 0); }
	50%      { transform: translate(-18px, 22px); }
}

.cwie-hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	background: rgba(255, 255, 255, .14);
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 50rem;
	padding: .4em 1em;
	font-size: .82rem;
	font-weight: 600;
	color: var(--cwie-gold);
	position: relative;
	margin-bottom: 1.1rem;
}

.promo.header-stick h3,
.promo.header-stick span,
.cwie-hero h1,
.cwie-hero h3,
.cwie-hero span,
.cwie-hero p { color: #fff; position: relative; }

.cwie-hero .cwie-hero-title {
	font-size: clamp(1.75rem, 3.8vw, 2.9rem);
	font-weight: 700;
	line-height: 1.28;
	letter-spacing: -.01em;
	margin-bottom: .85rem;
	text-wrap: balance;
}

.cwie-hero .cwie-hero-title em {
	font-style: normal;
	background: linear-gradient(100deg, var(--cwie-gold) 0%, #f3d67e 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.cwie-hero .cwie-hero-sub {
	font-size: 1.02rem;
	opacity: .92;
	margin-bottom: 1.4rem;
	line-height: 1.75;
}

.cwie-hero-actions .btn-hero {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	background: linear-gradient(135deg, #fff 0%, #f2f5fa 100%);
	color: var(--cwie-blue-deep) !important;
	font-weight: 700;
	border-radius: 10px;
	padding: .8rem 1.7rem;
	margin: .25rem .4rem .25rem 0;
	box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
	transition: transform .18s ease, box-shadow .18s ease;
}

.cwie-hero-actions .btn-hero i { transition: transform .18s ease; }

.cwie-hero-actions .btn-hero:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
}
.cwie-hero-actions .btn-hero:hover i { transform: translateX(3px); }

/* ปุ่มรอง: พื้นโปร่งสีเข้ม (ไม่ใช่ขาวจาง) เพื่อให้ตัวอักษรขาวอ่านชัดบนฮีโร่ทุกสี
   ขาวจางบนพื้นสว่าง = อักษรขาวจมหาย จึงกลับเป็นแบบ "กระจกเข้ม" ขอบขาวหนา */
.cwie-hero-actions .btn-hero-ghost {
	background: rgba(15, 23, 42, .28);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: #fff !important;
	font-weight: 700;
	border: 2px solid rgba(255, 255, 255, .9);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
	text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.cwie-hero-actions .btn-hero-ghost i { color: #fff; }

.cwie-hero-actions .btn-hero-ghost:hover {
	background: rgba(15, 23, 42, .42);
	border-color: #fff;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}

/* ป้ายจุดเด่นในฮีโร่ */
.cwie-hero-badges {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: 1.4rem;
	position: relative;
}

.cwie-hero-badges span {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	background: rgba(255, 255, 255, .12);
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 50rem;
	padding: .38em .95em;
	font-size: .86rem;
	color: #fff;
}

.cwie-hero-badges span i { color: var(--cwie-gold); }

.cwie-hero {
	padding: 4.6rem 0;
	margin-bottom: 0;
}


/* ---------- แถบเนื้อหา (สลับพื้นหลังให้หน้าเว็บมีจังหวะ) ---------- */
.cwie-band {
	position: relative;
	padding: 5.2rem 0;
	background: #fff;
}

.cwie-band-soft {
	background: var(--cwie-bg-soft);
	border-top: 1px solid var(--cwie-line);
	border-bottom: 1px solid var(--cwie-line);
}

.cwie-band-dark {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(900px 480px at 92% -12%, rgba(201, 162, 39, .18), transparent 60%),
		radial-gradient(760px 460px at 4% 112%, rgba(47, 122, 95, .2), transparent 58%),
		linear-gradient(160deg, var(--cwie-blue-deep) 0%, var(--cwie-blue-darkest) 100%);
}

.cwie-band-dark::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px);
	background-size: 24px 24px;
	-webkit-mask-image: radial-gradient(circle at 25% 15%, #000, transparent 65%);
	mask-image: radial-gradient(circle at 25% 15%, #000, transparent 65%);
	pointer-events: none;
}

.cwie-band-dark > .container { position: relative; z-index: 1; }

.cwie-band-dark .cwie-section-title { color: #fff; }
.cwie-band-dark .cwie-section-sub { color: rgba(255, 255, 255, .68); }
.cwie-band-dark .cwie-eyebrow { color: var(--cwie-gold); }
.cwie-band-dark .cwie-eyebrow::before { background: var(--cwie-gold); }

/* การ์ดวิดีโอบนพื้นเข้ม — ให้ยกตัวขึ้นเบา ๆ ตอนชี้ เข้าชุดกับการ์ดสถิติ */
.cwie-band-dark .portfolio-item { transition: transform .25s ease; }
.cwie-band-dark .portfolio-item:hover { transform: translateY(-4px); }

.cwie-band-dark .portfolio-desc span { color: rgba(255, 255, 255, .92); }
.cwie-band-dark .portfolio-desc small { color: rgba(255, 255, 255, .58); }

/* กระเบื้องสำรองเมื่อไฟล์ thumbnail ของวิดีโอหายไปจากดิสก์ — กันไอคอนรูปหัก */
.cwie-video-fallback {
	aspect-ratio: 16 / 9;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--cwie-blue-bright) 0%, var(--cwie-blue-deep) 100%);
	color: rgba(255, 255, 255, .55);
	font-size: 2rem;
}

/* ---------- หัวข้อหมวดแบบใหม่ ---------- */
.cwie-section-head {
	margin-bottom: 2.8rem;
	max-width: 680px;
}

.cwie-section-head.center {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.cwie-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	font-size: .84rem;
	font-weight: 600;
	color: var(--cwie-gold-deep);
	margin-bottom: .7rem;
}

/* ขีดนำหน้าป้ายกำกับ — ใช้แทนพื้นแคปซูล ให้อ่านเป็นคำกำกับหมวด ไม่ใช่ปุ่ม */
.cwie-eyebrow::before {
	content: "";
	width: 20px;
	height: 2px;
	background: var(--cwie-gold-deep);
	flex-shrink: 0;
}

.cwie-section-title {
	position: relative;
	font-size: clamp(1.6rem, 3.2vw, 2.35rem);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.01em;
	color: var(--cwie-ink);
	margin-bottom: .6rem;
	text-wrap: balance;
}

.cwie-section-sub {
	font-size: 1rem;
	color: var(--cwie-muted);
	line-height: 1.7;
	margin-bottom: 0;
}

/* ---------- section titles ---------- */
.fancy-title.title-bottom-border {
	border-bottom: none;
	margin-bottom: 1.8rem;
	width: 100%;
}

.fancy-title.title-bottom-border h3 {
	position: relative;
	display: inline-block;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--cwie-ink);
	padding-bottom: .6rem;
	margin-bottom: 0;
	/* construction.css ใส่ border-bottom สี teal ไว้ที่ h3 — ต้องปิด
	   ไม่งั้นจะเห็นเส้นสองสีซ้อนกันกับแถบส้มด้านล่าง */
	border-bottom: none !important;
}

.fancy-title.title-bottom-border h3::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 44px;
	height: 3px;
	background: var(--cwie-gold-deep);
}

.fancy-title h3 i {
	color: var(--cwie-blue);
	margin-right: .5rem;
}

.section > h2.center {
	font-size: 1.9rem;
	font-weight: 700;
}

/* เส้นคั่นระหว่างบล็อก */
.line, .line.line-sm { border-top-color: var(--cwie-line); }

/* ---------- news cards ---------- */
.posts-carousel .entry,
.entry.cwie-card {
	background: #fff;
	border: 1px solid var(--cwie-line);
	border-radius: var(--cwie-radius);
	overflow: hidden;
	height: 100%;
	transition: transform .2s ease, box-shadow .2s ease;
}

.posts-carousel .entry:hover {
	transform: translateY(-3px);
	box-shadow: var(--cwie-shadow-lg);
	border-color: #cfd9e6;
}

/* รูปข่าว: ซูมเบา ๆ ตอน hover + เคลือบไล่เฉดด้านล่างให้ดูมีมิติ */
.posts-carousel .entry-image {
	margin-bottom: 0;
	position: relative;
	overflow: hidden;
}

.posts-carousel .entry-image::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 45%;
	background: linear-gradient(to top, rgba(20, 26, 45, .35), transparent);
	pointer-events: none;
	z-index: 1;
}

.posts-carousel .entry-image img {
	border-radius: 0;
	transition: transform .5s ease;
}

.posts-carousel .entry:hover .entry-image img { transform: scale(1.06); }

.posts-carousel .entry-title { padding: 1rem 1.1rem 0; }

.posts-carousel .entry-title h3 {
	font-size: 1.02rem;
	font-weight: 600;
	line-height: 1.5;
}

.posts-carousel .entry-title h3 a { color: var(--cwie-ink); }
.posts-carousel .entry-title h3 a:hover { color: var(--cwie-blue); }

.posts-carousel .entry-meta {
	padding: .35rem 1.1rem 0;
	margin-top: .4rem;
}

.posts-carousel .entry-meta li {
	font-size: .82rem;
	color: var(--cwie-muted);
	margin-bottom: 0;
}

.posts-carousel .entry-content { padding: .9rem 1.1rem 1.1rem; margin-top: 0; }

/* ปุ่มมาตรฐานของเว็บ */
.button.button-border.button-rounded {
	border-radius: 10px;
	border-width: 1px;
	border-color: var(--cwie-blue);
	color: var(--cwie-blue);
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	padding: 0 1.2rem;
	line-height: 38px;
	height: 38px;
	transition: all .15s ease;
}

.button.button-border.button-rounded:hover {
	background: var(--cwie-blue);
	border-color: var(--cwie-blue);
	color: #fff;
	box-shadow: none;
}

/* จุด/ลูกศรของ carousel */
.owl-carousel .owl-dot span {
	background: #dfe4ec;
	border-radius: 50rem;
	transition: all .2s ease;
}

.owl-carousel .owl-dot.active span {
	background: var(--cwie-blue);
	width: 22px;
}

.owl-carousel .owl-nav button {
	background: #fff !important;
	border: 1px solid var(--cwie-line) !important;
	box-shadow: var(--cwie-shadow);
	border-radius: 50% !important;
	color: var(--cwie-blue) !important;
}

/* ---------- faculty grid ---------- */
.clients-grid .grid-item {
	border: 1px solid var(--cwie-line) !important;
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.clients-grid .grid-item:hover {
	transform: translateY(-3px);
	border-color: transparent !important;
	box-shadow: var(--cwie-shadow-lg);
}

.clients-grid .grid-item img {
	padding: 1.1rem;
	object-fit: contain;
	filter: none;
	opacity: 1;
}

.clients-grid .bg-overlay-bg { background: rgba(31, 39, 64, .72); }

.clients-grid .portfolio-desc h3 { font-size: .92rem; line-height: 1.5; }
.clients-grid .portfolio-desc h3 a { color: #fff; }

/* ---------- ตัวเลขผลการดำเนินงาน (counters) ---------- */
/* ธีมเดิมกำหนดสีพาสเทลไว้ใน inline style — ทับเป็นการ์ดขาวเส้นผมบาง ให้ตัวเลขเด่นแทนพื้นสี
   การ์ดพวกนี้เป็น <button> เปิด modal ได้ จึงต้องมีสัญญาณว่ากดได้ (เคอร์เซอร์ ลูกศร แถบสีตอนชี้) */
.cwie-stats .btn {
	position: relative;
	display: flex !important;
	flex-direction: column;
	/* ต้องเป็น stretch ไม่ใช่ flex-start — flex-start ทำให้ลูกทุกตัวหดตามความกว้าง
	   ของไอคอน (46px) ข้อความคำอธิบายจึงถูกบีบตกบรรทัดทีละตัวอักษรจนการ์ดสูงผิดปกติ */
	align-items: stretch;
	text-align: left !important;
	background: #fff !important;
	border: 1px solid var(--cwie-line) !important;
	border-radius: var(--cwie-radius) !important;
	padding: 1.7rem 1.6rem 1.5rem !important;
	/* การ์ดใบแรกมีคลาส .shadow ของ Bootstrap ติดมา (มี !important) จึงต้องทับด้วย !important */
	box-shadow: none !important;
	overflow: hidden;
	cursor: pointer;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

/* แถบสีบางบนขอบบน กวาดออกตอนชี้ — บอกว่าการ์ดกดได้ โดยไม่ต้องเพิ่มอะไรใน HTML */
.cwie-stats .btn::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

.cwie-stats .btn:hover::before,
.cwie-stats .btn:focus-visible::before { transform: scaleX(1); }

/* ลูกศรมุมขวาบน (ทำจากเส้นขอบสองด้าน) จางไว้ ชัดขึ้นตอนชี้ */
.cwie-stats .btn::after {
	content: "";
	position: absolute;
	top: 1.9rem;
	right: 1.6rem;
	width: 7px;
	height: 7px;
	border-top: 2px solid var(--cwie-muted);
	border-right: 2px solid var(--cwie-muted);
	transform: rotate(45deg);
	opacity: .35;
	transition: opacity .2s ease, transform .2s ease, right .2s ease;
}

.cwie-stats .btn:hover::after {
	opacity: 1;
	right: 1.35rem;
}

.cwie-stats .btn:focus-visible {
	outline: 3px solid var(--cwie-gold);
	outline-offset: 2px;
}

/* ธีมลากเส้นคั่นใต้ตัวเลขผ่าน .counter-lined — ตัดออก แล้วคุมระยะด้วย margin เอง
   ห้ามทำ .counter เป็น flex: ตัวนับของธีมยิงผ่าน jquery.appear ซึ่งเช็ค :visible
   ถ้าเป็น flex ตัว span ที่ยังว่างจะกลายเป็น 0x0 -> ถือว่ามองไม่เห็น -> ตัวเลขไม่ขึ้นเลย
   จึงคง span ไว้เป็น inline แล้วซ่อน <br> เพื่อดึงหน่วยนับขึ้นมาบรรทัดเดียวกันแทน */
.cwie-stats .counter,
.cwie-stats .counter-lined {
	border: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

.cwie-stats .counter br { display: none; }

.cwie-stats .btn:hover {
	transform: translateY(-4px);
	border-color: #cfd9e6 !important;
	box-shadow: 0 14px 34px rgba(20, 32, 55, .13);
}

/* ชิพไอคอน — เข้มพอให้เห็นเป็นสี (เดิม 10-16% ซีดจนดูเป็นสีเทา) + วงแหวนบางให้มีมิติ */
.cwie-stats .btn i.i-plain {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	/* การ์ดเป็น stretch ไอคอนจึงต้องบอกไม่ให้ยืดเต็มความกว้าง */
	align-self: flex-start;
	width: 48px !important;
	height: 48px !important;
	line-height: 48px !important;
	font-size: 1.3rem !important;
	border-radius: 13px !important;
	margin: 0 0 1.4rem !important;
	transition: transform .2s ease;
}

.cwie-stats .btn:hover i.i-plain { transform: scale(1.06); }

/* สีประจำใบ วนสามสีตามชุดกรมท่า-ทอง-เขียว: ชิพ, วงแหวน และแถบบนใช้สีเดียวกันทั้งใบ */
.cwie-stats .btn:nth-of-type(3n+1) i.i-plain {
	background-color: rgba(43, 93, 138, .12) !important;
	box-shadow: inset 0 0 0 1px rgba(43, 93, 138, .22);
	color: var(--cwie-blue) !important;
}

.cwie-stats .btn:nth-of-type(3n+2) i.i-plain {
	background-color: rgba(201, 162, 39, .20) !important;
	box-shadow: inset 0 0 0 1px rgba(138, 109, 16, .28);
	color: var(--cwie-gold-deep) !important;
}

.cwie-stats .btn:nth-of-type(3n+3) i.i-plain {
	background-color: rgba(47, 122, 95, .14) !important;
	box-shadow: inset 0 0 0 1px rgba(47, 122, 95, .24);
	color: var(--cwie-green) !important;
}

.cwie-stats .btn:nth-of-type(3n+1)::before { background: var(--cwie-blue); }
.cwie-stats .btn:nth-of-type(3n+2)::before { background: var(--cwie-gold); }
.cwie-stats .btn:nth-of-type(3n+3)::before { background: var(--cwie-green); }

/* ตัวเลขเป็นพระเอก — ตัวเลขเรียงหลักตรงกันทุกใบด้วย tabular-nums */
.cwie-stats .counter > span {
	font-size: 2.5rem !important;
	line-height: 1;
	font-weight: 700;
	color: var(--cwie-ink) !important;
	font-variant-numeric: tabular-nums;
	letter-spacing: -.025em;
}

/* หน่วยนับ (หลักสูตร/คน/แห่ง) วางต่อท้ายเลขในบรรทัดเดียวกัน แต่เล็กและเบากว่าชัดเจน
   ให้ตาแยกออกว่าอะไรคือค่า อะไรคือหน่วย */
.cwie-stats .btn h3 {
	display: inline-block;
	vertical-align: baseline;
	font-size: .82rem !important;
	font-weight: 600;
	margin: 0 0 0 .4rem !important;
	color: var(--cwie-muted) !important;
	letter-spacing: .01em;
}

/* การ์ด "ระดับดีมาก" ไม่มีตัวเลข ใช้ h2 แทน — ตั้งขนาดให้น้ำหนักสายตาใกล้ตัวเลขใบอื่น */
.cwie-stats .btn h2 {
	font-size: 1.75rem !important;
	line-height: 1.25;
	font-weight: 700;
	margin: 0 !important;
	color: var(--cwie-ink) !important;
	letter-spacing: -.01em;
}

/* คำอธิบาย: ดันชิดล่างให้ทุกใบจบระดับเดียวกัน + เส้นคั่นบางคั่นจากตัวเลข */
.cwie-stats .btn h5 {
	font-weight: 500;
	font-size: .875rem;
	margin: auto 0 0 !important;
	padding-top: 1.1rem;
	border-top: 1px solid var(--cwie-line);
	color: var(--cwie-text) !important;
	line-height: 1.6;
}

/* ธีมวางขีดสั้น ๆ ไว้หน้า h5 (border-top 2px) ลอยอยู่กลางการ์ดโดยไม่สื่อความหมาย — ตัดออก */
.cwie-stats .btn h5::before { display: none !important; }

.cwie-stats .counter-lined { border-color: var(--cwie-line) !important; }

/* ---------- calendar ---------- */
#calendar {
	background: #fff;
	border: 1px solid var(--cwie-line);
	border-radius: var(--cwie-radius);
	padding: 1.2rem;
	box-shadow: var(--cwie-shadow);
	width: 100%;
}

.fc-toolbar h2 { font-size: 1.25rem; font-weight: 700; }

.fc button {
	border-radius: 8px !important;
	border-color: var(--cwie-line) !important;
	color: var(--cwie-text) !important;
	background-image: none !important;
	background-color: var(--cwie-bg-soft) !important;
	box-shadow: none !important;
	text-transform: none;
}

.fc button:hover { background-color: #eaf0f7 !important; color: var(--cwie-blue) !important; }
.fc-state-active { background: var(--cwie-blue) !important; color: #fff !important; border-color: transparent !important; }
.fc-event { border: none; border-radius: 6px; padding: 2px 5px; font-size: .82rem; }

/* ---------- video carousel ---------- */
.portfolio-carousel .oc-item > div,
.portfolio-carousel iframe {
	border-radius: 14px;
	overflow: hidden;
}

/* ---------- page (inner) headers ---------- */
/* คอมโพเนนต์ breadcrumb ของเว็บใช้ id #page-title (ธีมมีคลาส .page-title ด้วย จึงเขียนคลุมทั้งคู่) */
#page-title,
.page-title {
	position: relative;
	background: var(--cwie-blue-deep);
	/* เส้นทองบางปิดท้ายแถบหัวเรื่อง ให้เข้าชุดกับเส้นใต้แถบบน */
	border-bottom: 2px solid var(--cwie-gold);
	padding: 3.2rem 0;
	overflow: hidden;
}

#page-title::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
	background-size: 22px 22px;
	-webkit-mask-image: linear-gradient(to bottom right, #000, transparent 62%);
	mask-image: linear-gradient(to bottom right, #000, transparent 62%);
}

#page-title h1,
#page-title span,
#page-title .breadcrumb a,
#page-title .breadcrumb li,
#page-title .breadcrumb .active,
.page-title h1,
.page-title span,
.page-title .breadcrumb a,
.page-title .breadcrumb li,
.page-title .breadcrumb .active {
	color: #fff !important;
	position: relative;
}

#page-title h1,
.page-title h1 {
	font-weight: 700;
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	line-height: 1.3;
	letter-spacing: -.01em;
	border-left: none;
	padding-left: 0;
}

#page-title .breadcrumb a { opacity: .85; }
#page-title .breadcrumb a:hover { opacity: 1; }
#page-title .breadcrumb { margin-top: .5rem; }
#page-title .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .55); }

/* ---------- footer ---------- */
/* ธีมกำหนดสีไว้ที่ ".dark #footer" (specificity สูงกว่า #footer เดี่ยว ๆ) จึงต้องระบุให้ตรงกัน */
#footer,
.dark #footer,
#footer.dark {
	background: var(--cwie-blue-deep);
	border-top: none;
	color: rgba(255, 255, 255, .72);
}

#footer h4, #footer h3, .dark #footer h4, .dark #footer h3 { color: #fff; }
#footer a, .dark #footer a { color: rgba(255, 255, 255, .8); }
#footer a:hover, .dark #footer a:hover { color: #fff; }

#copyrights,
.dark #copyrights,
#copyrights.dark {
	background: var(--cwie-blue-darkest);
	color: rgba(255, 255, 255, .6);
	border-top: 1px solid rgba(255, 255, 255, .08);
}

/* ---------- misc ---------- */
#gotoTop {
	background: var(--cwie-blue);
	border-radius: 12px;
	box-shadow: 0 6px 16px rgba(20, 30, 90, .22);
	color: #fff;
}

a { color: var(--cwie-blue); }
a:hover { color: var(--cwie-blue-bright); }

.bg-white-soft { background: var(--cwie-bg-soft); }

/* ระยะห่างระหว่างบล็อกเนื้อหาให้หายใจขึ้น */
.content-wrap { padding: 0 0 4rem; }
.content-wrap .container > .row.col-mb-50 { margin-bottom: .5rem; }

/* ==========================================================================
   เฮดเดอร์แถวเดียว + แถบยูทิลิตี้ + ฟุตเตอร์เต็มรูปแบบ
   ========================================================================== */

/* ---------- แถบยูทิลิตี้ด้านบน (บางลง เหลือแค่ลิงก์เว็บในเครือ + เบอร์โทร) ---------- */
.cwie-topbar {
	font-size: .82rem;
	line-height: 1.4;
}

.cwie-topbar .container > .row {
	min-height: 38px;
}

/* ธีมทำ #top-social เป็นไอคอนกว้างคงที่แล้วค่อยกางข้อความตอน hover
   ที่นี่ต้องการให้ข้อความโชว์ถาวร จึงต้องปลดความกว้างคงที่ของทั้ง a และ .ts-icon ด้วย
   ไม่ใช่แค่เปิด .ts-text (ไม่ปลด -> ข้อความล้นไปทับไอคอนตัวถัดไป) */
.cwie-topbar #top-social { display: flex; flex-wrap: wrap; }

.cwie-topbar #top-social li a {
	display: inline-flex !important;
	align-items: center;
	width: auto !important;
	height: auto !important;
	padding: 0 1.1rem 0 0 !important;
	margin: 0 !important;
	border: none !important;
	overflow: visible !important;
	background: none !important;
}

.cwie-topbar #top-social li a .ts-icon {
	position: static !important;
	width: auto !important;
	height: auto !important;
	line-height: 1 !important;
	margin-right: .4rem;
	font-size: .92rem;
}

.cwie-topbar #top-social li a .ts-text {
	position: static !important;
	width: auto !important;
	max-width: none !important;
	padding: 0 !important;
	opacity: 1 !important;
	overflow: visible !important;
	white-space: nowrap;
	background: none !important;
}

.cwie-topbar-tel {
	color: rgba(255, 255, 255, .8) !important;
	font-weight: 500;
	white-space: nowrap;
}

.cwie-topbar-tel:hover { color: #fff !important; }
.cwie-topbar-tel i { margin-right: .35rem; }

/* ---------- เฮดเดอร์: บาง ติดหนึบ เบลอพื้นหลังตอนเลื่อน ---------- */
#header-wrap {
	background: rgba(255, 255, 255, .92);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	backdrop-filter: saturate(180%) blur(12px);
}

/* ล็อกความสูง ปล่อยความกว้างตามสัดส่วน — ตัว a เป็น flex ถ้าไม่กัน flex-shrink
   รูปจะถูกบีบจนเสียสัดส่วน (โลโก้เป็นเวิร์ดมาร์ค จึงต้องคงอัตราส่วนไว้) */
#header #logo img {
	height: 58px;
	width: auto;
	max-width: none;
	object-fit: contain;
	flex: 0 0 auto;
}

/* เฮดเดอร์แถวเดียวต้องไม่ตกบรรทัดบนจอใหญ่ (โลโก้ | เมนู | ปุ่ม) */
@media (min-width: 992px) {
	#header-wrap .header-row {
		flex-wrap: nowrap;
	}

	#header-wrap .header-row .primary-menu { min-width: 0; }
}

/* ปุ่มเข้าสู่ระบบในเฮดเดอร์ — คงอยู่แม้เลื่อนหน้าลง */
.cwie-header-cta {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	white-space: nowrap;
	background: var(--cwie-gold-deep);
	color: #fff !important;
	font-weight: 600;
	font-size: .92rem;
	line-height: 1;
	padding: .62rem 1.15rem;
	border-radius: 8px;
	transition: background-color .15s ease;
}

.cwie-header-cta:hover { background: var(--cwie-gold-deep); }

/* ---------- ฟุตเตอร์ ---------- */
.cwie-footer .cwie-footer-cols {
	padding: 3.6rem 0 2.8rem;
}

.cwie-footer-logo {
	max-height: 44px;
	width: auto;
	margin-bottom: 1.1rem;
	background: #fff;
	border-radius: 8px;
	padding: .35rem .6rem;
}

.cwie-footer-about {
	font-size: .9rem;
	line-height: 1.85;
	color: rgba(255, 255, 255, .68);
	margin-bottom: 0;
	max-width: 42ch;
}

.cwie-footer-head {
	font-size: .95rem !important;
	font-weight: 600;
	margin-bottom: 1.1rem;
	color: #fff !important;
}

.cwie-footer-head-sm {
	margin-top: 1.8rem;
}

.cwie-footer-links,
.cwie-footer-contact {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: .6rem;
	font-size: .89rem;
}

.cwie-footer-links a {
	color: rgba(255, 255, 255, .68) !important;
	transition: color .15s ease;
}

.cwie-footer-links a:hover { color: #fff !important; }

.cwie-footer-links-inline {
	flex-direction: row;
	flex-wrap: wrap;
	gap: .4rem .9rem;
	font-size: .84rem;
}

.cwie-footer-contact li {
	display: flex;
	align-items: flex-start;
	gap: .6rem;
	color: rgba(255, 255, 255, .68);
}

.cwie-footer-contact li i {
	color: var(--cwie-gold-deep);
	font-size: .95rem;
	margin-top: .15rem;
	flex-shrink: 0;
}

.cwie-footer-contact a { color: rgba(255, 255, 255, .68) !important; }
.cwie-footer-contact a:hover { color: #fff !important; }

#copyrights { font-size: .84rem; }

/* ==========================================================================
   เส้นทาง CWIE — 3 ขั้นในฮีโร่ (ห้องเรียน -> สถานประกอบการ -> บัณฑิต)
   สีของจุดไล่ตามตัวอักษรในโลโก้: ส้ม (W) / ขาว / เขียว (I)
   ========================================================================== */
.cwie-path {
	position: relative;
	z-index: 1;
	background: rgba(255, 255, 255, .09);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: var(--cwie-radius);
	padding: 1.7rem 1.6rem;
	box-shadow: 0 24px 50px rgba(6, 14, 28, .3);
}

.cwie-path-title {
	font-size: .95rem;
	font-weight: 600;
	color: #fff;
	margin-bottom: 1.3rem;
	display: flex;
	align-items: center;
	gap: .55rem;
}

.cwie-path-step {
	display: flex;
	gap: .95rem;
}

.cwie-path-rail {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex-shrink: 0;
}

.cwie-path-dot {
	width: 32px;
	height: 32px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .92rem;
	font-weight: 700;
	flex-shrink: 0;
}

.cwie-path-step:nth-of-type(1) .cwie-path-dot { background: var(--cwie-gold); color: var(--cwie-gold-ink); box-shadow: 0 0 0 0 rgba(201, 162, 39, .55); animation: cwiePathPulse 2.4s ease-out infinite; }
.cwie-path-step:nth-of-type(2) .cwie-path-dot { background: #fff; color: var(--cwie-blue-deep); }
.cwie-path-step:nth-of-type(3) .cwie-path-dot { background: var(--cwie-green); color: #fff; }

@keyframes cwiePathPulse {
	0%   { box-shadow: 0 0 0 0 rgba(201, 162, 39, .55); }
	70%  { box-shadow: 0 0 0 10px rgba(201, 162, 39, 0); }
	100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0); }
}

.cwie-path-line {
	width: 2px;
	flex: 1;
	min-height: 18px;
	margin: 4px 0;
	background: rgba(255, 255, 255, .22);
}

.cwie-path-body { padding-bottom: 1.15rem; }
.cwie-path-step:last-of-type .cwie-path-body { padding-bottom: 0; }

.cwie-path-body h4 {
	font-size: .95rem;
	font-weight: 600;
	color: #fff;
	margin: .3rem 0 .15rem;
}

.cwie-path-body p {
	font-size: .85rem;
	line-height: 1.7;
	color: rgba(255, 255, 255, .7);
	margin: 0;
}

@media (max-width: 991px) {
	.cwie-path { margin-top: 2.2rem; }
}

@media (max-width: 767px) {
	.cwie-hero { padding: 2.4rem 0 calc(2.4rem + 36px); }
	.cwie-hero::after { height: 36px; }
	.cwie-stats .btn { padding: 1.5rem 1rem !important; }
}

/* ==========================================================================
   หน้าเนื้อหาชั้นใน (about / board / download / gallery / news / quality / trophy)
   ========================================================================== */

/* ---------- การ์ดข้อมูลทั่วไป (พันธกิจ/เป้าหมาย/กลุ่มเป้าหมาย ฯลฯ) ---------- */
.cwie-info-card {
	background: #fff;
	border: 1px solid var(--cwie-line);
	border-radius: var(--cwie-radius);
	padding: 1.9rem 1.7rem;
	height: 100%;
	text-align: center;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cwie-info-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--cwie-shadow-lg);
	border-color: transparent;
}

.cwie-info-card .cwie-info-icon {
	width: 62px;
	height: 62px;
	margin: 0 auto 1.1rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.4rem;
	font-weight: 700;
	color: #fff;
	background: var(--cwie-blue);
	flex-shrink: 0;
}

.cwie-info-card h3 { font-size: 1.05rem; margin-bottom: .6rem; }

.cwie-info-card ol,
.cwie-info-card p {
	text-align: left;
	color: var(--cwie-text);
	font-size: .92rem;
	line-height: 1.8;
	margin-bottom: 0;
}

.cwie-info-card .subtitle { color: var(--cwie-muted); }
.cwie-info-card.center-text ol,
.cwie-info-card.center-text p { text-align: center; }

/* คำโปรย/คำนำแบบอัญประกาศ */
.cwie-quote {
	position: relative;
	background: var(--cwie-bg-soft);
	border: 1px solid var(--cwie-line);
	border-left: 4px solid var(--cwie-blue);
	border-radius: var(--cwie-radius);
	padding: 1.9rem 2.1rem;
	font-size: 1rem;
	line-height: 1.95;
	color: var(--cwie-text);
	margin: 0;
}

/* ---------- บุคคล/คณะกรรมการ ---------- */
.cwie-people-card {
	text-align: center;
	background: #fff;
	border: 1px solid var(--cwie-line);
	border-radius: var(--cwie-radius);
	padding: 1.7rem 1.2rem 1.4rem;
	height: 100%;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cwie-people-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--cwie-shadow-lg);
	border-color: transparent;
}

.cwie-people-card img {
	width: 116px;
	height: 116px;
	object-fit: cover;
	border-radius: 50%;
	margin: 0 auto 1rem;
	display: block;
	border: 3px solid var(--cwie-bg-soft);
	box-shadow: var(--cwie-shadow);
}

.cwie-people-card h4 { font-size: .95rem; font-weight: 700; margin-bottom: .25rem; line-height: 1.4; }
.cwie-people-card .cwie-people-role { color: var(--cwie-blue); font-weight: 600; font-size: .84rem; margin-bottom: .2rem; }
.cwie-people-card .cwie-people-org { color: var(--cwie-muted); font-size: .8rem; line-height: 1.5; }

.cwie-people-card.is-chair { padding: 2.1rem 1.6rem 1.8rem; }
.cwie-people-card.is-chair img {
	width: 160px;
	height: 160px;
	border-width: 4px;
	box-shadow: var(--cwie-shadow-lg);
}
.cwie-people-card.is-chair h4 { font-size: 1.2rem; }
.cwie-people-card.is-chair .cwie-people-role { font-size: .92rem; }

/* ---------- รายการเอกสารดาวน์โหลด ---------- */
.cwie-doc-list { display: flex; flex-direction: column; gap: .7rem; margin: 0; padding: 0; list-style: none; }

.cwie-doc-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	background: #fff;
	border: 1px solid var(--cwie-line);
	border-radius: 14px;
	padding: .85rem 1.2rem;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.cwie-doc-item:hover { transform: translateX(4px); box-shadow: var(--cwie-shadow); border-color: transparent; }

.cwie-doc-icon {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(43, 93, 138, .10);
	color: var(--cwie-blue);
	font-size: 1.05rem;
}

.cwie-doc-name { flex: 1; font-weight: 500; color: var(--cwie-ink); font-size: .93rem; line-height: 1.55; }

.cwie-doc-action {
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--cwie-blue);
	color: #fff !important;
	transition: transform .15s ease, box-shadow .15s ease;
}

.cwie-doc-action:hover { transform: scale(1.08); box-shadow: 0 6px 16px rgba(43, 93, 138, .35); }

/* ---------- แกลเลอรีรูปภาพ ---------- */
.cwie-gallery-grid .grid-item,
.portfolio-image {
	border-radius: 14px;
	overflow: hidden;
	position: relative;
	display: block;
}

.cwie-gallery-grid .grid-item img,
.portfolio-image img { transition: transform .45s ease; }

.cwie-gallery-grid .grid-item:hover img,
.portfolio-item:hover .portfolio-image img { transform: scale(1.08); }

.cwie-gallery-grid .grid-item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(20, 26, 45, .35), transparent 55%);
	opacity: 0;
	transition: opacity .25s ease;
	pointer-events: none;
}

.cwie-gallery-grid .grid-item:hover::after { opacity: 1; }

/* ---------- ข่าว: รายการแนวนอน ---------- */
.cwie-news-row { margin-bottom: 1.5rem; }
.cwie-news-row .entry.cwie-card { display: flex; flex-wrap: wrap; }
.cwie-news-row .cwie-news-thumb { flex: 0 0 320px; max-width: 320px; }
.cwie-news-row .cwie-news-thumb .fslider,
.cwie-news-row .cwie-news-thumb .flexslider { height: 100%; margin-bottom: 0; border: none; }
.cwie-news-row .cwie-news-body { flex: 1 1 260px; padding: 1.7rem 1.9rem; display: flex; flex-direction: column; justify-content: center; }
.cwie-news-row .entry-title h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.5; }
.cwie-news-row .entry-title h2 a { color: var(--cwie-ink); }
.cwie-news-row .entry-title h2 a:hover { color: var(--cwie-blue); }
.cwie-news-row .entry-meta { padding: 0; margin: 0 0 1rem; }
.cwie-news-row .entry-content { padding: 0; margin: 0; }

@media (max-width: 767px) {
	.cwie-news-row .cwie-news-thumb { flex: 1 1 100%; max-width: 100%; }
}

/* ---------- กล่องข้อมูลเมตาในหน้ารายละเอียดข่าว ---------- */
.cwie-meta-card.card {
	border: 1px solid var(--cwie-line);
	border-radius: var(--cwie-radius);
	box-shadow: var(--cwie-shadow);
}

.cwie-meta-card .iconlist li { color: var(--cwie-text); font-size: .92rem; }
.cwie-meta-card .iconlist li i { color: var(--cwie-blue); }

/* ---------- accordion เอกสารประกันคุณภาพ ---------- */
.faq-marketplace.toggle {
	border: 1px solid var(--cwie-line) !important;
	border-radius: var(--cwie-radius) !important;
	overflow: hidden;
	box-shadow: var(--cwie-shadow);
}

.faq-marketplace .toggle-header { background: var(--cwie-bg-soft); padding: 1.1rem 1.4rem; }
.faq-marketplace .toggle-title { font-weight: 600; color: var(--cwie-ink); }
.faq-marketplace .toggle-icon i { color: var(--cwie-blue); }
.faq-marketplace .toggle-content { padding: 1.6rem 1.6rem 1.9rem; }

/* ---------- รางวัล/เกียรติประวัติ ---------- */
.cwie-year-badge {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	background: var(--cwie-gold);
	color: var(--cwie-gold-ink) !important;
	font-weight: 700;
	font-size: .95rem;
	border-radius: 50rem;
	padding: .5em 1.5em;
	margin: 0 0 1.4rem;
	box-shadow: 0 6px 16px rgba(201, 162, 39, .28);
}

.cwie-award-card {
	background: #fff;
	border: 1px solid var(--cwie-line);
	border-radius: var(--cwie-radius);
	padding: 1.6rem;
	margin-bottom: 1.4rem;
	display: flex;
	gap: 1.7rem;
	align-items: flex-start;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cwie-award-card:hover { transform: translateY(-3px); box-shadow: var(--cwie-shadow-lg); border-color: transparent; }

.cwie-award-card .cwie-award-media { flex: 0 0 210px; max-width: 210px; }
.cwie-award-card .cwie-award-media img { border-radius: 12px; width: 100%; }
.cwie-award-card .cwie-award-media.is-dual { display: flex; gap: .5rem; }

.cwie-award-card .cwie-award-body { flex: 1 1 auto; }
.cwie-award-card h3 { font-size: 1.03rem; margin-bottom: .3rem; line-height: 1.5; }
.cwie-award-card .subtitle { display: block; color: var(--cwie-muted); font-size: .84rem; font-weight: 400; margin-top: .25rem; }
.cwie-award-card p { font-size: .9rem; color: var(--cwie-text); margin-bottom: .2rem; }

@media (max-width: 575px) {
	.cwie-award-card { flex-direction: column; }
	.cwie-award-card .cwie-award-media { max-width: 100%; width: 100%; }
	.cwie-award-card .cwie-award-media.is-dual { flex-wrap: wrap; }
}
