/* ==========================================================
   ข่าวสารล่าสุด บนหน้าแรก (template-parts/home-news.php)
   ========================================================== */
.cx-hnews {
	--cx-primary: #472c59;
	--cx-primary-2: #6b3f8a;
	--cx-gold: #ffb51e;
	--cx-gold-2: #ffcf3d;
	--cx-text: #1f1430;
	--cx-muted: #7a6d87;

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

.cx-hnews .container {
	max-width: 1180px;
	padding: 2.25rem;
	border-radius: 28px;
	background:
		radial-gradient(circle at 100% 0, rgba(255, 207, 61, .28), transparent 40%),
		linear-gradient(180deg, #fff, #f6f2fa);
	box-shadow: 0 14px 44px rgba(71, 44, 89, .12);
}

.cx-hnews a,
.cx-hnews a:hover {
	text-decoration: none;
	margin-top: 0;
}

/* หัวข้อ */
.cx-hnews__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.75rem;
}

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

.cx-hnews__title {
	margin: .6rem 0 0;
	color: var(--cx-primary);
	font-size: clamp(1.5rem, 3vw, 2.1rem);
	font-weight: 700;
	line-height: 1.2;
}

.cx-hnews__title::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin-top: .6rem;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--cx-gold-2), var(--cx-gold));
}

.cx-hnews__all {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: .45rem;
	padding: .55rem 1.3rem;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--cx-gold-2), var(--cx-gold));
	color: var(--cx-primary) !important;
	font-weight: 600;
	font-size: .92rem;
	white-space: nowrap;
	box-shadow: 0 6px 18px rgba(255, 181, 30, .35);
	transition: transform .2s ease, box-shadow .2s ease;
}

.cx-hnews__all:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(255, 181, 30, .45);
}

.cx-hnews__all i {
	transition: transform .2s ease;
}

.cx-hnews__all:hover i {
	transform: translateX(3px);
}

.cx-hnews__all.-bottom {
	display: none !important;
}

/* กริด: การ์ดใหญ่ซ้าย + รายการขวา */
.cx-hnews__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 1.5rem;
}

/* การ์ดใหญ่ */
.cx-hnews__lead-link {
	position: relative;
	display: block !important;
	height: 100%;
	min-height: 420px;
	border-radius: 22px;
	overflow: hidden;
	background: linear-gradient(135deg, var(--cx-primary), var(--cx-primary-2));
	box-shadow: 0 10px 30px rgba(71, 44, 89, .18);
}

.cx-hnews__lead-media {
	position: absolute;
	inset: 0;
}

.cx-hnews__lead-media > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .7s ease;
}

.cx-hnews__lead-link:hover .cx-hnews__lead-media > img {
	transform: scale(1.05);
}

.cx-hnews__lead-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(31, 20, 48, 0) 30%, rgba(31, 20, 48, .55) 60%, rgba(31, 20, 48, .92) 100%);
}

.cx-hnews__lead-body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	padding: 1.75rem;
	color: #fff;
}

.cx-hnews__tag {
	display: inline-block;
	margin-bottom: .7rem;
	padding: .2rem .75rem;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--cx-gold-2), var(--cx-gold));
	color: var(--cx-primary);
	font-size: .75rem;
	font-weight: 600;
}

.cx-hnews__lead-title {
	margin: 0 0 .5rem;
	color: #fff;
	font-size: clamp(1.25rem, 2.2vw, 1.65rem);
	font-weight: 700;
	line-height: 1.4;
	text-shadow: 0 2px 10px rgba(0, 0, 0, .3);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cx-hnews__excerpt {
	margin: 0 0 .75rem;
	color: rgba(255, 255, 255, .85);
	font-size: .92rem;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cx-hnews__lead-body .cx-hnews__date {
	color: rgba(255, 255, 255, .8);
}

.cx-hnews__date {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	color: var(--cx-muted);
	font-size: .8rem;
}

.cx-hnews__date i {
	color: var(--cx-gold);
}

/* รายการย่อ */
.cx-hnews__list {
	display: flex;
	flex-direction: column;
	gap: .85rem;
}

.cx-hnews__item {
	flex: 1;
}

.cx-hnews__item-link {
	display: flex !important;
	align-items: center;
	gap: 1rem;
	height: 100%;
	padding: .7rem;
	border-radius: 18px;
	background: #fff;
	border: 1px solid #efe8f5;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.cx-hnews__item-link:hover {
	transform: translateX(4px);
	border-color: var(--cx-gold);
	box-shadow: 0 8px 22px rgba(71, 44, 89, .12);
}

.cx-hnews__thumb {
	flex: 0 0 132px;
	aspect-ratio: 16 / 10;
	border-radius: 12px;
	overflow: hidden;
	background: linear-gradient(135deg, var(--cx-primary), var(--cx-primary-2));
}

.cx-hnews__thumb > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.cx-hnews__item-link:hover .cx-hnews__thumb > img {
	transform: scale(1.08);
}

.cx-hnews__item-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: .35rem;
}

.cx-hnews__item-title {
	margin: 0;
	color: var(--cx-text);
	font-size: .98rem;
	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-hnews__item-link:hover .cx-hnews__item-title {
	color: var(--cx-primary-2);
}

/* ไม่มีรูปปก */
.cx-hnews__ph {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cx-hnews__ph img {
	max-width: 50%;
	max-height: 50%;
	object-fit: contain;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
	.cx-hnews__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.cx-hnews__lead-link {
		min-height: 360px;
	}

	.cx-hnews__list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

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

	.cx-hnews .container {
		padding: 1.5rem 1rem;
		border-radius: 22px;
		width: calc(100% - 24px);
	}

	.cx-hnews__head {
		margin-bottom: 1.25rem;
	}

	.cx-hnews__all.-top {
		display: none !important;
	}

	.cx-hnews__all.-bottom {
		display: flex !important;
		margin-top: 1.25rem;
		width: 100%;
	}

	.cx-hnews__grid {
		gap: 1rem;
	}

	.cx-hnews__lead-link {
		min-height: 0;
		aspect-ratio: 4 / 3.4;
		border-radius: 18px;
	}

	.cx-hnews__lead-body {
		padding: 1.15rem;
	}

	.cx-hnews__excerpt {
		display: none;
	}

	.cx-hnews__list {
		display: flex;
		gap: .7rem;
	}

	.cx-hnews__item-link {
		gap: .8rem;
		padding: .55rem;
		border-radius: 14px;
	}

	.cx-hnews__item-link:hover {
		transform: none;
	}

	.cx-hnews__thumb {
		flex-basis: 108px;
		border-radius: 10px;
	}

	.cx-hnews__item-title {
		font-size: .92rem;
	}
}
