/*
Theme Name: Moban 8-2-28
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 tin nhanh đen trắng: ticker chạy ngang, luồng tin dọc theo trục thời gian và cột tin đọc nhiều nhất.
Version: 1.0
Author: Moban82
Text Domain: moban82
*/

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

/* ============================================================
   1. Design tokens — black & white wire service
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-alt: #f2f2f0;
  --ink: #0d0d0d;
  --ink-soft: #44443f;
  --ink-faint: #8a8a82;
  --signal: #d92323;
  --signal-deep: #a81616;
  --line: #d8d8d2;
  --line-strong: #0d0d0d;
  --radius: 0px;
  --shadow: 6px 6px 0 var(--ink);
  --font-display: 'Libre Baskerville', Georgia, 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(--ink);
  background-color: var(--bg);
  background-image: linear-gradient(var(--bg-alt) 1px, transparent 1px);
  background-size: 100% 44px;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--signal);
}

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

h1 { font-size: clamp(1.7rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 3.2vw, 1.9rem); }
h3 { font-size: clamp(1.05rem, 2.4vw, 1.25rem); }

p {
  margin: 0 0 1.2em;
}

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

.section {
  padding: 3rem 0;
}

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

.wire-box-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink);
  display: inline-block;
  padding: 0.45rem 0.95rem;
  margin: 0 0 1.1rem;
}

.wire-box-title--lg {
  font-size: 0.95rem;
}

.wire-lede {
  max-width: 66ch;
  color: var(--ink-soft);
}

/* ============================================================
   3. Header & capsule navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg);
  border-bottom: 3px solid var(--ink);
}

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

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

.site-brand__logo {
  width: 46px;
  height: 46px;
  border: 2px solid var(--ink);
  filter: grayscale(1);
}

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

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

.header-clock {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.header-clock__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal);
  animation: clock-blink 1.6s steps(2, start) infinite;
}

@media (min-width: 760px) {
  .header-clock {
    display: inline-flex;
  }
}

@keyframes clock-blink {
  50% { opacity: 0.25; }
}

.site-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

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

.site-nav__link {
  display: block;
  padding: 0.42rem 1.05rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link:focus {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-1px);
}

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

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--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.is-open {
  display: block;
  border-bottom: 3px solid var(--ink);
}

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

.site-nav.is-open .site-nav__link {
  border-radius: 0;
  text-align: center;
  padding: 0.7rem 1rem;
}

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

  .nav-toggle {
    display: none;
  }
}

/* ============================================================
   4. Scrolling ticker
   ============================================================ */
.ticker {
  display: flex;
  align-items: stretch;
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
}

.ticker__flag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--signal);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.6rem 1.1rem;
  z-index: 1;
}

.ticker__viewport {
  overflow: hidden;
  flex: 1;
}

.ticker__track {
  display: inline-flex;
  gap: 3rem;
  padding: 0.6rem 1.5rem;
  white-space: nowrap;
  animation: ticker-scroll 32s linear infinite;
  will-change: transform;
}

.ticker:hover .ticker__track {
  animation-play-state: paused;
}

.ticker__item {
  font-size: 0.88rem;
}

.ticker__item::before {
  content: '●';
  color: var(--signal);
  margin-right: 0.6rem;
  font-size: 0.6rem;
  vertical-align: 2px;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   5. Page head
   ============================================================ */
.wire-head {
  padding: 2.4rem 0 0.4rem;
}

.wire-head__title {
  max-width: 24ch;
  font-size: clamp(1.8rem, 4.6vw, 2.9rem);
}

.wire-head__lede {
  max-width: 66ch;
  color: var(--ink-soft);
}

/* ============================================================
   6. Timeline feed + sidebar
   ============================================================ */
.wire-layout {
  display: grid;
  gap: 2.4rem;
  grid-template-columns: 1fr;
  padding-bottom: 3rem;
}

@media (min-width: 1024px) {
  .wire-layout {
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  }
}

.wire-feed {
  position: relative;
  border-left: 3px solid var(--ink);
  padding-left: 0;
}

.wire-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 0 1.2rem;
  padding: 1.2rem 0;
}

.wire-item__rail {
  position: relative;
  text-align: right;
  padding-right: 1.1rem;
}

.wire-item__time {
  display: inline-block;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  background: var(--bg);
  border: 2px solid var(--ink);
  padding: 0.15rem 0.5rem;
}

.wire-item__node {
  position: absolute;
  top: 1.35rem;
  right: -8.5px;
  width: 14px;
  height: 14px;
  background: var(--signal);
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.wire-item__tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 0.3rem;
}

.wire-item__title {
  font-size: 1.15rem;
  margin-bottom: 0.35em;
}

