/*
Theme Name: Moban 8-2-16
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 hồng vàng kim kể chuyện theo dòng thời gian dọc, tối ưu SEO.
Version: 1.0
Author: Moban82
Text Domain: moban82
*/

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

/* ============================================================
   1. Design tokens
   ============================================================ */
:root {
  --brand-primary: #db2777;
  --brand-primary-deep: #9d174d;
  --brand-ink: #4c0d2c;
  --brand-gold: #d9a441;
  --brand-gold-soft: #f7ead0;
  --bg: #fff9fb;
  --bg-pink: #fdeef5;
  --surface: #ffffff;
  --text: #4b3a44;
  --text-muted: #8a7280;
  --line: #f3d7e4;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px rgba(219, 39, 119, 0.10);
  --shadow-lg: 0 26px 56px rgba(157, 23, 77, 0.16);
  --font-display: 'Rubik', '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 46% 30% at 100% 0%, rgba(217, 164, 65, 0.12), transparent 60%),
    radial-gradient(ellipse 42% 30% at 0% 12%, rgba(219, 39, 119, 0.07), transparent 60%);
  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); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 3.4vw, 2.05rem); }
h3 { font-size: clamp(1.06rem, 2.4vw, 1.28rem); }

p { margin: 0 0 1.2em; }

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

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

/* ============================================================
   3. Header: slim bar + era strip
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 249, 251, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

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

.site-brand { display: flex; align-items: center; gap: 0.6rem; margin-right: auto; }

.site-brand__logo {
  width: 44px; height: 44px;
  border-radius: 50% 50% 50% 6px;
  border: 2px solid var(--brand-gold);
}

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

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

.site-nav { display: none; }

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-family: var(--font-display);
  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 { background: var(--bg-pink); color: var(--brand-primary); }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 12px;
  background: var(--bg-pink);
  border: 0;
  border-radius: 50%;
  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: 2px solid var(--brand-primary);
  box-shadow: var(--shadow-lg);
  padding: 0.6rem 4% 1rem;
}

.era-strip {
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-primary-deep) 55%, var(--brand-gold));
  color: #fff;
}

.era-strip__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.8rem;
  padding: 0.45rem 0;
}

.era-strip__item { font-size: 0.8rem; font-weight: 500; color: rgba(255, 255, 255, 0.9); }

.era-strip__item b {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-gold-soft);
  margin-right: 0.3rem;
}

@media (min-width: 1000px) {
  .site-nav { display: block; }
  .nav-toggle { display: none; }
  .site-nav__list { flex-direction: row; gap: 0.2rem; }
}

/* ============================================================
   4. Intro
   ============================================================ */
.tl-intro {
  text-align: center;
  padding: 3.6rem 0 2.6rem;
}

.tl-intro__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brand-primary-deep);
  background: var(--bg-pink);
  border-radius: 999px;
  padding: 0.4rem 1.2rem;
  margin-bottom: 1rem;
}

.tl-intro__title { max-width: 24ch; margin-inline: auto; }

.tl-intro__lead {
  max-width: 66ch;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.03rem;
}

/* ============================================================
   5. Timeline
   ============================================================ */
.tl-section { padding: 1rem 0 4rem; }

.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 1rem 0 0;
  display: grid;
  gap: 2.4rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 19px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-gold), var(--brand-primary) 45%, var(--brand-primary-deep));
}

.tl-node { position: relative; padding-left: 58px; }

.tl-node__dot {
  position: absolute;
  left: 8px;
  top: 1.6rem;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface);
  border: 6px solid var(--brand-primary);
  box-shadow: 0 0 0 5px var(--bg);
}

.tl-node__dot--end { border-color: var(--brand-gold); background: var(--brand-gold-soft); }

.tl-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.7rem;
  box-shadow: var(--shadow);
}

.tl-card__era {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin-bottom: 0.6rem;
}

.tl-card__title { margin-bottom: 0.5rem; }

.tl-card__text { color: var(--text-muted); }

.tl-card__media { margin: 1rem 0 0; }

.tl-card__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 4px solid var(--bg-pink);
}

/* Symbols inside milestone 2 */
.tl-symbols {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, 1fr);
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

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

.tl-symbols__item {
  text-align: center;
  background: var(--bg-pink);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.4rem;
}

.tl-symbols__item img { width: 56px; height: 56px; margin: 0 auto 0.4rem; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }

.tl-symbols__item span {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--brand-primary-deep);
}

/* Tips inside milestone 4 */
.tl-tips { display: grid; gap: 1rem; margin-top: 1rem; }

