/* =========================================================
   FUN88 TH — Static Site Stylesheet
   Palette: light background + primary blue (#00A6FF)
   ========================================================= */

:root {
  --blue-50:  #EAF7FF;
  --blue-100: #CDEBFF;
  --blue-300: #6FCBFF;
  --blue-500: #00A6FF;   /* primary */
  --blue-600: #0072B8;
  --blue-700: #0058A3;
  --blue-900: #0F2A3B;

  --gold-400: #FFC53D;
  --gold-500: #FFB020;

  --bg: #F7FAFD;
  --surface: #FFFFFF;
  --surface-alt: #F0F8FF;
  --border: #E3EEF7;

  --ink-900: #101828;
  --ink-700: #33414F;
  --ink-500: #5B6B7C;
  --ink-300: #93A4B3;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(15, 42, 59, 0.06);
  --shadow-md: 0 12px 32px rgba(0, 114, 184, 0.12);
  --shadow-lg: 0 20px 48px rgba(0, 114, 184, 0.16);

  --container: 1180px;

  --font-display: "Prompt", "Noto Sans Thai", sans-serif;
  --font-body: "Sarabun", "Noto Sans Thai", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-700);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  line-height: 1.3;
  margin: 0 0 0.6em;
  font-weight: 600;
}

h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.2em; padding-inline-start: 1.4em; }
li { margin-bottom: 0.45em; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue-600);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ===================== Top notice bar ===================== */
.notice-bar {
  background: var(--blue-900);
  color: #CDEBFF;
  font-size: 0.8rem;
  text-align: center;
  padding: 7px 16px;
  letter-spacing: 0.02em;
}
.notice-bar strong { color: #fff; }

/* ===================== Header ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 250, 253, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ink-900);
}
.brand .mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.brand .brand-sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--ink-500);
  letter-spacing: 0.04em;
}

.header-actions { display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost {
  background: transparent;
  color: var(--blue-700);
  border: 1.5px solid var(--blue-100);
}
.btn-ghost:hover { background: var(--blue-50); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink-900);
  position: relative;
  transition: 0.2s;
}
.nav-toggle span::before { content: ""; position: absolute; top: -6px; width: 18px; background: var(--ink-900); }
.nav-toggle span::after { content: ""; position: absolute; top: 6px; width: 18px; background: var(--ink-900); }

/* ===================== Hero ===================== */
.hero {
  padding: 56px 0 40px;
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-100);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.hero h1 { margin-bottom: 0.5em; }
.hero-lede {
  font-size: 1.08rem;
  color: var(--ink-500);
  max-width: 46ch;
  margin-bottom: 1.6em;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--ink-500);
}
.hero-tags span {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}
.hero-media { display: flex; justify-content: center; }
.hero-media img { width: 100%; max-width: 420px; }

/* ===================== Page shell: article + TOC sidebar ===================== */
.page-shell {
  padding: 20px 0 80px;
}
.page-shell .container {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 52px);
  box-shadow: var(--shadow-sm);
}
.article > section { scroll-margin-top: 90px; }
.article > section + section {
  margin-top: 44px;
  padding-top: 44px;
  border-top: 1px solid var(--border);
}
.article h2 { display: flex; align-items: center; gap: 12px; }
.article h2 .num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue-600);
  background: var(--blue-50);
  border-radius: var(--radius-pill);
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article h3 { color: var(--blue-700); margin-top: 1.3em; }
.article ul li::marker { color: var(--blue-500); }
.article a.inline-link { color: var(--blue-600); text-decoration: underline; text-underline-offset: 3px; }

.lede-block {
  font-size: 1.02rem;
  color: var(--ink-700);
}

.callout {
  background: var(--surface-alt);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 22px 0;
  font-size: 0.95rem;
}
.callout strong { color: var(--blue-700); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 22px 0;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.info-card h3 { margin-top: 0; font-size: 1.05rem; }

.feature-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  align-items: start;
  margin: 20px 0;
}
.feature-row img { width: 60px; height: 60px; }

