/*
Theme Name: Moban 8-2-1
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 lễ hội Tết đỏ vàng, tối ưu SEO.
Version: 1.0
Author: Moban82
Text Domain: moban82
*/

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

/* ============================================================
   1. Design tokens
   ============================================================ */
:root {
  --brand-primary: #8B0000;
  --brand-primary-deep: #570909;
  --brand-primary-ink: #2e0404;
  --brand-accent: #D4AF37;
  --brand-accent-soft: #f2dc9b;
  --brand-accent-deep: #a8842a;
  --bg: #1c0606;
  --surface: #2a0e0e;
  --surface-alt: #341212;
  --text: #f8ecd4;
  --text-muted: #d3b694;
  --line: rgba(212, 175, 55, 0.28);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  --font-display: 'Paytone One', '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);
  background-image:
    radial-gradient(ellipse 60% 38% at 15% -6%, rgba(212, 175, 55, 0.14), transparent 60%),
    radial-gradient(ellipse 55% 40% at 88% 4%, rgba(139, 0, 0, 0.55), transparent 65%),
    radial-gradient(circle at 50% 120%, rgba(212, 175, 55, 0.08), transparent 55%);
  background-attachment: fixed;
  overflow-x: hidden;
}

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

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

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

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

h1 { font-size: clamp(1.7rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); }

p {
  margin: 0 0 1.2em;
}

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

.section {
  padding: 3.5rem 0;
}

.section-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brand-accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  margin-bottom: 0.9rem;
  background: rgba(212, 175, 55, 0.07);
}

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

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 68px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-accent), transparent);
}

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

/* ============================================================
   3. Header & navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(46, 4, 4, 0.97), rgba(28, 6, 6, 0.92));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
}

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

.site-brand__logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--brand-accent);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
}

.site-brand__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--brand-accent);
  line-height: 1.1;
}

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

.site-nav {
  display: none;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  transition: background 0.25s ease, color 0.25s ease;
}

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

.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;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-accent);
  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(--brand-primary-ink);
  border-bottom: 2px solid var(--brand-accent);
  box-shadow: var(--shadow);
}

.site-nav.is-open .site-nav__list {
  flex-direction: column;
  padding: 0.75rem 4%;
}

.site-nav.is-open .site-nav__link {
  padding: 0.8rem 1rem;
}

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

  .nav-toggle {
    display: none;
  }
}

/* ============================================================
   4. Hero carousel
   ============================================================ */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--brand-primary-deep), var(--bg));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 12% 20%, rgba(212, 175, 55, 0.16) 0 3px, transparent 4px),
    radial-gradient(circle at 86% 14%, rgba(212, 175, 55, 0.14) 0 2.5px, transparent 4px),
    radial-gradient(circle at 68% 82%, rgba(212, 175, 55, 0.1) 0 2px, transparent 3px),
    radial-gradient(circle at 28% 74%, rgba(212, 175, 55, 0.1) 0 2px, transparent 3px);
  pointer-events: none;
}

.carousel {
  position: relative;
}

.carousel__track {
  position: relative;
  aspect-ratio: 2560 / 1080;
  min-height: 220px;
  max-height: 620px;
}

.carousel__slide {
  position: absolute;
  inset: 0;
  margin: 0; /* Reset <figure> UA default margin so absolutely-positioned slides stay flush. */
  opacity: 0;
  transition: opacity 0.9s ease;
}

.carousel__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel__dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.carousel__dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 3px;
  background: rgba(248, 236, 212, 0.35);
  cursor: pointer;
  transition: background 0.3s ease;
  padding: 0;
}

.carousel__dot.is-active {
  background: var(--brand-accent);
}

.hero__panel {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2.2rem 0 3rem;
}

.hero__title {
  max-width: 22ch;
  margin-inline: auto;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.55);
}

.hero__lead {
  max-width: 62ch;
  margin-inline: auto;
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* ============================================================
   5. CTA button
   ============================================================ */
.cta-btn {
  display: inline-block;
  position: relative;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--brand-primary-ink);
  background: linear-gradient(160deg, #f7e08a, var(--brand-accent) 55%, var(--brand-accent-deep));
  border-radius: 999px;
  padding: 0.95rem 2.6rem;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  animation: cta-pulse 2.6s ease-in-out infinite;
}

.cta-btn:hover,
.cta-btn:focus {
  color: var(--brand-primary-ink);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 40px rgba(212, 175, 55, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

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

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
  50% { box-shadow: 0 10px 44px rgba(212, 175, 55, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
}

/* ============================================================
   6. Cards & grids
   ============================================================ */
.card {
  background: linear-gradient(170deg, var(--surface-alt), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--brand-accent);
}

.feature-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
  margin-top: 2rem;
}

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

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

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

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

.feature-card__title {
  margin-bottom: 0.35rem;
}

.feature-card__text {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

/* Icon grid (6 symbols) */
.icon-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) {
  .icon-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

.icon-tile {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 0.8rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icon-tile:hover {
  transform: translateY(-6px) rotate(-1.5deg);
  box-shadow: 0 14px 30px rgba(212, 175, 55, 0.22);
}

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

.icon-tile__name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--brand-accent);
}

/* Rules table */
.rules-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.rules-table th,
.rules-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(212, 175, 55, 0.14);
  font-size: 0.94rem;
}

.rules-table th {
  background: var(--brand-primary);
  color: var(--brand-accent-soft);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.rules-table tbody tr:hover {
  background: rgba(212, 175, 55, 0.06);
}

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

/* Testimonials */
.review-grid {
  display: grid;
  gap: 1.3rem;
  grid-template-columns: 1fr;
  margin-top: 2rem;
}

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

.review-card {
  padding: 1.5rem 1.4rem;
}

.review-card__stars {
  color: var(--brand-accent);
  letter-spacing: 0.15em;
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.review-card__text {
  font-style: italic;
  color: var(--text);
  font-size: 0.95rem;
}

.review-card__author {
  margin: 0.9rem 0 0;
  font-weight: 700;
  color: var(--brand-accent-soft);
  font-size: 0.88rem;
}

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

.breadcrumbs li + li::before {
  content: '›';
  margin-right: 0.4rem;
  color: var(--brand-accent);
}

.breadcrumbs a {
  color: var(--text-muted);
}

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

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

/* ============================================================
   8. Archive / posts
   ============================================================ */
.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__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-size: 1.05rem;
  margin-bottom: 0.4rem;
}

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

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

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

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

.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: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  background: var(--surface);
}

.page-numbers.current {
  background: var(--brand-accent);
  color: var(--brand-primary-ink);
  border-color: var(--brand-accent);
}

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

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

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

.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);
}

.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(--brand-accent);
  background: var(--surface);
  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.4rem 1rem;
  margin: 2rem 0 3rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.1), transparent 70%);
}

/* ============================================================
   10. Footer
   ============================================================ */
.site-footer {
  border-top: 2px solid var(--brand-accent);
  background: linear-gradient(180deg, var(--brand-primary-ink), #180303);
  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(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

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

.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(--text-muted);
}

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

.site-footer__copy {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  color: rgba(211, 182, 148, 0.6);
}

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