/* NBT Central - government style overrides (loaded after template style.css) */

:root {
  --nbt-navy: #6013d2;
  --nbt-navy-dark: #4a0f9e;
  --nbt-blue: #7b22ff;
  --nbt-red: #6013d2;
  --nbt-gold: #f5b40a;
  --nbt-bg: #f6f4fb;
  --nbt-border: #e4def3;
  --nbt-text: #221a33;
  --nbt-text-light: #5f5674;
}

/* โหมดไว้ทุกข์: ทั้งหน้าขาวดำ */
html { filter: grayscale(1); }

body {
  font-family: 'Sarabun', 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--nbt-bg);
  color: var(--nbt-text);
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6, .card-title, .show_toppic {
  font-family: 'Sarabun', 'Prompt', sans-serif;
  color: var(--nbt-text);
}

a { color: var(--nbt-blue); }
a:hover { color: var(--nbt-navy); text-decoration: none; }

/* ---------- Utility top bar ---------- */
.nbt-utility {
  background: var(--nbt-navy-dark);
  color: #cdd8ea;
  font-size: 14px;
}
.nbt-utility a { color: #cdd8ea; }
.nbt-utility a:hover { color: #e6dcfb; }
.nbt-utility .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  flex-wrap: wrap;
}
.nbt-utility-links { display: flex; gap: 18px; padding: 6px 0; }
.nbt-utility-date { padding: 6px 0; color: #fff; }

/* ---------- Header ---------- */
header#header, .sticky, header {
  background: #ffffff !important;
  border-bottom: 3px solid var(--nbt-navy);
  box-shadow: 0 2px 6px rgba(74, 15, 158, 0.10);
}
header#header .nav-link { color: var(--nbt-navy) !important; font-weight: 600; }
header#header .nav-link:hover { color: var(--nbt-blue) !important; }
.navbar-top-left-menu { list-style: none; padding: 0; margin: 0; display: flex; }
.navbar-top-left-menu .nav-item { padding: 4px 2px; }
.navbar-top-left-menu .nav-item + .nav-item { margin-left: 6px; }
.navbar-top-left-menu .nav-item + .nav-item::before {
  content: "|";
  color: var(--nbt-border);
  margin-right: 8px;
}
.social-media { list-style: none; display: flex; margin: 0; }
.social-media li a {
  background: var(--nbt-navy) !important;
  color: #fff !important;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
}
.social-media li + li { margin-left: 8px; }
#mini-search-input {
  border: 1px solid var(--nbt-border);
  border-radius: 4px;
  font-size: 14px;
  padding: 4px 10px;
  height: auto !important;
}
#header form { display: flex; gap: 8px; align-items: center; }

/* ---------- Breaking ticker ---------- */
.flash-news-banner {
  background: #fff;
  border-bottom: 1px solid var(--nbt-border);
}
.flash-news-banner .badge-dark {
  background: var(--nbt-blue) !important;
  font-weight: 600;
  white-space: nowrap;
}
.nbt-ticker {
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
}
.nbt-ticker-track {
  display: inline-block;
  white-space: nowrap;
  animation: nbt-ticker 55s linear infinite;
  color: var(--nbt-text);
  font-size: 15px;
}
.nbt-ticker:hover .nbt-ticker-track { animation-play-state: paused; }
.nbt-ticker-track a { color: var(--nbt-text); margin: 0 28px; }
@keyframes nbt-ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Banner ---------- */
.nbt-banner img { display: block; width: 100%; height: auto; }

/* ---------- Quick link cards ---------- */
.nbt-quick {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--nbt-border);
  border-left: 4px solid var(--nbt-navy);
  border-radius: 6px; padding: 14px 16px; height: 100%;
  color: var(--nbt-navy); font-weight: 600;
  transition: box-shadow .15s ease, transform .15s ease;
}
.nbt-quick:hover {
  box-shadow: 0 4px 14px rgba(74, 15, 158, .16);
  transform: translateY(-1px);
  color: var(--nbt-navy);
}
.nbt-quick .mdi { font-size: 26px; color: var(--nbt-blue); }

/* ---------- Section titles ---------- */
.nbt-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 21px; font-weight: 700; color: var(--nbt-navy);
  margin: 0 0 4px;
}
.nbt-section-title::before {
  content: ""; width: 6px; height: 24px;
  background: var(--nbt-blue); border-radius: 2px; flex: 0 0 auto;
}
.nbt-section-title .nbt-more {
  margin-left: auto; font-size: 14px; font-weight: 500;
  color: var(--nbt-blue);
}

