@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap");

:root {
  --bg: #070b14;
  --bg-2: #0c1322;
  --bg-3: #121b2e;
  --bg-elevated: #162238;
  --blue: #2b7cff;
  --blue-deep: #1a5fd4;
  --blue-light: #6babff;
  --blue-soft: rgba(43, 124, 255, 0.14);
  --gold: #c9a227;
  --text: #e9eef8;
  --text-muted: #97a6bb;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --nav-h: 72px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --max: 1160px;
  --font: "Be Vietnam Pro", sans-serif;
  --display: "Sora", "Be Vietnam Pro", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue-light, #6babff);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #9bc4ff;
}

ul {
  padding-left: 1.2rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* ===== Site background atmosphere ===== */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(43, 124, 255, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(201, 162, 39, 0.08), transparent 50%),
    linear-gradient(180deg, #070b14 0%, #0a1020 45%, #070b14 100%);
  pointer-events: none;
}

.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
}

/* ===== Header / Nav ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(7, 11, 20, 0.96);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-height: calc(var(--nav-h) - 24px);
}

.brand img {
  height: 40px;
  width: auto;
  max-height: calc(var(--nav-h) - 24px);
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  justify-content: center;
}

.nav-desktop a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
  background: var(--blue-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff;
  box-shadow: 0 8px 20px rgba(43, 124, 255, 0.3);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(43, 124, 255, 0.45);
  color: var(--text);
  background: var(--blue-soft);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(43, 124, 255, 0.35);
  color: var(--text);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  margin-left: 0.15rem;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle.is-open .icon-menu {
  display: none;
}

.menu-toggle.is-open .icon-close {
  display: block;
}

.menu-toggle .menu-label::after {
  content: "Menu";
}

.menu-toggle.is-open .menu-label::after {
  content: "Đóng";
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 11, 20, 0.97);
  padding: 1.25rem 1rem 2rem;
  overflow-y: auto;
  z-index: 999;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile a {
  color: var(--text);
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  font-weight: 500;
}

.nav-mobile a:hover,
.nav-mobile a.active {
  background: var(--blue-soft);
  border-color: rgba(43, 124, 255, 0.35);
  color: #fff;
}

.nav-mobile .mobile-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.nav-mobile .mobile-auth .btn {
  width: 100%;
}

body.menu-open {
  overflow: hidden;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: clamp(420px, 78vh, 640px);
  margin-top: var(--nav-h);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 11, 20, 0.92) 0%, rgba(7, 11, 20, 0.72) 42%, rgba(7, 11, 20, 0.35) 70%, rgba(7, 11, 20, 0.55) 100%),
    linear-gradient(0deg, rgba(7, 11, 20, 0.95) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3.5rem 0 3rem;
  max-width: 640px;
  animation: fadeUp 0.8s ease both;
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 20%, #7eb3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.hero-lead {
  font-size: 1.02rem;
  max-width: 52ch;
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ===== Sections ===== */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(18, 27, 46, 0.55), rgba(7, 11, 20, 0));
}

.section-head {
  margin-bottom: 2rem;
  max-width: 680px;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
}

.section-head p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.55rem;
}