.icon-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 18px 0;
}
.icon-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.92rem;
  margin: 0;
}
.icon-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-500);
  flex-shrink: 0;
}

.article figure { margin: 26px 0; }
.article figure img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.article figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--ink-300);
  text-align: center;
}

.contact-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}
.contact-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.contact-list b { color: var(--blue-700); min-width: 90px; display: inline-block; }

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--surface);
}
.faq-item summary {
  cursor: pointer;
  padding: 16px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-900);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--blue-600);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 20px 18px; color: var(--ink-500); }

/* Numbered steps */
.step-list { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 16px; }
.step-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  margin: 0;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.step-list li::before {
  content: counter(step);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Comparison table */
.table-wrap { overflow-x: auto; margin: 22px 0; }
table.plain {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
table.plain th, table.plain td {
  border: 1px solid var(--border);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}
table.plain th {
  background: var(--blue-50);
  color: var(--blue-700);
  font-family: var(--font-display);
}

/* Ordered numbered feature list (why choose us) */
.reason-list { list-style: none; counter-reset: reason; padding: 0; display: grid; gap: 16px; }
.reason-list li {
  counter-increment: reason;
  position: relative;
  padding: 18px 20px 18px 68px;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  margin: 0;
}
.reason-list li::before {
  content: counter(reason, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--blue-600);
}
.reason-list strong { color: var(--ink-900); display: block; margin-bottom: 2px; font-family: var(--font-display); }

/* ===================== TOC sidebar ===================== */
.toc-wrap { position: sticky; top: 90px; }
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.toc h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  margin-bottom: 14px;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.toc a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--ink-500);
  border-left: 2px solid transparent;
}
.toc a:hover { background: var(--blue-50); color: var(--blue-700); }
.toc a.active {
  background: var(--blue-50);
  color: var(--blue-700);
  border-left-color: var(--blue-500);
  font-weight: 600;
}
.toc-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--ink-300);
}

.toc-mobile-toggle { display: none; }

/* ===================== Trust / responsible strip ===================== */
.trust-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 26px 0;
}
.trust-strip .container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  justify-content: space-between;
  align-items: center;
}
.trust-item { display: flex; align-items: center; gap: 12px; font-size: 0.88rem; color: var(--ink-500); }
.trust-item .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-50); display: flex; align-items: center; justify-content: center; color: var(--blue-600); font-weight: 700; font-family: var(--font-display); font-size: 0.8rem; }

/* ===================== Footer ===================== */
.site-footer { background: var(--blue-900); color: #C6DCEA; padding: 56px 0 26px; margin-top: 40px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand { color: #fff; }
.footer-brand .brand-sub { color: #8FB3C9; }
.footer-desc { margin-top: 14px; font-size: 0.88rem; color: #9DBACE; max-width: 34ch; }
.footer-col h3 {
  color: #fff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { font-size: 0.9rem; color: #C6DCEA; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: #7FA2B9;
}
.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid #7FA2B9;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 8px;
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff;
  border: none;
  box-shadow: var(--shadow-md);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
  font-size: 1.1rem;
}
.back-to-top.show { display: flex; }

/* ===================== Responsive ===================== */
@media (max-width: 980px) {
  .page-shell .container { grid-template-columns: 1fr; }
  .toc-wrap { position: static; order: -1; }
  .toc { max-height: none; }
  .toc-mobile-toggle {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--blue-700);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
  }
  .toc.collapsed .toc-list { display: none; }
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-lede { margin-inline: auto; }
  .hero-cta, .hero-tags { justify-content: center; }
  .hero-media { order: -1; }
  .hero-media img { max-width: 280px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .header-actions .btn-ghost { display: none; }
  .card-grid, .icon-list { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .article { padding: 22px; }
  .feature-row { grid-template-columns: 52px 1fr; }
  .feature-row img { width: 44px; height: 44px; }
}
