/* landing.css — trang chủ theo phong cách sáng, tối giản (giống bestpractice247) */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f4f6fa; --card: #ffffff; --border: #dde3ec; --header-bg: #ffffff;
  --ink: #222; --muted: #6b7280; --blue: #337ab7; --chip: #eef1f6;
}
:root[data-theme="dark"] {
  --bg: #0f131c; --card: #161c28; --border: #263042; --header-bg: #141a26;
  --ink: #e8edf6; --muted: #8b97ad; --blue: #5ab0e6; --chip: #202939;
}
body {
  font-family: "Roboto Condensed", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* Header */
#site-header { background: var(--header-bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; transition: background .2s, border-color .2s; }
.head-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-size: 20px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: .3px; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav-item { color: var(--blue); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav-item:hover { text-decoration: underline; }
.nav-item.active { color: var(--ink); cursor: default; }
.nav-item.active:hover { text-decoration: none; }
.auth-nav { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; }
.auth-nav .who { color: var(--muted); }
.auth-nav .who b { color: var(--ink); font-weight: 700; }
.auth-nav a, .auth-nav button { color: var(--blue); background: none; border: 0; cursor: pointer; font: inherit; text-decoration: none; }
.auth-nav a:hover, .auth-nav button:hover { text-decoration: underline; }
.theme-btn {
  background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--muted);
  width: 34px; height: 32px; cursor: pointer; font-size: 15px; line-height: 1; flex: none;
}
.theme-btn:hover { color: var(--blue); border-color: var(--blue); }

/* Main */
.main { padding: 28px 16px 60px; }
.page-title { font-size: 26px; font-weight: 700; }
.sub { color: var(--muted); margin-bottom: 22px; font-size: 15px; }

/* Danh sách topic */
.topic-list { display: flex; flex-direction: column; gap: 10px; }
.loading { color: var(--muted); padding: 20px 0; }
.topic-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  transition: box-shadow .15s, border-color .15s, background .2s;
}
.topic-card:hover { border-color: var(--blue); box-shadow: 0 2px 12px rgba(51,122,183,.13); }
.topic-card a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px; text-decoration: none; color: var(--blue); font-size: 16px; font-weight: 500;
}
.topic-card .count {
  color: var(--muted); font-weight: 700; white-space: nowrap;
  background: var(--chip); border-radius: 20px; padding: 2px 13px; font-size: 14px;
}
.topic-card.all a { color: var(--ink); font-weight: 700; }
.topic-card.all .count { color: var(--blue); }

/* tên + gợi ý chủ đề xếp dọc */
.topic-card .name { display: flex; flex-direction: column; gap: 2px; }
.topic-card .hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }

/* tiêu đề nhóm */
.section-title {
  font-size: 14px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 2px;
}
.section-note { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 13px; }

/* lưới card nhỏ cho case study */
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.topic-card.mini a { padding: 11px 14px; font-size: 14px; }
.topic-card.mini .count { padding: 1px 9px; font-size: 12.5px; }
