/* Home page (front-page.php), from docs/design-trang-chu/trang-chu.html. Loaded only on the front page; scoped under .tsd-home. */

/* Reset the legacy typography of layout.css inside the home page */
.tsd-home { color: var(--tsd-ink); font-size: 16px; line-height: 1.6; }
.tsd-home h1, .tsd-home h2, .tsd-home h3, .tsd-home h4 { margin: 0; line-height: 1.25; }
.tsd-home p, .tsd-home figure, .tsd-home dl, .tsd-home dd { margin: 0; }
.tsd-home ul, .tsd-home ol { margin: 0; padding: 0; list-style: none; }
.tsd-home img { display: block; max-width: 100%; }
.tsd-home a:not(.btn) { color: inherit; text-decoration: none; }
.tsd-home .ic-sm { width: 18px; height: 18px; }

/* Hero */
.tsd-home .hero { position: relative; background: var(--tsd-g900); color: #fff; overflow: hidden; }
.tsd-home .hero-img { position: absolute; inset: 0 0 0 38%; }
.tsd-home .hero-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--tsd-g900) 0%, rgba(15, 61, 31, .75) 22%, rgba(15, 61, 31, 0) 55%); z-index: 1; }
.tsd-home .hero-img[data-ai]::after { bottom: 84px; z-index: 2; }
.tsd-home .hero .wrap { position: relative; z-index: 2; min-height: 560px; display: flex; align-items: center; padding-top: 56px; padding-bottom: 96px; }
.tsd-home .hero-txt { max-width: 620px; display: flex; flex-direction: column; gap: 22px; }
.tsd-home .eyebrow { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 14px; font-weight: 600; color: #e7f2e2; }
.tsd-home .eyebrow .ic { width: 16px; height: 16px; }
.tsd-home .hero h1 { font-size: 50px; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.tsd-home .hero h1 em { font-style: normal; color: var(--tsd-y400); }
.tsd-home .hero p { font-size: 18px; color: #dcebd6; max-width: 560px; }
.tsd-home .hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.tsd-home .hero-meta { display: flex; flex-wrap: wrap; gap: 20px; font-size: 15px; color: #cfe3c8; }
.tsd-home .hero-meta > * { display: inline-flex; align-items: center; gap: 8px; }
.tsd-home .hero-meta a:hover { color: #fff; }
.tsd-home .hero-meta .ic { width: 18px; height: 18px; color: var(--tsd-y400); }

/* Strengths overlapping the hero */
.tsd-home .strengths { position: relative; z-index: 3; margin-top: -64px; }
.tsd-home .str-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; background: #fff; border-radius: var(--tsd-r-lg); padding: 16px; box-shadow: 0 16px 40px rgba(15, 61, 31, .14); }
.tsd-home .str { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--tsd-r-md); background: var(--tsd-g50); }
.tsd-home .str-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--tsd-g100); color: var(--tsd-g700); display: flex; align-items: center; justify-content: center; flex: none; }
.tsd-home .str-ic .ic { width: 28px; height: 28px; }
.tsd-home .str h3 { font-size: 17px; font-weight: 700; color: var(--tsd-g800); margin-bottom: 4px; }
.tsd-home .str p { font-size: 14px; color: var(--tsd-muted); line-height: 1.55; }

/* Section heading: dark green pill flanked by rules */
.tsd-home .sec { padding: 80px 0 0; }
.tsd-home .sec-head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; margin-bottom: 36px; }
.tsd-home .pill-row { display: flex; align-items: center; gap: 18px; width: 100%; justify-content: center; }
.tsd-home .pill-row::before, .tsd-home .pill-row::after { content: ""; height: 2px; flex: 0 1 120px; background: var(--tsd-g200); }
.tsd-home .pill { display: inline-block; white-space: nowrap; padding: 10px 30px; border-radius: 999px; background: var(--tsd-g700); color: #fff; font-size: 28px; font-weight: 800; }
.tsd-home .sec-head p { max-width: 720px; color: var(--tsd-muted); font-size: 17px; }
.tsd-home .sec-head.left { align-items: flex-start; text-align: left; }
.tsd-home .sec-head.left .pill-row { justify-content: flex-start; }
.tsd-home .sec-head.left .pill-row::before { display: none; }
.tsd-home .focus-top .sec-head, .tsd-home .rec-top .sec-head { margin: 0; }

/* Ecosystem */
.tsd-home .eco { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.tsd-home .eco-card { display: flex; flex-direction: column; border-radius: var(--tsd-r-md); overflow: hidden; background: var(--tsd-g50); border: 1px solid var(--tsd-line); color: var(--tsd-ink); transition: box-shadow .15s, transform .15s; }
.tsd-home a.eco-card:hover { box-shadow: var(--tsd-shadow); transform: translateY(-2px); }
.tsd-home .eco-card .ph { aspect-ratio: 4 / 3; }
.tsd-home .eco-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tsd-home .eco-body h3 { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; font-weight: 700; color: var(--tsd-g800); }
.tsd-home .eco-body h3 .ic { color: var(--tsd-g600); margin-top: 1px; }
.tsd-home .eco-body p { font-size: 14px; color: var(--tsd-muted); }
.tsd-home .more { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--tsd-g700); }
.tsd-home a.more:hover { color: var(--tsd-g900); }
.tsd-home .more .ic { width: 16px; height: 16px; }

/* Focus conditions */
.tsd-home .focus-top { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; margin-bottom: 28px; }
.tsd-home .focus-top > p { color: var(--tsd-muted); font-size: 17px; max-width: 560px; }
.tsd-home .focus { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tsd-home .cond { display: grid; grid-template-columns: 200px 1fr; border-radius: var(--tsd-r-lg); overflow: hidden; background: linear-gradient(135deg, var(--tsd-g50), var(--tsd-g100)); border: 1px solid var(--tsd-line); }
.tsd-home .cond .ph { min-height: 220px; }
.tsd-home .cond-body { padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.tsd-home .cond h3 { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; color: var(--tsd-g800); }
.tsd-home .cond h3 .ic { color: var(--tsd-g600); }
.tsd-home .cond p { color: var(--tsd-muted); font-size: 15px; }
.tsd-home .cond ul { margin-top: 2px; display: flex; flex-wrap: wrap; gap: 8px; }
.tsd-home .cond li { padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--tsd-line); font-size: 13px; font-weight: 600; color: var(--tsd-g800); }

/* Recovery spaces */
.tsd-home .rec-top { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; margin-bottom: 28px; }
.tsd-home .adv { padding: 16px 20px; border-radius: var(--tsd-r-md); background: var(--tsd-y100); border: 1px solid #f2df8a; }
.tsd-home .adv b { display: inline-flex; align-items: center; gap: 8px; color: var(--tsd-g900); font-size: 16px; }
.tsd-home .adv b .ic { color: #b88a00; }
.tsd-home .adv p { font-size: 14px; color: #4b4a33; margin-top: 4px; }
.tsd-home .spaces { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.tsd-home .space .ph { aspect-ratio: 1 / 1; border-radius: var(--tsd-r-md); }
.tsd-home .space figcaption { margin-top: 10px; text-align: center; font-size: 14px; font-weight: 600; color: var(--tsd-ink); line-height: 1.45; }

/* Clinic & team */
.tsd-home .team { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: stretch; }
.tsd-home .doc { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 24px; border-radius: var(--tsd-r-lg); background: var(--tsd-g50); border: 1px solid var(--tsd-line); align-items: start; }
.tsd-home .doc .ph { border-radius: var(--tsd-r-md); aspect-ratio: 4 / 5; }
.tsd-home .doc h3 { font-size: 26px; font-weight: 800; color: var(--tsd-g800); }
.tsd-home .doc .role { color: var(--tsd-g600); font-weight: 600; margin: 2px 0 14px; }
.tsd-home .doc .more { margin-top: 16px; }
.tsd-home .checks { display: flex; flex-direction: column; gap: 10px; }
.tsd-home .checks li { display: flex; gap: 10px; font-size: 15px; color: var(--tsd-ink); }
.tsd-home .checks .ic { width: 20px; height: 20px; color: var(--tsd-g600); margin-top: 2px; }
.tsd-home .clinics { display: flex; flex-direction: column; gap: 14px; }
.tsd-home .clinics h3 { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; color: var(--tsd-g800); }
.tsd-home .clinics h3 .ic { color: var(--tsd-g600); }
.tsd-home .clinic { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px; border-radius: var(--tsd-r-md); background: #fff; border: 1px solid var(--tsd-line); box-shadow: var(--tsd-shadow); }
.tsd-home .clinic .ph { border-radius: var(--tsd-r-sm); aspect-ratio: 4 / 3; }
.tsd-home .clinic .ph[data-ai]::after { right: 4px; bottom: 4px; padding: 1px 6px; font-size: 10px; }
.tsd-home .clinic h4 { font-size: 16px; font-weight: 700; color: var(--tsd-g800); margin-bottom: 6px; }
.tsd-home .clinic dl { display: grid; gap: 4px; font-size: 14px; color: var(--tsd-muted); }
.tsd-home .clinic dl > div { display: flex; gap: 8px; align-items: flex-start; }
.tsd-home .clinic dt { flex: none; }
.tsd-home .clinic dl .ic { width: 16px; height: 16px; margin-top: 3px; color: var(--tsd-g600); }
.tsd-home .clinic dd a:hover { color: var(--tsd-g700); }

/* Process */
.tsd-home .steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tsd-home .step { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px 18px; border-radius: var(--tsd-r-md); background: var(--tsd-g50); border: 1px solid var(--tsd-line); scroll-margin-top: 96px; }
.tsd-home .step-ic { width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 2px solid var(--tsd-g200); color: var(--tsd-g700); display: flex; align-items: center; justify-content: center; flex: none; }
.tsd-home .step-ic .ic { width: 26px; height: 26px; }
.tsd-home .step h3 { font-size: 17px; font-weight: 800; color: var(--tsd-g800); }
.tsd-home .step p { font-size: 14px; color: var(--tsd-muted); }
.tsd-home .step:not(:last-child)::after { content: ""; position: absolute; right: -12px; top: 46px; width: 12px; height: 2px; background: var(--tsd-g200); }
.tsd-home .step.hl { background: var(--tsd-g800); border-color: var(--tsd-g800); color: #fff; }
.tsd-home .step.hl .step-ic { background: var(--tsd-y400); border-color: var(--tsd-y400); color: var(--tsd-g950); }
.tsd-home .step.hl h3 { color: var(--tsd-y400); }
.tsd-home .step.hl p { color: #dcebd6; }
.tsd-home .step.hl .btn { margin-top: auto; align-self: flex-start; }

/* Stories + channels */
.tsd-home .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tsd-home .home-box { border-radius: var(--tsd-r-lg); border: 1px solid var(--tsd-line); background: var(--tsd-g50); padding: 26px; display: grid; gap: 20px; align-content: start; }
.tsd-home .video { grid-template-columns: 1.1fr 1fr; align-items: center; }
.tsd-home .vthumb-link { display: block; border-radius: var(--tsd-r-md); }
.tsd-home .vthumb { position: relative; aspect-ratio: 16 / 10; border-radius: var(--tsd-r-md); }
.tsd-home .vplay { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: flex; align-items: center; justify-content: center; color: var(--tsd-g700); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); z-index: 1; transition: transform .15s; }
.tsd-home .vplay .ic { width: 30px; height: 30px; margin-left: 4px; }
.tsd-home .vthumb-link:hover .vplay { transform: scale(1.06); }
.tsd-home .home-box h3 { font-size: 24px; font-weight: 800; color: var(--tsd-g800); }
.tsd-home .home-box p { color: var(--tsd-muted); font-size: 15px; }
.tsd-home .home-stack { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.tsd-home .chans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tsd-home .chan { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: var(--tsd-r-md); background: #fff; border: 1px solid var(--tsd-line); font-size: 14px; font-weight: 700; color: var(--tsd-ink); text-align: center; line-height: 1.3; }
.tsd-home a.chan[href]:hover { border-color: var(--tsd-g200); box-shadow: var(--tsd-shadow); }
.tsd-home .chan.is-empty { cursor: default; }
.tsd-home .chan small { font-size: 12px; font-weight: 500; color: var(--tsd-muted); }
.tsd-home .chan-txt { display: flex; flex-direction: column; align-items: inherit; gap: 2px; min-width: 0; max-width: 100%; }
.tsd-home .chan-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; max-width: 100%; overflow-wrap: anywhere; text-wrap: balance; }
.tsd-home .chan-ic { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; }
.tsd-home .chan-ic .ic { width: 26px; height: 26px; }
.tsd-home .chan-youtube .chan-ic { background: #e62117; }
.tsd-home .chan-facebook .chan-ic { background: #1877f2; }
.tsd-home .chan-tiktok .chan-ic { background: #111; }

.tsd-home a:focus-visible { outline: 3px solid var(--tsd-y400); outline-offset: 2px; }

/* Desktop: the channels box is half the row, too narrow for 4 columns with long channel
   names, so channels become a 2×2 grid of horizontal cards (icon left, name up to 2 lines). */
@media (min-width: 1181px) {
  .tsd-home .chans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tsd-home .chan { flex-direction: row; align-items: center; text-align: left; gap: 12px; padding: 12px 14px; }
  .tsd-home .chan-ic { flex: none; width: 44px; height: 44px; }
  .tsd-home .chan-txt { align-items: flex-start; }
}

/* Responsive */
@media (max-width: 1180px) {
  .tsd-home .str-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tsd-home .eco { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tsd-home .spaces { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tsd-home .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tsd-home .step::after { display: none; }
  .tsd-home .team, .tsd-home .duo, .tsd-home .focus { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tsd-home .hero { display: flex; flex-direction: column-reverse; }
  .tsd-home .hero-img { position: relative; inset: auto; height: 240px; }
  .tsd-home .hero-img::before { background: linear-gradient(180deg, var(--tsd-g900) 0%, rgba(15, 61, 31, 0) 35%); }
  .tsd-home .hero-img[data-ai]::after { bottom: 72px; }
  .tsd-home .hero .wrap { min-height: 0; padding-top: 28px; padding-bottom: 20px; }
  .tsd-home .hero h1 { font-size: 32px; }
  .tsd-home .eyebrow { font-size: 13px; }
  .tsd-home .hero p { font-size: 16px; }
  .tsd-home .hero-ctas .btn { flex: 1 1 100%; }
  .tsd-home .str-grid { grid-template-columns: 1fr; padding: 12px; gap: 10px; }
  .tsd-home .str { padding: 14px; }
  .tsd-home .sec { padding-top: 56px; }
  .tsd-home .pill { font-size: 21px; padding: 8px 20px; white-space: normal; }
  .tsd-home .pill-row::before, .tsd-home .pill-row::after { flex-basis: 24px; }
  .tsd-home .sec-head p { font-size: 15px; }
  .tsd-home .eco { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tsd-home .eco-card:first-child { grid-column: 1 / -1; }
  .tsd-home .eco-body { padding: 12px; }
  .tsd-home .eco-body h3 { font-size: 15px; }
  .tsd-home .eco-body p { font-size: 13px; }
  .tsd-home .focus-top, .tsd-home .rec-top { grid-template-columns: 1fr; gap: 12px; }
  .tsd-home .focus-top > p { font-size: 15px; }
  .tsd-home .cond { grid-template-columns: 1fr; }
  .tsd-home .cond .ph { min-height: 0; aspect-ratio: 16 / 9; }
  .tsd-home .cond h3 { font-size: 22px; }
  .tsd-home .spaces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tsd-home .doc { grid-template-columns: 1fr; padding: 18px; }
  .tsd-home .doc .ph { aspect-ratio: 1 / 1; max-width: 220px; }
  .tsd-home .clinic { grid-template-columns: 96px 1fr; }
  .tsd-home .steps { grid-template-columns: 1fr; }
  .tsd-home .step { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
  .tsd-home .step-ic { width: 48px; height: 48px; }
  .tsd-home .step > div:not(.step-ic) { flex: 1 1 calc(100% - 64px); min-width: 0; }
  .tsd-home .step.hl .btn { margin-left: 62px; margin-top: 0; }
  .tsd-home .video { grid-template-columns: 1fr; }
  .tsd-home .chans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tsd-home .home-box { padding: 18px; }
}

/* Narrow phones: 2 columns are too tight for 2-line channel names, use one row per channel. */
@media (max-width: 420px) {
  .tsd-home .chans { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tsd-home .chan { flex-direction: row; align-items: center; text-align: left; gap: 12px; padding: 10px 14px; }
  .tsd-home .chan-ic { flex: none; width: 40px; height: 40px; }
  .tsd-home .chan-txt { align-items: flex-start; }
}
