/*
Theme Name: G2G789T Press
Theme URI: https://g2g789tth.com/
Author: G2G789T
Author URI: https://g2g789tth.com/
Description: ธีมเว็บข้อมูล G2G789T สไตล์คาสิโนออนไลน์ ดำ-ทอง รองรับ SEO เต็มรูปแบบ
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: g2g789tpress
*/

:root {
  --bg: #060606;
  --bg-soft: #101010;
  --panel: #151515;
  --card: #1d1d1d;
  --card-2: #323030;
  --line: #2b2b2b;
  --gold: #cd962b;
  --gold-soft: #e8c766;
  --gold-bright: #f7d562;
  --nav-1: #853c06;
  --nav-2: #1f0500;
  --text: #f2f2f2;
  --muted: #b8b8b8;
  --gold-grad: linear-gradient(135deg, #ffea8d 0%, #d3a447 55%, #a97a1e 100%);
  --shadow: 0 10px 30px rgba(0, 0, 0, .55);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Kanit', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold-soft); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-bright); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 18px; }

/* ============ Top bar ============ */
.topbar {
  background: linear-gradient(90deg, #0a0a0a, #161005, #0a0a0a);
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; flex-wrap: wrap; padding: 4px 0; }
.topbar-marquee { color: var(--muted); overflow: hidden; white-space: nowrap; flex: 1 1 320px; }
.topbar-marquee span { display: inline-block; padding-left: 100%; animation: g789-marquee 26s linear infinite; }
@keyframes g789-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
.topbar-actions { display: flex; gap: 10px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-gold { background: var(--gold-grad); color: #241500 !important; box-shadow: 0 6px 18px rgba(205, 150, 43, .35); }
.btn-dark { background: linear-gradient(180deg, #47454a 0%, #292929 100%); color: #fff !important; border: 1px solid #4a4a4a; }
.btn-sm { padding: 7px 18px; font-size: 13.5px; }

/* ============ Header ============ */
.site-header {
  background: linear-gradient(100deg, var(--nav-1), var(--nav-2));
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 4px 22px rgba(0, 0, 0, .6);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 74px; }
.site-branding img { max-height: 52px; width: auto; display: block; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 10px; padding: 8px 12px; font-size: 18px; cursor: pointer; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a {
  color: #f4e9d2;
  font-weight: 500;
  font-size: 15.5px;
  padding: 10px 14px;
  border-radius: 999px;
  display: block;
}
.main-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { background: rgba(205, 150, 43, .22); color: var(--gold-bright); }
.header-cta { display: flex; gap: 10px; align-items: center; }

/* ============ Hero carousel ============ */
.hero { padding: 22px 0 8px; background: radial-gradient(1200px 400px at 50% -100px, rgba(205, 150, 43, .12), transparent 70%); }
.carousel { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid #2e2413; background: #0c0c0c; }
.carousel-track { display: flex; transition: transform .55s cubic-bezier(.5, 0, .3, 1); }
.carousel-slide { min-width: 100%; }
.carousel-slide a { display: block; }
.carousel-slide img { width: 100%; display: block; aspect-ratio: 1080 / 278; object-fit: cover; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(10, 8, 4, .55); color: var(--gold-bright);
  border: 1px solid rgba(205, 150, 43, .5); font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.carousel-btn:hover { background: rgba(205, 150, 43, .3); }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }
.carousel-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .35); border: 0; cursor: pointer; padding: 0; }
.carousel-dot.active { background: var(--gold-bright); box-shadow: 0 0 8px rgba(247, 213, 98, .8); }
.hero-cta { display: flex; justify-content: center; gap: 14px; margin: 20px 0 6px; flex-wrap: wrap; }
.hero-cta .btn { min-width: 210px; font-size: 16.5px; padding: 12px 30px; }

/* ============ Sections ============ */
.section { padding: 42px 0 10px; }
.section-head { text-align: center; margin-bottom: 26px; }
.section-title {
  font-size: 30px; font-weight: 700; margin: 0 0 6px; color: var(--gold-soft);
  text-transform: none; line-height: 1.35;
}
.section-title::after { content: ""; display: block; width: 88px; height: 3px; margin: 12px auto 0; border-radius: 3px; background: var(--gold-grad); }
.section-sub { color: var(--muted); margin: 10px auto 0; max-width: 640px; font-size: 15px; }

/* Game cards */
.game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.game-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s ease, border-color .18s ease; position: relative;
}
.game-card:hover { transform: translateY(-5px); border-color: var(--gold); }
.game-card img { width: 100%; aspect-ratio: 333 / 219; object-fit: cover; display: block; }
.game-card .game-name {
  display: block; text-align: center; padding: 11px 8px; font-weight: 600; color: var(--text);
  background: linear-gradient(180deg, #232323, #191919); font-size: 15.5px;
}
.game-card:hover .game-name { color: var(--gold-bright); }

/* Category hub cards */
.hub-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hub-card {
  background: linear-gradient(160deg, #20180a 0%, #141414 60%);
  border: 1px solid #3a2e12; border-radius: var(--radius); padding: 22px 20px 18px;
  position: relative; overflow: hidden;
}
.hub-card::before {
  content: ""; position: absolute; top: -46px; right: -46px; width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(205,150,43,.25), transparent 65%); border-radius: 50%;
}
.hub-card .hub-icon { font-size: 30px; margin-bottom: 8px; display: block; }
.hub-card h3 { margin: 0 0 8px; font-size: 20px; color: var(--gold-soft); }
.hub-card p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.hub-card .btn { width: 100%; }

/* Promo strip */
.promo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.promo-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); position: relative; background: var(--card); }
.promo-card a { display: block; }
.promo-card img { width: 100%; aspect-ratio: 1080 / 278; object-fit: cover; display: block; transition: transform .3s ease; }
.promo-card:hover img { transform: scale(1.03); }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.step-card img { border-radius: 10px; margin-bottom: 10px; width: 100%; aspect-ratio: 500 / 250; object-fit: cover; }
.step-card h3 { margin: 0 0 6px; font-size: 17px; color: var(--gold-soft); }
.step-card p { margin: 0; color: var(--muted); font-size: 13.8px; }

/* Article cards */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, border-color .18s ease;
}
.post-card:hover { transform: translateY(-5px); border-color: var(--gold); }
.post-card .thumb { display: block; position: relative; }
.post-card .thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.post-card .cat-badge {
  position: absolute; top: 10px; left: 10px; background: rgba(133, 60, 6, .92);
  color: #ffe9bd; font-size: 12.5px; font-weight: 600; padding: 3px 12px; border-radius: 999px;
}
.post-card .card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h3 { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 600; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--gold-bright); }
.post-card .excerpt { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .meta { color: #8f8f8f; font-size: 12.8px; display: flex; gap: 10px; align-items: center; }

/* SEO text block / generic content */
.seo-block, .entry-content, .term-description-content {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 34px; margin: 26px 0 8px;
}
.entry-content h2, .seo-block h2, .term-description-content h2 { color: var(--gold-soft); font-size: 24px; margin: 28px 0 10px; line-height: 1.45; }
.entry-content h3, .seo-block h3, .term-description-content h3 { color: var(--gold-soft); font-size: 19.5px; margin: 22px 0 8px; line-height: 1.5; }
.entry-content p, .seo-block p, .term-description-content p { margin: 0 0 14px; color: #dcdcdc; }
.entry-content ul, .entry-content ol, .seo-block ul, .term-description-content ul { margin: 0 0 16px; padding-left: 24px; color: #dcdcdc; }
.entry-content li, .seo-block li { margin-bottom: 6px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; background: #111; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; font-size: 14.5px; text-align: left; }
.entry-content th { background: #241b08; color: var(--gold-soft); font-weight: 600; }
.entry-content blockquote { border-left: 3px solid var(--gold); margin: 16px 0; padding: 10px 18px; background: #171717; border-radius: 0 10px 10px 0; color: #d9d9d9; }
.entry-content img { border-radius: 10px; }

/* ============ Breadcrumbs ============ */
.breadcrumbs { font-size: 13.5px; color: var(--muted); padding: 16px 0 2px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--gold-bright); }
.breadcrumbs .separator { margin: 0 7px; opacity: .55; }
.breadcrumbs .last { color: var(--gold-soft); }

/* ============ Page / single layout ============ */
.page-hero {
  background: linear-gradient(100deg, rgba(133, 60, 6, .55), rgba(31, 5, 0, .92)), var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 34px 0 30px;
  margin-bottom: 26px;
}
.page-hero h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.4; color: #fff; }
.page-hero .lead { color: #d9c9a8; margin: 0; max-width: 760px; font-size: 15.5px; }

.single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; padding-bottom: 40px; }
.content-area { min-width: 0; }
.entry-header h1 { font-size: 29px; line-height: 1.45; margin: 0 0 12px; color: #fff; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 16px; color: #9a9a9a; font-size: 13.5px; margin-bottom: 18px; align-items: center; }
.entry-meta .cat { background: rgba(133, 60, 6, .35); color: #ffd88a; padding: 2px 12px; border-radius: 999px; }
.entry-thumb img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.entry-tags { margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.entry-tags a { background: #1f1f1f; border: 1px solid var(--line); color: var(--muted); padding: 4px 14px; border-radius: 999px; font-size: 13px; }
.entry-tags a:hover { border-color: var(--gold); color: var(--gold-bright); }

.cta-box {
  margin: 30px 0 4px; padding: 24px; border-radius: var(--radius); text-align: center;
  background: linear-gradient(135deg, rgba(133, 60, 6, .4), rgba(31, 5, 0, .6));
  border: 1px solid #5a3d0e;
}
.cta-box h2 { margin: 0 0 6px; font-size: 21px; color: var(--gold-bright); }
.cta-box p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; }
.cta-box .btn { margin: 0 6px 8px; }

.post-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.post-nav a { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; font-size: 13.8px; color: var(--muted); max-width: 48%; }
.post-nav a:hover { border-color: var(--gold); color: var(--gold-bright); }

/* Sidebar */
.sidebar .widget {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 22px;
}
.sidebar .widget-title { margin: 0 0 14px; font-size: 17.5px; color: var(--gold-soft); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 7px 0; border-bottom: 1px dashed #232323; font-size: 14.3px; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar .tagcloud a { background: #1f1f1f; border: 1px solid var(--line); padding: 3px 12px; border-radius: 999px; font-size: 13px !important; color: var(--muted); display: inline-block; margin: 0 6px 8px 0; }

/* Archive listing */
.archive-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.archive-toolbar .count { color: var(--muted); font-size: 14px; }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin: 34px 0 10px; flex-wrap: wrap; }
.pagination .page-numbers {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); padding: 0 12px; font-size: 14.5px;
}
.pagination .page-numbers.current { background: var(--gold-grad); color: #241500; font-weight: 700; border-color: transparent; }
.pagination .page-numbers:hover:not(.current) { border-color: var(--gold); color: var(--gold-bright); }

/* ============ Footer ============ */
.site-footer { margin-top: 46px; background: linear-gradient(180deg, #0d0903, #050505); border-top: 1px solid #33260e; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; padding: 42px 0 24px; }
.footer-col .footer-logo { max-width: 210px; margin-bottom: 14px; }
.footer-col h3 { margin: 0 0 14px; font-size: 17px; color: var(--gold-soft); }
.footer-col p { color: var(--muted); font-size: 14px; line-height: 1.75; margin: 0 0 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; font-size: 14.3px; }
.social-links { display: flex; gap: 10px; margin-top: 14px; }
.social-links a { width: 40px; height: 40px; border-radius: 50%; background: #1c1c1c; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--muted); }
.social-links a:hover { border-color: var(--gold); color: var(--gold-bright); }
.banks-row { display: flex; flex-wrap: wrap; gap: 8px; }
.bank-pill { background: #141414; border: 1px solid #2e2e2e; color: #e3d9c2; border-radius: 8px; padding: 5px 13px; font-size: 12.8px; font-weight: 600; letter-spacing: .4px; }
.footer-disclaimer { color: #8b8b8b; font-size: 12.8px; border-top: 1px solid #1e1e1e; padding: 16px 0; line-height: 1.8; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: #7d7d7d; font-size: 13px; padding: 14px 0 22px; border-top: 1px solid #1e1e1e; }

/* ============ Mobile ============ */
@media (max-width: 1024px) {
  .game-grid, .hub-grid, .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid, .promo-grid { grid-template-columns: repeat(2, 1fr); }
  .single-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; margin-left: auto; }
  .header-cta { display: none; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #150a03; border-bottom: 1px solid #3a2b10; padding: 10px 16px 16px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav a { padding: 11px 14px; }
  .game-grid, .hub-grid, .steps-grid, .post-grid, .promo-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 24px; }
  .page-hero h1, .entry-header h1 { font-size: 23px; }
  .seo-block, .entry-content, .term-description-content { padding: 20px 18px; }
  .topbar-marquee { flex-basis: 100%; }
}

/* Search form */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; background: #101010; border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 9px 16px; font-family: inherit; font-size: 14px; }
.search-form button { background: var(--gold-grad); color: #241500; border: 0; border-radius: 999px; padding: 9px 18px; font-weight: 700; cursor: pointer; font-family: inherit; }

/* Screen reader text */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; background: #000; color: #fff; padding: 8px 14px; z-index: 9999; }

/* ============ Floating main-site CTA (all pages except front) ============ */
.g789-float-cta {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 950;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 32px;
  border-radius: 999px;
  background: var(--gold-grad);
  color: #241500 !important;
  font-weight: 700;
  font-size: 16.5px;
  line-height: 1.2;
  letter-spacing: .3px;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(205, 150, 43, .5);
  overflow: hidden;
  animation: g789-cta-pulse 1.6s ease-in-out infinite;
}
.g789-float-cta:hover { transform: translateX(-50%) translateY(-4px); filter: brightness(1.07); }
@keyframes g789-cta-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(205, 150, 43, .5), 0 0 0 0 rgba(247, 213, 98, .6); }
  50% { box-shadow: 0 8px 34px rgba(247, 213, 98, .85), 0 0 0 16px rgba(247, 213, 98, 0); }
}
.g789-float-cta__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #b30f2e;
  box-shadow: 0 0 8px rgba(255, 80, 110, .95);
  animation: g789-cta-blink 0.9s steps(2, start) infinite;
}
@keyframes g789-cta-blink { to { visibility: hidden; } }
.g789-float-cta__icon { font-size: 21px; animation: g789-cta-bounce 1.2s ease-in-out infinite; }
@keyframes g789-cta-bounce {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-3px) rotate(6deg); }
}
.g789-float-cta__shine {
  position: absolute;
  top: 0; left: -85%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: skewX(-22deg);
  animation: g789-cta-shine 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes g789-cta-shine {
  0% { left: -85%; }
  55%, 100% { left: 135%; }
}
@media (max-width: 760px) {
  .g789-float-cta { padding: 11px 22px; font-size: 14.5px; gap: 7px; bottom: 12px; }
  .g789-float-cta__icon { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .g789-float-cta, .g789-float-cta__dot, .g789-float-cta__icon, .g789-float-cta__shine { animation: none; }
}
