/* =====================================================================
   COMPONENT: POST CARD (thẻ bài viết) — dùng chung, tải CÓ ĐIỀU KIỆN
   Tải ở: trang chủ, mọi trang blog/bài viết, lưu trữ, tìm kiếm, và trang có [blog_posts] / [gv_posts] (functions.php → gv_css_map)
   Markup: template-parts/blog/card.php (+ shortcode [gv_posts] ở inc/blog.php)
   ===================================================================== */
.post-item .box-text { text-align: left; }
.post-item .post-title { font-size: 15px; font-weight: 600; }

/* ---- Lưới thẻ ---- */
.gv-blog-list { display: grid; grid-template-columns: repeat(var(--gv-cols, 3), minmax(0, 1fr)); gap: 24px 20px; }
.gv-post { display: flex; flex-direction: column; margin: 0; background: var(--gv-white); border: 1px solid var(--gv-border); border-radius: 14px; overflow: hidden; transition: box-shadow .18s, border-color .18s; }
.gv-post:hover { border-color: var(--gv-primary); box-shadow: 0 8px 24px rgba(0, 0, 0, .07); }
.gv-post-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; background: var(--gv-bg); overflow: hidden; }
.gv-post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.gv-post:hover .gv-post-thumb img { transform: scale(1.04); }
.gv-post-noimg { font-size: 48px; color: var(--gv-border-3); }
.gv-post-body { display: flex; flex: 1; flex-direction: column; padding: 14px 16px 16px; }
.gv-post-cat { align-self: flex-start; margin-bottom: 8px; padding: 2px 10px; border-radius: 99px; background: var(--gv-primary-soft); color: var(--gv-accent); font-size: 12px; font-weight: 600; }
.gv-post-cat:hover { background: var(--gv-primary); color: var(--gv-white); }
.gv-post-title { margin: 0 0 8px; font-size: 17px; font-weight: 700; line-height: 1.4; text-transform: none; }
.gv-post-title a { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--gv-text); }
.gv-post:hover .gv-post-title a { color: var(--gv-accent); }
.gv-post-excerpt { flex: 1; margin: 0 0 12px; font-size: 14px; line-height: 1.6; color: var(--gv-text-3); }
.gv-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; color: var(--gv-muted); }
.gv-post-meta .gv-ico { font-size: 15px; margin-right: 0; }
.gv-post-meta span + .gv-ico { margin-left: 10px; }

/* Bài nổi bật: ngang, rộng hết hàng */
.gv-post--featured { grid-column: 1 / -1; flex-direction: row; }
.gv-post--featured .gv-post-thumb { flex: 0 0 55%; aspect-ratio: auto; min-height: 320px; }
.gv-post--featured .gv-post-body { justify-content: center; padding: 28px 32px; }
.gv-post--featured .gv-post-title { font-size: 26px; font-weight: 800; }
.gv-post--featured .gv-post-title a { -webkit-line-clamp: 4; }
.gv-post--featured .gv-post-excerpt { flex: none; font-size: 15px; }

/* Bài nổi bật: chiều cao theo khối chữ, ảnh phủ kín (không để ảnh cao kéo giãn thẻ) */
.gv-post--featured .gv-post-thumb { position: relative; align-self: stretch; }
.gv-post--featured .gv-post-thumb img { position: absolute; inset: 0; }

@media (max-width: 1023px) {
	.gv-blog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gv-post--featured .gv-post-thumb { min-height: 260px; }
}
@media (max-width: 849px) {
	.gv-post--featured { flex-direction: column; }
	.gv-post--featured .gv-post-thumb { flex-basis: auto; min-height: 0; aspect-ratio: 16 / 10; }
	.gv-post--featured .gv-post-body { padding: 16px; }
	.gv-post--featured .gv-post-title { font-size: 20px; }
	.gv-post--featured .gv-post-thumb { position: static; }
	.gv-post--featured .gv-post-thumb img { position: static; }
}
@media (max-width: 549px) {
	.gv-blog-list { grid-template-columns: 1fr; }
}
