/* ========================================================================
   THONGDEE (ทองดี) — "Royal Crest" theme
   Black / gold / card-suit luxury casino aesthetic, shield-badge motif
   ======================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }

:root {
  --bg: #0a0807;
  --bg-alt: #141009;
  --panel: #1a140d;
  --gold: #d4af37;
  --gold-bright: #f3d576;
  --gold-deep: #9c7a1f;
  --cream: #f3ead4;
  --text: #e8dcc4;
  --muted: #b3a488;
  --suit-red: #c0435a;
  --line: rgba(212, 175, 55, 0.22);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  --radius: 16px;
  --font-head: 'Trirong', 'Sarabun', serif;
  --font-body: 'Sarabun', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; color: var(--cream); line-height: 1.42; margin: 0 0 0.6rem; }
h1 { font-size: clamp(1.8rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; color: var(--text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.grad-text {
  background: linear-gradient(120deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kw { color: var(--gold-bright); font-weight: 600; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.8rem; letter-spacing: 0.14em; color: var(--gold-bright);
  font-weight: 600; margin-bottom: 0.7rem; text-transform: uppercase;
}
.eyebrow .suit { color: var(--suit-red); font-size: 0.85rem; }

/* ---- shield badge (signature motif, echoes the crest logo) ---- */
.shield-badge {
  width: 68px; height: 76px; margin: 0 auto 1rem;
  clip-path: polygon(50% 0%, 100% 22%, 100% 65%, 50% 100%, 0% 65%, 0% 22%);
  background: linear-gradient(160deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.28);
}
.shield-badge svg { width: 30px; height: 30px; fill: #1a1207; }
.shield-frame {
  position: relative; padding: 4px;
  clip-path: polygon(6% 0%, 94% 0%, 100% 8%, 100% 92%, 94% 100%, 6% 100%, 0% 92%, 0% 8%);
  background: linear-gradient(160deg, var(--gold), var(--gold-deep));
}
.shield-frame > .shield-inner {
  clip-path: polygon(6% 0%, 94% 0%, 100% 8%, 100% 92%, 94% 100%, 6% 100%, 0% 92%, 0% 8%);
  overflow: hidden; background: var(--bg-alt);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.78rem 1.8rem; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap; font-family: var(--font-head);
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 60%, var(--gold-deep));
  color: #1a1207; box-shadow: 0 10px 26px rgba(212, 175, 55, 0.3);
}
.btn-outline { background: rgba(212, 175, 55, 0.06); color: var(--gold-bright); border-color: var(--gold-deep); }
.btn-outline:hover { background: rgba(212, 175, 55, 0.14); }
.btn-img { padding: 0; border-radius: 999px; overflow: hidden; }
.btn-img img { height: 40px; width: auto; }

