/**
 * BTM Knowledge — CSS cho hub + trang chi tiết bài kiến thức
 * Dùng chung class với 24 bài cũ trong Page 302
 * Bước 7 Mục 1 — 2026-07-20
 */

/* ── Hub section (bài CPT mới trên hub) ── */
.kh-hub-articles {
  background: #fff;
  padding: 72px 24px;
}
.kh-hub-articles__container {
  max-width: 1200px;
  margin: 0 auto;
}
/* Grid auto-fit (24 bài cũ — đủ số nên tự điền 3 cột) */
.kh-hub-articles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  align-items: start;
}
/* Grid cố định 3 cột — CPT mới: 1-2 bài giữ 1/3, không giãn full
   Dùng !important vì CSS inline Page 302 có .kh-hub-articles__grid
   với auto-fit load sau (trong body) — override specificity */
.kh-hub-articles__grid--fixed,
.kh-hub-articles--new .kh-hub-articles__grid {
  grid-template-columns: repeat(3, 1fr) !important;
}
/* Tiêu đề nhỏ khối bài mới */
.kh-hub-articles__new-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta, #B85742);
  margin: 0 0 24px;
}
.kh-hub-card {
  background: var(--cream, #faf6f0);
  padding: 32px 28px;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}
.kh-hub-card:hover { transform: translateY(-2px); }
.kh-hub-card__title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--navy, #1A2332);
  margin: 0 0 12px;
}
.kh-hub-card__excerpt {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--gray-600, #5e6470);
  margin: 0 0 20px;
}
.kh-hub-card__excerpt:empty { display: none; margin: 0; }
.kh-hub-card__more {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: var(--terracotta-darker, #8B3A2F);
  font-weight: 500;
}

/* ── Divider ngăn cách bài mới / bài cũ ── */
.kh-hub-divider {
  text-align: center;
  padding: 8px 24px 0;
  background: #fff;
}
.kh-hub-divider__label {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500, #6e7480);
  padding: 0 16px;
  position: relative;
}
.kh-hub-divider__label::before,
.kh-hub-divider__label::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 60px;
  height: 1px;
  background: var(--gray-500, #6e7480);
  opacity: 0.3;
}
.kh-hub-divider__label::before { right: 100%; }
.kh-hub-divider__label::after  { left: 100%; }

/* ── Trang chi tiết bài kiến thức (single-knowledge.php) ── */
.kn-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.kn-article__hero {
  margin: -48px -24px 40px;
  max-height: 420px;
  overflow: hidden;
}
.kn-article__hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kn-article__header {
  margin-bottom: 36px;
}
.kn-article__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  color: var(--navy, #1A2332);
  margin: 0 0 16px;
}
.kn-article__meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: var(--gray-500, #6e7480);
  margin-bottom: 16px;
}
.kn-article__sep { margin: 0 8px; }
.kn-article__lead {
  font-family: 'Inter', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--gray-600, #5e6470);
  border-left: 3px solid var(--terracotta, #B85742);
  padding-left: 16px;
  margin: 0;
}
.kn-article__content {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--navy, #1A2332);
}
.kn-article__content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin: 40px 0 16px;
}
.kn-article__content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  margin: 32px 0 12px;
}
.kn-article__content p  { margin: 0 0 20px; }
.kn-article__content ul,
.kn-article__content ol { margin: 0 0 20px; padding-left: 24px; }
.kn-article__content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 24px 0;
}
.kn-article__footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(26,35,50,0.1);
}
.kn-article__back {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  color: var(--terracotta, #B85742);
  text-decoration: none;
  font-weight: 500;
}
.kn-article__back:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .kh-hub-articles { padding: 56px 20px; }
  .kh-hub-articles__grid { gap: 20px; }
  .kn-article { padding: 32px 16px 60px; }
  .kn-article__hero { margin: -32px -16px 32px; }
}
