@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Pridi:wght@400;500;600;700&display=swap');

:root {
  --bg-dark: #070707;
  --bg-surface: #121212;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --gold: #f4c95d;
  --gold-light: #ffe9a3;
  --gold-dark: #c59728;
  --gold-gradient: linear-gradient(135deg, #f4c95d 0%, #e5b842 50%, #b8860b 100%);
  --gold-border: rgba(244, 201, 93, 0.25);
  --gold-glow: rgba(244, 201, 93, 0.15);
  --text-main: #ffffff;
  --text-muted: #b0b5c0;
  --text-sub: #828896;
  --line-color: rgba(255, 255, 255, 0.08);
  --font-heading: 'Pridi', serif;
  --font-body: 'Kanit', sans-serif;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-main);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-main);
  background-color: var(--bg-dark);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.25s ease;
}

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

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(20px, calc((100% - var(--max-width)) / 2));
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gold-border);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 120px;
}

.logo-image {
  max-height: 44px;
  object-fit: contain;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 500;
}

.site-header nav > a:not(.nav-cta) {
  color: var(--text-muted);
}

.site-header nav > a:not(.nav-cta):hover {
  color: var(--gold);
}

.nav-cta, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold-gradient);
  color: #000;
  padding: 11px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 18px rgba(244, 201, 93, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover, .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(244, 201, 93, 0.4);
  color: #000;
}

.menu-button {
  display: none;
}

/* Brand Tokens */
.brand-token {
  color: var(--gold);
  font-weight: 700;
}

/* Hero Section */
.hero, .inner-hero, .article-hero {
  position: relative;
  padding: 80px max(20px, calc((100% - var(--max-width)) / 2));
  background: radial-gradient(circle at 80% 20%, rgba(244, 201, 93, 0.08) 0%, transparent 60%),
              linear-gradient(180deg, #121212 0%, #070707 100%);
  border-bottom: 1px solid var(--line-color);
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  align-items: center;
  gap: 60px;
  min-height: 520px;
}

.kicker {
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero h1, .inner-hero h1, .article-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(38px, 5.5vw, 68px);
  line-height: 1.15;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy > p:not(.kicker), .inner-hero > p:not(.kicker), .article-hero > p:not(.kicker) {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 30px;
}

.hero aside {
  padding: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero aside span {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 44px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.hero aside strong {
  display: block;
  font-size: 18px;
  margin: 12px 0 8px;
  color: #fff;
}

.hero aside p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* Service Ribbon / Category Badges */
.service-ribbon {
  width: min(var(--max-width), calc(100% - 40px));
  margin: -40px auto 40px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.service-ribbon article {
  background: var(--bg-card);
  padding: 24px 20px;
  border: 1px solid var(--gold-border);
  border-radius: 10px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.service-ribbon article:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  background: var(--bg-card-hover);
}

.service-ribbon span {
  color: var(--gold);
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
}

.service-ribbon h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  color: #fff;
  margin: 8px 0 6px;
}

.service-ribbon p {
  font-size: 13px;
  color: var(--text-sub);
}

/* Grid & Content Sections */
.home-content {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 60px auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.content-section {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 40px;
  background: var(--bg-surface);
  border: 1px solid var(--line-color);
  border-radius: 12px;
  transition: border-color 0.25s ease;
}

.content-section:hover {
  border-color: var(--gold-border);
}

.section-number {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.content-section h2, .reading h2, .faq h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.5vw, 42px);
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.25;
}

.content-section .lead {
  font-size: 20px;
  color: var(--gold-light);
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.6;
}

.content-section p:not(.lead), .reading p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.8;
}

.content-section p strong, .reading p strong {
  color: #fff;
}

/* Feature Cards Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--line-color);
  padding: 24px;
  border-radius: 10px;
}

.feature-card:hover {
  border-color: var(--gold-border);
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Table Styling */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-color);
}

.data-table th, .data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line-color);
  font-size: 15px;
}