/* ===== HEADER ===== */
.header { position: sticky; top: 0; z-index: 50; background: rgba(10, 8, 7, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 0.65rem 1.5rem; }
.header-row1 { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; }
.logo-img { height: 50px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 1.6rem; }
.nav-link { font-size: 0.92rem; color: var(--muted); font-weight: 500; letter-spacing: 0.03em; transition: color 0.15s ease; }
.nav-link:hover { color: var(--gold-bright); }
.nav-link .ico-line { background: #06c755; color: #fff; font-size: 0.6rem; font-weight: 800; padding: 0.1rem 0.32rem; border-radius: 4px; margin-right: 0.35rem; }
.header-btns { display: flex; align-items: center; gap: 0.7rem; }
.header-row2 { display: none; }

/* ===== HERO ===== */
.hero {
  position: relative; padding: 4rem 1.5rem 3rem;
  background: linear-gradient(180deg, rgba(10,8,7,0.5), rgba(10,8,7,0.92)), url('assets/img/BG.webp');
  background-size: cover; background-position: center;
}
.hero-wrap { max-width: 1280px; margin: 0 auto; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.6rem; align-items: center; }
.hero h1 { max-width: 620px; }
.hero-intro p { color: var(--muted); font-size: 1.02rem; max-width: 600px; }
.hero-actions { display: flex; gap: 0.9rem; margin-top: 1.4rem; flex-wrap: wrap; align-items: center; }
.hero-visual { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }

/* ===== SECTIONS ===== */
.section { padding: 3.6rem 1.5rem; }
.section.alt { background: var(--bg-alt); }
.section.stage-bg {
  background: linear-gradient(180deg, rgba(10,8,7,0.78), rgba(10,8,7,0.93)), url('assets/img/BG.webp');
  background-size: cover; background-position: center;
}
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-head { max-width: 760px; margin: 0 auto 2.4rem; text-align: center; }
.section-head p { color: var(--muted); }

/* ===== SERVICES (H2-1, 4 items) ===== */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.service-card { text-align: center; padding: 1.4rem 1rem 1.6rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.service-card img { width: 100%; border-radius: 10px; margin-bottom: 0.9rem; }
.service-card h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.service-card p { color: var(--muted); font-size: 0.86rem; margin: 0; }

/* ===== WHY US (H2-2, 6 shields) ===== */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem 1.2rem; }
.why-card { text-align: center; }
.why-card img { width: 130px; margin: 0 auto 0.6rem; }
.why-card h3 { font-size: 1.02rem; margin-bottom: 0.3rem; }
.why-card p { color: var(--muted); font-size: 0.86rem; margin: 0; }

/* ===== PROMOTIONS (H2-3, 4 real banner cards) ===== */
.promo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.promo-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel); transition: transform 0.18s ease; }
.promo-card:hover { transform: translateY(-4px); }
.promo-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.promo-card-body { padding: 1rem 1.1rem 1.2rem; }
.promo-card-body p { color: var(--muted); font-size: 0.84rem; margin: 0; }

/* ===== GAMES (H2-4, suit-accented list) ===== */
.suit-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; max-width: 1000px; margin: 0 auto; }
.suit-card { text-align: center; padding: 1.7rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.suit-card .suit-glyph { font-size: 2rem; margin-bottom: 0.6rem; }
.suit-card .suit-glyph.black { color: var(--gold-bright); }
.suit-card .suit-glyph.red { color: var(--suit-red); }
.suit-card h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.suit-card p { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* ===== FAQ ===== */
.faq-list { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.9rem; }
.faq-item { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.4rem; }
.faq-q { color: var(--gold-bright); margin-bottom: 0.4rem; font-size: 1rem; font-family: var(--font-head); }
.faq-a { color: var(--muted); margin: 0; font-size: 0.92rem; }

/* ===== ARTICLES ===== */
.article-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.article-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.18s ease; }
.article-card:hover { transform: translateY(-4px); }
.article-card img { height: 150px; object-fit: cover; width: 100%; }
.article-card-body { padding: 1rem 1.1rem 1.2rem; }
.article-card-body h3 { font-size: 0.96rem; margin-bottom: 0.35rem; }
.article-card-body p { color: var(--muted); font-size: 0.82rem; margin: 0; }

/* ===== CTA ===== */
.cta-section { padding: 0 1.5rem 4rem; }
.cta-panel {
  max-width: 1000px; margin: 0 auto; text-align: center; padding: 3rem 1.6rem; border-radius: 24px;
  background: linear-gradient(135deg, var(--panel), var(--bg-alt) 60%);
  border: 1px solid var(--gold-deep);
}
.cta-btns { display: flex; justify-content: center; gap: 0.9rem; margin-top: 1.4rem; flex-wrap: wrap; }

/* ===== FOOTER ===== */
.footer { padding: 3rem 1.5rem 7rem; text-align: center; background: var(--bg-alt); border-top: 1px solid var(--line); }
.footer-logo { height: 60px; margin: 0 auto 1rem; }
.footer-tagline { max-width: 640px; margin: 0 auto 1.6rem; color: var(--muted); font-size: 0.9rem; }
.footer-copy { color: var(--muted); font-size: 0.8rem; margin: 0; }

/* ===== STICKY BAR (image-icon bottom nav, edge-to-edge with hexagon center) ===== */
.sticky-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  align-items: flex-end; justify-content: space-between;
  background: rgba(10, 8, 7, 0.97); border-top: 1px solid var(--gold-deep);
  padding: 0.7rem 0.5rem 0.8rem; box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
}
.mnav-item { flex: 1; display: flex; flex-direction: column; align-items: center; }
.mnav-item img { width: 58px; height: 58px; object-fit: contain; margin-bottom: 0.1rem; }
.mnav-center {
  width: 96px; height: 102px; margin-top: -38px; flex-shrink: 0;
  clip-path: polygon(50% 0%, 100% 22%, 100% 65%, 50% 100%, 0% 65%, 0% 22%);
  background: linear-gradient(160deg, var(--gold-bright), var(--gold-deep));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}
