/* ===================================================================
   สไตล์กลางของหน้าบทความทุกหน้าใน /knowledge/
   แยกเป็นไฟล์เดียวเพราะบทความจะมีหลายสิบหน้า แก้ที่นี่ที่เดียวพอ
   ใช้ตัวแปรสีชุดเดียวกับหน้าลงทะเบียน จะได้เป็นแบรนด์เดียวกัน
   =================================================================== */
:root {
  --ink: #0a2036;
  --muted: #5a6b7d;
  --paper: #eef6fd;
  --panel: #ffffff;
  --deep: #0b2e63;
  --deep-2: #14428a;
  --green: #2f9e33;
  --green-dark: #22812b;
  --leaf: #6dcb4f;
  --blue: #06224d;
  --line: #d6e4f2;
  --shadow: 0 24px 70px rgba(11, 46, 99, 0.16);
  --font-body: "Noto Sans Thai", "Segoe UI", sans-serif;
  --font-heading: "Anuphan", "Noto Sans Thai", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fcff 0%, var(--paper) 60%, #e3eefb 100%);
  font-family: var(--font-body);
  line-height: 1.75;
  font-size: 17px;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--deep-2); }
.shell { width: min(760px, calc(100% - 36px)); margin: 0 auto; }
.shell-wide { width: min(1100px, calc(100% - 36px)); margin: 0 auto; }

/* ---------- แถบบน ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid rgba(214, 228, 242, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}
.topbar-inner {
  min-height: 68px; display: flex; align-items: center;
  justify-content: space-between; gap: 18px;
}
.brand-lockup { display: flex; align-items: center; gap: 16px; }
.brand-lockup img { width: auto; object-fit: contain; }
.brand-lockup .trol { height: 28px; }
.brand-lockup .speedy { height: 34px; }

/* ---------- ปุ่ม ---------- */
.button {
  display: inline-flex; min-height: 48px; align-items: center; justify-content: center;
  gap: 10px; border: 0; border-radius: 8px; padding: 12px 22px;
  background: var(--green-dark); color: #fff;
  font-family: var(--font-heading); font-size: 15px; font-weight: 900;
  line-height: 1.2; cursor: pointer; text-decoration: none;
  box-shadow: 0 14px 30px rgba(34, 129, 43, 0.28);
  transition: background 0.15s ease, transform 0.15s ease;
}
.button:hover { background: var(--green); transform: translateY(-1px); }
.button.navy { background: var(--deep); box-shadow: none; }
.button.navy:hover { background: var(--deep-2); }

/* ---------- เส้นทางนำทาง ---------- */
.crumbs { padding: 22px 0 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- หัวบทความ ---------- */
.article-head { padding: 12px 0 8px; }
.article-head h1 {
  font-family: var(--font-heading); font-weight: 900;
  font-size: clamp(28px, 4.2vw, 40px); line-height: 1.28;
  margin: 10px 0 14px; color: var(--deep);
}
.article-meta { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 16px; }
.lede { font-size: 19px; color: #24384f; margin: 18px 0 0; }

/* ---------- เนื้อบทความ ---------- */
article { padding: 8px 0 40px; }
article h2 {
  font-family: var(--font-heading); font-weight: 900;
  font-size: clamp(22px, 3vw, 28px); line-height: 1.35;
  margin: 44px 0 14px; color: var(--deep);
  padding-top: 18px; border-top: 3px solid var(--line);
}
article h3 {
  font-family: var(--font-heading); font-weight: 800;
  font-size: 19px; margin: 28px 0 8px; color: var(--deep-2);
}
article p { margin: 14px 0; }
article ul, article ol { margin: 14px 0; padding-left: 24px; }
article li { margin: 8px 0; }
article strong { color: var(--deep); }

/* ---------- ตาราง ---------- */
.table-wrap { overflow-x: auto; margin: 22px 0; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; background: var(--panel); }
th, td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--paper); font-weight: 800; color: var(--deep); }

/* ---------- กล่องเน้น ---------- */
.callout {
  margin: 26px 0; padding: 20px 22px; border-radius: 12px;
  background: #e9f7e4; border-left: 5px solid var(--green);
}
.callout.navy { background: #e8f2ff; border-left-color: var(--deep-2); }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout-title { font-family: var(--font-heading); font-weight: 900; color: var(--deep); }

/* ---------- กล่องชวนลงทะเบียน ---------- */
.cta-box {
  margin: 40px 0; padding: 28px; border-radius: 16px; color: #fff;
  background:
    radial-gradient(circle at 85% 10%, rgba(127, 212, 99, 0.3), transparent 45%),
    linear-gradient(180deg, #0a2c5e, #061c3f);
  box-shadow: var(--shadow);
}
.cta-box h2 {
  border: 0; padding: 0; margin: 0 0 10px; color: #fff;
  font-size: clamp(21px, 3vw, 26px);
}
.cta-box p { color: #cbe3f8; margin: 0 0 20px; }
.cta-box .fine { font-size: 14px; color: #8fb4dd; margin: 16px 0 0; }

/* ---------- บทความที่เกี่ยวข้อง ---------- */
.related { margin: 48px 0 0; }
.related h2 { border-top: 3px solid var(--line); }
.related-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.related-card {
  display: block; padding: 18px 20px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.related-card:hover { border-color: var(--green); transform: translateY(-2px); }
.related-card .kicker { font-size: 13px; color: var(--green); font-weight: 800; }
.related-card .t { font-family: var(--font-heading); font-weight: 800; margin-top: 4px; line-height: 1.4; }

/* ---------- หน้ารวมบทความ ---------- */
.hub-head { padding: 34px 0 10px; }
.hub-head h1 {
  font-family: var(--font-heading); font-weight: 900;
  font-size: clamp(28px, 4.2vw, 40px); margin: 8px 0 12px; color: var(--deep);
}
.hub-section { margin: 40px 0; }
.hub-section > h2 {
  font-family: var(--font-heading); font-weight: 900; font-size: 22px;
  color: var(--deep); margin: 0 0 6px;
}
.hub-section > p.sub { color: var(--muted); margin: 0 0 18px; font-size: 15.5px; }
.hub-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.soon {
  padding: 18px 20px; border-radius: 12px; border: 1px dashed var(--line);
  color: var(--muted); font-size: 15px; background: rgba(255, 255, 255, 0.5);
}

/* ---------- ท้ายหน้า ---------- */
footer { padding: 34px 0; color: #d8e7f7; background: #051730; margin-top: 50px; }
.footer-inner { display: flex; justify-content: space-between; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 14.5px; }
footer a { color: #8ade6d; }
.footer-logos { display: flex; gap: 18px; align-items: center; }
.footer-logos img { max-height: 30px; width: auto; filter: brightness(0) invert(1); }

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .brand-lockup .speedy { height: 28px; }
  .brand-lockup .trol { height: 24px; }
  .cta-box { padding: 22px 20px; }
  .button { width: 100%; }
}
