/*
Theme Name: Moban 8-2-10
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 câu đối Tết: nền đỏ thắm, chữ vàng kim, hai liễn đối dọc hai bên, tối ưu SEO.
Version: 1.0
Author: Moban82
Text Domain: moban82
*/

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

/* ============================================================
   1. Design tokens — giấy đỏ chữ vàng
   ============================================================ */
:root {
  --red: #ad1220;
  --red-deep: #8c0d19;
  --red-ink: #560a12;
  --gold: #f7c948;
  --gold-soft: #ffe08a;
  --gold-deep: #c99a2e;
  --cream: #fdf6e3;
  --cream-ink: #4c0d13;
  --line: rgba(247, 201, 72, 0.4);
  --line-soft: rgba(247, 201, 72, 0.2);
  --radius: 4px;
  --radius-sm: 3px;
  --shadow-scroll: 0 12px 34px rgba(60, 4, 10, 0.45);
  --font-display: 'Dancing Script', cursive;
  --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.72;
  color: var(--cream);
  background-color: var(--red);
  background-image:
    radial-gradient(circle at 10% 12%, rgba(247, 201, 72, 0.1) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 88% 20%, rgba(247, 201, 72, 0.09) 0 2px, transparent 3px),
    radial-gradient(circle at 24% 82%, rgba(247, 201, 72, 0.07) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 90%, rgba(247, 201, 72, 0.08) 0 2.5px, transparent 3.5px),
    linear-gradient(160deg, #b81524 0%, #ad1220 45%, #97101c 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

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

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--gold-soft);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--gold);
  margin: 0 0 0.55em;
  text-shadow: 0 2px 14px rgba(60, 4, 10, 0.5);
}

h1 { font-size: clamp(2.1rem, 5.4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); }

p {
  margin: 0 0 1.2em;
}

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

.section {
  padding: 3.2rem 0;
}

.section-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--line);
  padding: 0.3rem 1rem;
  margin-bottom: 0.9rem;
  background: rgba(247, 201, 72, 0.08);
}

.section-title {
  position: relative;
  padding-bottom: 0.9rem;
}

.section-title::before,
.section-title::after {
  content: '❖';
  position: absolute;
  bottom: 0;
  color: var(--gold);
  font-size: 0.7rem;
}

.section-title::before {
  left: calc(50% - 46px);
}

.section-title::after {
  left: calc(50% + 34px);
}

.section-head {
  text-align: center;
}

.section-head + .couplet-scrolls,
.section > .wrap > p {
  text-align: center;
}

.section > .wrap > p {
  max-width: 66ch;
  margin-inline: auto;
  color: rgba(253, 246, 227, 0.88);
}

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

/* ============================================================
   3. Header — cổng đỏ chữ vàng, menu canh giữa
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, var(--red-deep), var(--red-ink));
  border-bottom: 4px double var(--gold);
  box-shadow: 0 6px 24px rgba(60, 4, 10, 0.5);
}

.site-header__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0 0.5rem;
  position: relative;
}

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

.site-brand__logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px var(--red-ink), 0 0 18px rgba(247, 201, 72, 0.5);
}

.site-brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
  text-align: left;
}

.site-brand__tag {
  display: block;
  font-family: var(--font-body);
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-soft);
  opacity: 0.85;
}

.site-nav {
  display: none;
  width: 100%;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.35rem 0 0.35rem;
  list-style: none;
  border-top: 1px solid var(--line-soft);
}

.site-nav__link {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--gold-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.site-nav__link:hover,
.site-nav__link:focus {
  color: var(--red-ink);
  background: var(--gold);
  border-color: var(--gold);
}

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

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

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

.site-nav.is-open .site-nav__link {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line-soft);
}

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

  .nav-toggle {
    display: none;
  }
}

/* ============================================================
   4. Front page — liễn đối hai bên, nội dung ở giữa
   ============================================================ */
.couplet-layout {
  display: grid;
  gap: 1.6rem;
  padding: 2.2rem 0 0;
}

@media (min-width: 1000px) {
  .couplet-layout {
    grid-template-columns: 84px minmax(0, 1fr) 84px;
    gap: 2.4rem;
  }
}

.couplet {
  margin: 0;
  background: linear-gradient(180deg, #7c0c17, var(--red-ink));
  border: 4px double var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-scroll);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.2rem 0.6rem;
}