.mnav-center img { width: 58px; height: 58px; }

/* ===== PAGE (promotion / article hub inner pages) ===== */
.page-hero { padding: 2.8rem 1.5rem 1rem; text-align: center; background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.page-hero .eyebrow { justify-content: center; display: flex; }
.page-hero h1 { max-width: 780px; margin: 0 auto 0.6rem; }
.page-hero p { max-width: 640px; margin: 0 auto; color: var(--muted); }
.page-main { max-width: 1080px; margin: 0 auto; padding: 2.8rem 1.5rem 4rem; }
.page-content h2 { color: var(--gold-bright); margin-top: 2.2rem; }
.page-content h2:first-child { margin-top: 0; }
.page-content ul { margin: 1rem 0; display: flex; flex-direction: column; gap: 0.55rem; }
.page-content ul li { padding-left: 1.5rem; position: relative; color: var(--muted); }
.page-content ul li::before { content: "♦"; position: absolute; left: 0; color: var(--gold); font-size: 0.72rem; top: 0.35rem; }

/* ===== ARTICLE DETAIL PAGE ===== */
.article-main { max-width: 780px; margin: 0 auto; padding: 2.8rem 1.5rem 4rem; }
.article-main .eyebrow { justify-content: center; display: flex; }
.article-main h1 { text-align: center; margin-bottom: 0.6rem; }
.article-meta { text-align: center; color: var(--muted); font-size: 0.85rem; margin-bottom: 1.8rem; }
.article-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; border: 1px solid var(--line); }
.article-cover img { width: 100%; }
.article-tldr { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.6rem; margin-bottom: 2rem; }
.article-tldr h2 { color: var(--gold-bright); font-size: 1.05rem; margin-bottom: 0.7rem; }
.article-tldr ul { display: flex; flex-direction: column; gap: 0.5rem; }
.article-tldr ul li { padding-left: 1.4rem; position: relative; color: var(--muted); font-size: 0.92rem; }
.article-tldr ul li::before { content: "♦"; position: absolute; left: 0; color: var(--gold); font-size: 0.65rem; top: 0.3rem; }
.article-main h2 { margin-top: 2rem; }
.article-faq { margin-top: 2.4rem; }
.article-faq h2 { color: var(--gold-bright); }
.article-related { margin-top: 2.6rem; border-top: 1px solid var(--line); padding-top: 1.8rem; }
.article-related h2 { font-size: 1.1rem; }
.article-related-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.article-related-item { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; }
.rel-title { color: var(--gold-bright); font-weight: 600; margin-bottom: 0.3rem; font-size: 0.92rem; font-family: var(--font-head); }
.rel-desc { color: var(--muted); font-size: 0.83rem; margin: 0; }
.action-btns { display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; }

/* ===== reveal-on-scroll ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-height: 260px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-grid { grid-template-columns: repeat(2, 1fr); }
  .suit-list { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .article-related-list { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-menu { display: none; }
  .header-btns .btn-img img { height: 34px; }
  body { padding-bottom: 6.6rem; }
  .sticky-bar { display: flex; }
}
