/*
Theme Name: Moban 8-2-14
Description: Chủ đề WordPress tùy chỉnh cho cổng thông tin game Bầu Cua Tôm Cá (Hoo Hey How) – landing page nền xám nhạt phối cam, bố cục Z chữ xen kẽ, tối ưu SEO.
Version: 1.0
Author: Moban82
Text Domain: moban82
*/

/* Google Fonts (Quicksand + Be Vietnam Pro) are enqueued in functions.php — no @import here. */

/* ============================================================
   1. Design tokens
   ============================================================ */
:root {
  --brand-primary: #f97316;
  --brand-primary-deep: #c2410c;
  --brand-ink: #292018;
  --brand-accent: #0ea5e9;
  --bg: #f6f7f9;
  --bg-grey: #eceef2;
  --surface: #ffffff;
  --text: #424a55;
  --text-muted: #77808c;
  --line: #e2e6ec;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 6px 6px 0 rgba(249, 115, 22, 0.14);
  --shadow-hard: 8px 8px 0 rgba(41, 32, 24, 0.12);
  --font-display: 'Quicksand', 'Be Vietnam Pro', sans-serif;
  --font-body: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
  --wrap: 1180px;
}

/* ============================================================
   2. Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-primary); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--brand-primary-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.24;
  color: var(--brand-ink);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.8rem, 4.6vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 2.05rem); }
h3 { font-size: clamp(1.08rem, 2.4vw, 1.3rem); }

p { margin: 0 0 1.2em; }

.wrap { width: min(var(--wrap), 92%); margin-inline: auto; }
.wrap--narrow { width: min(820px, 92%); margin-inline: auto; }

.section { padding: 3.6rem 0; }
.section--grey { background: var(--bg-grey); }

.z-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand-primary);
  border-radius: 4px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 0.9rem;
  box-shadow: 4px 4px 0 rgba(41, 32, 24, 0.12);
}

.z-heading { margin-bottom: 0.5rem; }

.z-lead { max-width: 64ch; color: var(--text-muted); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   3. Header: centered logo, split menus
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface);
  border-bottom: 3px solid var(--brand-primary);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
}

.site-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  z-index: 2;
}

.site-brand__logo {
  width: 46px; height: 46px;
  border-radius: 10px;
  border: 2px solid var(--brand-primary);
  transform: rotate(-6deg);
}

.site-brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--brand-ink);
  line-height: 1.1;
}

.site-brand__tag {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-primary);
}

.site-nav { display: none; }

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  justify-content: center;
}

.nav-spacer { width: 210px; list-style: none; }

.site-nav__link {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  transition: background 0.25s ease, color 0.25s ease;
}

.site-nav__link:hover,
.site-nav__link:focus { background: var(--brand-primary); color: #fff; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 12px;
  background: var(--bg-grey);
  border: 2px solid var(--brand-ink);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: var(--brand-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--surface);
  border-bottom: 3px solid var(--brand-primary);
  box-shadow: var(--shadow-hard);
  padding: 0.7rem 4% 1rem;
}

.site-nav.is-open .nav-spacer { display: none; }
.site-nav.is-open .site-nav__list { flex-direction: column; align-items: stretch; }

@media (min-width: 1080px) {
  .site-nav { display: block; width: 100%; }
  .nav-toggle { display: none; }
}

/* ============================================================
   4. Hero
   ============================================================ */
.hero-z {
  background:
    repeating-linear-gradient(135deg, rgba(249, 115, 22, 0.05) 0 26px, transparent 26px 52px),
    linear-gradient(180deg, #fff3e8, var(--bg));
  border-bottom: 3px solid var(--brand-primary);
  text-align: center;
  padding: 4.2rem 0 4rem;
}

.hero-z__eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--brand-primary-deep);
  margin-bottom: 0.9rem;
}

.hero-z__title { margin-bottom: 0.6rem; }

.hero-z__lead {
  max-width: 62ch;
  margin: 0 auto 1.6rem;
  color: var(--text-muted);
  font-size: 1.03rem;
}

/* ============================================================
   5. Z rows
   ============================================================ */
.z-stack { display: grid; gap: 2.4rem; }

.z-row {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: 1fr;
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--brand-ink);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-hard);
}

@media (min-width: 860px) {
  .z-row { grid-template-columns: 1fr 1fr; gap: 2.4rem; padding: 2rem; }
  .z-row--flip .z-row__media { order: 2; }
  .z-row--flip .z-row__body { order: 1; text-align: right; }
}

.z-row__media { margin: 0; }

.z-row__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--brand-ink);
  box-shadow: var(--shadow);
}

.z-row__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-primary-deep);
  margin-bottom: 0.5rem;
}

.z-row__title { font-size: clamp(1.2rem, 2.6vw, 1.55rem); margin-bottom: 0.5rem; }
.z-row__text { color: var(--text-muted); margin: 0; }

/* ============================================================
   6. Comparison table
   ============================================================ */
.table-scroll { overflow-x: auto; margin-top: 1.8rem; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 2px solid var(--brand-ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hard);
  min-width: 640px;
}

.compare-table th,
.compare-table td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}

.compare-table thead th {
  background: var(--brand-primary);
  color: #fff;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.compare-table tbody th[scope="row"] {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-ink);
  background: #fff7f0;
}

