/* ══════════════════════════════════════════════════════════════
   Chứng Khoán SH — giao diện dùng chung cho toàn bộ website
   (trang chủ, bài viết, chuyên mục, trang tĩnh)
   ══════════════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted) ── */
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 400; font-display: optional; src: url(/assets/fonts/bvp-400-vi.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 400; font-display: optional; src: url(/assets/fonts/bvp-400-la.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 600; font-display: optional; src: url(/assets/fonts/bvp-600-vi.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 600; font-display: optional; src: url(/assets/fonts/bvp-600-la.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 800; font-display: optional; src: url(/assets/fonts/bvp-800-vi.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 800; font-display: optional; src: url(/assets/fonts/bvp-800-la.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #f6f5fa;
  --card:     #ffffff;
  --border:   #e7e4ef;
  --text:     #1c1830;
  --muted:    #6b6880;
  --purple:   #6d4fd8;
  --purple-d: #5338b8;
  --lavender: #f1edfd;
  --gap: 12px;
  --r: 18px;
  --hh: 72px;                 /* chiều cao header */
  --wrap: 1200px;             /* bề rộng nội dung trang con */
  --accent: #6d4fd8; --tint: #f1edfd;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hh) + 12px); -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse 60% 50% at 85% 0%, #ece7fb 0%, transparent 65%) no-repeat, var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--purple); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.muted { color: var(--muted); }

/* Màu nhấn theo chuyên mục */
.a-purple { --accent: #6d4fd8; --tint: #f1edfd; }
.a-green  { --accent: #0f8a62; --tint: #e8f6f0; }
.a-blue   { --accent: #2463c9; --tint: #eaf1fc; }
.a-red    { --accent: #c93c4c; --tint: #fbeeef; }
.a-amber  { --accent: #a86d08; --tint: #fbf3e2; }

/* ══ Header + menu ══ */
.site-header {
  position: sticky; top: 0; z-index: 50; isolation: isolate;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
/* Lớp nền mờ tách riêng: backdrop-filter đặt trực tiếp trên header sẽ làm menu mobile (position: fixed) bị kẹt trong header */
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(246, 245, 250, .82);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
}
body.nav-open .site-header::before { background: var(--bg); }
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 6px 20px rgba(28, 24, 48, .05); }
.sh-inner { height: var(--hh); display: flex; align-items: center; gap: 16px; padding: 0 20px; }

.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo img { width: 42px; height: 42px; object-fit: contain; border-radius: 10px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text b { font-size: 16.5px; font-weight: 800; letter-spacing: -.015em; }
.logo-text b em { font-style: normal; color: var(--purple); }
.logo-text > span { font-size: 12px; color: var(--muted); }

.nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link {
  display: inline-flex; align-items: center; height: 38px; padding: 0 12px;
  font-size: 14px; font-weight: 600; color: #3b3650; border-radius: 10px; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover, .nav-item.open > .nav-link { background: #fff; color: var(--purple-d); }
.nav-link[aria-current="page"] { color: var(--purple); background: var(--lavender); }
.has-sub > .nav-link { padding-right: 4px; }
.sub-toggle {
  width: 26px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  margin-left: -2px; border-radius: 8px; color: #8c88a0;
}
.sub-toggle svg { width: 15px; height: 15px; transition: transform .2s ease; }
.nav-item.open .sub-toggle svg { transform: rotate(180deg); }
.sub {
  position: absolute; top: calc(100% + 8px); left: 50%; min-width: 300px;
  display: grid; gap: 2px; padding: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 18px 40px rgba(40, 28, 100, .13);
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.sub::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nav-item.open .sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (hover: hover) and (min-width: 1101px) {
  .has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
  .has-sub:hover .sub-toggle svg { transform: rotate(180deg); }
}
.sub-link { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 11px; transition: background .15s ease; }
.sub-link:hover { background: var(--lavender); }
.sub-ic { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 17px; background: var(--bg); border-radius: 10px; }
.sub-txt { display: flex; flex-direction: column; min-width: 0; }
.sub-txt b { font-size: 14px; font-weight: 600; }
.sub-txt small { font-size: 12px; color: var(--muted); line-height: 1.4; }

.sh-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.btn-community {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px;
  background: var(--purple); color: #fff; border-radius: 10px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background .2s ease, transform .2s ease;
}
.btn-community:hover { background: var(--purple-d); transform: translateY(-1px); }
.btn-community svg { width: 16px; height: 16px; }

.nav-burger { display: none; width: 42px; height: 42px; border-radius: 11px; background: #fff; border: 1px solid var(--border); position: relative; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  position: absolute; left: 50%; width: 18px; height: 2px; margin-left: -9px; background: var(--text); border-radius: 2px;
  transition: transform .2s ease, background .2s ease; content: '';
}
.nav-burger span { top: 50%; margin-top: -1px; }
.nav-burger span::before { top: -6px; left: 0; margin: 0; }
.nav-burger span::after  { top: 6px;  left: 0; margin: 0; }
.nav-burger[aria-expanded="true"] span { background: transparent; }
.nav-burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1100px) {
  .nav-burger { display: block; }
  .nav {
    position: fixed; left: 0; right: 0; top: var(--hh); bottom: 0; z-index: 49;
    display: block; padding: 12px 16px 32px; overflow-y: auto;
    background: var(--bg); border-top: 1px solid var(--border);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }
  body.nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  body.nav-open { overflow: hidden; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 6px; max-width: 560px; margin: 0 auto; }
  .nav-item { flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
  .nav-link { flex: 1; height: 52px; padding: 0 16px; font-size: 15.5px; background: none !important; }
  .nav-link[aria-current="page"] { color: var(--purple); }
  .sub-toggle { width: 52px; height: 52px; margin: 0; }
  .sub {
    position: static; width: 100%; min-width: 0; padding: 0 8px 8px; border: 0; box-shadow: none; border-radius: 0 0 14px 14px;
    display: none; opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .sub::before { display: none; }
  .nav-item.open .sub { display: grid; transform: none; }
}
@media (max-width: 600px) {
  :root { --hh: 60px; }
  .sh-inner { padding: 0 12px; gap: 10px; }
  .logo img { width: 36px; height: 36px; }
  .logo-text b { font-size: 15px; }
  .logo-text > span { font-size: 11px; }
  .btn-community { padding: 8px 12px; font-size: 13px; }
  .nav-burger { width: 38px; height: 38px; }
}
@media (max-width: 400px) {
  .sh-inner { gap: 8px; }
  .logo { gap: 8px; }
  .logo-text b { font-size: 14px; }
  .logo-text > span { font-size: 10.5px; }
  .btn-community { padding: 8px 10px; gap: 6px; font-size: 12.5px; }
  .btn-community svg { width: 15px; height: 15px; }
}
@media (max-width: 340px) {
  .logo-text > span { display: none; }
}

/* ══ Card dùng chung (giống bento trang chủ) ══ */
.card {
  position: relative; overflow: hidden; overflow: clip; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  min-height: 0; padding: 20px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(28, 24, 48, .04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.card:hover { transform: translateY(-2px); border-color: #cfc5f3; box-shadow: 0 12px 28px rgba(60, 40, 140, .09); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-icon {
  width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 19px; background: var(--tint); border-radius: 11px;
}
.card-icon.yt-ic { color: #ff0033; } .card-icon.yt-ic svg { width: 22px; height: 16px; }
.card-icon.fb-ic { color: #1877f2; } .card-icon.fb-ic svg { width: 20px; height: 20px; }
.card-arrow {
  width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; color: #9a96ad; transition: transform .2s ease, background .2s ease, color .2s ease;
}
.card-arrow svg { width: 16px; height: 16px; }
a.card:hover .card-arrow { transform: translate(2px, -2px); background: var(--tint); color: var(--accent); }
.card-body { min-height: 0; }
.card-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 5px;
}
.card-label::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); flex-shrink: 0; }
.card-title { font-size: 17px; font-weight: 800; line-height: 1.25; letter-spacing: -.015em; margin-bottom: 4px; }
.card-desc { font-size: 13px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.btn, .btn-ghost, .btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 11px; font-size: 14.5px; font-weight: 600;
  transition: background .2s ease, transform .2s ease, color .2s ease, border-color .2s ease;
}
.btn { background: var(--purple); color: #fff; }
.btn:hover { background: var(--purple-d); transform: translateY(-1px); }
.btn-ghost { color: var(--purple-d); border: 1px solid #d9d0f5; background: #fff; }
.btn-ghost:hover { border-color: var(--purple); }
.btn-sm { padding: 8px 14px; font-size: 13px; background: var(--purple); color: #fff !important; text-decoration: none !important; }
.btn-sm:hover { background: var(--purple-d); }

/* ══ Bố cục trang con ══ */
.page { flex: 1; width: 100%; max-width: calc(var(--wrap) + 40px); margin: 0 auto; padding: 8px 20px 56px; }
@media (max-width: 600px) { .page { padding: 6px 12px 40px; } }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--purple); }
.crumbs i { font-style: normal; color: #b6b2c6; }
.crumbs span { color: var(--text); font-weight: 600; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page-hero {
  position: relative; overflow: hidden; overflow: clip; isolation: isolate;
  padding: 26px 28px; margin-bottom: 16px;
  background: linear-gradient(160deg, #ffffff 25%, var(--tint) 100%);
  border: 1px solid var(--border); border-radius: var(--r);
}
.page-hero::after {
  content: ''; position: absolute; z-index: -1; right: -40px; top: -60px; width: 260px; height: 260px;
  background: radial-gradient(circle, var(--tint) 0%, transparent 70%); opacity: .9;
}
.ph-row { display: flex; align-items: flex-start; gap: 16px; }
.ph-ic { width: 52px; height: 52px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 25px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.ph-logo { width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0; }
.page-hero h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-bottom: 6px; }
.page-hero h1 em { font-style: normal; color: var(--purple); }
.page-hero p { font-size: 14.5px; line-height: 1.6; color: var(--muted); max-width: 70ch; }
.ph-count { display: inline-flex; margin-left: 6px; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--accent); background: #fff; border: 1px solid var(--border); white-space: nowrap; }
.ph-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
@media (max-width: 600px) {
  .page-hero { padding: 18px 16px; border-radius: 14px; }
  .ph-ic { width: 42px; height: 42px; font-size: 20px; border-radius: 12px; }
  .ph-row { gap: 12px; }
}

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #4a4560; background: #fff; border: 1px solid var(--border);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.chip:hover { border-color: #cfc5f3; color: var(--purple-d); }
.chip.is-on { background: var(--purple); border-color: var(--purple); color: #fff; }

.search { position: relative; display: flex; align-items: center; flex: 0 1 300px; min-width: 220px; }
.search svg { position: absolute; left: 13px; width: 17px; height: 17px; color: #9a96ad; pointer-events: none; }
.search input {
  width: 100%; height: 40px; padding: 0 14px 0 38px; font: inherit; font-size: 14px; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: 11px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(109, 79, 216, .14); }
@media (max-width: 700px) { .search { flex: 1 1 100%; } }
.search-results .sr-info { font-size: 13.5px; color: var(--muted); margin: 0 2px 12px; }
.search-results mark { background: #ece6ff; color: inherit; border-radius: 3px; padding: 0 2px; }

/* ══ Thẻ bài viết ══ */
.post-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(28, 24, 48, .04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover { transform: translateY(-2px); border-color: #cfc5f3; box-shadow: 0 12px 28px rgba(60, 40, 140, .09); }
.pc-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--tint); border-bottom: 1px solid var(--border); }
.pc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.post-card:hover .pc-thumb img { transform: scale(1.03); }
.pc-thumb.ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(150deg, #fff 0%, var(--tint) 100%); }
.pc-thumb.ph span { font-size: 38px; opacity: .55; }
.pc-body { flex: 1; display: flex; flex-direction: column; padding: 14px 16px 16px; }
.pc-title { font-size: 15.5px; font-weight: 800; line-height: 1.35; letter-spacing: -.01em; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-excerpt { font-size: 13px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.pc-date { margin-top: auto; font-size: 12px; font-weight: 600; color: #9a96ad; }
@media (max-width: 600px) {
  .post-grid { grid-template-columns: 1fr; gap: 10px; }
  .post-card { flex-direction: row; border-radius: 14px; }
  .pc-thumb { width: 112px; flex-shrink: 0; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--border); }
  .pc-thumb.ph span { font-size: 26px; }
  .pc-body { padding: 10px 12px; }
  .pc-title { font-size: 14px; -webkit-line-clamp: 3; margin-bottom: 4px; }
  .pc-excerpt { display: none; }
  .post-card .card-label { font-size: 9.5px; margin-bottom: 3px; }
}

/* ══ Thẻ tin dạng chữ (tin do bot F247 đăng — không ảnh, không nhãn) ══ */
.news-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.news-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 0;
  padding: 18px 20px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(28, 24, 48, .04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.news-card:hover { transform: translateY(-2px); border-color: #cfc5f3; box-shadow: 0 12px 28px rgba(60, 40, 140, .09); }
.news-card:hover .nc-title { color: var(--purple-d); }
.nc-title { font-size: 16.5px; font-weight: 800; line-height: 1.4; letter-spacing: -.01em; transition: color .15s ease; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nc-excerpt { font-size: 13.5px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nc-date { margin-top: auto; padding-top: 2px; font-size: 12px; font-weight: 600; color: #9a96ad; }
@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; gap: 10px; }
  .news-card { padding: 14px 16px; border-radius: 14px; }
  .nc-title { font-size: 15px; }
}

.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 24px; }
.pager a, .pager span {
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px; font-size: 14px; font-weight: 600;
}
.pager a { background: #fff; border: 1px solid var(--border); }
.pager a:hover { border-color: var(--purple); color: var(--purple-d); }
.pager .pg-cur { background: var(--purple); color: #fff; }
.pager .pg-gap { color: #9a96ad; min-width: 20px; padding: 0; }

/* ══ Trang bài viết ══ */
.post {
  max-width: 820px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 32px 44px 28px; box-shadow: 0 1px 2px rgba(28, 24, 48, .04);
}
.post-head { margin-bottom: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; margin-bottom: 12px;
  border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--accent); background: var(--tint);
}
.post-title { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; line-height: 1.22; letter-spacing: -.025em; margin-bottom: 12px; text-wrap: balance; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.post-meta i { font-style: normal; color: #c4c0d3; }
.post-cover { margin: 0 -12px 22px; }
.post-cover img { width: 100%; border-radius: 14px; display: block; }
@media (max-width: 700px) {
  .post { padding: 20px 16px 18px; border-radius: 14px; }
  .post-cover { margin: 0 -6px 18px; }
}

/* Nội dung bài */
.prose { font-size: 17px; line-height: 1.75; color: #2a2640; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1em; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5 { color: var(--text); line-height: 1.3; letter-spacing: -.015em; font-weight: 800; margin-top: 1.6em; }
.prose h1 { font-size: 1.6em; } .prose h2 { font-size: 1.4em; } .prose h3 { font-size: 1.22em; } .prose h4, .prose h5 { font-size: 1.08em; }
.prose a { color: var(--purple-d); text-decoration: underline; text-decoration-color: #cfc5f3; text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--purple); }
.prose strong, .prose b { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--accent); }
.prose img { border-radius: 12px; display: block; margin-left: auto; margin-right: auto; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption, .prose .wp-element-caption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.5; }
.prose blockquote, .prose .wp-block-pullquote blockquote, .prose .wp-block-quote {
  margin-left: 0; margin-right: 0; padding: 16px 20px; border-left: 3px solid var(--purple);
  background: var(--lavender); border-radius: 0 12px 12px 0; color: #3b3650;
}
.prose .wp-block-pullquote { padding: 0; border: 0; }
.prose blockquote p + p { margin-top: .6em; }
.prose blockquote cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; font-weight: 600; color: var(--muted); }
.prose hr { border: 0 !important; height: 1px; background: var(--border) !important; margin: 2em 0; }
.prose .wp-block-spacer { display: none; }
.prose p.src { font-size: 13.5px; color: var(--muted); font-style: italic; }
.prose iframe { max-width: 100%; border: 0; border-radius: 12px; }
.prose iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.prose .wp-block-table, .prose figure.wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.prose th, .prose td { padding: 9px 12px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose thead th, .prose tr:first-child td strong { background: var(--lavender); }
.prose thead th { font-weight: 700; color: var(--text); }
.prose tbody tr:nth-child(even) td { background: #fbfaff; }
.prose .wp-block-columns { display: flex; flex-wrap: wrap; gap: 16px; }
.prose .wp-block-column { flex: 1 1 240px; min-width: 0; }
.prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.prose .wp-block-button__link {
  display: inline-flex; padding: 10px 18px; border-radius: 10px !important; text-decoration: none;
  background: var(--purple) !important; color: #fff !important; font-weight: 600; font-size: 15px;
}
.prose .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.prose .has-text-align-center { text-align: center; }
.prose details { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; background: #fff; }
.prose summary { cursor: pointer; font-weight: 700; }
.prose .blocks-gallery-grid, .prose .wp-block-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; list-style: none; padding: 0; }
@media (max-width: 600px) { .prose { font-size: 16px; line-height: 1.7; } }

/* Video YouTube trong bài (tải khi bấm) */
.yt-embed { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #0f0d18; }
.yt-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0 !important; }
.yt-play { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.yt-play img { width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; margin: 0 !important; transition: transform .4s ease, filter .3s ease; }
.yt-play::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px;
  border-radius: 14px; background: rgba(28, 24, 48, .72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 26px no-repeat;
  transition: background-color .2s ease, transform .2s ease;
}
.yt-play:hover::after { background-color: #ff0033; transform: scale(1.06); }
.yt-play:hover img { transform: scale(1.02); filter: brightness(.92); }

/* Hộp tác giả trong bài */
.author-box { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; margin-top: 1.6em !important; background: var(--lavender); border: 1px solid #ddd5f8; border-radius: 16px; font-size: 14.5px; line-height: 1.6; }
.author-box img { width: 56px; height: 56px; border-radius: 14px; margin: 0 !important; flex-shrink: 0; }
.author-box b { font-size: 16px; }
.author-box p { margin: 4px 0 10px; color: var(--muted); }

.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.post-share > span { font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.share-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: #fff; font-size: 13px; font-weight: 600; transition: border-color .15s ease, color .15s ease; }
.share-btn:hover { border-color: var(--purple); color: var(--purple-d); }
.share-btn svg { width: 15px; height: 15px; }
.share-btn:first-of-type svg { color: #1877f2; }

.post-nav { max-width: 820px; margin: 14px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.post-nav a { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; background: #fff; border: 1px solid var(--border); border-radius: 14px; transition: border-color .15s ease; }
.post-nav a:hover { border-color: #cfc5f3; }
.post-nav small { font-size: 12px; font-weight: 600; color: var(--muted); }
.post-nav b { font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pn-next { text-align: right; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } .pn-next { text-align: left; } }

.cta-strip { max-width: 820px; margin: 14px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.cta-strip .card { padding: 16px; }
.cta-strip .card-title { font-size: 15.5px; }
.cta-strip .card-desc { font-size: 12.5px; -webkit-line-clamp: 2; }
.cta-strip .card-icon img { width: 24px; height: 24px; }
@media (max-width: 760px) { .cta-strip { grid-template-columns: 1fr; } .cta-strip .card { flex-direction: row; align-items: center; } .cta-strip .card-top { order: 2; } .cta-strip .card-body { flex: 1; } }

.related { margin-top: 40px; }

/* ══ Tiêu đề section (trang chủ + liên quan) ══ */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sec-head h2 { font-size: clamp(21px, 2.4vw, 28px); font-weight: 800; letter-spacing: -.025em; line-height: 1.2; }
.sec-more { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--purple-d); padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--border); transition: border-color .15s ease; }
.sec-more:hover { border-color: var(--purple); }
.sec-more svg { width: 18px; height: 14px; color: #ff0033; }
@media (max-width: 600px) { .sec-head { align-items: flex-start; flex-direction: column; gap: 10px; } }

/* ══ Trang dịch vụ / giới thiệu ══ */
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.plan-grid.one { grid-template-columns: minmax(0, 640px); }
.plan { display: flex; flex-direction: column; gap: 14px; padding: 26px; background: #fff; border: 1px solid var(--border); border-radius: var(--r); }
.plan h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.plan-vip { background: linear-gradient(160deg, #f4f1fe 0%, #e9e3fb 100%); border-color: #e0d9f7; }
.plan .btn { align-self: flex-start; margin-top: auto; }
.plan .btn-ghost { align-self: flex-start; }
.ticks { list-style: none; display: grid; gap: 10px; font-size: 15px; line-height: 1.5; margin-bottom: 6px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d4fd8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.plan-vip .ticks li::before { background-color: #fff; }
@media (max-width: 760px) { .plan-grid { grid-template-columns: 1fr; } .plan { padding: 20px; } }

.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--gap); margin-bottom: var(--gap); }
.quote-card { padding: 26px; background: linear-gradient(160deg, #f4f1fe 0%, #e9e3fb 100%); border: 1px solid #e0d9f7; border-radius: var(--r); font-size: 16px; line-height: 1.7; }
.quote-card p::before { content: '“'; display: block; font-size: 48px; line-height: .8; color: var(--purple); font-weight: 800; margin-bottom: 6px; }
.quote-card footer { margin-top: 14px; font-size: 14px; color: var(--muted); }
.quote-card footer b { color: var(--text); }
.about-text { padding: 26px; background: #fff; border: 1px solid var(--border); border-radius: var(--r); font-size: 15.5px; line-height: 1.7; color: #3b3650; }
.about-text p + p { margin-top: 12px; }
.channel-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.channel { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #fff; border: 1px solid var(--border); border-radius: 16px; transition: border-color .15s ease, transform .2s ease; }
.channel:hover { border-color: #cfc5f3; transform: translateY(-1px); }
.channel > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.channel b { font-size: 15px; }
.channel small { font-size: 12.5px; color: var(--muted); }
.channel em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--tint); padding: 7px 12px; border-radius: 9px; flex-shrink: 0; }
.channel .card-icon img { width: 24px; height: 24px; }
@media (max-width: 760px) { .about-grid, .channel-list { grid-template-columns: 1fr; } .channel em { display: none; } }

.widget-card { padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--r); min-height: 680px; }

/* 404 */
.nf { max-width: 560px; margin: 40px auto; text-align: center; padding: 40px 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--r); }
.nf-code { font-size: 64px; font-weight: 800; letter-spacing: -.04em; color: var(--purple); line-height: 1; margin-bottom: 10px; }
.nf h1 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.nf p { color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ══ Footer ══ */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: rgba(255, 255, 255, .55); }
.ft-inner { max-width: calc(var(--wrap) + 40px); margin: 0 auto; padding: 36px 20px 24px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; }
.ft-brand p { font-size: 13.5px; line-height: 1.6; color: var(--muted); margin: 12px 0 14px; max-width: 34ch; }
.ft-social { display: flex; gap: 8px; }
.ft-social a { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #fff; border: 1px solid var(--border); transition: border-color .15s ease, transform .15s ease; }
.ft-social a:hover { border-color: #cfc5f3; transform: translateY(-1px); }
.ft-social svg { width: 18px; height: 18px; }
.s-yt { color: #ff0033; } .s-yt svg { width: 20px; height: 15px; }
.s-fb { color: #1877f2; }
.ft-col h4 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.ft-col ul { list-style: none; display: grid; gap: 9px; }
.ft-col a { font-size: 14px; color: #3b3650; }
.ft-col a:hover { color: var(--purple); }
.ft-bottom { max-width: calc(var(--wrap) + 40px); margin: 0 auto; padding: 16px 20px 24px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); line-height: 1.6; }
@media (max-width: 860px) { .ft-inner { grid-template-columns: 1fr 1fr; } .ft-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .ft-inner { padding: 28px 16px 18px; gap: 22px; } .ft-bottom { padding: 14px 16px 20px; padding-bottom: max(20px, env(safe-area-inset-bottom)); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
