/* ══════════════════════════════════════════════════════════
   78wing.online — app layer
   ต่อจาก design.css (design system ที่ยึดจากเว็บตัวอย่าง)
   ══════════════════════════════════════════════════════════ */

:root {
  --brand: #eab308;
  --line: rgba(124, 58, 237, 0.22);
  --radius: 16px;
}

body {
  font-family: 'Sarabun', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

.container { max-width: 1180px; }

/* ── BRAND MARK ── */
.brand-svg { height: 42px; width: auto; display: block; }
.footer-brand .brand-svg { height: 46px; margin-bottom: 1.2rem; }

/* ── PAGE HERO (หน้าลูก) ── */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.5rem;
  background: linear-gradient(135deg, #0c0a1f 0%, #190a3c 45%, #0d1a4a 100%);
  border-bottom: 1px solid var(--line);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 40%, rgba(124, 58, 237, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 25%, rgba(30, 64, 175, 0.30) 0%, transparent 55%),
    radial-gradient(ellipse at 60% 90%, rgba(234, 179, 8, 0.07) 0%, transparent 50%);
  pointer-events: none;
}
.page-hero > .container { position: relative; z-index: 2; }

.page-hero h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
  margin: 0.9rem 0 1rem;
}
.page-hero .lead-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 820px;
  margin-bottom: 1.6rem;
}

.hero-badge-sm {
  display: inline-block;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.28rem 0.95rem;
  border-radius: 50px;
  letter-spacing: 0.04em;
}

.breadcrumb-nav {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.breadcrumb-nav a { color: #a78bfa; }
.breadcrumb-nav a:hover { color: var(--accent); }

/* ── ARTICLE TYPOGRAPHY ── */
.article-wrap { max-width: 940px; margin: 0 auto; }
.section-pad { padding: 3.5rem 0; }
.section-pad-sm { padding: 2.2rem 0; }

.content-body h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.5;
  margin: 2.4rem 0 0.9rem;
  scroll-margin-top: 90px;
}
.content-body h3 {
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  font-weight: 700;
  color: #ddd6fe;
  line-height: 1.55;
  margin: 1.8rem 0 0.7rem;
  scroll-margin-top: 90px;
}
.content-body p {
  color: #cfc9ef;
  line-height: 1.95;
  margin-bottom: 1.05rem;
  font-size: 1.02rem;
}
.content-body strong { color: #fff; }
.content-body a { color: #a78bfa; text-decoration: underline; }
.content-body a:hover { color: var(--accent); }
.content-body ul, .content-body ol { color: #cfc9ef; line-height: 1.95; margin-bottom: 1.1rem; }
.content-body li { margin-bottom: 0.45rem; }

/* ── ตาราง ── */
.tbl-wrap { overflow-x: auto; margin: 1.4rem 0 1.8rem; border-radius: 14px; border: 1px solid var(--line); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 0.95rem; }
table.tbl caption {
  caption-side: top;
  color: #a78bfa;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  padding: 0.7rem 1rem;
  background: rgba(124, 58, 237, 0.10);
}
table.tbl th {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.55), rgba(124, 58, 237, 0.55));
  color: #fff;
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl td {
  padding: 0.7rem 0.9rem;
  color: #cfc9ef;
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
  vertical-align: top;
}
table.tbl tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.025); }
table.tbl tbody tr:hover { background: rgba(124, 58, 237, 0.10); }

/* ── สารบัญ ── */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.3rem 1.5rem;
  margin: 1.8rem 0 2.2rem;
  box-shadow: var(--neu-shadow-out);
}
.toc-title { color: #fff; font-weight: 800; font-size: 1.05rem; margin-bottom: 0.6rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin-bottom: 0.4rem; }
.toc a { color: #b9b0e8; text-decoration: none; font-size: 0.97rem; }
.toc a:hover { color: var(--accent); }

/* ── FAQ ── */
.faq-list { display: grid; gap: 0.85rem; margin-top: 1.4rem; }
details.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--neu-shadow-out);
  overflow: hidden;
}
details.faq-item[open] { border-color: rgba(234, 179, 8, 0.45); }
details.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 3rem 1rem 1.2rem;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}
details.faq-item[open] summary::after { content: '–'; }
details.faq-item .faq-answer {
  padding: 0 1.2rem 1.15rem;
  color: #cfc9ef;
  line-height: 1.9;
  font-size: 0.98rem;
  border-top: 1px solid rgba(124, 58, 237, 0.16);
  padding-top: 0.9rem;
  margin-top: 0.2rem;
}
details.faq-item .faq-answer p:last-child { margin-bottom: 0; }