/* ---------- Live TV ---------- */
.live-frame {
  position: relative; width: 100%; padding-top: 56.25%;
  background: #000; border-radius: 6px; overflow: hidden;
}
.live-frame iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: 0;
}
.nbt-live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--nbt-navy); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 3px 12px; border-radius: 3px;
}
.nbt-live-dot {
  width: 8px; height: 8px; background: #fff; border-radius: 50%;
  animation: nbt-blink 1.4s infinite;
}
@keyframes nbt-blink { 50% { opacity: .25; } }

/* ---------- News cards ---------- */
.card {
  border: 1px solid var(--nbt-border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(34, 26, 51, .06);
}
.nbt-lead-img {
  position: relative; overflow: hidden; border-radius: 8px 8px 0 0;
}
.nbt-lead-img img { width: 100%; height: auto; display: block; }
.nbt-lead-body {
  background: #fff; padding: 18px 20px 16px;
  border-radius: 0 0 8px 8px;
  border: 1px solid var(--nbt-border); border-top: 0;
}
.nbt-lead-title {
  font-size: 22px; font-weight: 700; line-height: 1.45;
  color: var(--nbt-navy); margin: 10px 0 8px;
}
.nbt-lead-title a { color: inherit; }
.nbt-side-item {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--nbt-border);
}
.nbt-side-item:last-child { border-bottom: 0; }
.nbt-side-item img {
  width: 108px; height: 74px; object-fit: cover;
  border-radius: 4px; flex: 0 0 auto;
}
.nbt-side-title {
  font-size: 15.5px; font-weight: 600; line-height: 1.4;
  margin: 2px 0 4px;
}
.nbt-side-title a { color: var(--nbt-text); }
.nbt-side-title a:hover { color: var(--nbt-blue); }
.nbt-meta { font-size: 13px; color: var(--nbt-text-light); }

.nbt-badge-cat {
  display: inline-block;
  background: #efe9fb; color: #4a0f9e;
  font-size: 12.5px; font-weight: 600;
  padding: 2px 10px; border-radius: 3px;
}
.nbt-news-card {
  background: #fff; border: 1px solid var(--nbt-border);
  border-radius: 8px; overflow: hidden; height: 100%;
  transition: box-shadow .15s ease;
}
.nbt-news-card:hover { box-shadow: 0 5px 16px rgba(34, 26, 51, .14); }
.nbt-news-card img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
}
.nbt-news-body { padding: 12px 14px 14px; }
.nbt-news-title {
  font-size: 15.5px; font-weight: 600; line-height: 1.42;
  margin: 6px 0 0; color: var(--nbt-text);
}

/* ---------- Media list (events / procurement) ---------- */
.nbt-media-row {
  display: flex; gap: 16px; padding: 16px 0;
  border-bottom: 1px solid var(--nbt-border);
  align-items: flex-start;
}
.nbt-media-row:first-of-type { padding-top: 4px; }
.nbt-media-row:last-of-type { border-bottom: 0; }
.nbt-media-row img {
  width: 168px; height: 108px; object-fit: cover;
  border-radius: 6px; flex: 0 0 auto;
}
.nbt-media-title {
  font-size: 17px; font-weight: 600; line-height: 1.45;
  margin: 4px 0 6px;
}
.nbt-media-title a { color: var(--nbt-navy); }

/* ---------- Footer ---------- */
footer .footer-top, footer .footer-bottom, .collapse {
  background: var(--nbt-navy-dark) !important;
}
footer h5, footer h3 { color: #dce5f2 !important; font-weight: 500; }
footer .footer-border-bottom { border-color: rgba(255,255,255,.14) !important; }
footer { color: #c6d2e4; }
footer a { color: #fff; }

/* ---------- Template compatibility ---------- */
.rotate-img { width: 100%; }
h2, h3 { font-size: 17px; }
.text-danger { color: var(--nbt-red) !important; }
.badge-danger { background: var(--nbt-red) !important; }

@media (max-width: 991px) {
  .nbt-media-row img { width: 124px; height: 84px; }
  .nbt-lead-title { font-size: 19px; }
}
