/* Trang chủ v2 — dùng biến/component của site.css. */
.home-hero { background: linear-gradient(180deg, var(--white) 0%, var(--cream) 100%); border-bottom: 1px solid var(--line); }
.home-hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.home-hero h1 { margin-bottom: .45em; }
.home-hero-lead { font-size: 1.12rem; color: var(--muted); max-width: 52ch; margin-bottom: 1.4rem; }
.home-sapo p { margin: 0; }
.home-sapo p + p { margin-top: .5em; }
.home-hero .search-bar svg { color: var(--muted); }
.home-needs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 18px; font-size: .92rem; color: var(--muted); }
.home-needs > span { font-weight: 600; margin-right: 4px; }
.home-hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 100% 50%; /* gia đình nằm nửa phải ảnh gốc 16:9 → bám phải để khung 4:3 đủ cả 5 người */ border-radius: var(--radius); box-shadow: var(--shadow-lg); background: var(--green-50); }

.home-section { padding-top: 56px; }
.section-lead { color: var(--muted); margin: -.6rem 0 1.4rem; max-width: 70ch; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 1.4rem; }
.section-head .section-title { margin-bottom: 0; }

/* Lưới 8 chuyên mục */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cat-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.cat-card:hover { border-color: var(--green-700); box-shadow: var(--shadow-lg); color: var(--ink); }
.cat-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; background: var(--green-50); }
.cat-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.cat-card-name { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--green-900); line-height: 1.3; }
.cat-card-desc { font-size: .85rem; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-card-arrow { color: var(--coral-700); font-weight: 700; flex: none; }

/* Thẻ dọc dùng chung */
.card-v .card-more { margin-top: auto; padding-top: 4px; font-weight: 700; font-size: .92rem; color: var(--coral-700); text-decoration: none; }
.card-v .card-more:hover { text-decoration: underline; }
.card-v .tag, .card-h .tag { align-self: flex-start; }
.card-h .card-body { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.card-h .meta { margin: 0; }
.card-h .card-media { display: block; }

/* Dải "Cách chúng tôi biên tập" */
.home-editorial { margin-top: 64px; padding: 48px 0; background: var(--green-50); border-top: 1px solid #d5e5d8; border-bottom: 1px solid #d5e5d8; }
.home-editorial h2 { margin-bottom: .3em; }
.home-editorial > .container > p { color: var(--muted); max-width: 70ch; }
.editorial-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 28px 0 24px; }
.editorial-steps li { counter-increment: step; position: relative; background: var(--white); border-radius: var(--radius); padding: 20px 22px 20px 72px; box-shadow: var(--shadow); }
.editorial-steps li::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--green-900); color: var(--white); font-weight: 700; font-family: var(--serif); }
.editorial-steps h3 { font-size: 1.1rem; margin-bottom: .3em; }
.editorial-steps p { margin: 0; font-size: .92rem; color: var(--muted); }
.editorial-link { font-weight: 700; }

@media (max-width: 900px) {
  .home-hero-inner { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; padding-bottom: 32px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editorial-steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .cat-grid { grid-template-columns: 1fr; }
  .home-section { padding-top: 40px; }
  .home-editorial { margin-top: 48px; padding: 36px 0; }
}
