/* ==========================================================
   ปุ่ม "ข่าวสารล่าสุด" บน header
   ========================================================== */
#headerContent .-btn-news {
	display: inline-flex !important;
	align-items: center;
	gap: .4rem;
	color: #472c59;
	font-weight: 500;
	white-space: nowrap;
	border-radius: 999px;
	padding: .4rem 1.1rem;
	box-shadow: 0 4px 14px rgba(255, 181, 30, .35);
	transition: transform .2s ease, box-shadow .2s ease;
}

#headerContent .-btn-news:hover {
	color: #472c59;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(255, 181, 30, .5);
}

@media (max-width: 575.98px) {
	#headerContent .-btn-news {
		font-size: .75rem;
		padding: .3rem .7rem;
	}
}

/* ==========================================================
   หน้ารวมบทความ
   ========================================================== */
.cx-news {
	--cx-primary: #472c59;
	--cx-primary-2: #6b3f8a;
	--cx-gold: #ffb51e;
	--cx-gold-2: #ffcf3d;
	--cx-text: #1f1430;
	--cx-muted: #7a6d87;
	--cx-bg: #f6f2fa;
	--cx-card: #fff;

	position: relative;
	z-index: 1;
	background: var(--cx-bg);
	color: var(--cx-text);
	padding: 3rem 0 4rem;
}

.cx-news .container {
	max-width: 1180px;
}

/* หัวข้อหน้า */
.cx-news__head {
	text-align: center;
	margin-bottom: 2.5rem;
}

.cx-news__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	padding: .3rem .9rem;
	border-radius: 999px;
	background: rgba(71, 44, 89, .08);
	color: var(--cx-primary);
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .08em;
}

.cx-news__title {
	margin: .9rem 0 .4rem;
	font-size: clamp(1.75rem, 4vw, 2.6rem);
	font-weight: 700;
	line-height: 1.2;
	background: linear-gradient(90deg, var(--cx-primary), var(--cx-primary-2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.cx-news__title::after {
	content: "";
	display: block;
	width: 64px;
	height: 4px;
	margin: .8rem auto 0;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--cx-gold-2), var(--cx-gold));
}

.cx-news__desc {
	margin: 0;
	color: var(--cx-muted);
	font-size: 1rem;
}

/* กริดการ์ด */
.cx-news__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.75rem;
}

.cx-card {
	min-width: 0;
}

.cx-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--cx-card);
	border-radius: 18px;
	overflow: hidden;
	color: inherit;
	text-decoration: none !important;
	box-shadow: 0 6px 24px rgba(71, 44, 89, .08);
	transition: transform .3s ease, box-shadow .3s ease;
}

.cx-card__link:hover {
	color: inherit;
	transform: translateY(-6px);
	box-shadow: 0 16px 40px rgba(71, 44, 89, .18);
}

.cx-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: linear-gradient(135deg, var(--cx-primary), var(--cx-primary-2));
}

.cx-card__media > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .6s ease;
}

.cx-card__link:hover .cx-card__media > img {
	transform: scale(1.06);
}

.cx-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, rgba(31, 20, 48, .35));
	pointer-events: none;
}

.cx-card__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cx-card__placeholder img {
	max-width: 45%;
	max-height: 50%;
	opacity: .9;
}

.cx-card__tag {
	position: absolute;
	top: .8rem;
	left: .8rem;
	z-index: 1;
	padding: .2rem .7rem;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--cx-gold-2), var(--cx-gold));
	color: var(--cx-primary);
	font-size: .75rem;
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.cx-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.1rem 1.25rem 1.3rem;
}

.cx-card__date {
	color: var(--cx-muted);
	font-size: .8rem;
	margin-bottom: .45rem;
}

.cx-card__date i {
	color: var(--cx-gold);
	margin-right: .2rem;
}

.cx-card__title {
	margin: 0 0 1rem;
	color: var(--cx-text);
	font-size: 1.08rem;
	font-weight: 600;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .2s ease;
}

.cx-card__link:hover .cx-card__title {
	color: var(--cx-primary-2);
}

.cx-card__more {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	color: var(--cx-primary);
	font-size: .88rem;
	font-weight: 600;
}

.cx-card__more i {
	transition: transform .25s ease;
}

.cx-card__link:hover .cx-card__more i {
	transform: translateX(4px);
}

/* การ์ดแรก (ไฮไลต์) */
.cx-card--featured {
	grid-column: 1 / -1;
}

.cx-card--featured .cx-card__link {
	flex-direction: row;
}

.cx-card--featured .cx-card__media {
	flex: 0 0 58%;
	aspect-ratio: auto;
	min-height: 340px;
}

.cx-card--featured .cx-card__body {
	justify-content: center;
	padding: 2rem 2.25rem;
}

.cx-card--featured .cx-card__title {
	font-size: clamp(1.3rem, 2.2vw, 1.75rem);
	line-height: 1.4;
	-webkit-line-clamp: 3;
}

.cx-card--featured .cx-card__more {
	margin-top: .5rem;
	align-self: flex-start;
	padding: .55rem 1.3rem;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--cx-gold-2), var(--cx-gold));
	box-shadow: 0 4px 14px rgba(255, 181, 30, .35);
}

/* เปลี่ยนหน้า */
.cx-news__pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .5rem;
	margin-top: 2.75rem;
}

.cx-news__pager .page-numbers {
	min-width: 42px;
	height: 42px;
	padding: 0 .75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: #fff;
	color: var(--cx-primary);
	font-weight: 500;
	text-decoration: none;
	box-shadow: 0 2px 10px rgba(71, 44, 89, .08);
	transition: background .2s ease, color .2s ease;
}

.cx-news__pager a.page-numbers:hover,
.cx-news__pager .page-numbers.current {
	background: linear-gradient(135deg, var(--cx-primary), var(--cx-primary-2));
	color: #fff;
}

.cx-news__pager .page-numbers.dots {
	background: transparent;
	box-shadow: none;
}

/* ไม่มีบทความ */
.cx-news__empty {
	text-align: center;
	padding: 4rem 1rem;
	color: var(--cx-muted);
}

.cx-news__empty i {
	font-size: 3rem;
	color: var(--cx-gold);
	margin-bottom: 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
	.cx-news__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.25rem;
	}

	.cx-card--featured .cx-card__media {
		flex-basis: 52%;
		min-height: 260px;
	}

	.cx-card--featured .cx-card__body {
		padding: 1.5rem;
	}
}

@media (max-width: 767.98px) {
	.cx-news {
		padding: 2rem 0 3rem;
	}

	.cx-news__head {
		margin-bottom: 1.75rem;
	}

	.cx-card--featured .cx-card__link {
		flex-direction: column;
	}

	.cx-card--featured .cx-card__media {
		flex-basis: auto;
		min-height: 0;
		aspect-ratio: 16 / 9;
	}

	.cx-card--featured .cx-card__body {
		padding: 1.1rem 1.25rem 1.3rem;
	}
}

@media (max-width: 575.98px) {
	.cx-news .container {
		padding-left: 16px;
		padding-right: 16px;
	}

	.cx-news__grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.cx-card__link {
		border-radius: 14px;
	}

	.cx-card__title {
		font-size: 1rem;
	}

	.cx-news__pager .page-numbers {
		min-width: 38px;
		height: 38px;
	}
}