.couplet::before,
.couplet::after {
  content: '';
  position: absolute;
  left: -6px;
  right: -6px;
  height: 14px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-deep));
  border-radius: 7px;
  box-shadow: 0 4px 10px rgba(60, 4, 10, 0.5);
}

.couplet::before {
  top: -10px;
}

.couplet::after {
  bottom: -10px;
}

.couplet__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  color: var(--gold);
  text-shadow: 0 2px 12px rgba(60, 4, 10, 0.7);
  letter-spacing: 0.06em;
}

@media (min-width: 1000px) {
  .couplet {
    min-height: 520px;
    align-self: start;
    position: sticky;
    top: 110px;
  }

  .couplet__text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    line-height: 1.5;
  }
}

@media (max-width: 999px) {
  .couplet__text {
    text-align: center;
  }
}

/* Hero panel in the middle */
.couplet-hero {
  text-align: center;
  padding: 0.6rem 0 1rem;
}

.couplet-hero__frame {
  margin: 0 0 1.6rem;
  border: 4px double var(--gold);
  border-radius: var(--radius);
  padding: 8px;
  background: var(--red-ink);
  box-shadow: var(--shadow-scroll);
}

.couplet-hero__frame img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: 2px;
}

.couplet-hero__lead {
  max-width: 62ch;
  margin: 0 auto 1.6em;
  color: rgba(253, 246, 227, 0.9);
}

/* Blessing words row */
.bless-words {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .bless-words {
    grid-template-columns: repeat(4, 1fr);
  }
}

.bless-word {
  background: var(--gold);
  color: var(--red-ink);
  border-radius: var(--radius);
  padding: 1rem 0.8rem;
  text-align: center;
  box-shadow: 0 8px 22px rgba(60, 4, 10, 0.4);
  transform: rotate(-1deg);
  transition: transform 0.3s ease;
}

.bless-word:nth-child(even) {
  transform: rotate(1deg);
}

.bless-word:hover {
  transform: rotate(0deg) scale(1.05);
}

.bless-word__big {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.15;
}

.bless-word__small {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.3rem;
  color: #7a5410;
}

/* Rules — chiếu thư vàng */
.edict {
  margin: 1.8rem auto 0;
  max-width: 880px;
  background: var(--cream);
  color: var(--cream-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-scroll);
  overflow: hidden;
  border: 1px solid var(--gold-deep);
}

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

.edict th,
.edict td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid rgba(173, 18, 32, 0.16);
  font-size: 0.95rem;
}

.edict th {
  background: var(--red);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.edict tbody tr:hover {
  background: rgba(247, 201, 72, 0.16);
}

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

/* Symbols — ô chữ vàng */
.char-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(2, 1fr);
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

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

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

.char-tile {
  text-align: center;
  background: var(--red-ink);
  border: 3px double var(--gold);
  border-radius: var(--radius);
  padding: 1.2rem 0.7rem;
  box-shadow: var(--shadow-scroll);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.char-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(60, 4, 10, 0.6), 0 0 26px rgba(247, 201, 72, 0.3);
}

.char-tile img {
  width: 84px;
  height: 84px;
  margin: 0 auto 0.65rem;
  border-radius: 50%;
  border: 2px solid var(--gold);
}

.char-tile__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--gold);
}

/* Feature scrolls */
.scroll-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
  margin-top: 2rem;
}

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

@media (min-width: 1024px) {
  .scroll-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.scroll-card {
  background: var(--cream);
  color: var(--cream-ink);
  border-radius: 14px 14px var(--radius) var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-scroll);
  border: 1px solid var(--gold-deep);
  border-top: 8px solid var(--gold);
  transition: transform 0.3s ease;
}

.scroll-card:hover {
  transform: translateY(-6px);
}

.scroll-card__media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.scroll-card__body {
  padding: 1.05rem 1.15rem 1.3rem;
}

.scroll-card__title {
  color: var(--red);
  text-shadow: none;
  margin-bottom: 0.3em;
}

.scroll-card__text {
  font-size: 0.92rem;
  margin: 0;
  color: #5d1a20;
}

/* Envelope reviews — phong bao lì xì */
.envelope-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
  margin-top: 2rem;
}

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

