/* หน้าแรก · แบบ 05 "คุณทำงานอะไร" (2026-11-07)
   ใช้เฉพาะ public/index.html · ต่อจาก site.css + articles.css · ห้าม inline style (CSP) */

.h5-hero { padding: var(--s7) 0 var(--s4); }
.h5-eyebrow { font-size: 14px; color: var(--muted); letter-spacing: .02em; margin: 0; }
.h5-hero h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.32; letter-spacing: -.01em; margin: var(--s2) 0 0; max-width: 18em; }
.h5-lead { font-size: 18px; color: var(--muted); margin: var(--s3) 0 var(--s6); max-width: 40em; }

/* ---------- กล่องตามงาน ---------- */
.roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); list-style: none; padding: 0; margin: 0; }
.role { border-radius: 24px; padding: 22px 20px 18px; display: flex; flex-direction: column; gap: var(--s3); }
.role.r-shop { background: var(--peach); }
.role.r-clip { background: var(--mint); }
.role.r-office { background: var(--butter); }
.role.r-app { background: var(--peri); }
.role-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--surface); display: grid; place-items: center; flex: none; }
.role-ic svg { width: 26px; height: 26px; }
.role-who { font: 700 14px/1.4 var(--font-head); color: var(--ink-2); margin: 0; }
.role h2 { font-size: 22px; line-height: 1.4; margin: -4px 0 0; }
.role h2 a { color: inherit; text-decoration: none; }
.role h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.role ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.role li a { display: flex; gap: 10px; background: var(--role-chip); padding: 10px 12px; border-radius: 12px; font-size: 15px; line-height: 1.45; color: var(--text); text-decoration: none; transition: background .15s; }
.role li a::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--text); margin-top: 9px; }
.role li a:hover { background: var(--role-chip-hover); }
.role-more { font-size: 14px; font-weight: 600; color: var(--text); }
.role-next { margin-top: auto; padding-top: var(--s3); border-top: 1px solid rgb(var(--ink-rgb) / .15); font-size: 14px; line-height: 1.5; color: var(--text); text-decoration: none; display: block; }
.role-next b { font-weight: 700; }
.role-next span { display: block; color: var(--muted); font-size: 13.5px; }
.role-next:hover b { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- ค้นหา ---------- */
.h5-ask { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s6); font-size: 15px; color: var(--muted); }
.h5-ask form { flex: 1; min-width: 260px; display: flex; align-items: center; border: 1.5px solid var(--text); border-radius: 999px; padding: 5px 5px 5px 20px; background: var(--surface); }
.h5-ask input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--text); padding: 8px 0; }
.h5-ask button { border: 0; background: var(--btn-bg); color: var(--btn-ink); border-radius: 999px; padding: 10px 20px; font: 700 15px/1 var(--font-head); cursor: pointer; }
.h5-ask form:focus-within { box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---------- คอร์ส ---------- */
.h5-courses .c-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.c5 { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s4); align-items: start; padding: var(--s4); border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.c5 img { width: 112px; height: auto; aspect-ratio: 620 / 877; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); }
.c5 .c-k { font-size: 13px; color: var(--muted); margin: 0; }
.c5 h3 { font-size: 17px; line-height: 1.45; margin: 2px 0 0; }
.c5 .c-d { font-size: 14px; color: var(--muted); margin: 6px 0 0; line-height: 1.55; }
.c5 .c-p { font: 700 22px/1.2 var(--font-head); margin: 10px 0 0; }
.c5 .c-cta { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }

/* ---------- คำถามที่พบบ่อย ---------- */
.h5-faq .faq-list { max-width: 820px; display: grid; gap: var(--s3); }
.h5-faq details { background: var(--surface-2); border-radius: 16px; padding: var(--s4) var(--s5); }
.h5-faq summary { cursor: pointer; font: 700 17px/1.5 var(--font-head); list-style: none; display: flex; justify-content: space-between; gap: var(--s4); }
.h5-faq summary::-webkit-details-marker { display: none; }
.h5-faq summary::after { content: "+"; flex: none; font-size: 22px; line-height: 1; }
.h5-faq details[open] summary::after { content: "−"; }
.h5-faq details p { margin: var(--s3) 0 0; color: var(--ink-2); line-height: 1.75; }

/* ---------- ส่วนอื่นบนหน้าแรก ---------- */
.hc-home .sec { border-top: 0; }
.hc-home .tool-card { background: var(--surface); }

@media (max-width: 1080px) {
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h5-courses .c-grid { grid-template-columns: 1fr; max-width: 640px; }
}
@media (max-width: 640px) {
  .h5-hero { padding: var(--s6) 0 var(--s5); }
  .h5-lead { font-size: 16px; margin-bottom: var(--s5); }
  .roles { grid-template-columns: 1fr; gap: var(--s3); }
  .role h2 { font-size: 20px; }
  .h5-ask { gap: var(--s2); }
  .c5 { grid-template-columns: 88px minmax(0, 1fr); }
  .c5 img { width: 88px; }
}

/* ---------- กล่องตามงาน บนมือถือ: หุบไว้ แตะเพื่อกาง (site.js ใส่ .role-tog · ไม่มี JS = กางเสมอ) ---------- */
.role { position: relative; }
.role-tog { display: none; }
@media (max-width: 640px) {
  .js .role { gap: var(--s2); padding: 16px 16px 14px; }
  .js .role-ic { width: 40px; height: 40px; border-radius: 12px; }
  .js .role-ic svg { width: 21px; height: 21px; }
  .js .role:not(.open) ul, .js .role:not(.open) .role-more, .js .role:not(.open) .role-next { display: none; }
  .js .role h2 { padding-right: 48px; }
  .js .role-tog { display: grid; place-items: center; position: absolute; right: 12px; top: 14px; width: 40px; height: 40px;
    border-radius: 12px; border: 0; background: var(--role-chip); color: var(--text); cursor: pointer; }
  .js .role-tog::before { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
  .js .role.open .role-tog::before { transform: translateY(2px) rotate(-135deg); }
}

/* ---------- การ์ดคอร์ส: ปุ่มเต็มความกว้างการ์ด วางคู่กัน ---------- */
.c5 .c-cta { grid-column: 1 / -1; margin-top: 0; }
.c5 .c-cta .btn { flex: 1 1 0; min-width: 0; }
