/* ธีมพื้นขาว: กล่องข้อความโทนน้ำเงิน-เหลือง / จุดสำคัญ (ผู้ต้องหา เตือนภัย) สีแดง */
:root {
  --bg: #ffffff;
  --text: #16223d;
  --muted: #5b6b86;
  --navy: #0d2a5c;
  --navy-2: #163d7e;
  --blue-soft: #eaf1fc;
  --blue-line: #b9cdee;
  --yellow: #f5c518;
  --yellow-soft: #fff6d3;
  --red: #d0102b;
  --red-dark: #9c0b20;
  --red-soft: #fff0f1;
  --white: #ffffff;
  --radius: 14px;
  --head: "Kanit", system-ui, sans-serif;
  --body: "Sarabun", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
}
a { color: var(--navy-2); }
img { max-width: 100%; display: block; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- แถบหัว (น้ำเงิน ขอบเหลือง) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--navy);
  border-bottom: 4px solid var(--yellow);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--yellow); background: #000;
}

/* ภาพปก: ภาพหน้าปกรายงานประจำเดือน + ตราคอมมานโด + SSD4 */
.cover {
  position: relative; overflow: hidden; color: var(--white);
  background:
    linear-gradient(90deg, rgba(8, 26, 60, .92) 0%, rgba(8, 26, 60, .55) 55%, rgba(8, 26, 60, .25) 100%),
    url("../img/cover-bg.jpg") center / cover no-repeat, var(--navy);
  border-bottom: 5px solid var(--red);
}
.cover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--yellow); transform: translateY(-5px); }
.cover-inner { position: relative; display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); min-height: clamp(220px, 34vw, 420px); padding-block: 28px; }
.cover-badge { width: clamp(96px, 17vw, 210px); flex: none; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .55)); }
.cover-text { flex: 1; min-width: 0; }
.cover-kicker {
  display: inline-block; background: var(--red); color: var(--white);
  font: 700 clamp(13px, 1.6vw, 18px) var(--head); padding: 4px 14px; transform: skewX(-8deg);
}
.cover-title {
  margin: 10px 0 6px; font: 800 italic clamp(30px, 5.6vw, 68px)/1.1 var(--head);
  text-shadow: 0 4px 0 rgba(0, 0, 0, .45);
}
.cover-title em { color: var(--yellow); font-style: inherit; }
.cover-sub { margin: 0; font: 500 clamp(15px, 1.9vw, 22px) var(--head); color: #dbe6f7; }
.cover-ssd4 { position: absolute; top: 18px; right: 16px; width: clamp(110px, 16vw, 220px); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); }
@media (max-width: 600px) {
  .cover-inner { flex-direction: column; align-items: flex-start; padding-top: 70px; }
  .cover-ssd4 { top: 14px; }
}

/* ภาพข่าว: โลโก้ SSD4 มุมขวาบน + แถบหัวข้อข่าวย่อ (ตัวขาว พื้นแดง-น้ำเงิน) */
.stamp { position: relative; container-type: inline-size; }
.media .stamp-logo { position: absolute; top: 3cqw; right: 3cqw; width: 14cqw; min-width: 46px; height: auto; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .7)); pointer-events: none; }
.stamp-head {
  position: absolute; left: 3cqw; bottom: 3cqw; max-width: 78%;
  display: flex; align-items: stretch; overflow: hidden;
  border-radius: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  font: 600 clamp(11px, 2.8cqw, 19px)/1.35 var(--head); color: var(--white);
}
.stamp-head .t {
  flex: none; display: flex; align-items: center;
  background: var(--red); padding: .9cqw 1.8cqw; font-weight: 700;
}
.stamp-head .h {
  min-width: 0; background: rgba(13, 42, 92, .92); border-left: 3px solid var(--yellow);
  padding: .9cqw 2cqw;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.brand-name { font: 700 18px/1.1 var(--head); }
.brand-name small { display: block; font: 400 12px/1.3 var(--body); color: #c9d6ee; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a {
  color: var(--white); text-decoration: none; font: 500 15px var(--head);
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--yellow); color: var(--navy); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--yellow); color: var(--white); border-radius: 8px; padding: 6px 12px; font: 500 15px var(--head); }

@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; inset: 68px 0 auto 0; flex-direction: column; background: var(--navy); border-bottom: 4px solid var(--yellow); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
}

