/* ═══════════════════════════════════════
   news.css
   ═══════════════════════════════════════ */

/* ── Tab bar ─────────────────────────── */
.news-tabs-bar {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  position: sticky; top: 72px; z-index: 100;
}
.news-tabs {
  display: flex; overflow-x: auto; gap: 0;
  max-width: 1320px; margin: 0 auto; padding: 0 1.5rem;
  scrollbar-width: none;
}
.news-tabs::-webkit-scrollbar { display: none; }
.news-tab {
  white-space: nowrap; padding: .9rem 1.4rem;
  font-size: .99rem; font-weight: 300; color: #888;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: color .2s, border-color .2s;
}
.news-tab:hover  { color: #333; }
.news-tab.active { color: #1a1a2e; border-bottom-color: #1a1a2e; font-weight: 300; }

/* ── Sub-tabs ────────────────────────── */
.news-subtabs {
  display: flex; justify-content: center;
  background: #f3f4f6; border-radius: 6px;
  padding: 4px; gap: 0;
  margin: .3rem auto .54rem;
  width: fit-content;
}
.news-subtab {
  padding: .28rem .85rem; border-radius: 4px;
  font-size: .99rem; font-weight: 300;
  border: none; color: #555;
  text-decoration: none; transition: all .2s;
}
.news-subtab:hover { color: #1a1a2e; }
.news-subtab.active { background: #1a1a2e; color: #fff; }

/* ── Page wrapper ────────────────────── */
.news-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: .75rem 1.5rem 5rem;
}

/* ══════════════════════════════════════
   CARD GRID
   ══════════════════════════════════════ */

/* ── Card shell ──────────────────────── */

.nc-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease;
  height: 100%;
}
.nc-card:hover {
  transform: translateY(-4px);
  color: inherit;
  text-decoration: none;
}

/* ── Image wrap — 8:5 ───────────────── */
.nc-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 62.5%; /* 8:5 ratio */
  overflow: hidden;
  background: #e8eceb;
  flex-shrink: 0;
  border-radius: 14px;
}

.nc-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform .35s ease;
}
.nc-card:hover .nc-img { transform: scale(1.05); }

.nc-img-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 2.8rem;
} 

/* ── Badges บนรูป ─────────────────────── */
.nc-badge-new {
  position: absolute; top: 10px; left: 10px;
  background: #ef4444; color: #fff;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .05em;
  padding: .18rem .65rem; border-radius: 20px;
  z-index: 2;
}
.nc-badge-ita {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(255,255,255,.92);
  border-radius: 8px; padding: .2rem .55rem;
  display: flex; align-items: center; gap: .3rem;
  font-size: .72rem; font-weight: 700; color: #1d4ed8;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.nc-badge-ita i { font-size: .78rem; }

/* ── Card body ───────────────────────── */
.nc-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: .75rem .2rem .5rem;
  gap: .3rem;
}

/* Category label */
.nc-cat {
  font-size: .72rem;
  font-weight: 500;
  color: #fff;
  background: #2d6a4f;
  display: inline-block;
  padding: .18rem .7rem;
  border-radius: 20px;
  align-self: flex-start;
  margin-bottom: .1rem;
  letter-spacing: .02em;
}

/* Date */
.nc-date {
  font-size: .83rem;
  font-weight: 300;
  color: #9F9F9F;
}

/* Title */
.nc-title {
  font-size: .99rem;
  font-weight: 500;
  color: #585858;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}
.nc-card:hover .nc-title { color: var(--g-600); }

/* Excerpt */
.nc-excerpt {
  font-size: .86rem;
  font-weight: 300;
  color: #9F9F9F;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Footer ของ card */
.nc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: .6rem;
  border-top: 1px solid #f3f4f6;
  gap: .5rem;
}

/* SDG badges */
.sdg-badges {
  display: flex; flex-wrap: wrap; gap: .28rem;
}
.sdg-badge-img {
  width: 24px; height: 24px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Read more arrow */
.nc-read-more {
  font-size: .75rem;
  font-weight: 600;
  color: #2d6a4f;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .2rem;
  margin-left: auto;
}

/* ══════════════════════════════════════
   DOC TABLE
   ══════════════════════════════════════ */
.doc-search-wrap { margin: 0 auto .75rem; display: flex; justify-content: center; }
.doc-search-form {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: .55rem 1.1rem;
  width: 100%;
  max-width: 560px;
}
.doc-search-form i { color: #9ca3af; flex-shrink: 0; }
.doc-search-form input {
  flex: 1;
  border: none;
  outline: none;
  font-size: .88rem;
  font-family: 'Mitr', sans-serif;
  font-weight: 300;
  color: #333;
  background: transparent;
}

/* doc-table + doc-btn → procurement.css */

/* ══════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════ */
.pag-wrap { display: flex; justify-content: center; gap: .35rem; margin-top: 3rem; }
.pag-btn {
  min-width: 38px; height: 38px; padding: 0 .6rem;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: .85rem; text-decoration: none; color: #555;
  border: 1px solid #e5e7eb; background: #fff; transition: all .15s;
}
.pag-btn:hover,
.pag-btn.active { background: #52796f; color: #fff; border-color: #52796f; }
.pag-btn.disabled { opacity: .4; pointer-events: none; }

/* ── Empty state ─────────────────────── */
.news-empty { text-align: center; padding: 5rem 1rem; color: #bbb; }
.news-empty i { font-size: 3rem; display: block; margin-bottom: 1rem; }

/* ── Responsive ──────────────────────── */
@media (max-width: 768px) {
  .news-wrap { padding: 1.5rem 1rem 3rem; }
  .nc-title  { font-size: .88rem; }
}
@media (max-width: 576px) {
  .nc-title { font-size: .85rem; }
}