/* ===== Intro / prose ===== */
.prose {
  max-width: 72ch;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose a {
  color: #7eb3ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose h2,
.prose h3 {
  margin-top: 1.75rem;
  color: var(--text);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.intro-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.intro-visual img {
  width: 100%;
  height: auto;
}

/* ===== Category grid ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cat-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(22, 34, 56, 0.9), rgba(12, 19, 34, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.cat-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(43, 124, 255, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(43, 124, 255, 0.4);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  color: #fff;
}

.cat-item:hover::before {
  opacity: 1;
}

.cat-item img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
  transition: transform 0.35s ease;
}

.cat-item:hover img {
  transform: scale(1.06);
}

.cat-item span {
  position: relative;
  z-index: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ===== Cards / articles ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(43, 124, 255, 0.4);
  box-shadow: var(--shadow);
  color: inherit;
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-3);
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.05);
}

.article-card .body {
  padding: 1.15rem 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card .meta {
  font-size: 0.78rem;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.55rem;
  color: var(--text);
}

.article-card p {
  font-size: 0.9rem;
  margin-bottom: 0;
  flex: 1;
}

/* ===== Guide list ===== */
.guide-list {
  display: grid;
  gap: 1rem;
}

.guide-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.guide-row:hover {
  border-color: rgba(43, 124, 255, 0.4);
  background: var(--bg-3);
  color: inherit;
}

.guide-row img {
  width: 140px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
}

.guide-row h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.guide-row p {
  margin: 0;
  font-size: 0.9rem;
}

.guide-row .more {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}

/* ===== Brands ===== */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.brand-strip img {
  height: 36px;
  width: auto;
  opacity: 0.75;
  filter: grayscale(0.2);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.brand-strip img:hover {
  opacity: 1;
  filter: none;
}

/* ===== FAQ ===== */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 820px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 1.25rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--blue);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-body {
  padding: 0 1.25rem 1.15rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== CTA band ===== */
.cta-band {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #132038, #0c1528 55%, #1a2a48);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.cta-band h2 {
  font-size: 1.6rem;
}

.cta-band img {
  max-height: 180px;
  margin-inline: auto;
  object-fit: contain;
}

/* ===== Page hero (inner) ===== */
.page-hero {
  margin-top: var(--nav-h);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(43, 124, 255, 0.08), transparent);
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  max-width: 28ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: #9bc4ff;
}

.breadcrumb span[aria-hidden="true"] {
  opacity: 0.5;
}

/* ===== Article layout ===== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}

.article-main {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 2rem;
}

.article-cover {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.sidebar-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.sidebar-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.related-list {
  display: grid;
  gap: 0.85rem;
}

.related-list a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.75rem;
  align-items: center;
  color: var(--text);
}

.related-list img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
}

.related-list span {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
}

/* ===== List page ===== */
.list-grid {
  display: grid;
  gap: 1.25rem;
  padding: 2.5rem 0 4rem;
}

.list-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  padding: 1.15rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.list-item:hover {
  border-color: rgba(43, 124, 255, 0.4);
  transform: translateY(-2px);
  color: inherit;
}

.list-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
}

.list-item h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* ===== Category showcase ===== */
.cat-showcase {
  display: grid;
  gap: 1.5rem;
  padding: 2.5rem 0 4rem;
}

.cat-block {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.cat-block img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin: auto;
}

.cat-block h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  background: #060910;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 36ch;
}

.footer-col h3 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.25rem 0;
}

.footer-col a:hover {
  color: #9bc4ff;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.disclaimer {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 80ch;
  margin-top: 1rem;
  opacity: 0.85;
}

/* ===== Error pages ===== */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 2rem) 1rem 2rem;
  margin-top: 0;
}

.error-page .code {
  font-family: var(--display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), #7eb3ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .nav-desktop,
  .nav-actions > .btn {
    display: none;
  }

  .intro-grid,
  .cta-band,
  .article-layout,
  .cat-block {
    grid-template-columns: 1fr;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .guide-row {
    grid-template-columns: 100px 1fr;
  }

  .guide-row .more {
    display: none;
  }

  .guide-row img {
    width: 100px;
    height: 70px;
  }

  .list-item {
    grid-template-columns: 1fr;
  }

  .list-item img {
    height: 180px;
  }

  .sidebar-box {
    position: static;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-h: 64px;
  }

  .brand img {
    height: 34px;
  }

  .section {
    padding: 3rem 0;
  }

  .card-grid,
  .cat-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cat-item img {
    width: 88px;
    height: 88px;
  }

  .hero-content {
    padding: 2.5rem 0 2rem;
  }

  .cta-band {
    padding: 1.5rem;
  }

  .article-main {
    padding: 1.15rem;
  }

  .page-hero {
    padding: 2.25rem 0 1.5rem;
  }
}