.data-table th {
  background: rgba(244, 201, 93, 0.1);
  color: var(--gold);
  font-family: var(--font-heading);
  font-weight: 600;
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* FAQ Accordion */
.faq {
  padding: 80px max(20px, calc((100% - var(--max-width)) / 2));
  background: var(--bg-surface);
  border-top: 1px solid var(--line-color);
  border-bottom: 1px solid var(--line-color);
}

.faq details {
  background: var(--bg-card);
  border: 1px solid var(--line-color);
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 18px 22px;
  transition: border-color 0.2s ease;
}

.faq details[open] {
  border-color: var(--gold-border);
}

.faq summary {
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  color: #fff;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-size: 24px;
  color: var(--gold);
  margin-left: 12px;
}

.faq details[open] summary::after {
  content: '−';
}

.faq details p {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* Reading / Article Detail Page */
.reading {
  width: min(880px, calc(100% - 40px));
  margin: 60px auto 100px;
}

.reading h2 {
  font-size: 32px;
  margin-top: 40px;
  border-bottom: 1px solid var(--line-color);
  padding-bottom: 10px;
}

.reading h3 {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--gold);
  margin: 30px 0 14px;
}

.reading ul, .reading ol {
  margin: 0 0 24px 24px;
  color: var(--text-muted);
}

.reading li {
  margin-bottom: 8px;
}

.callout {
  margin: 36px 0;
  padding: 24px;
  background: var(--bg-surface);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
}

.callout strong {
  display: block;
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 6px;
}

.callout p {
  margin-bottom: 0;
  font-size: 15px;
}

/* Article Grid & Cards */
.article-list {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 60px auto 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-color);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.article-card .tag {
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.article-card h2, .article-card h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 12px;
}

.article-card p {
  color: var(--text-sub);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.article-card .read-more {
  color: var(--gold);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Footer */
footer {
  background: #040404;
  border-top: 1px solid var(--line-color);
  padding: 60px max(20px, calc((100% - var(--max-width)) / 2)) 30px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  color: var(--text-sub);
}

footer strong {
  font-family: var(--font-heading);
  font-size: 32px;
  color: var(--gold);
  display: block;
  margin-bottom: 10px;
}

footer p {
  font-size: 14px;
  max-width: 440px;
  line-height: 1.7;
}

footer div:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
}

footer div:nth-child(2) a:hover {
  color: var(--gold);
}

footer small {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--line-color);
  color: var(--text-sub);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

footer small a {
  color: var(--text-muted);
}

footer small a:hover {
  color: var(--gold);
}

/* Mobile Sticky Dock */
.mobile-dock {
  display: none;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .service-ribbon {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -20px;
  }

  .content-section {
    grid-template-columns: 1fr;
    padding: 30px;
  }

  .section-number {
    font-size: 28px;
  }

  .article-list {
    grid-template-columns: 1fr;
  }

  footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 68px;
  }

  .site-header {
    padding: 12px 16px;
  }

  .site-header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0a0a0a;
    border-bottom: 1px solid var(--gold-border);
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .site-header nav.open {
    display: flex;
  }

  .menu-button {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
  }

  .menu-button i {
    width: 24px;
    height: 2px;
    background-color: var(--gold);
    transition: transform 0.2s ease;
  }

  .menu-button span {
    display: none;
  }

  .mobile-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #0d0d0d;
    border-top: 1px solid var(--gold-border);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.8);
  }

  .mobile-dock a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
  }

  .mobile-dock a:hover {
    color: var(--gold);
  }

  .mobile-dock .dock-cta {
    background: var(--gold-gradient);
    color: #000;
    font-weight: 700;
    border-radius: 8px 8px 0 0;
    margin-top: -12px;
    padding: 14px 4px;
  }
}

/* Image Assets & Media Styling */
.hero-image-banner,
.page-banner-img,
.article-hero-img {
  width: 100%;
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid var(--gold-border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px var(--gold-glow);
  object-fit: cover;
  margin-bottom: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-image-banner:hover,
.page-banner-img:hover,
.article-hero-img:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 32px var(--gold-glow);
}

.article-image-box {
  margin: 2rem 0;
  text-align: center;
}

.article-image-box img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--gold-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.article-image-caption {
  font-size: 0.9rem;
  color: var(--gold-light);
  margin-top: 0.5rem;
  font-style: italic;
}

.card-thumb-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  border-bottom: 1px solid var(--gold-border);
  transition: transform 0.3s ease;
}

.article-card h3 a {
  color: var(--text-main);
  transition: color 0.25s ease;
}

.article-card h3 a:hover {
  color: var(--gold);
}

.card-thumb-link {
  display: block;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}

.card-thumb-link:hover .card-thumb-img {
  transform: scale(1.03);
}

/* Table of Contents (สารบัญเนื้อหา) */
.toc-box {
  background: var(--bg-surface);
  border: 1px solid var(--gold-border);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.toc-box h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toc-box li a {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.toc-box li a:hover {
  color: var(--gold-light);
  transform: translateX(4px);
}