/*
Theme Name: G2G Galaxy TH
Theme URI: https://g2ggalaxyth.com/
Author: G2GGalaxy
Author URI: https://g2ggalaxyth.com/
Description: ธีมเว็บไซต์ข้อมูลคาสิโนออนไลน์ G2GGalaxy — สล็อต บาคาร่า เดิมพันกีฬา เครดิตฟรี ออกแบบเฉพาะสำหรับ g2ggalaxyth.com
Version: 1.2.1
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: g2g
Tags: dark, news, blog, custom-menu, featured-images
*/

:root {
  --bg: #0b0718;
  --bg-2: #120b26;
  --bg-3: #1a1038;
  --panel: #17102e;
  --panel-2: #1e1542;
  --line: rgba(150, 120, 255, 0.16);
  --purple: #7c3aed;
  --purple-2: #9d5cff;
  --magenta: #c026d3;
  --gold: #f5c451;
  --gold-2: #ffdd94;
  --cyan: #38e0e7;
  --text: #ece8fb;
  --muted: #a89ed2;
  --danger: #ff6b81;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(5, 2, 18, 0.55);
  --font: 'Kanit', 'Leelawadee UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  background:
    radial-gradient(1200px 600px at 85% -100px, rgba(124, 58, 237, 0.22), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(192, 38, 211, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 84px; /* clearance for the floating main-site CTA */
}

img { max-width: 100%; height: auto; }

a { color: var(--gold-2); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5 {
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  margin: 0 0 0.6em;
}

input, button, select, textarea { font-family: var(--font); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(135deg, #ffd97a, #f0b429 60%, #d99a1a);
  color: #3a2606;
  box-shadow: 0 10px 26px rgba(240, 180, 41, 0.35);
}
.btn-gold:hover { color: #2c1d04; box-shadow: 0 14px 32px rgba(240, 180, 41, 0.5); }
.btn-outline {
  border-color: rgba(245, 196, 81, 0.65);
  color: var(--gold-2);
  background: rgba(245, 196, 81, 0.06);
}
.btn-outline:hover { background: rgba(245, 196, 81, 0.14); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--purple-2); color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 8, 30, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.custom-logo { max-height: 52px; width: auto; }
.site-branding a { display: inline-flex; align-items: center; }
.site-branding .site-name {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--gold-2), #ffb1e6 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.5px;
}
.site-branding .site-tag { display: block; font-size: 0.72rem; color: var(--muted); letter-spacing: 2px; }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
  display: block;
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 400;
}
.main-nav a:hover { background: rgba(124, 58, 237, 0.18); color: #fff; }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(192, 38, 211, 0.28));
  color: #fff;
}
.header-cta { display: flex; gap: 10px; }
.header-cta .btn { padding: 9px 20px; font-size: 0.92rem; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------- hero (front page) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: #120a2a url('assets/hero-bg.jpg?v=3') center 30% / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 5, 22, 0.94) 0%, rgba(9, 5, 22, 0.78) 42%, rgba(9, 5, 22, 0.18) 78%);
}
.hero-inner {
  position: relative;
  padding: 96px 0 88px;
  max-width: 640px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid rgba(245, 196, 81, 0.5);
  background: rgba(245, 196, 81, 0.08);
  color: var(--gold-2);
  font-size: 0.88rem;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  font-weight: 700;
  margin-bottom: 18px;
}
.hero h1 .hl { color: var(--gold); }
.hero-sub { color: #cfc7ee; font-size: 1.08rem; max-width: 540px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.stat-chip {
  display: flex;
  flex-direction: column;
  padding: 12px 22px;
  min-width: 130px;
  border-radius: 14px;
  background: rgba(20, 12, 44, 0.75);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.stat-chip b { font-size: 1.25rem; font-weight: 600; color: var(--gold-2); }
.stat-chip span { font-size: 0.82rem; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { color: var(--muted); margin: 0; }
.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--purple-2);
  margin-bottom: 10px;
  font-weight: 500;
}

/* category cards */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cat-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
  display: block;
  color: var(--text);
}
.cat-card:hover { transform: translateY(-6px); border-color: rgba(245, 196, 81, 0.5); color: var(--text); }
.cat-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.cat-card .cat-body { padding: 18px 20px 22px; }
.cat-card h3 { margin: 0 0 6px; font-size: 1.18rem; color: #fff; }
.cat-card p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.cat-card .cat-arrow {
  display: inline-block;
  margin-top: 12px;
  color: var(--gold-2);
  font-size: 0.9rem;
  font-weight: 500;
}

/* features */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feat {
  padding: 26px 24px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
}
.feat .feat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(192, 38, 211, 0.3));
  border: 1px solid var(--line);
}
.feat h3 { font-size: 1.08rem; margin-bottom: 6px; }
.feat p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* post cards */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
  color: var(--text);
}
.post-card:hover { transform: translateY(-6px); border-color: rgba(124, 58, 237, 0.55); color: var(--text); }
.post-card .thumb { position: relative; overflow: hidden; }
.post-card .thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; transition: transform 0.3s; }
.post-card:hover .thumb img { transform: scale(1.05); }
.post-card .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--magenta));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.post-card .card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h3 { font-size: 1.05rem; margin: 0; line-height: 1.45; }
.post-card h3 a { color: #fff; }
.post-card h3 a:hover { color: var(--gold-2); }
.post-card .meta { font-size: 0.8rem; color: var(--muted); display: flex; gap: 10px; }
.post-card .excerpt { font-size: 0.9rem; color: var(--muted); margin: 0; flex: 1; }
.read-more { color: var(--gold-2); font-size: 0.9rem; font-weight: 500; }

.center-more { text-align: center; margin-top: 36px; }

/* ---------- page hero-lite ---------- */
.page-hero {
  padding: 58px 0 10px;
  background: linear-gradient(180deg, rgba(30, 18, 66, 0.75), transparent);
}
.page-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 8px; }
.page-hero .crumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.page-hero .crumb a { color: var(--muted); }
.page-hero .crumb a:hover { color: var(--gold-2); }