.envelope-card {
  margin: 0;
  background: linear-gradient(165deg, var(--red-deep), var(--red-ink));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.4rem 1.5rem;
  position: relative;
  box-shadow: var(--shadow-scroll);
}

.envelope-card::before {
  content: '福';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--red-ink);
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(60, 4, 10, 0.5);
}

.envelope-card__stars {
  color: var(--gold);
  letter-spacing: 0.16em;
  margin-bottom: 0.5rem;
}

.envelope-card__text {
  font-style: italic;
  font-size: 0.94rem;
  color: rgba(253, 246, 227, 0.92);
}

.envelope-card__author {
  margin: 0.9rem 0 0;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gold-soft);
}

/* ============================================================
   5. CTA button
   ============================================================ */
.cta-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-ink);
  background: linear-gradient(160deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  border: 2px solid var(--gold-soft);
  border-radius: var(--radius-sm);
  padding: 0.9rem 2.5rem;
  box-shadow: 0 10px 30px rgba(247, 201, 72, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cta-btn:hover,
.cta-btn:focus {
  color: var(--red-ink);
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(247, 201, 72, 0.55);
}

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

.cta-strip {
  text-align: center;
  padding: 2.6rem 1rem;
  margin: 2.2rem 0 3rem;
  border: 4px double var(--gold);
  border-radius: var(--radius);
  background: rgba(86, 10, 18, 0.55);
  box-shadow: var(--shadow-scroll);
}

/* ============================================================
   6. 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: rgba(253, 246, 227, 0.7);
}

.breadcrumbs li + li::before {
  content: '❖';
  margin-right: 0.4rem;
  color: var(--gold);
  font-size: 0.65rem;
}

.breadcrumbs a {
  color: rgba(253, 246, 227, 0.7);
}

.breadcrumbs a:hover {
  color: var(--gold);
}

.breadcrumbs [aria-current="page"] {
  color: var(--gold);
}

/* ============================================================
   7. Archive — phong bao bài viết
   ============================================================ */
.page-head {
  padding: 2.4rem 0 0.6rem;
  text-align: center;
}

.post-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  padding: 1.7rem 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(--red-ink);
  border: 1px solid var(--line);
  border-top: 6px solid var(--gold);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-scroll);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(60, 4, 10, 0.6), 0 0 26px rgba(247, 201, 72, 0.25);
}

.post-card__media {
  display: block;
}

.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-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 0.35rem;
}

.post-card__title a {
  color: var(--cream);
}

.post-card__title a:hover {
  color: var(--gold);
}

.post-card__excerpt {
  font-size: 0.9rem;
  color: rgba(253, 246, 227, 0.78);
  margin-bottom: 0.8rem;
}

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

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: rgba(253, 246, 227, 0.75);
}

/* 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: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-weight: 600;
  background: var(--red-ink);
}

.page-numbers.current {
  background: var(--gold);
  color: var(--red-ink);
  border-color: var(--gold);
}

.page-numbers:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.page-numbers.current:hover {
  color: var(--red-ink);
}

/* ============================================================
   8. Single post — tờ thư xuân
   ============================================================ */
.single-head {
  padding: 2.2rem 0 1rem;
  max-width: 860px;
  margin-inline: auto;
  text-align: center;
  border-bottom: 4px double var(--gold);
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.4rem;
  font-size: 0.85rem;
  color: rgba(253, 246, 227, 0.75);
  margin-bottom: 1.4rem;
}

.single-head img {
  border-radius: var(--radius);
  border: 3px double var(--gold);
}

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

.entry-content img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.entry-content h2,
.entry-content h3 {
  margin-top: 1.8em;
}

.entry-content blockquote {
  margin: 1.8em 0;
  padding: 1.2rem 1.6rem;
  border: 4px double var(--gold);
  border-radius: var(--radius);
  background: rgba(86, 10, 18, 0.55);
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold-soft);
  text-align: center;
}

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

/* ============================================================
   9. Footer
   ============================================================ */
.site-footer {
  border-top: 4px double var(--gold);
  background: linear-gradient(180deg, var(--red-ink), #38060c);
  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: rgba(253, 246, 227, 0.78);
  font-size: 0.92rem;
  font-weight: 600;
}

.site-footer__nav a:hover {
  color: var(--gold);
}

.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: rgba(253, 246, 227, 0.62);
}

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

.site-footer__copy {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  color: rgba(253, 246, 227, 0.42);
}

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