/* KGame – cổng thông tin game | kgame-l.autos */
:root {
  --bg-deep: #07131f;
  --bg-mid: #0c2438;
  --bg-panel: #12324a;
  --bg-soft: #1a405c;
  --line: rgba(140, 200, 230, 0.18);
  --text: #eef6fb;
  --muted: #9bb6c9;
  --brand: #2ec4b6;
  --brand-2: #1a9bb5;
  --accent: #f0a202;
  --accent-soft: #ffd166;
  --danger: #e85d4c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --nav-h: 72px;
  --max: 1120px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Sora", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: var(--nav-h);
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(46, 196, 182, 0.22), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(240, 162, 2, 0.12), transparent 55%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 45%, #0a1c2c 100%);
  background-attachment: fixed;
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent-soft);
}

ul {
  padding-left: 1.2rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* ===== Header / Nav ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  backdrop-filter: blur(16px);
  background: rgba(7, 19, 31, 0.86);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}

.logo-link img {
  height: 40px;
  width: auto;
  max-height: calc(var(--nav-h) - 24px);
  max-width: 150px;
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-desktop a {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  background: rgba(46, 196, 182, 0.12);
  color: var(--brand);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  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;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff8c2a);
  color: #1a1205;
}

.btn-primary:hover {
  color: #1a1205;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-outline {
  border-color: rgba(46, 196, 182, 0.45);
  color: var(--brand);
  background: rgba(46, 196, 182, 0.08);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: rgba(26, 64, 92, 0.7);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-drawer {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  background: rgba(7, 19, 31, 0.97);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0 1.4rem;
  z-index: 999;
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-drawer a {
  color: var(--text);
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(140, 200, 230, 0.08);
  font-weight: 500;
}

.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.mobile-actions .btn {
  width: 100%;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 19, 31, 0.35) 0%, rgba(7, 19, 31, 0.72) 48%, rgba(7, 19, 31, 0.96) 100%),
    linear-gradient(90deg, rgba(7, 19, 31, 0.75) 0%, rgba(7, 19, 31, 0.2) 60%, transparent 100%);
}

.hero-content {
  padding: 4.5rem 0 3.5rem;
  max-width: 640px;
  animation: rise 0.8s ease both;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 0.8rem;
  background: linear-gradient(120deg, #fff 20%, var(--brand) 55%, var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.9rem;
  color: var(--text);
}

.hero-lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
  max-width: 52ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ===== Sections ===== */
.section {
  padding: 4rem 0;
}

.section-tight {
  padding: 2.5rem 0;
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 640px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.55rem;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.prose {
  color: var(--muted);
  max-width: 72ch;
}

.prose p {
  margin: 0 0 1rem;
}

.prose h2,
.prose h3 {
  color: var(--text);
  font-family: var(--font-display);
  margin: 1.8rem 0 0.7rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.panel {
  background: linear-gradient(160deg, rgba(18, 50, 74, 0.92), rgba(12, 36, 56, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* Category tiles – not cards for hero, interactive list tiles */
.cat-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  min-height: 210px;
  isolation: isolate;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.cat-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 196, 182, 0.45);
}

.cat-tile img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  object-position: center;
}

.cat-tile span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.1rem 1rem 0.95rem;
  background: linear-gradient(180deg, transparent, rgba(5, 14, 24, 0.92));
  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);
}

/* Article list */
.article-list {
  display: grid;
  gap: 1rem;
}

.article-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  align-items: stretch;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: rgba(18, 50, 74, 0.35);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.article-item:hover {
  border-color: var(--line);
  background: rgba(18, 50, 74, 0.65);
}

.article-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.article-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-family: var(--font-display);
  color: var(--text);
}

.article-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.45rem;
}

.tag {
  color: var(--brand);
  font-weight: 600;
}

/* Feature strip */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-item {
  padding: 1.25rem 1.2rem;
  border-left: 3px solid var(--brand);
  background: rgba(18, 50, 74, 0.45);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.feature-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-family: var(--font-display);
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(18, 50, 74, 0.4);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.1rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-body {
  padding: 0 1.1rem 1.1rem;
  color: var(--muted);
}

/* Breadcrumb */
.breadcrumb {
  padding: 1.1rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: rgba(155, 182, 201, 0.5);
}

.breadcrumb a {
  color: var(--muted);
}

.page-hero {
  padding: 1.5rem 0 0.5rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin: 0 0 0.7rem;
  letter-spacing: -0.02em;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

.article-cover {
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.related-item {
  display: block;
  color: inherit;
}

.related-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.65rem;
}

.related-item h3 {
  margin: 0;
  font-size: 1rem;
  font-family: var(--font-display);
  color: var(--text);
}

.brand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

.brand-row img {
  height: 36px;
  width: auto;
  opacity: 0.85;
  filter: brightness(1.05);
}

.promo-banner {
  display: block;
  margin: 0 auto;
  max-width: 520px;
}

.error-page {
  min-height: calc(100vh - var(--nav-h) - 200px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 0;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5.5rem);
  margin: 0;
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page p {
  color: var(--muted);
  max-width: 42ch;
  margin: 0.8rem auto 1.4rem;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  background: rgba(4, 12, 20, 0.85);
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
}

.site-footer h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 0.8rem;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a:hover {
  color: var(--brand);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-bottom {
  border-top: 1px solid rgba(140, 200, 230, 0.1);
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Motion */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: rise 0.7s ease both;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3,
  .feature-strip,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --nav-h: 64px;
  }

  .nav-desktop,
  .nav-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .logo-link img {
    height: 36px;
    max-width: 140px;
  }

  .hero {
    min-height: 72vh;
  }

  .article-item {
    grid-template-columns: 1fr;
  }

  .article-item img {
    height: 180px;
  }
}

@media (max-width: 560px) {
  .grid-4,
  .grid-3,
  .feature-strip,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding-top: 3rem;
  }

  .section {
    padding: 3rem 0;
  }
}
