/*
Theme Name: Moban 8-2-44
Description: Chủ đề WordPress tùy chỉnh cho cổng thông tin game Bầu Cua Tôm Cá (Hoo Hey How) – phong cách chiếu trúc đan ngang, thanh sạp tre chia tầng, tông trúc xanh và kem sáng, tối ưu SEO.
Version: 1.0
Author: Moban82
Text Domain: moban82
*/

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

/* ============================================================
   1. Design tokens — bamboo green + rice cream
   ============================================================ */
:root {
  --bamboo: #6f8f3f;
  --bamboo-deep: #4c6b2f;
  --bamboo-ink: #2d4318;
  --cream: #f6f1de;
  --cream-soft: #fbf8ec;
  --rice: #ece3c6;
  --ink: #2c2a1c;
  --ink-muted: #5d5a42;
  --lac-red: #b3402e;
  --bg: #e9dfc0;
  --surface: #f6f1de;
  --surface-alt: #eee6cb;
  --text: #2c2a1c;
  --text-muted: #5d5a42;
  --line: rgba(76, 107, 47, 0.35);
  --radius: 12px;
  --radius-sm: 8px;
  --weave: repeating-linear-gradient(0deg, rgba(76, 107, 47, 0.07) 0 3px, transparent 3px 9px),
    repeating-linear-gradient(90deg, rgba(120, 90, 40, 0.05) 0 3px, transparent 3px 10px);
  --shadow-out: 0 10px 24px rgba(60, 52, 20, 0.22), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  --shadow-in: inset 0 4px 12px rgba(60, 52, 20, 0.18), inset 0 -1px 0 rgba(255, 255, 255, 0.6);
  --font-display: 'Alegreya', 'Be Vietnam Pro', serif;
  --font-body: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
  --wrap: 1140px;
}

/* ============================================================
   2. Reset & base — woven mat background
   ============================================================ */
*,
*::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);
  background-image: var(--weave);
  overflow-x: hidden;
}

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

a { color: var(--bamboo-deep); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--lac-red); }

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

h1 { font-size: clamp(1.8rem, 4.6vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.12rem, 2.5vw, 1.4rem); }

p { margin: 0 0 1.2em; }

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

.section { padding: 3.2rem 0; }

/* Band label: vertical tag pinned to the mat edge */
.band-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--lac-red);
  padding: 0.4rem 1.15rem 0.4rem 1.35rem;
  clip-path: polygon(0 50%, 12px 0, 100% 0, 100% 100%, 12px 100%);
  margin-bottom: 0.9rem;
  box-shadow: 0 4px 10px rgba(60, 52, 20, 0.25);
}

.section-title { position: relative; display: inline-block; }

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

/* Bamboo pole divider: striped stalk with nodes */
.bamboo-pole {
  height: 18px;
  background:
    repeating-linear-gradient(90deg, rgba(45, 67, 24, 0.5) 0 2px, transparent 2px 130px, rgba(45, 67, 24, 0.5) 130px 133px, transparent 133px 260px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0 6px, rgba(111, 143, 63, 0.9) 6px 34px, rgba(76, 107, 47, 0.95) 34px 42px),
    linear-gradient(180deg, #89a955, var(--bamboo-deep));
  border-radius: 999px;
  margin: 0 4%;
  box-shadow: 0 4px 8px rgba(60, 52, 20, 0.3);
}

/* ============================================================
   3. Header — centered mat plaque
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  text-align: center;
  background:
    var(--weave),
    linear-gradient(180deg, var(--cream-soft), var(--cream));
  border-bottom: 3px solid var(--bamboo-deep);
  box-shadow: 0 6px 18px rgba(60, 52, 20, 0.18);
}

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

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.site-brand__logo {
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 3px solid var(--bamboo-deep);
  box-shadow: var(--shadow-out);
}

.site-brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--bamboo-ink);
  line-height: 1.1;
}

.site-brand__tag {
  display: block;
  font-family: var(--font-body);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav-toggle {
  position: absolute;
  right: 0;
  top: 0.8rem;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 11px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: var(--bamboo-ink);
  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 { display: none; }

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin: 0; padding: 0;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding: 0.45rem 1.05rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--bamboo-ink);
  border-bottom: 3px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.site-nav__link:hover,
.site-nav__link:focus {
  color: var(--lac-red);
  border-bottom-color: var(--lac-red);
}

.site-nav.is-open {
  display: block;
  width: 100%;
  border-top: 1px dashed var(--line);
  padding: 0.5rem 0;
}

.site-nav.is-open .site-nav__list { flex-direction: column; align-items: stretch; }
.site-nav.is-open .site-nav__link { padding: 0.7rem 1rem; text-align: center; }

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

/* ============================================================
   4. Hero band — split mat roll
   ============================================================ */
.hero-band {
  padding: 3.2rem 0;
  background:
    var(--weave),
    linear-gradient(160deg, var(--cream), var(--rice));
}

.hero-band__row {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-band__row { grid-template-columns: 1.1fr 1fr; gap: 2.8rem; }
}

.hero-band__lead { color: var(--ink-muted); font-size: 1.02rem; max-width: 58ch; }

.hero-band__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
  padding: 0;
  list-style: none;
}

