/*
Theme Name: wgem8x-child
Template: generatepress
Version: 1.0.0
*/
:root {
  --g8-pri: #0284c7;
  --g8-pri-dark: #0369a1;
  --g8-navy: #0f172a;
  --g8-gold: #f59e0b;
  --g8-text: #1e293b;
  --g8-bg: #ffffff;
  --g8-soft: #f0f7ff;
  --g8-max: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: var(--g8-bg); color: var(--g8-text);
  font-family: 'Be Vietnam Pro', 'Roboto', sans-serif; font-size: 16px; line-height: 1.65;
  overflow-x: clip; max-width: 100%;
}
#page, .site-content, .site-main { max-width: 100% !important; min-width: 0; box-sizing: border-box; }
.site-content { display: block !important; }
.page-header-image, .featured-image.page-header-image { display: none !important; }
a { color: var(--g8-pri-dark); text-decoration: none; transition: color .2s; }
a:hover { color: var(--g8-pri); }

/* 2-Tier Sticky Header matching www.8xbetviet.website */
.g8-hdr {
  position: sticky; top: 0; z-index: 999; background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1); padding-bottom: 8px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.g8-top {
  max-width: var(--g8-max); margin: 0 auto; padding: 10px 15px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.g8-logo img { height: 36px; width: auto; display: block; }
.g8-cta-top { display: flex; align-items: center; gap: 10px; }
.g8-btn {
  padding: 9px 20px; border-radius: 6px; font-weight: 700; font-size: 13.5px;
  text-transform: uppercase; color: #ffffff !important; display: inline-block;
  white-space: nowrap; transition: transform .15s, filter .15s;
}
.g8-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.g8-btn-reg { background: linear-gradient(135deg, #0f172a, #1e3a8a); }
.g8-btn-login { background: linear-gradient(135deg, #0284c7, #0369a1); }

.g8-nav-wrap { max-width: var(--g8-max); margin: 0 auto; padding: 0 15px; }
.g8-nav {
  background: linear-gradient(90deg, #0284c7, #0369a1); border-radius: 12px; padding: 6px 12px;
}
.g8-nav ul {
  list-style: none; margin: 0; padding: 0; display: flex; align-items: center;
  justify-content: space-between; gap: 6px; flex-wrap: nowrap;
}
.g8-nav li a {
  color: #ffffff; font-weight: 700; font-size: 13px; text-transform: uppercase;
  padding: 7px 10px; border-radius: 6px; display: block; white-space: nowrap;
}
.g8-nav li.active a, .g8-nav li a:hover { background: var(--g8-navy); color: #ffffff; }

.g8-burger {
  display: none; background: var(--g8-pri); color: #fff; border: 0;
  border-radius: 6px; padding: 6px 11px; font-size: 18px; cursor: pointer;
}
.g8-drawer { display: none; position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.6); }
.g8-drawer.open { display: block; }
.g8-drawer-panel { width: 280px; max-width: 82vw; height: 100%; background: #fff; padding: 18px 16px; overflow-y: auto; }
.g8-drawer-panel ul { list-style: none; margin: 12px 0 0; padding: 0; }
.g8-drawer-panel li { border-bottom: 1px solid #eee; }
.g8-drawer-panel li a { display: block; padding: 11px 6px; color: var(--g8-navy); font-weight: 700; font-size: 14px; text-transform: uppercase; }

/* Hero, Main, Grids */
.g8-hero { max-width: var(--g8-max); margin: 14px auto 10px; padding: 0 15px; }
.g8-hero img { width: 100%; height: auto; display: block; border-radius: 12px; box-shadow: 0 4px 18px rgba(2,132,199,.15); }
main.g8-main { max-width: var(--g8-max) !important; width: 100%; margin: 0 auto !important; padding: 12px 15px 40px !important; min-width: 0; }
.g8-bc { font-size: 13px; color: #64748b; margin-bottom: 10px; }
.g8-bc a { color: var(--g8-pri-dark); font-weight: 500; }
.g8-h1, article h1 {
  color: var(--g8-pri-dark); font-size: 27px; font-weight: 700; line-height: 1.35;
  text-align: center; margin: 12px 0 18px;
}
.g8-content h2 {
  color: var(--g8-pri-dark); font-size: 22px; font-weight: 700; margin: 28px 0 12px;
  border-left: 4px solid var(--g8-pri); padding-left: 12px;
}
.g8-content h3 { color: var(--g8-navy); font-size: 18px; font-weight: 600; margin: 18px 0 8px; }
.g8-content p { margin: 0 0 14px; text-align: justify; }
.g8-content ul, .g8-content ol { margin: 0 0 16px 22px; }
article figure { margin: 18px auto 22px !important; text-align: center !important; max-width: 800px; }
article figure img { margin: 0 auto !important; display: block !important; max-width: 100%; height: auto; border-radius: 10px; }
article figcaption { font-size: 13.5px; color: #475569; margin-top: 6px; font-style: italic; }
.g8-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.g8-content th { background: var(--g8-pri); color: #fff; text-align: left; padding: 10px 12px; }
.g8-content td { border: 1px solid #cbd5e1; padding: 9px 12px; }
.g8-content tr:nth-child(even) td { background: var(--g8-soft); }

.cta-box {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border: 1.5px solid var(--g8-pri);
  border-radius: 12px; padding: 18px 20px; margin: 24px 0; text-align: center;
}
.cta-box p:last-child a {
  display: inline-block; background: var(--g8-navy); color: #fff !important;
  padding: 10px 26px; border-radius: 6px; font-weight: 700; margin-top: 6px;
}
.g8-disclaimer {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 12px 16px; font-size: 13.5px; color: #475569; margin-top: 24px;
}

/* Games 8-col & Payments 5x2 matching sample */
.g8-sec-title { color: var(--g8-pri-dark); font-size: 20px; font-weight: 700; text-align: center; margin: 28px 0 14px; }
.g8-games { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; margin-bottom: 24px; }
.g8-games > * { min-width: 0; max-width: 100%; }
.g8-game-card {
  background: #fff; border-radius: 12px; box-shadow: 0 0 4px rgba(0,0,0,.18);
  padding: 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.g8-game-card img { width: 100%; height: auto; border-radius: 8px; display: block; }
.g8-game-card span { font-size: 12px; font-weight: 700; color: var(--g8-navy); }

.g8-pays { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 28px; }
.g8-pays > * { min-width: 0; max-width: 100%; }
.g8-pay-card {
  background: #fff; border-radius: 10px; box-shadow: 0 0 4px rgba(0,0,0,.15);
  padding: 10px; display: flex; align-items: center; justify-content: center;
}
.g8-pay-card img { max-height: 42px; width: auto; max-width: 100%; display: block; }

/* Author & Related */
.g8-author {
  display: flex; gap: 14px; align-items: center; background: var(--g8-soft);
  border: 1px solid #bae6fd; border-radius: 10px; padding: 16px; margin: 28px 0;
}
.g8-author-av {
  width: 54px; height: 54px; border-radius: 50%; background: var(--g8-pri);
  color: #fff; font-weight: 700; font-size: 19px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.g8-post-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.g8-post-grid > * { min-width: 0; max-width: 100%; }
.g8-arch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.g8-arch-grid > * { min-width: 0; max-width: 100%; }
.g8-card { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.g8-card img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; display: block; }
.g8-card-b { padding: 10px 12px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.g8-card-b a { color: var(--g8-navy); }
.g8-pagi { margin: 26px 0; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.g8-pagi .page-numbers { padding: 6px 12px; border: 1px solid #cbd5e1; border-radius: 5px; color: var(--g8-pri-dark); }
.g8-pagi .page-numbers.current { background: var(--g8-pri); color: #fff; border-color: var(--g8-pri); }

/* 4-Column Footer + Blue Pill Bar matching sample */
.g8-ftr { background: #f8fafc; border-top: 2px solid var(--g8-pri); padding: 34px 0 74px; margin-top: 28px; }
.g8-ftr-in {
  max-width: var(--g8-max); margin: 0 auto; padding: 0 15px 24px;
  display: grid; grid-template-columns: 3.2fr 2.4fr 2.4fr 3fr; gap: 24px;
}
.g8-ftr-in > * { min-width: 0; max-width: 100%; }
.g8-ftr h4 { color: var(--g8-pri-dark); font-size: 15.5px; font-weight: 700; text-transform: uppercase; margin: 0 0 12px; }
.g8-ftr ul { list-style: none; margin: 0; padding: 0; }
.g8-ftr li { margin-bottom: 7px; font-size: 14.5px; }
.g8-ftr li a { color: #334155; }
.g8-ftr li a:hover { color: var(--g8-pri); }
.g8-ftr-bar {
  max-width: var(--g8-max); margin: 0 auto; padding: 0 15px;
}
.g8-ftr-pill {
  background: linear-gradient(90deg, #0284c7, #0369a1); color: #ffffff;
  border-radius: 12px; padding: 12px 20px; text-align: center; font-size: 14px; font-weight: 500;
}

/* Sticky Bottom GIF + Popup */
#b88-sticky {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 9990;
  width: 780px; max-width: 100%; display: flex; gap: 6px; justify-content: center; align-items: flex-end;
}
#b88-sticky a { display: block; flex: 1 1 50%; }
#b88-sticky img { width: 100%; height: auto; display: block; border-radius: 6px 6px 0 0; }
.b88-st-close {
  position: absolute; top: -22px; right: 4px; background: #e11d48; color: #fff; border: 0;
  border-radius: 4px; padding: 2px 8px; font-size: 11px; font-weight: 700; cursor: pointer; z-index: 9991;
}
#b88-pop { display: none; position: fixed; inset: 0; z-index: 10001; background: rgba(0,0,0,.68); align-items: center; justify-content: center; padding: 16px; }
#b88-pop.show { display: flex; }
.b88-pop-box { position: relative; max-width: 520px; width: 100%; }
.b88-pop-box img { width: 100%; height: auto; border-radius: 10px; display: block; }
.b88-pop-close {
  position: absolute; top: -12px; right: -10px; width: 32px; height: 32px; border-radius: 50%;
  background: #e11d48; color: #fff; border: 2px solid #fff; font-weight: 700; cursor: pointer;
}

@media (max-width: 1024px) {
  .g8-nav-wrap { display: none; }
  .g8-burger { display: inline-flex; }
  .g8-top { flex-wrap: wrap; }
  .g8-cta-top { width: 100%; justify-content: center; }
  .g8-btn { flex: 1 1 50%; text-align: center; padding: 8px 10px; font-size: 13px; }
  .g8-games { grid-template-columns: repeat(4, 1fr); }
  .g8-pays { grid-template-columns: repeat(2, 1fr); }
  .g8-post-grid, .g8-arch-grid { grid-template-columns: repeat(2, 1fr); }
  .g8-ftr-in { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 768px) {
  .g8-games { grid-template-columns: repeat(2, 1fr); }
  .g8-h1, article h1 { font-size: 22px; }
  .g8-content table { display: block; overflow-x: auto; width: 100%; }
  #b88-sticky a.st-second { display: none; }
  #b88-sticky { width: 100%; }
}