/* ---------- content prose ---------- */
.content-wrap { padding: 30px 0 70px; }
.prose { max-width: 820px; margin: 0 auto; font-size: 1.02rem; }
.prose > p { margin: 0 0 1.2em; color: #d9d3f2; }
.prose h2 { font-size: 1.55rem; margin: 1.7em 0 0.6em; padding-left: 14px; border-left: 4px solid var(--gold); }
.prose h3 { font-size: 1.2rem; margin: 1.4em 0 0.5em; color: var(--gold-2); }
.prose ul, .prose ol { padding-left: 1.4em; color: #d9d3f2; }
.prose li { margin-bottom: 0.5em; }
.prose img { border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.prose th { background: rgba(124, 58, 237, 0.16); color: #fff; }
.prose blockquote {
  margin: 1.5em 0;
  padding: 16px 22px;
  border-left: 4px solid var(--purple);
  background: rgba(124, 58, 237, 0.1);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #e6e0fb;
}
.prose blockquote p { margin: 0; }

/* CTA box in article */
.cta-box {
  margin: 2.2em 0;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(192, 38, 211, 0.18));
  border: 1px solid rgba(157, 92, 255, 0.4);
  text-align: center;
}
.cta-box h3 { color: #fff; margin-bottom: 8px; }
.cta-box p { margin: 0 0 16px; color: #d5cdf3; font-size: 0.96rem; }

/* FAQ */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
details.faq {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  overflow: hidden;
}
details.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-weight: 500;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--gold-2); }
details.faq[open] summary::after { content: "–"; }
details.faq .faq-a { padding: 0 20px 18px; color: #cfc7ee; font-size: 0.96rem; margin: 0; }

/* article header */
.article-head { max-width: 820px; margin: 0 auto 26px; }
.article-head .meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; color: var(--muted); font-size: 0.86rem; margin-bottom: 12px; }
.article-head .meta .cat-pill {
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--magenta));
  color: #fff;
  font-size: 0.8rem;
}
.article-head h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.article-featured { max-width: 820px; margin: 0 auto 30px; }
.article-featured img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

/* related */
.related { max-width: 820px; margin: 50px auto 0; }
.related h2 { font-size: 1.3rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card { border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); border: 1px solid var(--line); color: var(--text); display: block; }
.related-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.related-card div { padding: 12px 14px; font-size: 0.9rem; font-weight: 400; color: #fff; line-height: 1.5; }

/* category page */
.cat-hero {
  padding: 54px 0 34px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(800px 300px at 20% 0%, rgba(124, 58, 237, 0.18), transparent 60%),
    radial-gradient(700px 300px at 90% 20%, rgba(192, 38, 211, 0.12), transparent 60%);
}
.cat-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.cat-hero .cat-count { color: var(--muted); font-size: 0.95rem; }
.cat-seo { max-width: 820px; margin: 46px auto 0; padding-top: 36px; border-top: 1px dashed var(--line); }

/* pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 46px 0 10px; }
.pagination .page-numbers {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.95rem;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover {
  background: linear-gradient(135deg, var(--purple), var(--magenta));
  border-color: transparent;
  color: #fff;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 11, 40, 0.6), #0a0616);
  padding: 56px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-brand img { max-height: 48px; }
.footer-brand p { color: var(--muted); font-size: 0.92rem; margin: 14px 0 0; }
.site-footer h4 { font-size: 1rem; color: var(--gold-2); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: 9px; }
.site-footer ul a { color: var(--muted); font-size: 0.93rem; }
.site-footer ul a:hover { color: var(--gold-2); }
.pay-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-badge {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(124, 58, 237, 0.1);
  color: #d9d3f2;
  font-size: 0.8rem;
}
.footer-note {
  margin-top: 44px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  color: #8a80b8;
  font-size: 0.84rem;
}

/* main-site CTA (floating, bottom of viewport) */
.main-site-cta {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 90;
    margin: 0;
    text-align: center;
    pointer-events: none;
}
.btn-main-site {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 17px 46px;
    border-radius: 999px;
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(135deg, #ffd97a, #f0b429 55%, #d99a1a);
    color: #3a2606;
    position: relative;
    overflow: hidden;
    animation: ctaPulse 2s infinite;
    transition: transform 0.15s;
    box-shadow: 0 8px 24px rgba(5, 2, 18, 0.55);
}
.btn-main-site:hover { transform: translateY(-3px); color: #2c1d04; }
.btn-main-site .spark {
    color: #fff7dd;
    font-size: 1.25rem;
    line-height: 1;
    animation: sparkBlink 1.2s infinite;
    text-shadow: 0 0 10px rgba(255, 247, 221, 0.9);
}
.btn-main-site .spark.s2 { animation-delay: 0.6s; }
.btn-main-site::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 45%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    animation: ctaShine 2.6s infinite;
}
@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 196, 81, 0.5), 0 10px 26px rgba(240, 180, 41, 0.35); }
    50% { box-shadow: 0 0 0 16px rgba(245, 196, 81, 0), 0 14px 34px rgba(240, 180, 41, 0.6); }
}
@keyframes sparkBlink {
    0%, 100% { opacity: 0.25; transform: scale(0.75) rotate(-12deg); }
    50% { opacity: 1; transform: scale(1.25) rotate(12deg); }
}
@keyframes ctaShine {
    0% { left: -80%; }
    55%, 100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
    .btn-main-site, .btn-main-site .spark, .btn-main-site::after { animation: none; }
}

/* 404 / search */
.big-404 { font-size: 6rem; font-weight: 700; color: var(--gold); line-height: 1; }

/* breadcrumbs */
.crumb-link { color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .header-cta { display: none; }
}
@media (max-width: 720px) {
  .btn-main-site { padding: 13px 30px; font-size: 1rem; gap: 10px; }
  .main-site-cta { bottom: 12px; }
  body { padding-bottom: 70px; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(13, 8, 30, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 18px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .hero-inner { padding: 64px 0 60px; }
  .post-grid, .cat-grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .stat-chip { min-width: 104px; padding: 10px 16px; }
}