.hero-band__meta li {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--bamboo-ink);
  background: var(--surface-soft, var(--cream-soft));
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  box-shadow: var(--shadow-out);
}

/* Image pinned to the mat with bamboo clips */
.mat-photo {
  position: relative;
  padding: 10px;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  transform: rotate(1.2deg);
}

.mat-photo::before,
.mat-photo::after {
  content: '';
  position: absolute;
  top: -12px;
  width: 64px; height: 14px;
  border-radius: 7px;
  background: linear-gradient(180deg, #89a955, var(--bamboo-deep));
  box-shadow: 0 3px 6px rgba(60, 52, 20, 0.35);
}

.mat-photo::before { left: 12%; transform: rotate(-6deg); }
.mat-photo::after { right: 12%; transform: rotate(5deg); }

.mat-photo img { border-radius: var(--radius-sm); width: 100%; }

/* ============================================================
   5. CTA button — red lacquer seal
   ============================================================ */
.cta-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: var(--cream);
  background: linear-gradient(160deg, #d15a44, var(--lac-red) 55%, #8c2c1e);
  border-radius: 10px;
  padding: 0.95rem 2.6rem;
  box-shadow: var(--shadow-out), inset 0 0 0 2px rgba(246, 241, 222, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: cta-bob 3s ease-in-out infinite;
}

.cta-btn:hover,
.cta-btn:focus {
  color: var(--cream);
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(179, 64, 46, 0.35), inset 0 0 0 2px rgba(246, 241, 222, 0.35);
}

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

@keyframes cta-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ============================================================
   6. Bands — alternating horizontal partitions
   ============================================================ */
.band {
  padding: 3.2rem 0;
}

.band--rice { background: var(--weave), linear-gradient(180deg, var(--rice), var(--bg)); }
.band--cream { background: var(--weave), linear-gradient(180deg, var(--cream), var(--rice)); }

/* Feature strips: alternating media/text rows */
.strip {
  display: grid;
  gap: 1.4rem;
  align-items: center;
  padding: 1.4rem;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
}

.strip + .strip { margin-top: 1.3rem; }

@media (min-width: 760px) {
  .strip { grid-template-columns: 200px 1fr; }
  .strip--flip { grid-template-columns: 1fr 200px; }
  .strip--flip .strip__media { order: 2; }
}

.strip__media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.strip__title { margin-bottom: 0.3rem; }

.strip__text { font-size: 0.95rem; color: var(--ink-muted); margin: 0; }

/* Symbol tiles: one horizontal roll */
.tile-roll {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(3, 1fr);
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) { .tile-roll { grid-template-columns: repeat(6, 1fr); } }

.mat-tile {
  text-align: center;
  padding: 1rem 0.5rem 0.9rem;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-out);
  transition: transform 0.3s ease;
}

.mat-tile:hover { transform: translateY(-6px) rotate(-1deg); }

.mat-tile img {
  width: 72px; height: 72px;
  margin: 0 auto 0.55rem;
  border-radius: 50%;
  border: 2px solid var(--bamboo-deep);
  object-fit: cover;
}

.mat-tile__name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--bamboo-ink);
}