.wire-item--lead .wire-item__title {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
}

.wire-item__media {
  margin: 0.6rem 0 0.8rem;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
}

.wire-item__media img {
  width: 100%;
  aspect-ratio: 1920 / 810;
  object-fit: cover;
}

.wire-item__excerpt {
  font-size: 0.93rem;
  color: var(--ink-soft);
  margin: 0;
}

.wire-cta {
  padding: 1.4rem 0 0 92px;
}

/* Sidebar */
.wire-side {
  display: grid;
  gap: 1.6rem;
  align-content: start;
}

.hot-list,
.wire-box {
  border: 3px solid var(--ink);
  padding: 1.3rem 1.2rem;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.hot-list__ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: hot;
}

.hot-list__item {
  counter-increment: hot;
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.hot-list__item:last-child {
  border-bottom: 0;
}

.hot-list__item::before {
  content: counter(hot, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--signal);
  min-width: 1.6rem;
}

.wire-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wire-cat {
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 600;
}

.wire-cat:hover {
  background: var(--ink);
  color: var(--bg);
}

.wire-box--cta {
  background: var(--ink);
  color: var(--bg);
}

.wire-box--cta p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

/* ============================================================
   7. Symbol dossier & table
   ============================================================ */
.dossier {
  background: var(--bg-alt);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

.dossier__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

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

.dossier__tile {
  text-align: center;
  background: var(--bg);
  border: 2px solid var(--ink);
  padding: 1rem 0.6rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dossier__tile:hover {
  transform: translateY(-4px);
  box-shadow: 4px 4px 0 var(--ink);
}

.dossier__tile img {
  width: 74px;
  height: 74px;
  margin: 0 auto 0.55rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
}

.dossier__name {
  font-family: var(--font-display);
  font-weight: 700;
}

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

.wire-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.2rem;
  border: 3px solid var(--ink);
}

.wire-table th,
.wire-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border: 1px solid var(--line-strong);
  font-size: 0.93rem;
}

.wire-table th {
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.wire-table td:first-child {
  font-weight: 700;
  color: var(--signal);
  white-space: nowrap;
}

.wire-table tbody tr:nth-child(even) {
  background: var(--bg-alt);
}

/* ============================================================
   8. CTA button
   ============================================================ */
.cta-btn {
  display: inline-block;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--signal);
  border: 3px solid var(--ink);
  padding: 0.8rem 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cta-btn:hover,
.cta-btn:focus {
  color: #fff;
  background: var(--signal-deep);
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--ink);
}

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

.cta-strip {
  text-align: center;
  padding: 2.4rem 1rem;
  margin: 2rem 0 3rem;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
}

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

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

.breadcrumbs a {
  color: var(--ink-soft);
}

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

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

/* ============================================================
   10. Archive — timeline listing
   ============================================================ */
.page-head {
  padding: 2rem 0 1rem;
  border-bottom: 3px solid var(--ink);
}

.post-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
  padding: 1.8rem 0 2.6rem;
}

@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 {
  border: 3px solid var(--ink);
  background: var(--bg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.post-card__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 3px solid var(--ink);
}

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

.post-card__title {
  font-size: 1.02rem;
  margin-bottom: 0.4em;
}

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

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

.post-card__excerpt {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 0.7em;
}

.post-card__meta {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
  font-weight: 700;
}

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

/* 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(--ink);
  color: var(--ink);
  font-weight: 700;
  background: var(--bg);
}

.page-numbers.current {
  background: var(--ink);
  color: var(--bg);
}

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

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

.archive-feed {
  padding: 1.6rem 0 0.6rem;
}

/* ============================================================
   11. Single post — wire article
   ============================================================ */
.single-head {
  padding: 2rem 0 1.2rem;
}

.single-dateline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  border: 2px solid var(--ink);
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.single-dateline .signal {
  color: var(--signal);
}

.key-facts {
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  background: var(--bg-alt);
  padding: 1.2rem 1.4rem;
  margin: 1.4rem 0 2rem;
}

.key-facts__title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}

.key-facts ul {
  margin: 0;
  padding-left: 1.2rem;
}

.key-facts li {
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

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

.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(--signal);
  background: var(--bg-alt);
  font-style: italic;
}

.related-block {
  padding: 2rem 0 2.6rem;
}

/* ============================================================
   12. Footer
   ============================================================ */
.site-footer {
  border-top: 3px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  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(255, 255, 255, 0.82);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.site-footer__nav a:hover {
  color: #fff;
}

.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(255, 255, 255, 0.65);
}

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

.site-footer__copy {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ============================================================
   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;
  }

  .ticker__track {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}