.tl-tip { display: grid; grid-template-columns: 44px 1fr; gap: 0.9rem; align-items: start; }

.tl-tip__num {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--brand-gold), #b9832b);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.tl-tip__title { font-size: 1.02rem; margin-bottom: 0.25rem; }
.tl-tip__text { margin: 0; font-size: 0.92rem; color: var(--text-muted); }

/* CTA milestone */
.tl-card--cta {
  text-align: center;
  background:
    radial-gradient(ellipse 80% 120% at 50% 0%, rgba(217, 164, 65, 0.2), transparent 70%),
    var(--brand-gold-soft);
  border-color: var(--brand-gold);
}

.tl-card--cta .tl-card__text { max-width: 52ch; margin-inline: auto; }

/* Desktop alternating layout */
@media (min-width: 940px) {
  .timeline::before { left: 50%; transform: translateX(-50%); }

  .tl-node { padding-left: 0; width: calc(50% - 46px); }

  .tl-node:nth-child(even) { margin-left: calc(50% + 46px); }

  .tl-node:nth-child(odd) .tl-node__dot { left: auto; right: -60px; }

  .tl-node:nth-child(even) .tl-node__dot { left: -60px; }
}

/* ============================================================
   6. CTA button
   ============================================================ */
.cta-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-deep));
  border-radius: 999px;
  padding: 0.9rem 2.5rem;
  box-shadow: 0 14px 30px rgba(219, 39, 119, 0.32);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cta-btn:hover,
.cta-btn:focus {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 20px 42px rgba(219, 39, 119, 0.44);
}

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

/* ============================================================
   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-primary); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--brand-primary); }
.breadcrumbs [aria-current="page"] { color: var(--brand-primary); }

/* ============================================================
   8. Archive: timeline-style list rows
   ============================================================ */
.page-head { padding: 2.4rem 0 0.6rem; }

.page-head .tl-intro__eyebrow { margin-bottom: 0.8rem; }

.tl-post-list {
  position: relative;
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0 0 2.5rem;
  display: grid;
  gap: 1.4rem;
}

.tl-post-list::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 15px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-gold), var(--brand-primary));
}

.tl-post {
  position: relative;
  padding-left: 48px;
}

.tl-post::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 1.4rem;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 5px solid var(--brand-primary);
}

.tl-post__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

@media (min-width: 680px) {
  .tl-post__inner { grid-template-columns: 130px 1fr; }
}

.tl-post:hover .tl-post__inner { transform: translateX(6px); }

.tl-post__media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }

.tl-post__title { font-size: 1.06rem; margin-bottom: 0.3rem; }
.tl-post__title a { color: var(--brand-ink); }
.tl-post__title a:hover { color: var(--brand-primary); }

.tl-post__excerpt { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem; }

.tl-post__meta { margin: 0; font-size: 0.78rem; font-weight: 600; color: var(--brand-gold); letter-spacing: 0.08em; text-transform: uppercase; }

.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: 999px;
  color: var(--text);
  font-weight: 600;
  background: var(--surface);
}

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

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

.single-head .era-chip {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-primary-deep);
  background: var(--bg-pink);
  border-radius: 999px;
  padding: 0.35rem 1.1rem;
  margin-bottom: 0.9rem;
}

.single-head img { border-radius: var(--radius); margin-top: 1rem; }

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

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

.single-cta {
  max-width: 760px;
  margin: 2.4rem 0;
  padding: 1.8rem 1.6rem;
  text-align: center;
  background: var(--bg-pink);
  border-radius: var(--radius);
  border: 1px dashed var(--brand-primary);
}

.single-cta p { color: var(--text-muted); }

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

.related-rows { display: grid; gap: 1rem; max-width: 760px; margin-top: 1.6rem; }

.related-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow);
}

.related-row__dot {
  flex-shrink: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--brand-gold);
  box-shadow: 0 0 0 4px var(--brand-gold-soft);
}

.related-row__title { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; margin: 0; }
.related-row__title a { color: var(--brand-ink); }
.related-row__title a:hover { color: var(--brand-primary); }

/* ============================================================
   10. Footer
   ============================================================ */
.site-footer {
  border-top: 4px solid var(--brand-primary);
  background:
    radial-gradient(ellipse 60% 80% at 50% 120%, rgba(217, 164, 65, 0.16), transparent 70%),
    #fff5f9;
  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-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: var(--text-muted);
}

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

.site-footer__copy { margin-top: 1.4rem; font-size: 0.78rem; color: rgba(138, 114, 128, 0.7); }

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