/* Rules as a woven ledger */
.ledger {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-in);
  background: var(--cream);
}

.rules-table { width: 100%; border-collapse: collapse; }

.rules-table th,
.rules-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px dashed rgba(76, 107, 47, 0.3);
  font-size: 0.94rem;
}

.rules-table th {
  background: var(--bamboo-deep);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.rules-table tbody tr:nth-child(even) { background: rgba(76, 107, 47, 0.06); }
.rules-table tbody tr:hover { background: rgba(179, 64, 46, 0.08); }

.table-scroll { overflow-x: auto; }

/* Reviews stacked as horizontal slips */
.slip-stack { display: grid; gap: 1.1rem; margin-top: 0.8rem; }

.paper-slip {
  margin: 0;
  padding: 1.3rem 1.5rem;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-left: 6px solid var(--lac-red);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-out);
}

.paper-slip__stars { color: var(--lac-red); letter-spacing: 0.16em; margin-bottom: 0.4rem; }

.paper-slip__text { font-style: italic; color: var(--text); margin: 0 0 0.5rem; }

.paper-slip__author { font-weight: 700; font-size: 0.86rem; color: var(--bamboo-deep); }

/* ============================================================
   7. 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(--ink-muted);
}

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

/* ============================================================
   8. Archive — mat cards
   ============================================================ */
.page-head { padding: 2.2rem 0 0.6rem; }

.post-grid {
  display: grid;
  gap: 1.4rem;
  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); } }

.card {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.card:hover { transform: translateY(-6px) rotate(-0.4deg); }

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

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

.post-card__title { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; margin-bottom: 0.4rem; }

.post-card__title a { color: var(--bamboo-ink); }
.post-card__title a:hover { color: var(--lac-red); }

.post-card__excerpt { font-size: 0.9rem; color: var(--ink-muted); margin-bottom: 0.8rem; }

.post-card__meta { font-size: 0.8rem; color: var(--bamboo-deep); }

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

.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: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--bamboo-ink);
  font-weight: 700;
  background: var(--cream-soft);
  box-shadow: var(--shadow-out);
}

.page-numbers.current { background: var(--bamboo-deep); color: var(--cream); border-color: var(--bamboo-deep); }
.page-numbers:hover { border-color: var(--lac-red); color: var(--lac-red); }
.page-numbers.current:hover { color: var(--cream); }

/* ============================================================
   9. Single post — article on a cream mat
   ============================================================ */
.single-head { padding: 2rem 0 1rem; }

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

.entry-content {
  max-width: 780px;
  padding: 1.8rem;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
}

.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: 4px solid var(--bamboo-deep);
  background: var(--rice);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

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

.cta-strip {
  text-align: center;
  padding: 2.6rem 1rem;
  margin: 2rem 0 3rem;
  background: var(--weave), linear-gradient(160deg, var(--cream), var(--rice));
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}

/* ============================================================
   10. Footer — rolled mat edge
   ============================================================ */
.site-footer {
  border-top: 8px solid var(--bamboo-deep);
  background:
    var(--weave),
    linear-gradient(180deg, var(--rice), #ddd1ac);
  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: var(--ink-muted); font-size: 0.92rem; font-weight: 600; }
.site-footer__nav a:hover { color: var(--lac-red); }

.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: var(--ink-muted);
}

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

.site-footer__copy { margin-top: 1.4rem; font-size: 0.78rem; color: rgba(44, 42, 28, 0.55); }

/* ============================================================
   11. 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(--lac-red); outline-offset: 3px; }
