/* ==========================================================================
   duan.css — Trang danh sách Dự án (lưới 3 cột + lọc theo danh mục)
   Kế thừa tông màu & heading từ tintuc.css (.tt-page). Body dùng Inter.
   ========================================================================== */

.duan-list {
  background: #ffffff;
  padding-block: var(--section-py);
}

.duan-list .tt-section-title { color: var(--tt-ink); }

/* Số lượng dự án bên phải tiêu đề */
.duan-count {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--tt-meta);
}

/* ---- Bộ lọc danh mục (chip ngang) ---- */
.duan-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.duan-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border: 1px solid var(--tt-line);
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  color: var(--tt-body);
  text-decoration: none;
  transition: color var(--transition-base),
              background-color var(--transition-base),
              border-color var(--transition-base);
}

.duan-chip:hover {
  color: var(--dsh-red);
  border-color: var(--dsh-red);
}

.duan-chip.is-active {
  color: #ffffff;
  background: var(--dsh-red);
  border-color: var(--dsh-red);
}

/* ---- Thẻ dự án ---- */
.duan-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 1px solid var(--tt-line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .5s var(--ease-out-soft),
              box-shadow .5s var(--ease-out-soft),
              border-color .5s var(--ease-out-soft);
}

.duan-card:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 168, 76, 0.4);
  box-shadow: 0 18px 40px rgba(8, 15, 29, 0.14);
}

.duan-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
}

.duan-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--tt-skeleton);
  overflow: hidden;
}

.duan-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s var(--ease-out-soft);
}

.duan-card:hover .duan-card-media img { transform: scale(1.06); }

.duan-card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--dsh-red);
  color: #ffffff;
  font-weight: 700;
  font-size: 10px;
  line-height: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
}

.duan-card-body {
  display: flex;
  flex-direction: column;
  padding: 24px;
  flex: 1 1 auto;
}

.duan-card-body h3 {
  font-family: var(--tt-font-heading);
  font-weight: 700;
  font-size: 20px;
  line-height: 28px;
  color: var(--tt-ink);
  margin: 0;
  transition: color .3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.duan-card:hover .duan-card-body h3 { color: var(--dsh-red); }

.duan-card-loc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 20px;
  color: var(--tt-meta);
  margin: 10px 0 0;
}

.duan-card-loc img { width: 14px; height: 14px; flex-shrink: 0; }

.duan-card-desc {
  font-size: 15px;
  line-height: 23px;
  color: var(--tt-body);
  margin: 12px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Trạng thái rỗng ---- */
.duan-empty {
  margin: 24px 0 0;
  padding: 48px 24px;
  text-align: center;
  font-size: 16px;
  color: var(--tt-meta);
  border: 1px dashed var(--tt-line);
  border-radius: 12px;
}

/* Tôn trọng prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .duan-card,
  .duan-card-media img { transition: none !important; transform: none !important; }
}
