@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;500;600;700&family=IBM+Plex+Sans+Thai:wght@300;400;500&display=swap');

:root {
  --g100: #fdfaf3;
  --g200: #f9e9b8;
  --g400: #f5c842;
  --g600: #d4a017;
  --g800: #b8860b;
  --g900: #7a5500;
  --dark: #1a1005;
  --mid:  #2a1b05;
  --gray: #6b7280;
}

.nd-body { font-family: 'IBM Plex Sans Thai', sans-serif; background: var(--g100); }

/* ── Hero ── */
.nd-hero {
  background: linear-gradient(135deg, #2a1b05 0%, #4a3008 60%, #2a1b05 100%);
  padding: 56px 24px 72px; position: relative; overflow: hidden;
}
.nd-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, #f5c842 1.5px, transparent 1.5px);
  background-size: 28px 28px; opacity: 0.06;
}
.nd-hero-inner { position: relative; z-index: 1; max-width: 80rem; margin: 0 auto; }

/* ── Gold line ── */
.nd-gold-line {
  width: 40px; height: 3px; border-radius: 9999px;
  background: linear-gradient(90deg, var(--g400), var(--g800)); margin: 20px 0 0;
}

/* ── Chip / badge ── */
.nd-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500; letter-spacing: .06em;
  padding: 4px 14px; border-radius: 9999px;
  border: 1px solid rgba(245,200,66,.35);
  background: rgba(245,200,66,.08); color: var(--g400);
  margin-bottom: 14px;
}

/* ── Breadcrumb/back ── */
.nd-btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; padding: 7px 14px; text-decoration: none;
  transition: background .2s, color .2s;
}
.nd-btn-back:hover { background: rgba(255,255,255,.14); color: #fff; text-decoration: none; }

/* ── Main content area ── */
.nd-main { max-width: 80rem; margin: 0 auto; padding: 3rem 2rem 4rem; }
.nd-grid { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }

/* ── Card ── */
.nd-card {
  background: #fff; border-radius: 14px; border: 1px solid rgba(212,160,23,.15);
  box-shadow: 0 4px 16px rgba(26,16,5,.06); padding: 28px; margin-bottom: 20px;
}

/* ── Hero image ── */
.nd-hero-img {
  width: 100%; max-height: 480px; object-fit: cover;
  border-radius: 14px; border: 1px solid rgba(212,160,23,.15);
  box-shadow: 0 4px 20px rgba(26,16,5,.1); margin-bottom: 28px; display: block;
}
.nd-img-placeholder {
  width: 100%; height: 240px; border-radius: 14px; margin-bottom: 28px;
  background: linear-gradient(135deg, var(--g200) 0%, #fef3c7 100%);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(212,160,23,.15);
}

/* ── Meta row ── */
.nd-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.nd-meta-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--gray);
}
.nd-meta-item svg { flex-shrink: 0; color: var(--g600); }

/* ── Content body ── */
.nd-content {
  font-size: 15px; color: #374151; line-height: 1.9;
}
.nd-rich-content p { margin: 0 0 1em; }
.nd-rich-content h2 { font-family: 'Kanit', sans-serif; font-size: 1.3rem; font-weight: 600; color: #111827; margin: 1.4em 0 .5em; }
.nd-rich-content h3 { font-family: 'Kanit', sans-serif; font-size: 1.1rem; font-weight: 600; color: #111827; margin: 1.2em 0 .4em; }
.nd-rich-content strong { font-weight: 600; color: #111827; }
.nd-rich-content em { font-style: italic; }
.nd-rich-content u { text-decoration: underline; }
.nd-rich-content ul, .nd-rich-content ol { padding-left: 1.5em; margin: 0 0 1em; }
.nd-rich-content li { margin-bottom: .3em; }
.nd-rich-content a { color: var(--g800); text-decoration: underline; }
.nd-rich-content a:hover { color: var(--g600); }
.nd-rich-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 12px 0; box-shadow: 0 4px 16px rgba(26,16,5,.1); display: block; }
.nd-rich-content .ql-align-center { text-align: center; }
.nd-rich-content .ql-align-right  { text-align: right; }
.nd-rich-content .ql-align-justify { text-align: justify; }

/* ── Participant badge ── */
.nd-participants {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--g800);
  background: rgba(245,200,66,.1); border: 1px solid rgba(245,200,66,.3);
  border-radius: 9999px; padding: 6px 16px; margin-top: 20px;
}

/* ── External link button ── */
.nd-btn-ext {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 9px;
  background: var(--g400); color: var(--dark);
  font-family: 'Kanit', sans-serif; font-size: 14px; font-weight: 600;
  text-decoration: none; margin-top: 24px;
  transition: background .2s, box-shadow .2s, transform .15s;
  box-shadow: 0 3px 10px rgba(245,200,66,.3);
}
.nd-btn-ext:hover {
  background: var(--g600); color: #fff;
  box-shadow: 0 5px 18px rgba(212,160,23,.4); transform: translateY(-1px);
  text-decoration: none;
}

/* ── Share bar ── */
.nd-share {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-top: 20px; border-top: 1px solid rgba(212,160,23,.15); margin-top: 28px;
}
.nd-share-label { font-size: 13px; color: var(--gray); }
.nd-share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; padding: 6px 14px; border-radius: 8px;
  text-decoration: none; transition: opacity .2s;
}
.nd-share-btn:hover { opacity: .85; text-decoration: none; }
.nd-share-fb  { background: #0866FF; color: #fff; }
.nd-share-line { background: #06C755; color: #fff; }
.nd-share-copy {
  background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; cursor: pointer;
  font-family: 'IBM Plex Sans Thai', sans-serif;
}

/* ── Sidebar ── */
.nd-sidebar { position: sticky; top: 80px; }

/* ── Related cards ── */
.nd-rel-card {
  display: flex; gap: 12px; padding: 12px; border-radius: 10px;
  text-decoration: none; transition: background .18s;
  border: 1px solid transparent;
}
.nd-rel-card:hover {
  background: rgba(245,200,66,.06);
  border-color: rgba(245,200,66,.2); text-decoration: none;
}
.nd-rel-img {
  width: 72px; height: 54px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(212,160,23,.2);
}
.nd-rel-placeholder {
  width: 72px; height: 54px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--g200) 0%, #fef3c7 100%);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(212,160,23,.2);
}
.nd-rel-title {
  font-size: 13px; font-weight: 500; color: #111827; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nd-rel-date { font-size: 11px; color: var(--gray); margin-top: 4px; }

@media (max-width: 768px) {
  .nd-grid { grid-template-columns: 1fr; }
  .nd-sidebar { position: static; }
  .nd-main { padding: 2rem 1rem 3rem; }
}
@media (max-width: 480px) {
  .nd-hero { padding: 40px 16px 56px; }
  .nd-card { padding: 20px; }
}