/* ---------- ตัวหนังสือวิ่ง ---------- */
.ticker {
  display: flex; align-items: stretch;
  background: var(--yellow-soft); border-bottom: 1px solid var(--yellow);
  font: 600 15px/1 var(--head); color: var(--navy);
}
.ticker-label {
  flex: none; display: flex; align-items: center;
  background: var(--red); color: var(--white); padding: 0 14px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); padding-right: 22px;
}
.ticker-view { flex: 1; overflow: hidden; padding: 10px 0; }
.ticker-track { display: flex; width: max-content; animation: ticker 30s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-run { display: flex; align-items: center; white-space: nowrap; }
.ticker-run a, .ticker-run span { color: var(--navy); text-decoration: none; padding: 0 4px; }
.ticker-run a:hover { color: var(--red); text-decoration: underline; }
.ticker-run i { color: var(--red); font-style: normal; padding: 0 16px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- ข่าวเด่น ---------- */
.hero { padding: 32px 0 28px; background: linear-gradient(180deg, var(--blue-soft), var(--bg)); }
.kicker {
  display: inline-block; background: var(--navy); color: var(--yellow);
  font: 600 13px var(--head); letter-spacing: .02em;
  padding: 4px 12px; border-radius: 4px; transform: skewX(-8deg);
}
.hero-grid { display: grid; gap: 24px; grid-template-columns: 1.15fr 1fr; align-items: center; margin-top: 16px; }
.hero h1, .page-title {
  font: 800 italic clamp(28px, 4.4vw, 50px)/1.2 var(--head);
  color: var(--navy); margin: 12px 0 8px;
}
.hero h1 em, .page-title .hl { color: var(--red); font-style: inherit; }
.hero p.sub, .lead { font-size: 19px; margin: 0 0 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 15px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: var(--white); text-decoration: none;
  font: 600 16px var(--head); padding: 10px 18px; border-radius: 10px;
  border: 2px solid transparent;
}
.btn:hover { background: var(--red-dark); }
.btn.ghost { background: var(--white); border-color: var(--navy); color: var(--navy); }
.btn.ghost:hover { background: var(--navy); color: var(--yellow); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.media {
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  border: 2px solid var(--navy); background: var(--blue-soft);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media iframe { width: 100%; height: 100%; border: 0; }
.gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; border: 2px solid var(--blue-line); cursor: zoom-in; }
.gallery a:hover { border-color: var(--yellow); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.gallery a:hover img { transform: scale(1.04); }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr 1fr; gap: 8px; } }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } }
.media-full { display: block; aspect-ratio: auto; cursor: zoom-in; }
.media-full img { height: auto; object-fit: contain; }
.placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(135deg, var(--blue-soft) 0 18px, #dbe7fa 18px 36px);
  color: var(--navy-2); font: 500 15px var(--head); padding: 16px;
}

.placeholder.brand-ph {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px;
  background: radial-gradient(circle at 50% 40%, var(--navy-2), var(--navy)); color: var(--yellow);
  font: 700 clamp(13px, 3.4cqw, 20px) var(--head);
}
.media .brand-ph img { width: 34%; height: auto; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid .media { order: -1; }
}

/* ---------- ตัวเลขสรุป (กล่องน้ำเงิน ตัวเลขเหลือง) ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--navy); border-bottom: 4px solid var(--yellow); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font: 800 32px/1.1 var(--head); color: var(--yellow); }
.stat span { color: var(--white); font-size: 15px; }

/* ---------- หัวข้อส่วน ---------- */
section.block { padding: 36px 0; }
.section-title {
  display: flex; align-items: center; gap: 12px;
  font: 700 26px/1.2 var(--head); color: var(--navy); margin: 0 0 18px;
}
.section-title::before { content: ""; width: 6px; height: 28px; background: var(--yellow); border-radius: 3px; box-shadow: 3px 0 0 var(--navy); }

