:root {
  --hw-blue: #005091;
  --hw-blue-dark: #003a6b;
  --hw-red: #ed1b34;
  --hw-text: #141416;
  --hw-muted: #5a5a62;
  --hw-border: #e6e8ec;
  --hw-bg: #f5f7fa;
  --hw-white: #ffffff;
  --hw-wrapper: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--hw-text);
  background: var(--hw-white);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--hw-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--hw-red);
}

.wrapper {
  width: 100%;
  max-width: var(--hw-wrapper);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--hw-blue);
  color: var(--hw-white);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0, 40, 80, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--hw-white);
}

.brand:hover {
  color: var(--hw-white);
  opacity: 0.92;
}

.brand img {
  height: 48px;
  width: auto;
  display: block;
  border-radius: 4px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

.header-meta a {
  color: rgba(255, 255, 255, 0.92);
}

.header-meta a:hover {
  color: #fff;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  overflow: hidden;
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
}

.lang-switch button.is-active {
  background: var(--hw-white);
  color: var(--hw-blue);
}

/* Hero */
.page-hero {
  position: relative;
  background: var(--hw-blue);
  color: var(--hw-white);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(0, 80, 145, 0.92), rgba(0, 58, 107, 0.88)),
    url("../assets/bg-banner.png") center / cover no-repeat;
  opacity: 1;
}

.hero-inner {
  position: relative;
  padding: 56px 0 48px;
  text-align: center;
}

.hero-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 10px;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.25;
}

.hero-sub {
  margin: 0 auto;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
}

/* Layout */
.page-body {
  background: var(--hw-bg);
  padding: 36px 0 56px;
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 92px;
  background: var(--hw-white);
  border: 1px solid var(--hw-border);
  border-radius: 10px;
  padding: 18px 16px;
}

.toc h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hw-blue);
}

.toc ol {
  margin: 0;
  padding: 0 0 0 18px;
  display: grid;
  gap: 8px;
}

.toc a {
  color: var(--hw-muted);
  font-size: 13px;
  line-height: 1.4;
}

.toc a:hover,
.toc a.is-active {
  color: var(--hw-red);
}

.content-card {
  background: var(--hw-white);
  border: 1px solid var(--hw-border);
  border-radius: 10px;
  padding: 28px 32px 36px;
  box-shadow: 0 8px 24px rgba(20, 20, 22, 0.04);
}

.content-card section + section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--hw-border);
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--hw-blue);
  font-weight: 700;
}

.content-card h3 {
  margin: 18px 0 8px;
  font-size: 16px;
  color: var(--hw-text);
  font-weight: 600;
}

.content-card p,
.content-card li {
  color: var(--hw-muted);
}

.content-card ul,
.content-card ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.content-card li + li {
  margin-top: 6px;
}

.note {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgba(0, 80, 145, 0.08);
  border-left: 3px solid var(--hw-blue);
  border-radius: 0 8px 8px 0;
  color: var(--hw-text);
  font-size: 14px;
}

.contact-box {
  margin-top: 14px;
  padding: 16px 18px;
  background: var(--hw-bg);
  border-radius: 8px;
  border: 1px solid var(--hw-border);
}

.contact-box p {
  margin: 0;
  color: var(--hw-text);
}

.contact-box p + p {
  margin-top: 6px;
}

[data-lang] {
  display: none;
}

html[lang="en"] [data-lang="en"],
html[lang="vi"] [data-lang="vi"] {
  display: block;
}

html[lang="en"] span[data-lang="en"],
html[lang="vi"] span[data-lang="vi"] {
  display: inline;
}

html[lang="en"] .toc [data-lang="en"],
html[lang="vi"] .toc [data-lang="vi"] {
  display: contents;
}

/* Footer — giống headway_web, không có menu */
.site-footer {
  position: relative;
  background: #ffffff;
  color: #353945;
  border-top: 1px solid #dee0e4;
}

.footer-top {
  padding: 60px 0 30px;
  text-align: center;
}

.footer-brand-col {
  max-width: 480px;
  margin: 0 auto;
}

.footer-logo {
  max-width: 240px;
  margin: 0 auto 10px;
}

.footer-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.footer-address {
  max-width: 420px;
  margin: 0 auto 30px;
  color: #353945;
  font-size: 14px;
  line-height: 22px;
}

.footer-address a {
  color: #353945;
}

.footer-address a:hover {
  color: #ed1b34;
}

.footer-social ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.footer-social a {
  width: 48px;
  height: 48px;
  border-radius: 100%;
  display: block;
  transition: transform 0.2s ease;
}

.footer-social a:hover {
  transform: translateY(-2px);
}

.footer-social img {
  width: 100%;
  height: 100%;
  display: block;
}

.footer-bottom {
  padding: 30px 0;
  border-top: 1px solid #dee0e4;
}

.footer-copy {
  font-size: 14px;
  line-height: 22px;
  text-align: center;
  color: #b1b5c4;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #e8eaef;
  color: #6b7280;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 2px 8px rgba(20, 20, 22, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.back-to-top svg {
  display: block;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.back-to-top:hover {
  background: #dfe2e8;
  color: #141416;
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .content-card {
    padding: 22px 18px 28px;
  }

  .header-meta .hotline {
    display: none;
  }

  .footer-top {
    padding: 40px 0 24px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    min-height: 64px;
  }

  .brand img {
    height: 40px;
  }

  .hero-inner {
    padding: 40px 0 34px;
  }

  .footer-logo {
    max-width: 200px;
  }

  .back-to-top {
    right: 14px;
    bottom: 18px;
  }
}
