@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;
}

.nw-page { font-family: 'IBM Plex Sans Thai', sans-serif; background: var(--g100); min-height: 80vh; }

/* hero */
.nw-hero {
  background: linear-gradient(135deg, #2a1b05 0%, #4a3008 60%, #2a1b05 100%);
  padding: 64px 24px 80px; text-align: center; position: relative; overflow: hidden;
}
.nw-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;
}
.nw-hero-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.nw-hero-label {
  display: inline-block; font-size: 12px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--g400);
  border: 1px solid rgba(245,200,66,.35); background: rgba(245,200,66,.08);
  border-radius: 9999px; padding: 5px 18px; margin-bottom: 18px;
}
.nw-hero-title {
  font-family: 'Kanit', sans-serif; font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700; color: #fff; margin: 0 0 14px; line-height: 1.2;
}
.nw-hero-title span { color: var(--g400); }
.nw-hero-sub { color: rgba(255,255,255,.65); font-size: 15px; line-height: 1.7; margin: 0; }
.nw-gold-line {
  width: 40px; height: 3px; border-radius: 9999px;
  background: linear-gradient(90deg, var(--g400), var(--g800)); margin: 20px auto 0;
}

/* filter */
.nw-filter-wrap {
  background: #fff; border-bottom: 1px solid rgba(212,160,23,.18);
  position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 12px rgba(26,16,5,.06);
}
.nw-filter-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 10px; overflow-x: auto; scrollbar-width: none;
}
.nw-filter-inner::-webkit-scrollbar { display: none; }
.nw-filter-btn {
  flex-shrink: 0; padding: 12px 20px; border: none; background: transparent;
  font-family: 'IBM Plex Sans Thai', sans-serif; font-size: 14px; font-weight: 500;
  color: var(--gray); cursor: pointer; border-bottom: 2.5px solid transparent;
  transition: color .2s, border-color .2s; white-space: nowrap;
}
.nw-filter-btn:hover { color: var(--g800); }
.nw-filter-btn.active { color: var(--g800); border-bottom-color: var(--g400); font-weight: 600; }

/* search */
.nw-search-wrap { max-width: 1200px; margin: 0 auto; padding: 28px 24px 0; display: flex; gap: 12px; align-items: center; }
.nw-search-box { flex: 1; position: relative; max-width: 400px; }
.nw-search-input {
  width: 100%; padding: 10px 14px 10px 40px; border: 1.5px solid rgba(212,160,23,.3);
  border-radius: 8px; background: #fff; font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: 14px; color: var(--dark); outline: none; box-sizing: border-box; transition: border-color .2s, box-shadow .2s;
}
.nw-search-input:focus { border-color: var(--g400); box-shadow: 0 0 0 3px rgba(245,200,66,.15); }
.nw-search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--g600); pointer-events: none; }
.nw-result-count { font-size: 13px; color: var(--gray); margin-left: auto; }
.nw-result-count strong { color: var(--g800); }

/* grid */
.nw-grid-wrap { max-width: 1200px; margin: 0 auto; padding: 24px 24px 64px; }
.nw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }

/* card */
.nw-card {
  background: #fff; border-radius: 14px; border: 1px solid rgba(212,160,23,.15);
  box-shadow: 0 4px 16px rgba(26,16,5,.06); overflow: hidden;
  transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column;
}
.nw-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(212,160,23,.18); }

.nw-card-img {
  position: relative; height: 200px; overflow: hidden; background: var(--g200);
}
.nw-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.nw-card:hover .nw-card-img img { transform: scale(1.04); }

.nw-card-img-placeholder {
  height: 200px; background: linear-gradient(135deg, var(--g200) 0%, #fef3c7 100%);
  display: flex; align-items: center; justify-content: center;
}
.nw-card-img-placeholder svg { opacity: .3; }

.nw-cat-badge {
  position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 500;
  padding: 4px 12px; border-radius: 9999px; background: rgba(245,200,66,.18);
  color: var(--g800); border: 1px solid rgba(245,200,66,.4); backdrop-filter: blur(4px);
}

.nw-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.nw-card-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 12px; color: var(--gray); }
.nw-card-meta svg { flex-shrink: 0; }
.nw-card-title { font-family: 'Kanit', sans-serif; font-size: 16px; font-weight: 600; color: var(--dark); margin: 0 0 8px; line-height: 1.4; }
.nw-card-desc { font-size: 13px; color: #6b5a3e; line-height: 1.6; margin: 0 0 16px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-card-participants { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--g800); margin-bottom: 14px; }

.nw-card-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px;
  border-radius: 8px; background: var(--g400); color: var(--dark);
  font-family: 'Kanit', sans-serif; font-size: 13px; font-weight: 600;
  text-decoration: none; margin-top: auto;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 3px 10px rgba(245,200,66,.3);
}
.nw-card-btn:hover { background: var(--g600); color: #fff; box-shadow: 0 5px 18px rgba(212,160,23,.4); transform: translateY(-1px); text-decoration: none; }

/* empty */
.nw-empty { grid-column: 1/-1; text-align: center; padding: 64px 24px; color: var(--gray); }
.nw-empty svg { margin: 0 auto 16px; opacity: .35; }
.nw-empty p { margin: 0; font-size: 15px; }

@media (max-width: 640px) {
  .nw-hero { padding: 48px 16px 64px; }
  .nw-grid { grid-template-columns: 1fr; gap: 16px; }
  .nw-grid-wrap { padding: 16px 16px 48px; }
  .nw-search-wrap { padding: 20px 16px 0; }
}
