/* WIDGET "VD – Lưới bài viết (AJAX)" (template-parts/post-grid/*.php, assets/js/post-grid.js)
   Số cột, màu nền hàng, màu chữ… chỉnh trong widget. */

.vd-pg__items {
	--vd-pg-cols: 3;
	display: grid;
	grid-template-columns: repeat(var(--vd-pg-cols), minmax(0, 1fr));
	column-gap: 0;          /* thẻ sát nhau để nền ghép thành 1 dải mỗi hàng */
	row-gap: 36px;
	transition: opacity .2s ease;
}
.vd-pg.is-loading .vd-pg__items { opacity: .4; pointer-events: none; }

.vd-pg__card {
	display: flex;
	flex-direction: column;
	padding: 38px 32px 14px;
	background: #F0FCEF;
}
.vd-pg__thumb {
	display: block;
	overflow: hidden;
	aspect-ratio: 1.33;
	background: #DDF0D9;
	margin-bottom: 18px;
}
.vd-pg__thumb img,
.vd-pg__noimg {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}
.vd-pg__thumb:hover img { transform: scale(1.05); }
.vd-pg__title {
	margin: 0 0 12px;
	font-family: Inter, sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.vd-pg__title a { text-decoration: none; }
.vd-pg__excerpt {
	margin: 0 0 22px !important;
	font-family: Inter, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	text-align: justify;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.vd-pg__btn {
	align-self: flex-start;
	margin-top: auto;
	padding: 8px 25px;
	border-radius: 5px;
	font-family: Inter, sans-serif;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: filter .2s ease;
}
.vd-pg__btn:hover { filter: brightness(1.08); }
.vd-pg__empty { grid-column: 1 / -1; text-align: center; }

/* Phân trang */
.vd-pg__pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 56px;
	font-family: Inter, sans-serif;
	font-size: 12px;
}
.vd-pg__page {
	min-width: 28px;
	height: 28px;
	padding: 0 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #DDDDDD;
	border-radius: 3px;
	background: #fff;
	text-decoration: none;
	transition: border-color .2s ease;
}
a.vd-pg__page:hover { border-color: #04BA71; }
.vd-pg__page.is-current { color: #fff !important; }
.vd-pg__page.is-disabled { opacity: .45; }
.vd-pg__dots { color: #999; }

@media (max-width: 767px) {
	.vd-pg__card { padding: 24px 18px 10px; }
	.vd-pg__pagination { margin-top: 32px; }
}
