/* Colors from the ZOWIN logo: red, gold, green plate on a dark hall. */
:root {
  --red: #fe3d06;
  --red-2: #dd3333;
  --hover: #841200;
  --gold: #ffd700;
  --gold-2: #e6c27a;
  --header: #120000;
  --ink: #f6f1e8;
  --muted: #cbb8a4;
  --line: rgba(230, 194, 122, 0.32);
  --card: rgba(12, 6, 8, 0.88);
  --sans: "Be Vietnam Pro", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #120000; }
body {
  margin: 0;
  color: var(--ink);
  background: #120000 url("/assets/img/bg.webp") center top / cover fixed;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-2); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
.skip {
  position: absolute;
  left: 12px;
  top: 8px;
  padding: 8px 12px;
  background: #fff;
  color: #120000;
  z-index: 40;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 78px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img {
  height: 62px; width: auto; border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35);
}
.nav { display: flex; gap: 4px; align-items: center; flex: 1; flex-wrap: nowrap; }
.nav a:not(.btn) {
  color: #fff; text-decoration: none; font-size: 15px; font-weight: 650;
  padding: 8px 10px; border-radius: 6px; order: 1; white-space: nowrap; flex-shrink: 0;
}
.menu-group { position: relative; order: 1; flex-shrink: 0; }
.menu-group > a { display: inline-flex; align-items: center; gap: 6px; }
.menu-group > a::after {
  content: "";
  border: 4px solid transparent;
  border-top-color: currentColor;
  margin-top: 3px;
}
.menu-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 168px;
  padding: 8px;
  background: #1b0c0e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  z-index: 30;
}
.menu-group:hover .menu-panel,
.menu-group:focus-within .menu-panel { display: flex; flex-direction: column; }
.menu-panel a { display: block; }
.menu-group.here > a { color: #ffd0c2; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: #ffd0c2; background: rgba(254, 61, 6, 0.16); }
.nav .btn { order: 2; flex-shrink: 0; }
.nav .btn-solid { margin-left: auto; }
.nav-toggle {
  display: none; margin-left: 8px;
  width: 42px; height: 42px; padding: 0; gap: 5px;
  flex-direction: column; justify-content: center; align-items: center;
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,.25); border-radius: 6px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 1px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; border-radius: 6px; padding: 10px 16px; font-weight: 800;
}
.btn-solid, .btn-gold { background: var(--red); color: #fff; }
.btn-solid:hover, .btn-gold:hover { background: var(--hover); color: #fff; }
.btn-ghost, .btn-line { border: 1px solid #fff; color: #fff; background: transparent; }
.btn-ghost:hover, .btn-line:hover { background: #fff; color: var(--header); }

.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 36px;
  align-items: center; padding: 36px 0 12px;
}
.kicker {
  color: var(--gold); letter-spacing: 0.14em; text-transform: uppercase;
  font-size: 12px; font-weight: 800; margin: 0 0 10px;
}
h1 {
  font-weight: 800; font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18; margin: 0 0 14px; color: #fff;
}
.lead { font-size: 18px; color: #f3e6d4; }
.lead a { color: #ffe14a; font-weight: 700; }
.hero-figure { margin: 0; }
.hero-figure img, .frame img {
  width: 100%; border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.hero-figure figcaption, .frame figcaption {
  color: var(--muted); font-size: 13px; font-style: italic; text-align: center; margin-top: 8px;
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 8px; }

.layout { display: grid; grid-template-columns: 230px 1fr; gap: 28px; padding: 18px 0 64px; }
.toc {
  position: sticky; top: 96px; align-self: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
.toc p { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); font-weight: 800; }
.toc a { display: block; color: var(--gold-2); text-decoration: none; font-size: 14px; font-weight: 600; margin: 7px 0; }
.toc a:hover { color: var(--gold); }

.article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 32px 40px;
}
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.crumbs a { color: var(--gold-2); }
h2 { font-size: 28px; line-height: 1.25; font-weight: 800; margin: 32px 0 10px; color: #fff; }
h3 { font-size: 20px; margin: 22px 0 8px; color: #f6e4bf; }
.article table { width: 100%; border-collapse: collapse; margin: 16px 0 8px; font-size: 15px; }
.article th, .article td { border: 1px solid var(--line); text-align: left; padding: 10px 8px; vertical-align: top; }
.article th { background: #2a141b; color: #f6e4bf; font-weight: 700; }
.article td { background: rgba(255, 255, 255, 0.03); }
.frame { margin: 18px 0; }
blockquote {
  margin: 18px 0; padding: 12px 16px; border-left: 3px solid var(--red);
  background: rgba(254, 61, 6, 0.08); color: #fff;
}
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; color: #fff; }
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.related a {
  display: block; text-decoration: none; color: var(--ink);
  background: rgba(255, 255, 255, 0.04); border-radius: 12px; padding: 14px; border: 1px solid var(--line);
}
.related a:hover { border-color: var(--gold); }
.card-list { display: grid; gap: 12px; }
.card-list a { text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.note { font-size: 14px; color: var(--muted); }

.site-footer { background: #e24c18; color: #fff; padding: 36px 0 18px; }
.foot-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1.15fr; gap: 28px; align-items: start; }
.foot-brand img { height: 92px; width: auto; margin-bottom: 14px; }
.foot-about p { margin: 0; font-size: 15px; line-height: 1.65; }
.foot-about p a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #ffe14a; }
.site-footer a.gold,
.site-footer .highlight-brand,
.site-footer .highlight-brand a { color: #ffe14a; font-weight: 700; }
.foot-label {
  color: #fff; font-size: 15px; margin: 8px 0 12px; letter-spacing: 0.04em;
  text-transform: uppercase; font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,.55); padding-bottom: 8px;
}
.site-footer ul { margin: 0; padding: 0; }
.foot-links { list-style: none; }
.foot-links a::before { content: "> "; }
.foot-links li { margin: 8px 0; }
.foot-contact { list-style: disc; padding-left: 18px; }
.foot-contact li { margin: 8px 0; }
.legal { margin: 22px 0 0; font-size: 13px; color: rgba(255,255,255,.85); text-align: center; }
.crawl-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 32px;
  padding: 22px 18px 28px;
  background: #120000;
  border-top: 1px solid rgba(230, 194, 122, 0.55);
}
.crawl-bar a {
  color: #f6f1e8;
  text-decoration: none;
  font-size: 16px;
}
.crawl-bar a:hover { color: var(--gold); }

@media (max-width: 900px) {
  .hero, .layout, .foot-grid, .related { grid-template-columns: 1fr; }
  .hero { padding: 16px 0 8px; }
  .hero h1 { font-size: 26px; line-height: 1.2; margin-bottom: 10px; }
  .hero .lead { font-size: 15px; line-height: 1.55; }
  .hero .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero .actions .btn { width: 100%; padding: 12px 8px; font-size: 15px; }
  .toc { position: static; }
  .brand img { height: 48px; }
  .site-header .wrap { min-height: 64px; gap: 6px; }
  .nav-toggle { display: inline-flex; order: 3; margin-left: 0; flex-shrink: 0; }
  /* Keep Đăng ký / Đăng nhập in the bar; the rest of the menu stays behind the toggle. */
  .nav { display: contents; }
  .nav > a:not(.btn),
  .nav > .menu-group { display: none; }
  .nav > .btn {
    order: 2;
    width: auto;
    margin: 0;
    padding: 8px 9px;
    font-size: 13px;
    line-height: 1.15;
    white-space: nowrap;
  }
  .nav > .btn-solid { margin-left: auto; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    background: #1b0c0e;
    padding: 12px 18px 18px;
    flex-direction: column;
    align-items: stretch;
  }
  .nav.open > a:not(.btn),
  .nav.open > .menu-group { display: block; }
  .nav.open > .btn { order: 0; width: 100%; margin: 4px 0 8px; }
  .nav.open > .btn-solid { margin-left: 0; }
  .menu-group { width: 100%; }
  .menu-group > a::after { display: none; }
  .menu-panel {
    display: flex;
    flex-direction: column;
    position: static;
    min-width: 0;
    padding: 0 0 8px 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .article { padding: 20px 16px 28px; }
  body { background-attachment: scroll; }
}
