/* CAT-1 — Standard 3-col Grid */

.cat-1__header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; padding: 2rem 4rem;
  background: var(--color-surface);
  border-bottom: 3px solid var(--color-primary);
}
.cat-1__header-inner { flex: 1; }
.cat-1__title {
  font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 900;
  color: var(--color-text); margin: 0 0 .3rem; letter-spacing: -.02em;
}
.cat-1__desc { color: var(--color-muted); font-size: .88rem; margin: 0; line-height: 1.5; }
.cat-1__count {
  font-size: .65rem; color: var(--color-muted); white-space: nowrap;
  border: 1px solid var(--color-border); padding: .25rem .8rem; border-radius: 20px;
  flex-shrink: 0;
}

/* Grid: 3 cột, bài đầu span full */
.cat-1__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--color-border);
}

/* Bài đầu tiên: span 3 cols, layout ngang */
.cat-1__card--featured {
  grid-column: span 3;
  display: grid !important;
  grid-template-columns: 1.4fr 1fr;
  border-bottom: 1px solid var(--color-border);
}
.cat-1__card--featured .cat-1__card-img {
  aspect-ratio: 16/10;
}
.cat-1__card--featured .cat-1__card-body {
  padding: 2.5rem 3rem;
  justify-content: center;
  border-left: 1px solid var(--color-border);
}
.cat-1__card--featured .cat-1__card-title {
  font-size: clamp(1.3rem, 2.2vw, 2rem);
}
.cat-1__card--featured .cat-1__card-excerpt {
  display: block;
}

/* Card thường */
.cat-1__card {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: background .2s;
}
.cat-1__card:nth-child(3n+1):not(.cat-1__card--featured) { /* 1st of each row */ }
.cat-1__card:nth-child(3n):not(.cat-1__card--featured) { border-right: none; }
.cat-1__card:hover { background: color-mix(in srgb, var(--color-surface) 92%, var(--color-primary)); }

.cat-1__card-img {
  display: block; width: 100%; aspect-ratio: 16/10; overflow: hidden;
  background: var(--color-border) center/cover no-repeat; flex-shrink: 0;
}
.cat-1__card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s;
}
.cat-1__card:hover .cat-1__card-img img { transform: scale(1.05); }

.cat-1__card-body {
  padding: 1.1rem 1.25rem 1.4rem;
  flex: 1; display: flex; flex-direction: column; gap: .5rem;
}
.cat-1__card-title {
  font-size: .95rem; font-weight: 800; line-height: 1.35; margin: 0;
}
.cat-1__card-title a { color: var(--color-text); text-decoration: none; transition: color .2s; }
.cat-1__card-title a:hover { color: var(--color-primary); }
.cat-1__card-excerpt {
  display: none;
  font-size: .85rem; color: var(--color-muted); line-height: 1.6; margin: 0; flex: 1;
}
.cat-1__card-meta { font-size: .68rem; color: var(--color-muted); margin-top: auto; }

@media (max-width: 1024px) {
  .cat-1__header { padding: 1.75rem 2rem; }
  .cat-1__card--featured { grid-template-columns: 1fr; grid-column: span 3; }
  .cat-1__card--featured .cat-1__card-body { padding: 1.5rem 2rem; border-left: none; border-top: 1px solid var(--color-border); }
}
@media (max-width: 768px) {
  .cat-1__grid { grid-template-columns: repeat(2, 1fr); }
  .cat-1__card--featured { grid-column: span 2; }
  .cat-1__card:nth-child(3n) { border-right: 1px solid var(--color-border); }
  .cat-1__card:nth-child(2n) { border-right: none; }
}
@media (max-width: 480px) {
  .cat-1__grid { grid-template-columns: 1fr; }
  .cat-1__card, .cat-1__card--featured { grid-column: span 1; border-right: none; }
  .cat-1__header { padding: 1.25rem 1rem; }
}
