/* KGame – Game Câu Cá Vạn Cân portal */
:root {
  --bg: #eef6fb;
  --bg-deep: #d4ebf5;
  --surface: #ffffff;
  --ink: #0d2a3d;
  --ink-soft: #3a5a6e;
  --muted: #5f7a8c;
  --line: rgba(13, 42, 61, 0.12);
  --teal: #0d9aa8;
  --teal-deep: #087a86;
  --sky: #1c7ebd;
  --gold: #e8a317;
  --coral: #e85a3c;
  --shadow: 0 12px 40px rgba(13, 42, 61, 0.1);
  --radius: 14px;
  --header-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;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(28, 126, 189, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 45% at 95% 5%, rgba(13, 154, 168, 0.16), transparent 50%),
    linear-gradient(180deg, #f4fafd 0%, var(--bg) 40%, #e8f3f8 100%);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--sky);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--teal-deep);
}

ul,
ol {
  padding-left: 1.2rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(13, 42, 61, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-height: calc(var(--header-h) - 20px);
}

.logo-link img {
  height: 44px;
  width: auto;
  max-height: 44px;
  object-fit: contain;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav-desktop a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--teal-deep);
  background: rgba(13, 154, 168, 0.1);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--sky) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(13, 154, 168, 0.35);
}

.btn-primary:hover {
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--teal);
  color: var(--teal-deep);
}

.btn-outline:hover {
  background: rgba(13, 154, 168, 0.08);
  color: var(--teal-deep);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  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(--header-h);
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem 1.25rem;
  z-index: 999;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.nav-mobile.is-open {
  display: block;
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-mobile a {
  display: block;
  padding: 0.75rem 0.5rem;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

.nav-mobile a:last-of-type {
  border-bottom: none;
}

.nav-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1rem;
}

.nav-mobile-actions .btn {
  width: 100%;
}

@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
  }

  .header-actions {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .nav-mobile {
    display: none !important;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0a2a3c;
}

.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(100deg, rgba(6, 28, 42, 0.88) 0%, rgba(6, 28, 42, 0.55) 48%, rgba(6, 28, 42, 0.25) 100%),
    linear-gradient(0deg, rgba(6, 28, 42, 0.75) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3.5rem 0 3rem;
  max-width: 620px;
  color: #fff;
  animation: fadeUp 0.7s ease both;
}

.hero-content .brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #fff 0%, #9ae8ef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content h1 {
  color: #fff;
  margin-bottom: 0.85rem;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  margin-bottom: 1.4rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(212, 235, 245, 0.45));
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 640px;
}

.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(--teal-deep);
  margin-bottom: 0.4rem;
}

/* Intro / prose */
.prose {
  max-width: 720px;
}

.prose a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose strong {
  color: var(--ink);
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 700px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1000px) {
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cat-item {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a1a28;
  aspect-ratio: 1 / 1.05;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(13, 42, 61, 0.18);
}

.cat-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.cat-item:hover img {
  transform: scale(1.05);
}

.cat-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem 0.9rem 0.9rem;
  background: linear-gradient(transparent, rgba(5, 20, 32, 0.92));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-display);
}

/* Article cards */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 680px) {
  .card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(13, 42, 61, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a1a28;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.04);
}

.article-card .body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card .tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 0.35rem;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.article-card h3 a {
  color: var(--ink);
}

.article-card h3 a:hover {
  color: var(--teal-deep);
}

.article-card .excerpt {
  font-size: 0.92rem;
  flex: 1;
  margin-bottom: 0.85rem;
}

.article-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Guide list */
.guide-list {
  display: grid;
  gap: 1rem;
}

.guide-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guide-row:hover {
  border-color: rgba(13, 154, 168, 0.4);
  box-shadow: 0 8px 20px rgba(13, 42, 61, 0.08);
}

.guide-row img {
  width: 100px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: #0a1a28;
}

.guide-row h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.guide-row h3 a {
  color: var(--ink);
}

.guide-row p {
  margin: 0;
  font-size: 0.88rem;
}

@media (min-width: 700px) {
  .guide-row {
    grid-template-columns: 140px 1fr auto;
  }

  .guide-row img {
    width: 140px;
    height: 90px;
  }
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 800px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--ink);
  position: relative;
  padding-right: 2.5rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--teal);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item .faq-a {
  padding: 0 1.15rem 1.1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Brands */
.brand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.brand-row img {
  height: 36px;
  width: auto;
  opacity: 0.85;
  filter: grayscale(0.2);
  transition: opacity 0.2s, filter 0.2s;
}

.brand-row img:hover {
  opacity: 1;
  filter: none;
}

/* Promo strip */
.promo-strip {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(125deg, #0a3d52 0%, #0d6e7a 55%, #1a5f9e 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

@media (min-width: 800px) {
  .promo-strip {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.promo-strip h2 {
  color: #fff;
}

.promo-strip p {
  color: rgba(255, 255, 255, 0.88);
}

.promo-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.promo-visual img {
  max-height: 120px;
  width: auto;
}

.promo-visual .phone {
  max-height: 200px;
}

/* Page hero (inner) */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--teal-deep);
}

.breadcrumb span {
  color: var(--ink-soft);
}

/* Article detail */
.article-layout {
  display: grid;
  gap: 2rem;
  padding: 2rem 0 3.5rem;
}

@media (min-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }
}

.article-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 2rem;
  box-shadow: 0 8px 24px rgba(13, 42, 61, 0.05);
}

@media (min-width: 700px) {
  .article-main {
    padding: 2rem 2.25rem 2.5rem;
  }
}

.article-cover {
  margin: 0 0 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: #0a1a28;
}

.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.article-body h2 {
  margin-top: 1.75rem;
}

.article-body h3 {
  margin-top: 1.35rem;
}

.article-body ul li,
.article-body ol li {
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
}

.sidebar {
  display: grid;
  gap: 1.25rem;
}

.side-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
}

.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.side-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-links li {
  border-bottom: 1px solid var(--line);
}

.side-links li:last-child {
  border-bottom: none;
}

.side-links a {
  display: block;
  padding: 0.65rem 0;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.92rem;
}

.side-links a:hover {
  color: var(--teal-deep);
}

.related-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 600px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--header-h) - 220px);
  display: flex;
  align-items: center;
  text-align: center;
  padding: 3rem 0;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--teal), var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: #0a2433;
  color: rgba(255, 255, 255, 0.78);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a:hover {
  color: #9ae8ef;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* Utilities */
.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.text-center {
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}