/* ---------- ตัวกรอง + การ์ดคดี ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 18px; }
.filters .chips { margin-bottom: 0; }
.month-pick { display: flex; align-items: center; gap: 8px; font: 500 15px var(--head); color: var(--navy); }
.month-pick select {
  font: 500 15px var(--head); color: var(--navy); background: var(--blue-soft);
  border: 1px solid var(--blue-line); border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.more-row { display: flex; justify-content: center; margin-top: 22px; }
.more-row .btn { cursor: pointer; font-family: var(--head); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  background: var(--blue-soft); color: var(--navy); border: 1px solid var(--blue-line);
  font: 500 15px var(--head); padding: 6px 14px; border-radius: 999px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--navy); color: var(--yellow); border-color: var(--navy); }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  display: flex; flex-direction: column;
  background: var(--blue-soft); border: 1px solid var(--blue-line); border-top: 5px solid var(--yellow);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(13, 42, 92, .15); }
.card .media { border: 0; border-radius: 0; }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.tag { align-self: flex-start; background: var(--red); color: var(--white); font: 600 12px var(--head); padding: 2px 10px; border-radius: 4px; }
.card h3 { font: 700 19px/1.35 var(--head); color: var(--navy); margin: 0; }
.card .date { color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); }

/* ---------- เตือนภัย (สีแดง) ---------- */
.warn-band {
  background: var(--red); color: var(--white);
  border-radius: var(--radius); padding: 22px; display: grid; gap: 12px;
}
.warn-band h2 { margin: 0; font: 800 italic 26px var(--head); color: var(--yellow); }
.warn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.warn-list li { display: flex; gap: 10px; align-items: flex-start; }
.warn-list li::before {
  content: "!"; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--yellow); color: var(--red-dark); font: 800 16px/26px var(--head); text-align: center; margin-top: 2px;
}
.warn-band .btn.ghost { border-color: var(--white); }
.warn-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.warn-card { background: var(--red-soft); border: 1px solid #f3b9c1; border-top: 5px solid var(--red); border-radius: var(--radius); padding: 18px 20px; }
.warn-card h3 { margin: 0 0 8px; font: 700 21px var(--head); color: var(--red); }
.warn-card ul { margin: 0; padding-left: 20px; }

/* ---------- หน้าคดี ---------- */
.case-head { padding: 28px 0 12px; }
.case-title { font: 800 italic clamp(26px, 4vw, 44px)/1.25 var(--head); color: var(--navy); margin: 12px 0 6px; }
.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 20px 0; }
.fact { background: var(--blue-soft); border-left: 5px solid var(--yellow); border-radius: var(--radius); padding: 14px 16px; }
.fact small { display: block; color: var(--navy-2); font: 600 13px var(--head); }
.fact .big { font: 800 26px var(--head); color: var(--navy); }
.fact.red { background: var(--red); border-left-color: var(--red-dark); color: var(--white); font-weight: 700; }
.fact.red small { color: var(--yellow); }
.fact.navy { background: var(--navy); border-left-color: var(--yellow); color: var(--white); }
.fact.navy small { color: var(--yellow); }
.charge { background: var(--yellow-soft); border: 2px dashed var(--yellow); border-radius: var(--radius); padding: 16px 18px; margin: 20px 0; }
.charge b { color: var(--red); }
.charge .warrant { margin-top: 10px; background: var(--navy); color: var(--yellow); font-weight: 700; padding: 6px 12px; border-radius: 8px; }
/* พฤติการณ์แบบกราฟิกขั้นตอน: เส้นเวลา + ไอคอน + การ์ด (จอกว้างสลับซ้าย-ขวา) */
.steps-sub { margin: -8px 0 18px; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 18px; }
.steps::before {
  content: ""; position: absolute; top: 28px; bottom: 28px; left: 27px; width: 4px; border-radius: 2px;
  background: linear-gradient(var(--yellow), var(--navy-2) 70%, var(--red));
}
.step { position: relative; display: flex; align-items: flex-start; gap: 16px; }
.step-icon {
  position: relative; z-index: 1; flex: none; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy); color: var(--yellow);
  border: 4px solid var(--white); box-shadow: 0 0 0 2px var(--yellow), 0 6px 14px rgba(13, 42, 92, .25);
}
.step-icon svg { width: 28px; height: 28px; }
.step-card {
  position: relative; flex: 1; background: var(--white); border: 1px solid var(--blue-line); border-top: 4px solid var(--yellow);
  border-radius: var(--radius); padding: 12px 16px 14px; box-shadow: 0 6px 18px rgba(13, 42, 92, .08);
}
.step-card::before {
  content: ""; position: absolute; top: 18px; left: -9px; width: 16px; height: 16px; background: var(--white);
  border-left: 1px solid var(--blue-line); border-bottom: 1px solid var(--blue-line); transform: rotate(45deg);
}
.step-card p { margin: 6px 0 0; }
.step-no {
  display: inline-block; background: var(--yellow); color: var(--navy); font: 700 13px/1 var(--head);
  padding: 5px 10px; border-radius: 999px;
}
.money { color: var(--red); white-space: nowrap; }
.step-final .step-icon { background: var(--red); color: var(--white); box-shadow: 0 0 0 2px var(--red), 0 6px 14px rgba(208, 16, 43, .35); }
.step-final .step-card { background: var(--navy); color: var(--white); border-color: var(--navy); border-top-color: var(--red); }
.step-final .step-card::before { background: var(--navy); border-color: var(--navy); }
.step-final .step-no { background: var(--red); color: var(--white); }
.step-final .money { color: var(--yellow); }

