/* ============================================================
   สล็อตเว็บตรง — Dark iGaming Theme
   NOTE: Critical above-fold styles are inlined in <head> via critical.css
   This file handles everything below-fold + component styles.
   ============================================================ */

:root {
  --bg-primary:   #0a0a0a;
  --bg-secondary: #111111;
  --bg-card:      #1a1a1a;
  --bg-card-hover:#222233;
  --gold:         #ffd700;
  --gold-dark:    #cc9900;
  --gold-light:   #ffe566;
  --red:          #e63946;
  --green:        #2ecc71;
  --text-primary: #ffffff;
  --text-secondary:#cccccc;
  --text-muted:   #888888;
  --border:       #2a2a2a;
  --border-gold:  rgba(255,215,0,0.3);
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 4px 24px rgba(0,0,0,0.6);
  --shadow-gold:  0 4px 24px rgba(255,215,0,0.15);
  --transition:   all 0.25s ease;
  --font:         'Sarabun', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }

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

h1,h2,h3,h4,h5,h6 { line-height: 1.3; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }

p { margin-bottom: 1rem; color: var(--text-secondary); }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

section { padding: 60px 0; }

/* ── Top Bar ── */
.topbar {
  background: linear-gradient(90deg, #1a0a00, #2a1500, #1a0a00);
  border-bottom: 1px solid var(--gold-dark);
  padding: 8px 0;
  font-size: 0.85rem;
  text-align: center;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar span { color: var(--gold-light); }
.btn-topbar {
  background: var(--gold);
  color: #000;
  padding: 5px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}
.btn-topbar:hover { background: var(--gold-light); color: #000; }

/* ── Header / Nav ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.6rem; }
.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.5px;
}
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; align-items: center; }
.main-nav a {
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--gold); background: rgba(255,215,0,0.08); }
.main-nav .nav-cta {
  background: var(--gold);
  color: #000 !important;
  font-weight: 700;
  padding: 8px 18px;
}
.main-nav .nav-cta:hover { background: var(--gold-light); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Breadcrumb ── */
.breadcrumb-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.85rem;
}
.breadcrumb li { display: flex; align-items: center; gap: 4px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb li:last-child { color: var(--gold); }
.sep { color: var(--text-muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: var(--font);
  text-align: center;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(255,215,0,0.25);
}
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}
.btn-outline:hover { background: var(--gold); color: #000; }
.btn-lg { padding: 16px 40px; font-size: 1.1rem; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

/* ── Hero ── */
.hero {
  position: relative;
  padding: 90px 0 70px;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a 0%, #100800 40%, #1a0e00 100%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(255,215,0,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(255,100,0,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,215,0,0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 { color: var(--text-primary); margin-bottom: 16px; }
.hero h1 span { color: var(--gold); }
.hero p { font-size: 1.1rem; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
  display: block;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.promo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}
.promo-card:hover { border-color: var(--gold); background: var(--bg-card-hover); }
.promo-icon { font-size: 2rem; flex-shrink: 0; }
.promo-title { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; }
.promo-sub { font-size: 0.8rem; color: var(--text-muted); }

/* ── Section Headers ── */
.section-header { text-align: center; margin-bottom: 40px; }
.section-label {
  display: inline-block;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-header h2 { color: var(--text-primary); }
.section-header p { max-width: 560px; margin: 10px auto 0; }
.gold-line {
  width: 50px;
  height: 3px;
  background: var(--gold);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ── Cards Grid ── */
.cards-grid { display: grid; gap: 24px; }
.cards-grid-4 { grid-template-columns: repeat(4, 1fr); }
.cards-grid-3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: var(--transition);
}
.card:hover {
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}
.card-icon { font-size: 2.4rem; margin-bottom: 14px; }
.card h3 { color: var(--text-primary); margin-bottom: 10px; font-size: 1.05rem; }
.card p { font-size: 0.9rem; margin-bottom: 0; }

/* ── Provider Cards ── */
.provider-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: var(--transition);
}
.provider-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}
.provider-logo { font-size: 3rem; margin-bottom: 12px; }
.provider-name { font-size: 1.3rem; font-weight: 800; color: var(--gold); margin-bottom: 8px; }
.provider-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; }
.provider-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tag {
  background: rgba(255,215,0,0.1);
  color: var(--gold);
  border: 1px solid var(--border-gold);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── Bonus / Promo Table ── */
.bonus-table { width: 100%; border-collapse: collapse; }
.bonus-table th {
  background: var(--bg-card);
  color: var(--gold);
  padding: 14px 16px;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 2px solid var(--border-gold);
}
.bonus-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.bonus-table tr:hover td { background: var(--bg-card); color: var(--text-primary); }
.bonus-highlight { color: var(--gold) !important; font-weight: 700; }

/* ── FAQ Accordion ── */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 16px 20px;
  text-align: left;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}
.faq-question:hover { background: var(--bg-card-hover); color: var(--gold); }
.faq-question .faq-icon { color: var(--gold); font-size: 1.2rem; transition: var(--transition); }
.faq-answer {
  display: none;
  padding: 16px 20px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ── CTA Section ── */
.cta-section {
  background: linear-gradient(135deg, #100800, #1a0e00);
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
  text-align: center;
  padding: 70px 0;
}
.cta-section h2 { color: var(--text-primary); margin-bottom: 12px; }
.cta-section p { max-width: 540px; margin: 0 auto 28px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Content Article ── */
.content-article {
  max-width: 820px;
  margin: 0 auto;
}
.content-article h2 {
  color: var(--gold);
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.content-article h3 { color: var(--text-primary); margin: 24px 0 10px; }
.content-article ul, .content-article ol {
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}
.content-article li { margin-bottom: 6px; }
.content-article strong { color: var(--gold); }

/* ── Internal Links Box ── */
.related-links {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 36px 0;
}
.related-links h4 {
  color: var(--gold);
  margin-bottom: 14px;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}
.related-links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.related-links a {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: var(--transition);
}
.related-links a:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255,215,0,0.05);
}

/* ── Blog Grid ── */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.blog-card:hover { border-color: var(--border-gold); transform: translateY(-4px); }
.blog-thumb {
  height: 160px;
  background: linear-gradient(135deg, #1a0e00, #2a1a00);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}
.blog-body { padding: 20px; }
.blog-meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px; }
.blog-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.blog-excerpt { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 14px; }
.blog-read { font-size: 0.85rem; color: var(--gold); font-weight: 600; }

/* ── Highlight Box ── */
.highlight-box {
  background: linear-gradient(135deg, rgba(255,215,0,0.06), rgba(255,215,0,0.02));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 24px 0;
}
.highlight-box h3 { color: var(--gold); margin-bottom: 10px; font-size: 1rem; }
.highlight-box p { margin-bottom: 0; font-size: 0.9rem; }

/* ── Steps ── */
.steps { counter-reset: step; }
.step-item {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  align-items: flex-start;
}
.step-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gold);
  color: #000;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-content h4 { color: var(--text-primary); margin-bottom: 4px; }
.step-content p { font-size: 0.9rem; margin-bottom: 0; }

/* ── Page Hero (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, #0a0a0a 0%, #100800 100%);
  border-bottom: 1px solid var(--border);
  padding: 50px 0 40px;
  text-align: center;
}
.page-hero h1 span { color: var(--gold); }
.page-hero p { max-width: 620px; margin: 14px auto 0; }

/* ── Footer ── */
.site-footer {
  background: #070707;
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.footer-desc { font-size: 0.875rem; color: var(--text-muted); }
.payment-icons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
}
.site-footer h4 {
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul a { color: var(--text-muted); font-size: 0.875rem; }
.site-footer ul a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 4px; }
.footer-disclaimer { font-size: 0.75rem !important; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .cards-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  section { padding: 40px 0; }
  .hero { padding: 50px 0 40px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0a0a0a;
    border-bottom: 1px solid var(--border);
    padding: 16px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav a { display: block; padding: 10px 14px; }
  .cards-grid-3 { grid-template-columns: 1fr; }
  .cards-grid-2 { grid-template-columns: 1fr; }
  .cards-grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .topbar .container { justify-content: center; }
  .hero-stats { gap: 16px; }
  .cta-actions { flex-direction: column; align-items: center; }
  h1 { font-size: 1.7rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .btn-lg { padding: 13px 24px; font-size: 1rem; }
}

/* ── Performance Optimizations ─────────────────────────────
   content-visibility: auto  → skip rendering off-screen sections
   contain-intrinsic-size    → prevent layout shift during lazy render
   will-change               → hint GPU layers for animated elements
   ──────────────────────────────────────────────────────────── */

/* Below-fold sections deferred by browser rendering engine */
section:not(.hero):not(.page-hero) {
  content-visibility: auto;
  contain-intrinsic-size: 0 400px; /* estimated height prevents CLS */
}

/* GPU-accelerate elements that animate on hover */
.card,
.blog-card,
.provider-card,
.promo-card {
  will-change: transform;
}

/* Remove will-change after animation to free GPU memory */
.card:not(:hover),
.blog-card:not(:hover),
.provider-card:not(:hover) {
  will-change: auto;
}

/* Smooth scrolling — only when user hasn't requested reduced motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Respect user motion preferences — disable all transitions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Font rendering optimization */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Image optimization defaults */
img {
  max-width: 100%;
  height: auto;
  display: block;
  /* Native lazy loading for all images */
  loading: lazy;
  /* Prevent layout shift — set aspect ratio */
  aspect-ratio: auto;
}

/* Lazy-load placeholder while image loads */
img[loading="lazy"] {
  background: var(--bg-card);
}

/* ── Print styles (reduces page weight for print) ── */
@media print {
  .topbar, .site-header, .cta-section, .site-footer { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
