/* สไตล์หน้าบทความ — โทนเดียวกับ index.html (teal + ไวน์แดง + plum + ivory) */
:root {
  --teal-1: #0D5257; --teal-2: #1F7A87; --teal-3: #35AF9E;
  --teal-4: #7CCBC4; --teal-5: #BEE3DF;
  --wine: #7D2440; --wine-2: #A63A56; --plum: #8B5697;
  --text: #122e33; --muted: #0f4a52; --line: #BEE3DF;
  --ivory: #fbf8f1; --bg-soft: #f2f9f7;
  --h1: #072d30; --h3: #10535f;
  --shadow: 0 10px 30px -12px rgba(13,82,87,.18);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Plus Jakarta Sans", "Anuphan", "Segoe UI", "Leelawadee UI", Tahoma, sans-serif;
  font-size: 18px; font-weight: 500; line-height: 1.75;
  color: var(--text); background: #fff;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* nav — ให้เหมือนหน้าหลัก */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20,39,37,.94); border-bottom: 1px solid rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.topnav .bar {
  max-width: 1100px; margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; gap: 14px; min-height: 68px;
}
.topnav .brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.topnav .brand svg { width: 34px; height: 34px; flex-shrink: 0; border-radius: 7px; }
.topnav .wordmark { font-size: 1.08rem; font-weight: 700; letter-spacing: -.025em; color: #fff; }
.topnav .wordmark i { font-style: normal; font-weight: 600; }
.topnav .back {
  margin-left: auto; color: #cfe6e4; text-decoration: none; font-size: .92rem;
  padding: 8px 14px; border-radius: 9px; border: 1px solid rgba(255,255,255,.2);
}
.topnav .back:hover { color: #fff; background: rgba(255,255,255,.09); }

/* หัวบทความ */
.article-head {
  padding: 54px 0 40px; color: #fff;
  background:
    radial-gradient(circle at 85% 25%, rgba(166,58,86,.14), transparent 30%),
    radial-gradient(circle at 8% 90%, rgba(158,95,169,.13), transparent 40%),
    linear-gradient(125deg, var(--h1) 0%, #0a3e41 48%, var(--h3) 100%);
}
.tag {
  display: inline-block; margin-bottom: 14px; padding: 5px 13px; border-radius: 999px;
  background: rgba(204,164,205,.2); color: #E7C9E8;
  font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
}
.article-head h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.3; letter-spacing: -.02em; margin-bottom: 14px; }
.article-head .lead { color: #ded2f2; font-size: 1.05rem; line-height: 1.8; }
.article-head .meta { margin-top: 18px; color: #9fc5c2; font-size: .85rem; }

/* เนื้อบทความ */
article { padding: 44px 0 20px; }
article h2 {
  font-size: 1.42rem; line-height: 1.35; color: var(--h1);
  margin: 40px 0 14px; letter-spacing: -.01em;
}
article h2:first-child { margin-top: 0; }
/* หัวข้อย่อยมีไอคอนประกอบ */
article > h2 { display: flex; align-items: center; gap: 13px; }
.h2-ic {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--teal-1), var(--teal-2));
  box-shadow: 0 10px 22px -12px rgba(13,82,87,.7);
}
article > h2:nth-of-type(2) .h2-ic { background: linear-gradient(145deg, #2F5468, #1F7A87); }
article > h2:nth-of-type(3) .h2-ic { background: linear-gradient(145deg, #5C4B72, var(--plum)); }
article > h2:nth-of-type(4) .h2-ic { background: linear-gradient(145deg, #7C3960, var(--wine-2)); }
article > h2:nth-of-type(5) .h2-ic { background: linear-gradient(145deg, var(--wine), var(--wine-2)); }
.h2-ic svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 600px) {
  article > h2 { gap: 10px; }
  .h2-ic { width: 32px; height: 32px; border-radius: 9px; }
  .h2-ic svg { width: 17px; height: 17px; }
}
article h3 { font-size: 1.1rem; color: var(--teal-2); margin: 26px 0 10px; }
article p { margin-bottom: 18px; }
article ul, article ol { margin: 0 0 20px 22px; }
article li { margin-bottom: 9px; }
article strong { color: var(--h1); }
article a { color: var(--wine-2); }
.article-figure { margin: 28px 0; }
.article-figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow);
}
.article-figure figcaption {
  margin-top: 9px; color: var(--muted); font-size: .82rem; line-height: 1.55;
}
.source-note {
  margin-top: 24px; color: var(--muted); font-size: .82rem; line-height: 1.6;
}
.note {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--ivory); border-left: 3px solid var(--wine-2);
  border-radius: 0 12px 12px 0; padding: 16px 20px; margin: 26px 0;
}
.note b { color: var(--wine); white-space: nowrap; }
.note p { margin: 0; font-size: .95rem; color: var(--muted); }
.steps-box {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 14px; padding: 22px 24px; margin: 26px 0;
}
.steps-box h3 { margin-top: 0; color: var(--h1); }
.steps-box ol { margin-bottom: 0; }
table {
  width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .95rem;
  display: block; overflow-x: auto;
}
th, td { padding: 11px 14px; border: 1px solid var(--line); text-align: left; }
th { background: var(--bg-soft); color: var(--h1); font-weight: 700; }

/* CTA ท้ายบทความ */
.article-cta {
  margin: 44px 0 0; padding: 32px 34px; border-radius: 20px; color: #fff;
  background: linear-gradient(125deg, var(--h1) 0%, #0a3e41 55%, var(--h3) 100%);
}
.article-cta h2 { color: #fff; margin: 0 0 8px; font-size: 1.3rem; }
.article-cta p { color: #cfe6e4; margin-bottom: 20px; font-size: .98rem; }
.article-cta a {
  display: inline-block; padding: 13px 26px; border-radius: 12px; text-decoration: none;
  color: #fff; font-weight: 800;
  background: linear-gradient(135deg, var(--wine-2), var(--wine));
  box-shadow: 0 16px 32px -16px rgba(166,58,86,.7);
}

.more { margin: 40px 0 0; padding-top: 26px; border-top: 1px solid var(--line); }
.more h2 { font-size: 1.1rem; margin: 0 0 14px; }
.more ul { list-style: none; margin: 0; }
.more li { margin-bottom: 10px; }
.more a { color: var(--teal-2); text-decoration: none; font-weight: 600; }
.more a:hover { color: var(--wine-2); }

footer {
  margin-top: 48px; padding: 30px 0; color: #a9cfcb; font-size: .88rem;
  background: #041b1d;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
footer strong { color: #fff; }
footer a { color: var(--teal-4); }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .article-head { padding: 40px 0 32px; }
  .note { flex-direction: column; gap: 6px; }
  .note b { white-space: normal; }
  .article-cta { padding: 26px 22px; }
}