.compare-table tbody tr:nth-child(even) td { background: #fafbfc; }

/* ============================================================
   7. FAQ accordion
   ============================================================ */
.faq-wrap { margin-top: 1.8rem; display: grid; gap: 0.9rem; }

.faq-block {
  background: var(--surface);
  border: 2px solid var(--brand-ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-block__q {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 1rem 3rem 1rem 1.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-ink);
}

.faq-block__q::-webkit-details-marker { display: none; }

.faq-block__q::after {
  content: '+';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
}

.faq-block[open] .faq-block__q::after { content: '–'; }

.faq-block__a {
  margin: 0;
  padding: 0.9rem 1.2rem 1.1rem;
  border-top: 1px dashed var(--line);
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* ============================================================
   8. CTA button & banner
   ============================================================ */
.cta-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: var(--brand-primary);
  border: 2px solid var(--brand-ink);
  border-radius: var(--radius-sm);
  padding: 0.85rem 2.3rem;
  box-shadow: 5px 5px 0 var(--brand-ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn:hover,
.cta-btn:focus {
  color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--brand-ink);
}

.cta-btn--block { display: block; width: max-content; margin-inline: auto; }

.cta-banner {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 18px, transparent 18px 36px),
    linear-gradient(120deg, var(--brand-primary), var(--brand-primary-deep));
  color: #fff;
  padding: 3rem 0;
}

.cta-banner h2 { color: #fff; margin-bottom: 0.4rem; }
.cta-banner p { color: rgba(255, 255, 255, 0.85); margin: 0; }

.cta-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
}

.cta-banner .cta-btn { background: #fff; color: var(--brand-primary-deep); box-shadow: 5px 5px 0 rgba(41, 32, 24, 0.45); }

/* ============================================================
   9. Breadcrumbs
   ============================================================ */
.breadcrumbs { padding: 1rem 0 0; font-size: 0.85rem; }

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
}

.breadcrumbs li + li::before { content: '›'; margin-right: 0.4rem; color: var(--brand-primary); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--brand-primary); }
.breadcrumbs [aria-current="page"] { color: var(--brand-primary); }

/* ============================================================
   10. Archive: grid with interlaced CTA card
   ============================================================ */
.page-head { padding: 2.2rem 0 0.6rem; }

.post-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  padding: 1.6rem 0 3rem;
}

@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

.post-card {
  background: var(--surface);
  border: 2px solid var(--brand-ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hard);
  transition: transform 0.25s ease;
}

.post-card:hover { transform: translate(-3px, -3px); }

.post-card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.post-card__body { padding: 1.1rem 1.2rem 1.4rem; }

.post-card__title { font-size: 1.04rem; margin-bottom: 0.4rem; }
.post-card__title a { color: var(--brand-ink); }
.post-card__title a:hover { color: var(--brand-primary); }

.post-card__excerpt { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.8rem; }
.post-card__meta { margin: 0; font-size: 0.8rem; color: var(--brand-primary-deep); font-weight: 600; }

.grid-cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.8rem;
  background: linear-gradient(150deg, #fff3e8, #ffe4cc);
  border: 2px dashed var(--brand-primary);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
}

.grid-cta h2 { font-size: 1.15rem; margin: 0; }
.grid-cta p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-muted); }

/* Pagination */
.pagination, .nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0 3rem;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px; height: 42px;
  padding: 0 0.7rem;
  border: 2px solid var(--brand-ink);
  border-radius: var(--radius-sm);
  color: var(--brand-ink);
  font-weight: 700;
  background: var(--surface);
}

.page-numbers.current { background: var(--brand-primary); color: #fff; }
.page-numbers:hover { color: var(--brand-primary); border-color: var(--brand-primary); }
.page-numbers.current:hover { color: #fff; }

/* ============================================================
   11. Single post
   ============================================================ */
.single-head { padding: 2rem 0 1rem; }

.single-head .post-thumbnail { display: block; }

.single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}

.entry-content { max-width: 760px; }

.entry-content img { border-radius: var(--radius-sm); }
.entry-content h2, .entry-content h3 { margin-top: 1.8em; }

.entry-content blockquote {
  margin: 1.6em 0;
  padding: 1rem 1.4rem;
  border-left: 6px solid var(--brand-primary);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow);
  font-style: italic;
}

.related-block { padding: 2.5rem 0 3rem; }

.related-columns { display: grid; gap: 1.3rem; grid-template-columns: 1fr; margin-top: 1.6rem; }

@media (min-width: 860px) { .related-columns { grid-template-columns: repeat(3, 1fr); } }

.related-panel {
  background: var(--surface);
  border: 2px solid var(--brand-ink);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.3rem;
  box-shadow: var(--shadow);
}

.related-panel img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 0.9rem; }

.related-panel__title { font-size: 1rem; margin: 0; }
.related-panel__title a { color: var(--brand-ink); }
.related-panel__title a:hover { color: var(--brand-primary); }

/* ============================================================
   12. Footer
   ============================================================ */
.site-footer {
  border-top: 3px solid var(--brand-primary);
  background: var(--brand-ink);
  color: #cfd4db;
  padding: 2.8rem 0 1.6rem;
  text-align: center;
}

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.6rem;
  margin: 0 0 1.6rem;
  padding: 0;
  list-style: none;
}

.site-footer__nav a { color: #cfd4db; font-size: 0.92rem; font-weight: 600; }
.site-footer__nav a:hover { color: var(--brand-primary); }

.site-footer__badge { margin: 1.4rem 0; }

.site-footer__disclaimer {
  max-width: 720px;
  margin: 1.2rem auto 0;
  font-size: 0.82rem;
  line-height: 1.8;
  color: #9aa2ad;
}

.site-footer__disclaimer p { margin: 0.3em 0; }

.site-footer__copy { margin-top: 1.4rem; font-size: 0.78rem; color: rgba(154, 162, 173, 0.7); }

/* ============================================================
   13. Motion & a11y
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 3px; }