@media (min-width: 900px) {
  .steps::before { left: 50%; margin-left: -2px; }
  .step { width: 50%; padding-right: 46px; }
  .step-icon { position: absolute; right: -29px; top: 0; }
  .step-card::before { left: auto; right: -9px; border: 0; border-top: 1px solid var(--blue-line); border-right: 1px solid var(--blue-line); }
  .step:nth-child(even) { margin-left: 50%; padding: 0 0 0 46px; }
  .step:nth-child(even) .step-icon { right: auto; left: -29px; }
  .step:nth-child(even) .step-card::before { right: auto; left: -9px; border: 0; border-left: 1px solid var(--blue-line); border-bottom: 1px solid var(--blue-line); }
  .step-final .step-card::before, .step-final:nth-child(even) .step-card::before { border-color: var(--navy); }
  .steps { gap: 6px; }
}

.timeline { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 12px; }
.timeline li { counter-increment: s; display: flex; gap: 14px; background: var(--blue-soft); border-radius: var(--radius); padding: 14px 16px; border: 1px solid var(--blue-line); }
.timeline li::before {
  content: counter(s); flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--yellow); color: var(--navy); font: 800 18px/34px var(--head); text-align: center;
}
.quote { background: var(--blue-soft); border-left: 5px solid var(--navy); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 18px; margin: 0; }
.quote b { color: var(--navy); }
.opinion { background: var(--yellow); color: var(--navy); border-radius: var(--radius); padding: 16px 18px; }
.opinion h3 { margin: 0 0 6px; font: 700 18px var(--head); }
.slogan { text-align: center; background: var(--navy); color: var(--yellow); font: 700 italic 22px/1.4 var(--head); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.two { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

/* ---------- ติดต่อ / ท้ายเว็บ ---------- */
.contact-card { background: var(--blue-soft); border-top: 5px solid var(--yellow); border-radius: var(--radius); padding: 22px; }
.contact-card h2 { margin: 0 0 8px; font: 700 21px var(--head); color: var(--navy); }
.social { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.social-btn {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 1px solid var(--blue-line); border-left: 5px solid var(--yellow);
  border-radius: 12px; padding: 10px 14px; text-decoration: none;
  color: var(--navy); font: 600 16px/1.3 var(--head);
  transition: transform .15s ease, box-shadow .15s ease;
}
.social-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(13, 42, 92, .15); }
.social-btn svg { width: 40px; height: 40px; flex: none; }
.social-btn small { display: block; color: var(--muted); font: 400 13px var(--body); }
.footer .social { grid-template-columns: 1fr; }
.footer .social-btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .15); border-left-color: var(--yellow); color: var(--white); }
.footer .social-btn small { color: #c9d6ee; }
.footer .social-btn svg { width: 32px; height: 32px; }
.footer { background: var(--navy); border-top: 4px solid var(--yellow); margin-top: 40px; padding: 28px 0 36px; color: #c9d6ee; font-size: 15px; }
.footer a { color: var(--yellow); }
.footer .cols { display: grid; gap: 20px; grid-template-columns: 1.3fr 1fr; }
.footer h4 { margin: 0 0 6px; color: var(--yellow); font: 600 16px var(--head); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
@media (max-width: 760px) { .footer .cols { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
  .ticker-track { animation: none; width: auto; }
  .ticker-run { white-space: normal; flex-wrap: wrap; line-height: 1.5; }
  .ticker-run[aria-hidden] { display: none; }
}
