:root{ --container: 1160px; }

html, body{ background: var(--bg); color: var(--text); }

.archive-header{
  margin: 8px 0 16px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.archive-title{ margin: 0 0 6px; font-size: 26px; }
.archive-desc{ color: var(--muted); }

/* Lưới cards */
.posts-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.post-card{
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card-thumb img{
  display: block; width: 100%; height: 220px; object-fit: cover;
}
.card-body{ padding: 14px 16px 16px; flex: 1; display:flex; flex-direction:column; }
.card-title{ font-size: 18px; line-height: 1.35; margin: 6px 0 10px; }
.card-title a{ color: #ffd768; text-decoration: none; }
.card-title a:hover{ color: var(--accent); }
.card-excerpt{ color: #d6dde6; font-size: 14.5px; line-height: 1.7; flex: 1; }
.card-meta{
  margin-top: 12px; color: var(--muted); font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.card-meta .dot{ opacity: .6; }

/* Hover */
.post-card:hover{ border-color: #2a3340; transform: translateY(-1px); transition: .2s; }

/* Breadcrumb tái sử dụng style đã tạo */

/* Phân trang */
.pagination{ margin: 22px 0 10px; }
.pagination .nav-links{
  display:flex; flex-wrap:wrap; gap:8px;
  background: rgba(255,255,255,0.02);
  border:1px solid var(--border); border-radius: 999px; padding: 8px 10px;
}
.pagination a, .pagination span{
  padding: 6px 10px; border-radius: 999px; text-decoration:none;
  color:#e9edf2; border:1px solid transparent;
}
.pagination a:hover{ color: var(--accent); border-color: var(--border); background:#0f141b; }
.pagination .current{ background: var(--accent); color:#111; font-weight:700; }

/* Responsive */
@media (max-width: 1100px){
  .posts-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  .posts-grid{ grid-template-columns: 1fr; }
  .card-thumb img{ height: 200px; }
}
/* Lưới giữ nguyên ... */

/* Card click toàn bộ */
.post-card{ position: relative; }
.post-card .card-link{
  position:absolute; inset:0; z-index: 5; /* phủ toàn card */
}

/* Ảnh 16:9 + badge category */
.card-thumb{ position: relative; }
.card-thumb img{
  width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; display:block;
}
.badge-cat{
  position: absolute; left: 12px; top: 12px;
  background: rgba(247,181,0,.12);
  color: var(--accent);
  border: 1px solid rgba(247,181,0,.35);
  padding: 4px 10px; border-radius: 999px; font-size: 12px; z-index: 6;
  backdrop-filter: blur(6px);
}

/* Clamp tiêu đề & excerpt để đều hàng */
.card-title{
  font-size: 18px; line-height: 1.35; margin: 6px 0 8px;
  display:-webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow:hidden;
}
.card-excerpt{
  color:#d6dde6; font-size:14.5px; line-height:1.7; flex:1;
  display:-webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow:hidden;
}

/* Hover tinh tế */
.post-card{ transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.post-card:hover{
  transform: translateY(-2px);
  border-color: #2a3340;
  box-shadow: 0 14px 34px rgba(0,0,0,.45);
}

/* Meta + read time */
.card-meta{ margin-top: 12px; color: var(--muted); font-size: 13px; display:flex; align-items:center; gap:8px; }
.card-meta .readtime{ color:#b6beca; }

/* Responsive tweak: khoảng cách & clamp ít hơn */
@media (max-width: 1100px){
  .posts-grid{ grid-template-columns: repeat(2, 1fr); }
  .card-excerpt{ -webkit-line-clamp: 3; }
}
@media (max-width: 640px){
  .posts-grid{ grid-template-columns: 1fr; }
  .card-thumb img{ aspect-ratio: 16/9; }
  .card-title{ font-size: 17px; }
}