/* ── รูปในเนื้อหา ── */
.figure-img { margin: 1.6rem 0 1.8rem; }
.figure-img img {
  width: 100%;
  border-radius: 16px;
  display: block;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.5);
}
.figure-img figcaption {
  color: #8f88b8;
  font-size: 0.85rem;
  margin-top: 0.55rem;
  text-align: center;
}

/* ── กล่องข้อมูล ── */
.info-box {
  background: rgba(30, 64, 175, 0.14);
  border: 1px solid rgba(30, 64, 175, 0.38);
  border-radius: 14px;
  padding: 1.1rem 1.35rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.8;
}
.info-box strong { color: #fff; }

.step-grid { display: grid; gap: 0.9rem; margin: 1.4rem 0 1.8rem; }
.step-item {
  display: flex;
  gap: 1rem;
  background: var(--bg-card2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.05rem 1.2rem;
  box-shadow: var(--neu-shadow-out);
}
.step-no {
  flex: 0 0 40px;
  height: 40px;
  width: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-body { color: #cfc9ef; font-size: 0.97rem; line-height: 1.8; }
.step-body .step-h { color: #fff; font-weight: 700; display: block; margin-bottom: 0.15rem; }

/* ── ลงทะเบียน / CTA ในการ์ด ── */
.signup-strip {
  background: linear-gradient(90deg, rgba(30, 64, 175, 0.9) 0%, rgba(124, 58, 237, 0.9) 55%, rgba(109, 40, 217, 0.9) 100%);
  border-radius: 18px;
  padding: 2rem 1.6rem;
  text-align: center;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
  margin: 2.4rem 0;
}
.signup-strip .ss-title { color: #fff; font-weight: 800; font-size: clamp(1.15rem, 2.4vw, 1.5rem); margin-bottom: 0.4rem; }
.signup-strip .ss-sub { color: rgba(255, 255, 255, 0.78); font-size: 0.95rem; margin-bottom: 1.2rem; }

/* ── สรุปรายการสั้น (ไม่ใช่ <p>) ── */
.mini-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.8rem; margin: 1.3rem 0 1.8rem; }
.mini-item {
  background: var(--bg-card2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: #cfc9ef;
  font-size: 0.92rem;
  box-shadow: var(--neu-shadow-out);
}
.mini-item b { color: var(--accent); }

/* ── LEGAL PAGES ── */
.legal-note { color: #9d97c8; font-size: 0.9rem; line-height: 1.85; }

/* ── LAST LINE (E-E-A-T) ── */
.page-sign {
  border-top: 1px solid var(--line);
  margin-top: 2.4rem;
  padding-top: 1.1rem;
  color: #8f88b8;
  font-size: 0.86rem;
  line-height: 1.85;
}
.page-sign a { color: #a78bfa; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .page-hero { padding: 3rem 0 2.5rem; }
  .section-pad { padding: 2.6rem 0; }
  table.tbl { font-size: 0.88rem; }
  table.tbl th, table.tbl td { padding: 0.6rem 0.7rem; }
}

::selection { background: rgba(124, 58, 237, 0.5); color: #fff; }

/* ── เพิ่มเติมสำหรับการ์ดระดับสมาชิก / กล่องนโยบาย ── */
.tier-desc-mini { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.9rem; }
.pn-title { color: #fff; font-weight: 700; display: block; margin-bottom: 0.35rem; }
.privacy-notice { color: var(--text-muted); font-size: 0.92rem; line-height: 1.85; }
.privacy-notice a { color: #a78bfa; }
