/* =========================================================
   Smart Leader Thailand — Design System
   ========================================================= */

/* ---------- 1. Design Tokens ---------- */
:root {
  /* Brand greens (ดึงจากโลโก้ SLT) */
  --green-300: #8DD35A;   /* lime highlight */
  --green-400: #4CBB4A;
  --green-500: #2FA84F;   /* primary */
  --green-600: #1F8A3E;   /* primary hover / text on light */
  --green-700: #146B31;
  --green-800: #0E4D26;   /* dark green */
  --green-900: #0A2E18;
  --green-50:  #EEF8EF;
  --green-100: #DCF1DE;

  /* Neutrals */
  --black: #0B110D;
  --ink: #111A14;
  --muted: #5B6760;
  --line: #E3E8E4;
  --gray-50: #F5F7F5;
  --gray-100: #EDF1EE;
  --white: #FFFFFF;

  /* Typography */
  --font-head: "Prompt", "Noto Sans Thai", system-ui, sans-serif;
  --font-body: "Noto Sans Thai", "Prompt", system-ui, sans-serif;

  /* Layout */
  --container: 1200px;
  --gutter: 24px;
  --header-h: 76px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(11, 17, 13, .06), 0 2px 8px rgba(11, 17, 13, .04);
  --shadow: 0 10px 30px -12px rgba(11, 17, 13, .18);
  --shadow-lg: 0 24px 60px -20px rgba(14, 77, 38, .35);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --grad-brand: linear-gradient(135deg, var(--green-400) 0%, var(--green-600) 55%, var(--green-800) 100%);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.3;
  margin: 0 0 .5em;
  color: var(--black);
  font-weight: 600;
}

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--green-300); outline-offset: 3px; border-radius: 6px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--green-800); color: var(--white);
  padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.text-gradient {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.text-lime { color: var(--green-300); }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn .icon { transition: transform .25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(1px) scale(.98); }

.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-sm { padding: 9px 16px; font-size: 14px; }

.btn-primary { background: var(--green-500); color: var(--white); box-shadow: 0 8px 20px -8px rgba(47, 168, 79, .6); }
.btn-primary:hover { background: var(--green-600); transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(47, 168, 79, .7); }

.btn-outline { border-color: var(--green-800); color: var(--green-800); background: transparent; }
.btn-outline:hover { background: var(--green-800); color: var(--white); transform: translateY(-2px); }

.btn-soft { background: var(--green-50); color: var(--green-700); }
.btn-soft:hover { background: var(--green-500); color: var(--white); }

.btn-lime { background: var(--green-300); color: var(--green-900); }
.btn-lime:hover { background: #A2E070; transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(141, 211, 90, .6); }

.btn-white { background: var(--white); color: var(--green-800); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .35); }

.btn-ghost-light { border-color: rgba(255, 255, 255, .55); color: var(--white); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); border-color: var(--white); transform: translateY(-2px); }

/* ---------- 4. Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s, background-color .3s;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .95);
  border-color: var(--line);
  box-shadow: 0 6px 24px -16px rgba(11, 17, 13, .3);
}

.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 44px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--font-head); }
.brand-text strong { font-size: 19px; font-weight: 700; color: var(--black); letter-spacing: -.01em; }
.brand-text small { font-size: 12px; font-weight: 600; letter-spacing: .32em; color: var(--green-600); margin-top: 3px; }
.brand-light .brand-text strong { color: var(--white); }
.brand-light .brand-text small { color: var(--green-300); }

.primary-nav { display: flex; align-items: center; gap: 20px; }
.nav-list { display: flex; align-items: center; gap: 2px; }

.nav-link {
  position: relative;
  display: block;
  padding: 8px 11px;
  font-family: var(--font-head);
  font-size: 15px;
  color: #2B3630;
  border-radius: 8px;
  transition: color .2s;
}
.nav-link::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px;
  background: var(--green-500); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-link:hover, .nav-link.is-active { color: var(--green-700); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--white);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; background: var(--black); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Sections (shared) ---------- */
.section { padding: 100px 0; position: relative; }
.section-alt { background: var(--gray-50); }

.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.split {
  max-width: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.section-head.split > div { max-width: 620px; }
.section-head.center { max-width: 820px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.01em; text-wrap: balance; }
.section-head p:not(.kicker) { color: var(--muted); font-size: 17px; margin: 0; }
.nowrap { white-space: nowrap; }

.kicker {
  display: inline-block;
  font-family: var(--font-head); font-size: 13px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 12px;
}
.kicker.on-dark { color: var(--green-300); }

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--white);
  color: var(--green-700);
  font-family: var(--font-head); font-size: 12px; font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ---------- 6. Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 110px; }

.hero-bg { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #F3FAF2 0%, var(--white) 85%); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.blob-1 { width: 520px; height: 520px; right: -120px; top: -160px; background: radial-gradient(circle, #9FE08B, transparent 70%); }
.blob-2 { width: 420px; height: 420px; left: -160px; bottom: -120px; background: radial-gradient(circle, #BDEBC0, transparent 70%); }
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(14, 77, 38, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 77, 38, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 65%);
}

.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px;
  background: var(--white); border: 1px solid var(--green-100); border-radius: 999px;
  font-family: var(--font-head); font-size: 13px; font-weight: 500; color: var(--green-700);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 4px rgba(47, 168, 79, .18); }

.hero h1 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 700; line-height: 1.25; letter-spacing: -.015em; margin-bottom: 22px; }
.hero h1 .text-gradient { display: block; }
.hero .lead { font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); max-width: 560px; margin-bottom: 32px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }


.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tags li {
  font-size: 13px; color: #3A4640;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .7); border: 1px solid var(--line);
}

.hero-visual { position: relative; padding: 24px 12px 24px 24px; }
.hero-visual::before {
  content: ""; position: absolute; inset: 0 0 0 48px;
  background: var(--grad-brand);
  border-radius: 32px 32px 32px 120px;
  transform: rotate(3deg);
  opacity: .95;
}

.placeholder-media {
  position: relative;
  margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center;
  color: var(--green-700);
  background:
    repeating-linear-gradient(45deg, rgba(47, 168, 79, .05) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, #F7FBF6, #E5F3E4);
  border: 1.5px dashed rgba(31, 138, 62, .35);
}
.placeholder-media .icon { width: 44px; height: 44px; stroke-width: 1.4; opacity: .8; }
.placeholder-media figcaption { font-size: 14px; color: var(--muted); padding: 0 24px; }
.placeholder-media small { font-size: 12px; opacity: .7; }

.hero-media { position: relative; margin: 0; overflow: hidden; aspect-ratio: 4 / 4.4; border-radius: 28px 28px 28px 100px; box-shadow: var(--shadow-lg); background-color: var(--white); }
.hero-media > img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.float-card {
  position: absolute;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 14px 14px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: floaty 6s ease-in-out infinite;
}
.float-card strong { display: block; font-family: var(--font-head); font-size: 15px; font-weight: 600; line-height: 1.3; }
.float-card small { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }
.float-card-a { left: -18px; top: 18%; }
.float-card-b { right: -10px; bottom: 12%; animation-delay: -3s; }
.float-icon {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--green-50); color: var(--green-600);
}
.float-icon.dark { background: var(--green-800); color: var(--green-300); }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- 7. Category ---------- */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.category-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.category-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(160deg, var(--green-50), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.category-card > * { position: relative; z-index: 1; }
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--green-100); }
.category-card:hover::before { opacity: 1; }

.cat-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px; margin-bottom: 20px;
  border-radius: 16px;
  background: var(--green-50); color: var(--green-600);
  transition: background-color .35s, color .35s, transform .35s var(--ease);
}
.cat-icon .icon { width: 28px; height: 28px; }
.category-card:hover .cat-icon { background: var(--green-500); color: var(--white); transform: rotate(-6deg); }

.category-card h3 { font-size: 20px; margin-bottom: 8px; }
.category-card p { color: var(--muted); font-size: 15px; flex-grow: 1; }
.cat-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: 14px; font-weight: 500; color: var(--green-600); }
.cat-link .icon { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.category-card:hover .cat-link .icon { transform: translateX(4px); }

/* ---------- 8. Courses ---------- */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; }
.filter-tab {
  border: 0; background: transparent;
  padding: 9px 16px; border-radius: 999px;
  font-family: var(--font-head); font-size: 14px; color: var(--muted);
  transition: background-color .25s, color .25s;
}
.filter-tab:hover { color: var(--green-700); }
.filter-tab.is-active { background: var(--green-800); color: var(--white); }

.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.course-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.course-card.is-hidden { display: none; }

.course-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid; place-items: center;
  overflow: hidden;
  color: rgba(255, 255, 255, .92);
}
.course-thumb::after {
  content: ""; position: absolute; width: 70%; aspect-ratio: 1; right: -20%; bottom: -45%;
  border-radius: 50%; border: 28px solid rgba(255, 255, 255, .1);
}
.course-thumb > .icon { width: 64px; height: 64px; stroke-width: 1.3; transition: transform .6s var(--ease); }
.course-card:hover .course-thumb > .icon { transform: scale(1.12) rotate(-4deg); }
.course-thumb .badge { position: absolute; left: 16px; top: 16px; z-index: 1; }

/* ภาพปกคอร์ส / บทความ */
.course-thumb > img, .article-thumb > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.course-thumb:has(img)::after { display: none; }
.course-card:hover .course-thumb > img, .article-card:hover .article-thumb > img { transform: scale(1.05); }

/* Course/article cover gradients (ใช้แทนภาพจริงชั่วคราว) */
.thumb-1 { background: linear-gradient(135deg, #0E4D26, #2FA84F); }
.thumb-2 { background: linear-gradient(135deg, #0B110D, #146B31 70%, #4CBB4A); }
.thumb-3 { background: linear-gradient(135deg, #1F8A3E, #8DD35A); }
.thumb-4 { background: linear-gradient(135deg, #146B31, #0A2E18); }
.thumb-5 { background: linear-gradient(135deg, #2FA84F, #0E4D26 80%); }
.thumb-6 { background: linear-gradient(135deg, #0A2E18, #1F8A3E 60%, #8DD35A); }

.course-body { display: flex; flex-direction: column; flex-grow: 1; padding: 22px 22px 20px; }
.course-title { font-size: 19px; margin-bottom: 2px; }
.course-sub { font-family: var(--font-head); font-size: 13px; color: var(--green-600); margin-bottom: 10px; }
.course-desc { font-size: 15px; color: var(--muted); flex-grow: 1; }

.course-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 13px; color: #45514A; }
.course-meta li { display: inline-flex; align-items: center; gap: 6px; }
.course-meta .icon { width: 16px; height: 16px; color: var(--green-600); }

.course-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.price { font-family: var(--font-head); font-size: 24px; font-weight: 700; color: var(--green-800); }

.empty-state { text-align: center; color: var(--muted); padding: 40px 0; }
.center-action { text-align: center; margin-top: 48px; }

/* ---------- 8.1 Course Preview Video ---------- */
.video-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: center; }
.video-copy h2 { font-size: clamp(28px, 3.4vw, 40px); }
.video-copy > p:not(.kicker) { color: var(--muted); font-size: 17px; }
.check-list.light { margin: 22px 0 30px; }
.video-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.check-list.light .icon { background: var(--green-50); color: var(--green-600); }

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--black);
  box-shadow: var(--shadow-lg);
}
.video-frame video { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--black); }
.video-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center;
  background:
    linear-gradient(135deg, rgba(10, 46, 24, .88), rgba(20, 107, 49, .72)),
    url("images/ai/video-poster.jpg") center / cover;
  color: var(--white);
}
.video-placeholder strong { font-family: var(--font-head); font-weight: 500; font-size: 17px; }
.video-placeholder small { font-size: 12px; opacity: .55; }
.video-play {
  display: grid; place-items: center;
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, .06);
  margin-bottom: 6px;
}
.video-play .icon { width: 34px; height: 34px; color: var(--green-300); }

/* ---------- 9. Corporate (B2B) ---------- */
.corporate { background: var(--green-900); color: rgba(255, 255, 255, .82); overflow: hidden; }
.corporate-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 90% 10%, rgba(76, 187, 74, .35), transparent 70%),
    radial-gradient(500px 400px at 0% 100%, rgba(141, 211, 90, .18), transparent 70%);
}
.corporate-inner { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.corporate h2 { color: var(--white); font-size: clamp(28px, 3.3vw, 40px); }
.corporate h2 span { display: block; font-size: .72em; margin-top: 8px; font-weight: 500; }
.corporate-copy > p { font-size: 17px; }

.check-list { display: grid; gap: 12px; margin: 26px 0 34px; }
.check-list li { display: flex; align-items: center; gap: 12px; }
.check-list .icon {
  width: 26px; height: 26px; padding: 5px;
  border-radius: 50%; background: rgba(141, 211, 90, .18); color: var(--green-300); stroke-width: 2.4;
}

.corp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.corp-item {
  padding: 24px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  transition: background-color .3s, border-color .3s, transform .35s var(--ease);
}
.corp-item:hover { background: rgba(255, 255, 255, .09); border-color: rgba(141, 211, 90, .45); transform: translateY(-4px); }
.corp-item > .icon { width: 30px; height: 30px; color: var(--green-300); margin-bottom: 14px; }
.corp-item h3 { color: var(--white); font-size: 17px; margin-bottom: 4px; }
.corp-item p { font-size: 14px; margin: 0; color: rgba(255, 255, 255, .65); }

/* ---------- 10. Why Smart Leader ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why-card {
  position: relative;
  padding: 32px 26px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.why-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.why-num { position: absolute; top: 22px; right: 24px; font-family: var(--font-head); font-size: 34px; font-weight: 700; color: var(--green-50); line-height: 1; }
.why-icon {
  display: grid; place-items: center;
  width: 52px; height: 52px; margin-bottom: 22px;
  border-radius: 50%;
  background: var(--grad-brand); color: var(--white);
  box-shadow: 0 10px 20px -8px rgba(31, 138, 62, .6);
}
.why-icon .icon { width: 24px; height: 24px; }
.why-card h3 { font-size: 18px; }
.why-card p { color: var(--muted); font-size: 15px; margin: 0; }

.approach {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center;
  margin-top: 40px; padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--green-50);
}
.approach-label { font-family: var(--font-head); font-weight: 600; color: var(--green-800); }
.approach ul { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.approach li { font-size: 14px; padding: 6px 14px; border-radius: 999px; background: var(--white); color: var(--green-700); border: 1px solid var(--green-100); }

/* ---------- 11. Learning Experience ---------- */
.exp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.exp-card {
  padding: 34px 26px;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.exp-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--green-100); }
.exp-icon {
  display: inline-grid; place-items: center;
  width: 68px; height: 68px; margin-bottom: 20px;
  border-radius: 20px;
  background: var(--black); color: var(--green-300);
  transition: background-color .35s, transform .35s var(--ease);
}
.exp-icon .icon { width: 30px; height: 30px; }
.exp-card:hover .exp-icon { background: var(--green-600); color: var(--white); transform: translateY(-3px); }

/* การ์ดที่มีภาพจริงด้านบน */
.exp-card:has(.exp-photo) { padding: 0 0 30px; overflow: hidden; }
.exp-card:has(.exp-photo) h3, .exp-card:has(.exp-photo) p { padding-inline: 24px; }
.exp-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s var(--ease); }
.exp-card:hover .exp-photo { transform: scale(1.04); }
.exp-card:has(.exp-photo) .exp-icon { position: relative; z-index: 1; margin-top: -34px; border: 4px solid var(--white); }

/* ---------- 12.1 Training Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 14px;
}
.g-item { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--gray-100); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.g-item:hover img { transform: scale(1.05); }
.g-large { grid-column: span 2; grid-row: span 2; }
.g-wide { grid-column: span 2; }
.exp-card h3 { font-size: 20px; }
.exp-card p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- 12. Business Experience (stats) ---------- */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--white);
  overflow: hidden;
}
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-icon { color: var(--green-600); margin-bottom: 10px; }
.stat-icon .icon { width: 28px; height: 28px; }
.stat-value { font-family: var(--font-head); font-size: 44px; font-weight: 700; line-height: 1.1; color: var(--green-800); }
.placeholder-value { color: #B8C4BC; }
.stat-label { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* ---------- 13. Client Logos ---------- */
.logo-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.logo-slot {
  display: grid; place-items: center;
  height: 88px;
  border-radius: var(--radius);
  border: 1.5px dashed #CAD5CD;
  background: var(--white);
  font-family: var(--font-head); font-size: 13px; color: #9AA69F; letter-spacing: .04em;
  transition: border-color .3s, color .3s;
}
.logo-slot:hover { border-color: var(--green-400); color: var(--green-600); }

/* ---------- 14. Testimonials ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.testi-card {
  margin: 0;
  display: flex; flex-direction: column; gap: 20px;
  padding: 30px;
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  border: 1px solid var(--line);
}
.testi-quote { font-family: Georgia, serif; font-size: 64px; line-height: .6; height: 28px; color: var(--green-500); }
.testi-card blockquote { margin: 0; flex-grow: 1; font-size: 17px; color: #7A867F; font-style: italic; }
.testi-card figcaption { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.testi-card figcaption strong { display: block; font-family: var(--font-head); font-size: 15px; font-weight: 500; color: #7A867F; }
.testi-card figcaption small { color: #9AA69F; font-size: 13px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--green-100), #CFE7D2); flex-shrink: 0; }

/* ---------- 15. Articles ---------- */
.article-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.article-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.article-thumb { position: relative; overflow: hidden; aspect-ratio: 16 / 10; display: grid; place-items: center; color: rgba(255, 255, 255, .9); }
.article-thumb .icon { width: 44px; height: 44px; stroke-width: 1.4; }
.article-body { display: flex; flex-direction: column; flex-grow: 1; padding: 20px; }
.article-tag { align-self: flex-start; font-family: var(--font-head); font-size: 12px; font-weight: 600; color: var(--green-700); background: var(--green-50); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.article-card h3 { font-size: 17px; line-height: 1.45; }
.article-card p { font-size: 14px; color: var(--muted); flex-grow: 1; }
.read-more { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: 14px; font-weight: 500; color: var(--green-600); }
.read-more .icon { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.read-more:hover .icon { transform: translateX(4px); }

/* ---------- 16. CTA ---------- */
.cta-section { padding: 0 0 100px; background: var(--gray-50); }
.cta-box {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  padding: 56px 60px;
  border-radius: 32px;
  background: var(--grad-brand);
  color: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-lg);
}
.cta-box::before, .cta-box::after {
  content: ""; position: absolute; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .07);
}
.cta-box::before { width: 360px; height: 360px; right: -120px; top: -180px; }
.cta-box::after { width: 240px; height: 240px; left: 30%; bottom: -170px; }
.cta-copy, .cta-actions { position: relative; z-index: 1; }
.cta-copy { max-width: 580px; }
.cta-box h2 { color: var(--white); font-size: clamp(26px, 3vw, 36px); }
.cta-box p { margin: 0; font-size: 17px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }

/* ---------- 17. Footer ---------- */
.site-footer { background: var(--black); color: rgba(255, 255, 255, .68); padding-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; padding-bottom: 48px; }
.footer-tagline { font-family: var(--font-head); color: var(--green-300); margin: 16px 0 8px; }
.footer-about { font-size: 15px; max-width: 380px; }

.social { display: flex; gap: 10px; margin-top: 20px; }
.social a {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); color: var(--white);
  transition: background-color .3s, transform .3s var(--ease);
}
.social a:hover { background: var(--green-500); transform: translateY(-3px); }

.footer-col h3 { color: var(--white); font-size: 16px; margin-bottom: 18px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { font-size: 15px; transition: color .2s; }
.footer-col a:hover { color: var(--green-300); }

.contact-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.contact-list .icon { color: var(--green-300); margin-top: 3px; }
.contact-list em { font-style: normal; color: rgba(255, 255, 255, .42); }
.contact-list address { font-style: normal; }
.contact-list span { overflow-wrap: anywhere; }

.footer-bottom { padding: 22px var(--gutter); border-top: 1px solid rgba(255, 255, 255, .08); font-size: 14px; }
.footer-bottom p { margin: 0; }

/* ---------- 18. Course Modal ---------- */
.course-modal {
  width: min(520px, calc(100% - 32px));
  padding: 36px 32px 28px;
  border: 0; border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .45);
  color: var(--ink);
}
.course-modal[open] { animation: modalIn .35s var(--ease); }
.course-modal::backdrop { background: rgba(10, 46, 24, .55); backdrop-filter: blur(4px); }
.course-modal .badge { background: var(--green-50); box-shadow: none; margin-bottom: 14px; }
.course-modal h3 { font-size: 24px; margin-bottom: 2px; }
.course-modal #modalDesc { color: var(--muted); }
.modal-note { font-size: 13px; color: var(--muted); background: var(--gray-50); padding: 10px 14px; border-radius: var(--radius-sm); }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--gray-100); font-size: 22px; line-height: 1; color: var(--ink);
  transition: background-color .2s;
}
.modal-close:hover { background: var(--green-100); }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- 19. Scroll Reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
/* หลังแสดงผลแล้ว ใช้ transition ปกติของ card สำหรับ hover */
.js [data-reveal].is-revealed {
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s, background-color .35s;
}

/* ---------- 20. Responsive ---------- */

/* Nav collapse (เมนูมี 8 รายการ จึงเปลี่ยนเป็น Hamburger ตั้งแต่จอขนาดกลาง) */
@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }

  .primary-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    height: calc(100dvh - var(--header-h));
    flex-direction: column; align-items: stretch; gap: 20px;
    padding: 20px var(--gutter) 32px;
    background: var(--white);
    border-top: 1px solid var(--line);
    overflow-y: auto;
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; transform: none; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--gray-100); border-radius: 0; }
  .nav-link::after { display: none; }
  .nav-cta { padding: 15px; font-size: 16px; }

  body.nav-open { overflow: hidden; }
}

@media (max-width: 1024px) {
  .section { padding: 80px 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-actions, .hero-tags { justify-content: center; }
  .hero-visual { max-width: 520px; margin-inline: auto; width: 100%; }
  .hero-media { aspect-ratio: 4 / 3.2; }

  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .corporate-inner { grid-template-columns: 1fr; gap: 44px; }
  .video-layout { grid-template-columns: 1fr; gap: 36px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .g-wide { grid-column: span 2; }
  .why-grid, .exp-grid, .article-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat + .stat { border-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .logo-grid { grid-template-columns: repeat(4, 1fr); }
  .testi-grid { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }

  .cta-box { flex-direction: column; text-align: center; padding: 48px 32px; }
  .cta-actions { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; --header-h: 68px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .section-head.split { align-items: flex-start; }

  .brand img { height: 38px; }
  .brand-text strong { font-size: 17px; }

  .hero { padding: 40px 0 72px; }
  .hero-actions .btn, .video-actions .btn { width: 100%; }
  .hero-visual { padding: 16px 4px 16px 16px; }
  .float-card { padding: 10px 14px 10px 10px; }
  .float-card-a { left: -4px; top: 8%; }
  .float-card-b { right: -4px; bottom: 6%; }
  .float-icon { width: 36px; height: 36px; }

  .category-grid, .course-grid, .why-grid, .exp-grid, .article-grid, .corp-grid { grid-template-columns: 1fr; }
  .filter-tabs { border-radius: var(--radius); width: 100%; }
  .filter-tab { flex: 1 1 auto; }
  .logo-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .gallery-grid { grid-auto-rows: 130px; gap: 10px; }
  .logo-slot { height: 68px; font-size: 12px; }
  .stat { padding: 28px 12px; }
  .stat-value { font-size: 36px; }
  .stat-label { font-size: 14px; }

  .cta-section { padding-bottom: 64px; }
  .cta-box { padding: 40px 22px; border-radius: 24px; }
  .cta-actions { flex-direction: column; width: 100%; }
  .cta-actions .btn { width: 100%; white-space: normal; }

  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .course-modal { padding: 32px 20px 22px; }
  .modal-foot { flex-direction: column; align-items: stretch; }
  .modal-foot .btn { width: 100%; }
}

/* ลด Animation สำหรับผู้ใช้ที่ตั้งค่าลดการเคลื่อนไหว */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* =========================================================
   21. Checkout (checkout.html)
   ========================================================= */
.checkout-page { background: var(--gray-50); }
.modal-actions { display: flex; gap: 10px; }

.back-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: 15px; color: var(--green-700); }
.back-link:hover { color: var(--green-500); }

.checkout { padding: 44px 0 80px; }
.checkout-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; scroll-margin-top: calc(var(--header-h) + 16px); }
.checkout-head h1 { font-size: clamp(26px, 3vw, 34px); margin: 0; }
.checkout-head p { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: var(--muted); }
.checkout-head .icon { color: var(--green-600); }

/* Stepper */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 28px; padding: 0; }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.stepper li::before {
  content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0;
}
.stepper li:first-child::before { display: none; }
.stepper li.is-done::before, .stepper li.is-current::before { background: var(--green-500); }
.step-dot {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--line);
  font-family: var(--font-head); font-weight: 600; color: var(--muted);
  transition: background-color .3s, border-color .3s, color .3s;
}
.step-label { font-family: var(--font-head); font-size: 14px; color: var(--muted); }
.stepper li.is-current .step-dot { border-color: var(--green-500); color: var(--green-700); box-shadow: 0 0 0 5px rgba(47, 168, 79, .15); }
.stepper li.is-current .step-label { color: var(--black); font-weight: 500; }
.stepper li.is-done .step-dot { background: var(--green-500); border-color: var(--green-500); color: var(--white); }

/* Layout */
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }

.step-panel, .order-summary {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.step-panel:not([hidden]) { animation: modalIn .35s var(--ease); }
.step-panel h2 { font-size: 22px; margin-bottom: 4px; outline: none; }
.panel-hint { color: var(--muted); font-size: 15px; margin-bottom: 24px; }

/* Form fields */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; margin-bottom: 20px; }
.field-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-family: var(--font-head); font-size: 14px; font-weight: 500; color: #2B3630; }
.req { color: #C0392B; }
.optional { color: var(--muted); font-weight: 400; }

.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white);
  border: 1.5px solid #D5DDD7;
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(47, 168, 79, .15); }
.field input[readonly] { background: var(--gray-50); color: var(--muted); }
.field [aria-invalid="true"] { border-color: #C0392B; }
.field-error { margin: 0; font-size: 13px; color: #C0392B; }
.field-error:empty { display: none; }
.form-error { padding: 12px 14px; border-radius: var(--radius-sm); background: #FDECEA; color: #A5281B; font-size: 14px; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; margin-bottom: 18px; }
.check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--green-600); flex-shrink: 0; }
.check + .field-error { margin: -10px 0 16px 28px; }
.invoice-fields { padding: 20px; background: var(--gray-50); border-radius: var(--radius); }

.step-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.step-actions.center { justify-content: center; }

/* Payment methods */
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0 24px; }
.pay-method {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  border: 1.5px solid #D5DDD7; border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method:hover { border-color: var(--green-400); }
.pay-method:has(input:checked) { border-color: var(--green-500); background: var(--green-50); box-shadow: 0 0 0 3px rgba(47, 168, 79, .15); }
.pay-method:has(input:focus-visible) { outline: 3px solid var(--green-300); outline-offset: 2px; }
.pay-method.is-disabled { opacity: .5; cursor: not-allowed; }
.pay-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--gray-100); color: var(--green-700); flex-shrink: 0; }
.pay-method:has(input:checked) .pay-icon { background: var(--green-500); color: var(--white); }
.pay-text strong { display: block; font-family: var(--font-head); font-size: 15px; font-weight: 500; line-height: 1.3; }
.pay-text small { font-size: 13px; color: var(--muted); }

/* Done */
.done-panel { text-align: center; }
.done-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--grad-brand); color: var(--white); margin-bottom: 16px; box-shadow: var(--shadow-lg); }
.done-icon .icon { width: 36px; height: 36px; stroke-width: 2.4; }
.done-lead { color: var(--muted); max-width: 520px; margin-inline: auto; }
/* Order summary */
.order-summary { position: sticky; top: calc(var(--header-h) + 20px); }
.order-summary h2 { font-size: 18px; margin-bottom: 18px; }
.summary-course { display: grid; grid-template-columns: 88px 1fr; gap: 14px; margin-bottom: 18px; }
.summary-thumb { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; }
.summary-thumb img { width: 100%; height: 100%; object-fit: cover; }
.summary-course .badge { background: var(--green-50); box-shadow: none; padding: 3px 10px; font-size: 12px; }
.summary-course h3 { font-size: 16px; line-height: 1.4; margin: 6px 0 0; }
.summary-course .course-meta { border: 0; padding: 6px 0 0; gap: 4px 12px; font-size: 12px; }
.summary-select { margin-bottom: 18px; }
.summary-select select { font-size: 14px; padding: 10px 12px; }
.summary-select select:disabled { background: var(--gray-50); color: var(--muted); }
.summary-lines { margin: 0 0 18px; border-top: 1px solid var(--line); }
.summary-lines > div { display: flex; justify-content: space-between; padding: 12px 0; font-size: 15px; }
.summary-lines dt { color: var(--muted); }
.summary-lines dd { margin: 0; }
.summary-lines .total { border-top: 1px solid var(--line); }
.summary-lines .total dt { color: var(--black); font-family: var(--font-head); font-weight: 600; }
.summary-lines .total dd { font-family: var(--font-head); font-size: 24px; font-weight: 700; color: var(--green-800); }
.summary-perks { display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.summary-perks li { display: flex; gap: 8px; }
.summary-perks .icon { width: 16px; height: 16px; color: var(--green-600); margin-top: 3px; }

.checkout-footer { padding: 22px 0; background: var(--black); color: rgba(255, 255, 255, .6); font-size: 14px; }
.checkout-footer p { margin: 0; }

/* ---------- 22. Touch devices: พื้นที่แตะอย่างน้อย 44px ---------- */
@media (max-width: 1024px), (pointer: coarse) {
  .btn-sm { min-height: 44px; padding-inline: 18px; }
  .back-link { min-height: 44px; min-width: 44px; justify-content: center; }
  .filter-tab { min-height: 44px; }
}

@media (max-width: 1024px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; order: -1; }
}

@media (max-width: 720px) {
  .modal-actions { flex-direction: column; }
  .back-link span { display: none; }
  .back-link .icon { width: 24px; height: 24px; }
  .checkout { padding: 28px 0 56px; }
  .step-panel, .order-summary { padding: 22px 18px; }
  .stepper li::before { top: 15px; }
  .step-dot { width: 32px; height: 32px; font-size: 14px; }
  .step-label { font-size: 12px; }
  .field-grid { grid-template-columns: 1fr; }
  .pay-methods { grid-template-columns: 1fr; }
  .step-actions { flex-direction: column-reverse; align-items: stretch; }
  .step-actions > span:empty { display: none; }
  .step-actions .btn { width: 100%; white-space: normal; }
}

/* =========================================================
   23. Premium Theme — เขียวมรกตเข้ม + ทอง + ขาวงาช้าง
   ชั้นนี้เปลี่ยนเฉพาะสี ฟอนต์ เส้นขอบ และเงา (ไม่แตะเลย์เอาต์/Responsive)
   ========================================================= */
:root {
  --gold-200: #F4E7C5;
  --gold-300: #EBD49A;
  --gold-400: #D9B66A;
  --gold-500: #C29B4F;
  --gold-600: #9E7A35;
  --emerald-950: #06130C;
  --emerald-900: #0A1F14;
  --emerald-850: #0D2A1A;
  --ivory: #FAF7F0;
  --ivory-2: #F3EEE2;
  --line-warm: #E9E2D2;
  --font-display: "Noto Serif Thai", "Prompt", Georgia, serif;
  --grad-gold: linear-gradient(135deg, #F1DDA6 0%, #D9B66A 45%, #B88D40 100%);
  --grad-night: linear-gradient(160deg, #06130C 0%, #0B2416 55%, #0F301D 100%);
  --shadow-lux: 0 30px 70px -30px rgba(6, 19, 12, .45);
}

::selection { background: var(--gold-300); color: var(--emerald-950); }
body { background: #FFFEFB; }

/* ---------- Typography ---------- */
.hero h1, .section-head h2, .corporate h2, .cta-box h2, .video-copy h2, .checkout-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.005em;
}
.hero h1 { line-height: 1.32; }

.kicker { color: var(--gold-600); letter-spacing: .22em; font-size: 12px; display: inline-flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.section-head.center .kicker::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.kicker.on-dark { color: var(--gold-400); }

.text-gradient {
  background: var(--grad-gold);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.text-lime { color: var(--gold-300); }

/* ---------- Buttons ---------- */
.btn { letter-spacing: .01em; }
.btn-primary, .btn-lime, .btn-white {
  background: var(--grad-gold);
  color: var(--emerald-950);
  box-shadow: 0 10px 26px -12px rgba(194, 155, 79, .75), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.btn-primary:hover, .btn-lime:hover, .btn-white:hover {
  background: linear-gradient(135deg, #F6E6BA 0%, #E2C27C 45%, #C29B4F 100%);
  color: var(--emerald-950);
  box-shadow: 0 16px 34px -12px rgba(194, 155, 79, .85), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn-outline { border-color: var(--emerald-900); color: var(--emerald-900); }
.btn-outline:hover { background: var(--emerald-900); color: var(--gold-300); }
.btn-soft { background: var(--ivory-2); color: var(--emerald-900); }
.btn-soft:hover { background: var(--emerald-900); color: var(--gold-300); }
.btn-ghost-light { border-color: rgba(235, 212, 154, .55); color: var(--gold-200); }
.btn-ghost-light:hover { background: rgba(235, 212, 154, .1); border-color: var(--gold-300); }

/* ---------- Header (โทนเข้มทุกหน้า) ---------- */
.site-header, .site-header.is-scrolled {
  background: rgba(6, 19, 12, .82);
  border-bottom: 1px solid rgba(194, 155, 79, .18);
}
.site-header.is-scrolled { background: rgba(6, 19, 12, .94); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .6); }
.site-header .brand-text strong { color: #FFFFFF; }
.site-header .brand-text small { color: var(--gold-400); }
.nav-link { color: rgba(255, 255, 255, .78); }
.nav-link:hover, .nav-link.is-active { color: var(--gold-300); }
.nav-link::after { background: var(--gold-400); }
.nav-toggle { background: transparent; border-color: rgba(194, 155, 79, .4); }
.nav-toggle span { background: var(--gold-200); }
.back-link { color: var(--gold-300); }
.back-link:hover { color: var(--gold-200); }

@media (max-width: 1180px) {
  .primary-nav { background: var(--emerald-950); border-top-color: rgba(194, 155, 79, .18); }
  .nav-link { border-bottom-color: rgba(255, 255, 255, .07); }
}

/* ---------- Hero ---------- */
.hero-bg {
  background:
    radial-gradient(900px 520px at 82% 18%, rgba(47, 168, 79, .22), transparent 60%),
    radial-gradient(700px 480px at 6% 96%, rgba(194, 155, 79, .16), transparent 60%),
    var(--grad-night);
}
.blob { display: none; }
.grid-lines {
  background-image:
    linear-gradient(rgba(194, 155, 79, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(194, 155, 79, .07) 1px, transparent 1px);
}
.hero h1 { color: #FFFFFF; }
.hero .lead { color: rgba(255, 255, 255, .72); }
.eyebrow { background: rgba(194, 155, 79, .08); border-color: rgba(194, 155, 79, .45); color: var(--gold-300); box-shadow: none; }
.eyebrow .dot { background: var(--gold-400); box-shadow: 0 0 0 4px rgba(194, 155, 79, .2); }
.hero .btn-outline { border-color: rgba(255, 255, 255, .45); color: #FFFFFF; }
.hero .btn-outline:hover { background: #FFFFFF; color: var(--emerald-950); border-color: #FFFFFF; }
.hero-tags li { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .75); }
.hero-visual::before {
  background: none;
  border: 1.5px solid rgba(194, 155, 79, .55);
  opacity: 1;
}
.hero-media { box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7); }
.float-card { box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .55); border: 1px solid rgba(194, 155, 79, .25); }
.float-icon { background: var(--ivory-2); color: var(--gold-600); }
.float-icon.dark { background: var(--emerald-900); color: var(--gold-300); }

/* ---------- Sections & cards ---------- */
.section-alt { background: var(--ivory); }
.section-head p:not(.kicker) { color: #6B706A; }

.category-card, .course-card, .why-card, .exp-card, .article-card, .testi-card {
  border-color: var(--line-warm);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 12px 30px -24px rgba(6, 19, 12, .25);
}
.category-card:hover, .course-card:hover, .why-card:hover, .exp-card:hover, .article-card:hover {
  border-color: var(--gold-400);
  box-shadow: var(--shadow-lux);
}
.category-card::before { background: linear-gradient(160deg, var(--ivory), transparent 65%); }
.cat-icon { background: var(--ivory-2); color: var(--emerald-900); }
.category-card:hover .cat-icon { background: var(--emerald-900); color: var(--gold-300); }
.cat-link, .read-more { color: var(--gold-600); }

.filter-tabs { border-color: var(--line-warm); }
.filter-tab:hover { color: var(--emerald-900); }
.filter-tab.is-active { background: var(--emerald-900); color: var(--gold-300); }

.course-thumb .badge, .badge { background: rgba(6, 19, 12, .86); color: var(--gold-300); box-shadow: none; backdrop-filter: blur(6px); }
.course-sub { color: var(--gold-600); }
.course-meta .icon { color: var(--gold-500); }
.course-meta, .course-foot { border-color: var(--line-warm); }
.price { color: var(--emerald-900); font-family: var(--font-display); }

.why-icon { background: linear-gradient(140deg, var(--emerald-850), var(--emerald-950)); color: var(--gold-300); box-shadow: 0 12px 24px -12px rgba(6, 19, 12, .6); }
.why-num { color: var(--gold-200); font-family: var(--font-display); }
.approach { background: var(--ivory-2); border: 1px solid var(--line-warm); }
.approach-label { color: var(--emerald-900); }
.approach li { border-color: var(--line-warm); color: var(--emerald-900); }

.exp-icon { background: var(--emerald-950); color: var(--gold-300); }
.exp-card:hover .exp-icon { background: var(--gold-500); color: var(--emerald-950); }

.article-tag { background: var(--ivory-2); color: var(--emerald-900); }

/* ---------- Corporate (B2B) ---------- */
.corporate { background: var(--emerald-950); }
.corporate-bg {
  background:
    radial-gradient(640px 420px at 92% 8%, rgba(47, 168, 79, .2), transparent 70%),
    radial-gradient(560px 420px at 0% 100%, rgba(194, 155, 79, .16), transparent 70%);
}
.check-list .icon { background: rgba(194, 155, 79, .16); color: var(--gold-300); }
.corp-item { background: rgba(255, 255, 255, .03); border-color: rgba(194, 155, 79, .16); }
.corp-item:hover { background: rgba(194, 155, 79, .06); border-color: rgba(194, 155, 79, .5); }
.corp-item > .icon { color: var(--gold-400); }
.check-list.light .icon { background: var(--ivory-2); color: var(--gold-600); }

/* ---------- Video ---------- */
.video-frame { box-shadow: 0 0 0 1px rgba(194, 155, 79, .45), 0 0 0 10px rgba(194, 155, 79, .07), var(--shadow-lux); }

/* ---------- Experience (แถบเข้ม) ---------- */
.experience { background: var(--grad-night); }
.experience .section-head h2 { color: #FFFFFF; }
.experience .kicker { color: var(--gold-400); }
.stats-grid { background: rgba(255, 255, 255, .02); border-color: rgba(194, 155, 79, .25); }
.stat + .stat, .stat:nth-child(even), .stat:nth-child(n+3) { border-color: rgba(194, 155, 79, .18); }
.stat-icon { color: var(--gold-400); }
.stat-value { color: var(--gold-300); font-family: var(--font-display); }
.placeholder-value { color: rgba(235, 212, 154, .35); }
.stat-label { color: rgba(255, 255, 255, .7); }

/* ---------- Gallery / Clients / Testimonials ---------- */
.g-item { box-shadow: 0 16px 34px -26px rgba(6, 19, 12, .5); }
.logo-slot { border-color: #DCCFB2; background: #FFFFFF; color: #A99B7C; }
.logo-slot:hover { border-color: var(--gold-500); color: var(--gold-600); }
.testi-card { background: var(--ivory); }
.testi-quote { color: var(--gold-500); font-family: var(--font-display); }
.avatar { background: linear-gradient(135deg, var(--gold-200), var(--ivory-2)); }

/* ---------- CTA ---------- */
.cta-section { background: var(--ivory); }
.cta-box {
  background:
    radial-gradient(520px 320px at 100% 0%, rgba(194, 155, 79, .22), transparent 70%),
    var(--grad-night);
  border: 1px solid rgba(194, 155, 79, .35);
  box-shadow: var(--shadow-lux);
}
.cta-box::before, .cta-box::after { border-color: rgba(194, 155, 79, .1); }
.cta-box p { color: rgba(255, 255, 255, .75); }

/* ---------- Footer ---------- */
.site-footer { background: #040C07; border-top: 1px solid rgba(194, 155, 79, .2); }
.footer-tagline { color: var(--gold-400); }
.brand-light .brand-text small { color: var(--gold-400); }
.social a { border: 1px solid rgba(194, 155, 79, .22); background: transparent; }
.social a:hover { background: var(--gold-500); color: var(--emerald-950); border-color: var(--gold-500); }
.footer-col a:hover { color: var(--gold-300); }
.contact-list .icon { color: var(--gold-400); }
.footer-bottom { border-color: rgba(194, 155, 79, .14); }

/* ---------- Modal ---------- */
.course-modal { border: 1px solid var(--line-warm); }
.course-modal::backdrop { background: rgba(6, 19, 12, .7); }
.course-modal .badge { background: var(--emerald-900); color: var(--gold-300); }

/* ---------- Checkout ---------- */
.checkout-page { background: var(--ivory); }
.step-panel, .order-summary { border-color: var(--line-warm); box-shadow: 0 18px 40px -32px rgba(6, 19, 12, .35); }
.stepper li.is-current .step-dot { border-color: var(--gold-500); color: var(--gold-600); box-shadow: 0 0 0 5px rgba(194, 155, 79, .18); }
.stepper li.is-done .step-dot { background: var(--emerald-900); border-color: var(--emerald-900); color: var(--gold-300); }
.stepper li.is-done::before, .stepper li.is-current::before { background: var(--gold-500); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(194, 155, 79, .18); }
.pay-method:hover { border-color: var(--gold-400); }
.pay-method:has(input:checked) { border-color: var(--gold-500); background: var(--ivory); box-shadow: 0 0 0 3px rgba(194, 155, 79, .16); }
.pay-method:has(input:checked) .pay-icon { background: var(--emerald-900); color: var(--gold-300); }
.invoice-fields { background: var(--ivory); }
.summary-lines .total dd { color: var(--emerald-900); font-family: var(--font-display); }
.done-icon { background: var(--grad-gold); color: var(--emerald-950); }
.summary-course .badge { background: var(--emerald-900); color: var(--gold-300); }
.check input { accent-color: var(--emerald-900); }
.checkout-footer { background: #040C07; }

/* =========================================================
   24. บัญชีผู้เรียน / ชำระเงิน Stripe / ห้องเรียน (login.html, checkout.html, learn.html)
   ========================================================= */
.stepper.steps-3 { grid-template-columns: repeat(3, 1fr); }
.stepper[hidden] { display: none; }

.notice { margin: 0 0 24px; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--line-warm); background: var(--white); font-size: 15px; }
.notice a { color: var(--gold-600); text-decoration: underline; }
.notice-success { background: #EEF8EF; border-color: #BFE3C6; color: var(--green-800); }
.notice-error { background: #FDECEA; border-color: #F3C1BA; color: #A5281B; }
.notice-info { background: var(--ivory-2); }

.gate-panel { text-align: center; }
.gate-panel h2 { margin-top: 4px; }

/* Payment (Stripe) */
.pay-methods { grid-template-columns: repeat(2, 1fr); list-style: none; padding: 0; }
li.pay-method { cursor: default; }
li.pay-method:hover { border-color: #D5DDD7; }
.pay-steps { margin: 0 0 22px; padding: 18px 18px 18px 38px; border-radius: var(--radius); background: var(--ivory); font-size: 14px; color: var(--muted); list-style: decimal; }

/* Login */
.auth-card { max-width: 460px; margin: 0 auto; }
.auth-card .field { margin-bottom: 16px; }
.auth-card .field[hidden] { display: none; }
.auth-title { font-family: var(--font-display); font-size: 26px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 24px; border-radius: 999px; background: var(--ivory-2); }
.auth-tabs button { padding: 10px; border: 0; border-radius: 999px; background: transparent; font-family: var(--font-head); font-size: 15px; color: var(--muted); cursor: pointer; }
.auth-tabs button[aria-selected="true"] { background: var(--emerald-900); color: var(--gold-300); }
.auth-submit { width: 100%; margin-top: 8px; }
.auth-card .form-error { margin: 0 0 12px; }

/* Header account */
.account-bar { display: flex; align-items: center; gap: 12px; }
.account-bar .btn[hidden] { display: none; }

/* Unlocked badge */
.unlocked-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: #EEF8EF; color: var(--green-700); font-family: var(--font-head); font-size: 13px; font-weight: 500; }
.unlocked-tag .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.course-card.is-enrolled .price { display: none; }

/* My courses */
.my-course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.my-course-grid > .gate-panel { grid-column: 1 / -1; }
.my-course-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; transition: border-color .3s, box-shadow .3s, transform .3s var(--ease); }
.my-course-card:hover { border-color: var(--gold-400); box-shadow: var(--shadow-lux); transform: translateY(-4px); }
.my-course-card h2 { font-size: 19px; margin: 6px 0 0; }
.my-course-card p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.my-course-card .btn { margin-top: auto; }

/* Classroom */
.checkout-head p a { color: var(--gold-600); text-decoration: underline; }
.learn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.lesson-panel { padding: 20px 20px 28px; }
.lesson-panel h2 { margin: 20px 8px 6px; outline: none; }
.lesson-body { margin: 0 8px; color: var(--muted); white-space: pre-line; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--grad-night); }
.player.is-portrait { aspect-ratio: 9 / 16; width: min(100%, 360px); margin-inline: auto; }
.player video { display: block; width: 100%; height: 100%; background: #000; }
.player video[hidden] { display: none; }
.player-empty, .player-locked {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 20px; text-align: center; color: rgba(255, 255, 255, .75); font-size: 15px;
}
.player-empty[hidden], .player-locked[hidden] { display: none; }
.player-empty .icon, .player-locked .icon { width: 44px; height: 44px; color: var(--gold-300); }
.player-locked strong { font-family: var(--font-head); font-size: 20px; color: #FFFFFF; }
.player-locked .btn { margin-top: 10px; }

.lesson-list-panel { padding: 22px 14px; max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; }
.lesson-list-panel h2 { padding: 0 10px; }
.lesson-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.lesson-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px; border: 0; border-radius: var(--radius-sm); background: transparent;
  font: inherit; text-align: left; color: var(--ink); cursor: pointer;
  transition: background-color .2s;
}
.lesson-item:hover { background: var(--ivory); }
.lesson-item[aria-current="true"] { background: var(--ivory-2); box-shadow: inset 3px 0 0 var(--gold-500); }
.lesson-no { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--emerald-900); color: var(--gold-300); font-family: var(--font-head); font-size: 13px; }
.lesson-item.is-locked .lesson-no { background: var(--gray-100); color: var(--muted); }
.lesson-text { flex: 1; min-width: 0; }
.lesson-text strong { display: block; font-family: var(--font-head); font-size: 14px; font-weight: 500; line-height: 1.4; }
.lesson-text small { font-size: 12px; color: var(--muted); }
.lesson-item > .icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }

@media (max-width: 1024px) {
  .learn-layout { grid-template-columns: 1fr; }
  .lesson-list-panel { position: static; max-height: none; }
}

@media (max-width: 720px) {
  .lesson-panel { padding: 12px 12px 22px; }
  .account-bar .btn { min-height: 44px; }
}

/* ---------- ลืมรหัสผ่าน ---------- */
.auth-links { margin: 18px 0 0; text-align: center; }
.auth-links [hidden] { display: none; }
.link-btn { padding: 8px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--gold-600); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--emerald-900); }
.auth-card .notice { margin: 0 0 12px; }
.auth-card .btn[hidden], .auth-tabs[hidden], .back-link[hidden] { display: none; }

/* =========================================================
   25. ผู้ดูแลระบบ (admin.html)
   ========================================================= */
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 0 24px; }
.admin-stats > div { padding: 20px 22px; border-radius: var(--radius-lg); border: 1px solid var(--line-warm); background: var(--white); }
.admin-stats dt { font-size: 14px; color: var(--muted); }
.admin-stats dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--emerald-900); }

.admin-grant { margin-bottom: 24px; }
.admin-grant h2 { font-size: 19px; }
.admin-grant-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.admin-grant-actions { display: flex; gap: 10px; }
.admin-grant .notice { margin: 16px 0 0; }

.admin-table-panel { padding: 24px; }
.admin-tabs { max-width: 360px; }
.admin-filters { display: grid; grid-template-columns: minmax(0, 1fr) 200px auto; gap: 16px; align-items: end; margin-bottom: 18px; }
.admin-filters .field[hidden] { display: none; }
.admin-filter-actions { display: flex; gap: 10px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line-warm); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-warm); }
.admin-table th { position: sticky; top: 0; background: var(--ivory-2); font-family: var(--font-head); font-weight: 500; white-space: nowrap; }
.admin-table td { max-width: 280px; overflow-wrap: anywhere; }
.admin-table tbody tr:hover { background: var(--ivory); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.table-empty { margin: 16px 0 0; text-align: center; }
.status-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-family: var(--font-head); white-space: nowrap; background: var(--gray-100); color: var(--muted); }
.status-paid { background: #EEF8EF; color: var(--green-700); }
.status-pending { background: #FFF6E0; color: #8A6212; }
.status-failed, .status-expired { background: #FDECEA; color: #A5281B; }

@media (max-width: 1024px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-grant-row, .admin-filters { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .admin-stats dd { font-size: 22px; }
  .admin-grant-actions .btn, .admin-filter-actions .btn { flex: 1; }
  .admin-table-panel { padding: 18px 14px; }
  /* ตารางแบบการ์ดบนมือถือ */
  .admin-table thead { display: none; }
  .admin-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line-warm); }
  .admin-table td { display: grid; grid-template-columns: 110px 1fr; gap: 8px; max-width: none; padding: 4px 14px; border: 0; }
  .admin-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  .admin-table td:empty { display: none; }
}

/* =========================================================
   รายการคอร์สในสรุปคำสั่งซื้อ (หน้าชำระเงิน)
   ========================================================= */
.cart-list { display: grid; gap: 12px; margin: 0 0 16px; padding: 0; list-style: none; }
.cart-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding-bottom: 12px; border-bottom: 1px solid var(--line-warm); }
.cart-item .summary-thumb { width: 64px; }
.cart-item-body .badge { background: var(--emerald-900); color: var(--gold-300); box-shadow: none; padding: 2px 8px; font-size: 11px; }
.cart-item-body h3 { font-size: 15px; line-height: 1.4; margin: 4px 0 2px; }
.cart-item-meta { margin: 0; font-size: 12px; color: var(--muted); }
.cart-item-side { display: grid; justify-items: end; gap: 6px; }
.cart-item-price { font-family: var(--font-head); font-weight: 600; white-space: nowrap; }
.cart-empty { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

/* =========================================================
   หลักสูตรสอนสด + รายละเอียดหลักสูตรฉบับเต็มในป๊อปอัป
   ========================================================= */
.price.price-ask { font-family: var(--font-head); font-size: 15px; font-weight: 600; }
.course-modal.is-wide { width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; }
.course-modal.is-wide .modal-foot { position: sticky; bottom: -28px; margin: 18px -32px -28px; padding: 16px 32px 20px; background: var(--white); border-top: 1px solid var(--line-warm); }
.modal-detail { margin-top: 18px; }
.detail-lesson-link { margin: 0 0 16px; font-size: 14px; font-weight: 600; }
.detail-block { padding: 16px 0; border-top: 1px solid var(--line-warm); }
.detail-block h4 { margin: 0 0 10px; font-family: var(--font-head); font-size: 16px; color: var(--emerald-900); }
.detail-list { display: grid; gap: 6px; margin: 0; padding-left: 20px; font-size: 14px; color: var(--ink); }
.detail-ws { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.detail-ws li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start; }
.detail-ws strong { display: block; font-family: var(--font-head); font-size: 15px; font-weight: 600; }
.detail-ws small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.ws-code {
  display: inline-grid; place-items: center; min-height: 28px; padding: 2px 8px; border-radius: 8px;
  background: var(--emerald-900); color: var(--gold-300); font-family: var(--font-head); font-size: 12px; font-weight: 600; text-align: center;
}
.modal-detail > .modal-note { margin-top: 4px; }

@media (max-width: 720px) {
  .course-modal.is-wide .modal-foot { bottom: -22px; margin: 18px -20px -22px; padding: 14px 20px 18px; }
  .detail-ws li { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; }
}

/* เมนูไม่ตัดบรรทัด */
.nav-link { white-space: nowrap; }
@media (min-width: 1181px) and (max-width: 1440px) {
  .nav-link { padding-inline: 8px; font-size: 14px; }
  .nav-link::after { left: 8px; right: 8px; }
  .primary-nav { gap: 14px; }
}
/* จอ Desktop: ซ่อนปุ่ม "ดูคอร์สทั้งหมด" (ซ้ำกับเมนูคอร์สออนไลน์) เพื่อให้เมนูพอดีในความกว้าง container
   — ในเมนูมือถือยังแสดงตามเดิม */
@media (min-width: 1181px) {
  .nav-cta { display: none; }
}

/* ราคาหลักสูตรสอนสด: ราคาต่อท่าน + ราคาองค์กร */
.price-unit { margin-left: 2px; font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--muted); }
.price-group { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--ivory-2); font-size: 13px; color: var(--ink); }
.price-group strong { color: var(--emerald-900); font-family: var(--font-head); font-weight: 600; white-space: nowrap; }
.detail-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-prices > div { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line-warm); border-radius: var(--radius); background: var(--white); }
.detail-prices > div.is-best { border-color: var(--gold-500); background: var(--ivory); }
.detail-prices span { font-size: 13px; color: var(--muted); }
.detail-prices strong { font-family: var(--font-display); font-size: 26px; color: var(--emerald-900); line-height: 1.2; }
.detail-prices small { font-size: 13px; color: var(--ink); }
@media (max-width: 480px) { .detail-prices { grid-template-columns: 1fr; } }

/* ราคาหลักสูตรสอนสด: กล่องราคาในป๊อปอัปกดเลือกได้ */
.detail-prices > a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line-warm); border-radius: var(--radius); background: var(--white); color: inherit; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.detail-prices > a.is-best { border-color: var(--gold-500); background: var(--ivory); }
.detail-prices > a:hover, .detail-prices > a:focus-visible { border-color: var(--emerald-900); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.detail-prices em { margin-top: 6px; font-style: normal; font-family: var(--font-head); font-size: 13px; font-weight: 600; color: var(--gold-600); }

/* หน้าชำระเงิน: เลือกราคา + จำนวนผู้เข้าอบรม */
.live-options { margin: 0 0 16px; }
.tier-options { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.tier-options legend { margin-bottom: 8px; font-family: var(--font-head); font-size: 14px; font-weight: 600; }
.tier-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-warm); border-radius: var(--radius-sm); background: var(--white); cursor: pointer; transition: border-color .2s, background-color .2s; }
.tier-option:has(input:checked) { border-color: var(--gold-500); background: var(--ivory); box-shadow: inset 0 0 0 1px var(--gold-500); }
.tier-option input { width: 18px; height: 18px; accent-color: var(--emerald-900); flex-shrink: 0; }
.tier-body { display: grid; gap: 1px; }
.tier-body strong { font-family: var(--font-head); font-size: 16px; color: var(--emerald-900); }
.tier-body small { font-size: 12.5px; color: var(--muted); }
.seats-field { margin-top: 14px; }
.seat-stepper { display: flex; align-items: center; gap: 8px; }
.seat-stepper button { width: 40px; height: 40px; border: 1px solid var(--line-warm); border-radius: 50%; background: var(--white); font-size: 20px; line-height: 1; color: var(--emerald-900); cursor: pointer; }
.seat-stepper button:hover { border-color: var(--emerald-900); }
.seat-stepper button:disabled, .seat-stepper input:disabled { opacity: .5; cursor: not-allowed; }
.seat-stepper input { width: 72px; text-align: center; font-size: 16px; padding: 8px; }
.seat-stepper span { font-size: 14px; color: var(--muted); }

/* =========================================================
   ฟอร์มสมัครหลักสูตรสอนสด: ตัวเลือก รูปแบบ/รอบ/วิธีชำระ + ภาษี
   ========================================================= */
.choice-group { margin: 0 0 18px; padding: 0; border: 0; }
.choice-group legend { margin-bottom: 8px; font-family: var(--font-head); font-size: 15px; font-weight: 600; }
.choice-group legend .optional { margin-left: 6px; font-weight: 400; }
.choice-list { display: grid; gap: 10px; }
.choice { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-warm); border-radius: var(--radius-sm); background: var(--white); cursor: pointer; transition: border-color .2s, background-color .2s; }
.choice:has(input:checked) { border-color: var(--gold-500); background: var(--ivory); box-shadow: inset 0 0 0 1px var(--gold-500); }
.choice input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--emerald-900); flex-shrink: 0; }
.choice-body { display: grid; gap: 2px; }
.choice-body strong { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--emerald-900); }
.choice-body strong .icon { width: 18px; height: 18px; }
.choice-body small { font-size: 13px; color: var(--muted); }
.live-choice { margin-bottom: 6px; }
.check-sub { display: block; font-size: 12.5px; color: var(--muted); }
.wht-box { margin: 4px 0 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--ivory-2); }
.wht-box .check { margin: 0; }
.wht-box .panel-hint { margin: 8px 0 0; font-size: 13px; }
.tax-note { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--gold-500); background: var(--ivory); font-size: 13px; color: var(--ink); }
.summary-tax { margin: -8px 0 16px; font-size: 12.5px; color: var(--muted); }
.footer-legal { margin-top: 6px; font-size: 12.5px; opacity: .75; }

/* หน้าแจ้งชำระเงิน */
.pay-page { max-width: 760px; }
.pay-layout .step-panel h2 { margin: 6px 0 14px; font-size: 22px; }
.pay-layout h3 { margin: 22px 0 10px; font-family: var(--font-head); font-size: 16px; }
.pay-status { display: inline-block; margin: 0; }
.pay-info { display: grid; margin: 0; border-top: 1px solid var(--line-warm); }
.pay-info > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-warm); font-size: 14.5px; }
.pay-info dt { color: var(--muted); }
.pay-info dd { margin: 0; overflow-wrap: anywhere; }
.bank-card { padding: 18px 20px; border: 1px solid var(--gold-500); border-radius: var(--radius); background: var(--ivory); }
.bank-card .bank-name { margin: 0 0 10px; font-family: var(--font-head); font-weight: 600; color: var(--emerald-900); }
.bank-card dl { display: grid; gap: 8px; margin: 0; }
.bank-card dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: center; }
.bank-card dt { font-size: 13px; color: var(--muted); }
.bank-card dd { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.bank-card dd strong { font-family: var(--font-head); font-size: 18px; letter-spacing: .02em; }
.pay-amount { color: var(--emerald-900); font-size: 22px !important; }
.bank-note { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.copy-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--line-warm); border-radius: 999px; background: var(--white); font-size: 12.5px; color: var(--emerald-900); cursor: pointer; }
.copy-btn .icon { width: 14px; height: 14px; }
.copy-btn:hover { border-color: var(--emerald-900); }
@media (max-width: 720px) {
  .pay-info > div, .bank-card dl > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ใบเสร็จรับเงิน (A4) */
.receipt-page { background: #ECEAE4; }
.receipt-toolbar { display: flex; justify-content: center; gap: 10px; padding: 16px; }
.receipt-error { max-width: 760px; margin: 0 auto 16px; }
.receipt { width: min(210mm, calc(100% - 32px)); margin: 0 auto 32px; padding: 14mm 14mm 12mm; background: #fff; color: #111; font-family: var(--font-body); font-size: 13.5px; line-height: 1.55; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .25); }
.receipt-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid #0A1F14; }
.receipt-seller { display: flex; gap: 12px; }
.receipt-seller strong { font-family: var(--font-head); font-size: 16px; }
.receipt-seller p { margin: 2px 0 0; font-size: 12.5px; }
.receipt-title { text-align: right; }
.receipt-title h1 { margin: 0; font-family: var(--font-head); font-size: 24px; }
.receipt-title > p { margin: 0 0 8px; letter-spacing: .2em; font-size: 12px; color: #555; }
.receipt-title dl { display: grid; gap: 2px; margin: 0; font-size: 12.5px; }
.receipt-title dl > div { display: flex; justify-content: flex-end; gap: 8px; }
.receipt-title dt { color: #555; }
.receipt-title dd { margin: 0; font-weight: 600; }
.receipt-payer { margin: 14px 0; }
.receipt-payer h2 { margin: 0 0 4px; font-size: 13px; color: #555; }
.receipt-payer p { margin: 0; }
.receipt-table { width: 100%; border-collapse: collapse; }
.receipt-table th, .receipt-table td { padding: 8px 10px; border: 1px solid #c9c9c9; vertical-align: top; }
.receipt-table th { background: #F3EEE2; font-family: var(--font-head); font-weight: 600; font-size: 12.5px; }
.receipt-table .num { text-align: right; white-space: nowrap; }
.receipt-table tfoot td { font-weight: 500; }
.receipt-table tfoot tr.grand td { font-family: var(--font-head); font-weight: 700; background: #F3EEE2; }
.receipt-words { margin: 8px 0 0; text-align: right; font-weight: 500; }
.receipt-settled { margin: 4px 0 0; font-size: 12.5px; color: #333; }
.receipt-meta { display: flex; gap: 32px; margin: 14px 0 0; }
.receipt-meta dt { font-size: 12px; color: #555; }
.receipt-meta dd { margin: 0; }
.receipt-vat { margin: 14px 0 0; padding: 8px 10px; border: 1px dashed #999; font-size: 12.5px; }
.receipt-sign { display: flex; justify-content: flex-end; margin-top: 36px; text-align: center; }
.receipt-sign .sign-line { display: block; width: 220px; margin: 0 auto 6px; border-bottom: 1px solid #333; height: 28px; }
.receipt-sign p { margin: 0; font-size: 12.5px; }
@media (max-width: 640px) {
  .receipt { padding: 18px; }
  .receipt-head { flex-direction: column; }
  .receipt-title, .receipt-title dl > div { text-align: left; justify-content: flex-start; }
}
@media print {
  @page { size: A4; margin: 0; }
  .receipt-page { background: #fff; }
  .receipt-toolbar { display: none; }
  .receipt { width: 210mm; margin: 0; box-shadow: none; }
}

/* =========================================================
   ชำระเงินง่าย: ขั้นตอน 1-2-3, QR พร้อมเพย์, แนบสลิป, สมัครโดยไม่ต้องมีบัญชี
   ========================================================= */
.pay-step-no { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 6px; border-radius: 50%; background: var(--emerald-900); color: var(--gold-300); font-size: 14px; vertical-align: 1px; }
.qr-box { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; padding: 16px; border: 1px solid var(--line-warm); border-radius: var(--radius); background: var(--white); }
.qr-img { flex: 0 0 180px; width: 180px; height: 180px; }
.qr-img svg { width: 100%; height: 100%; display: block; }
.qr-box strong { font-family: var(--font-head); font-size: 16px; color: var(--emerald-900); }
.qr-box p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.qr-box .qr-amount { margin-top: 8px; font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--emerald-900); }
.slip-drop { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px 16px; border: 2px dashed var(--gold-500); border-radius: var(--radius); background: var(--ivory); color: var(--emerald-900); text-align: center; cursor: pointer; transition: background-color .2s; }
.slip-drop:hover, .slip-drop:focus-within { background: var(--ivory-2); }
.slip-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.slip-drop .icon { width: 26px; height: 26px; flex-shrink: 0; }
.slip-drop.is-busy { opacity: .6; pointer-events: none; }
.slip-status { margin: 10px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ivory-2); font-size: 14px; }
.slip-status.is-done { background: #EEF8EF; color: var(--green-700); }
.slip-status.is-error { background: #FDECEA; color: #A5281B; }
.slip-alt { margin-top: 8px; font-size: 13px; }
.guest-hint { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ivory-2); }
@media (max-width: 560px) {
  .qr-box { flex-direction: column; text-align: center; }
  .qr-img { flex-basis: auto; width: 220px; height: 220px; }
}

/* =========================================================
   คอร์สของฉัน: เลือกซื้อคอร์ส (หลังสมัครสมาชิกซื้อได้ทันที)
   ========================================================= */
.my-course-empty { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--ivory-2); }
.shop { margin-top: 36px; scroll-margin-top: calc(var(--header-h) + 16px); }
.shop-head { margin-bottom: 16px; }
.shop-head h2 { margin: 0; font-size: clamp(22px, 2.6vw, 28px); }
.shop-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.shop-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line-warm); border-radius: var(--radius); background: var(--white); color: inherit; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s; }
.shop-card:hover, .shop-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); }
.shop-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ivory-2); }
.shop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shop-thumb .badge { position: absolute; left: 12px; top: 12px; }
.shop-body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 14px 16px 16px; }
.shop-title { font-family: var(--font-head); font-size: 16px; line-height: 1.4; }
.shop-meta { font-size: 13px; color: var(--muted); }
.shop-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-warm); }
.shop-price { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--emerald-900); }

/* ---------- ห้องเรียน: บทเรียนข้อความ / ไฟล์ประกอบบทเรียน ---------- */
.lesson-body { white-space: normal; }
.lesson-body p { margin: 0 0 12px; white-space: pre-line; }
.lesson-body a { color: var(--gold-600); text-decoration: underline; overflow-wrap: anywhere; }
.lesson-body.is-article { margin: 4px 8px 0; color: var(--ink); font-size: 17px; line-height: 1.85; }
.lesson-files { margin: 20px 8px 4px; padding-top: 16px; border-top: 1px solid var(--line-warm); }
.lesson-files h3 { margin: 0 0 10px; font-size: 16px; }
.lesson-files ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.file-link {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto 20px; gap: 10px; align-items: center;
  padding: 10px 14px; border: 1px solid var(--line-warm); border-radius: 12px; color: var(--ink); text-decoration: none; background: var(--white);
}
.file-link:hover { border-color: var(--gold-400); background: #FFFBEF; }
.file-link .icon { width: 20px; height: 20px; color: var(--gold-600); }
.file-link span { overflow-wrap: anywhere; font-family: var(--font-head); font-size: 15px; }
.file-link small { color: var(--muted); font-size: 13px; }

/* ---------- ประวัติการชำระเงิน (orders.html) ---------- */
.history-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 24px; }
.history-stats > div { padding: 18px 22px; border-radius: var(--radius-lg); border: 1px solid var(--line-warm); background: var(--white); }
.history-stats dt { font-size: 14px; color: var(--muted); }
.history-stats dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--emerald-900); }
.history-tabs { max-width: 620px; margin-bottom: 20px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) { .history-tabs { grid-template-columns: repeat(2, 1fr); } }
.history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.history-card { margin: 0; padding: 22px 24px; }
.history-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-warm); }
.history-head strong { display: block; font-family: var(--font-head); font-size: 16px; }
.history-head small { color: var(--muted); font-size: 13px; }
.history-items { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
.history-items li { display: flex; justify-content: space-between; gap: 16px; }
.history-items small { color: var(--muted); }
.history-price { white-space: nowrap; font-family: var(--font-head); }
.history-sums { display: grid; grid-template-columns: max-content 1fr; gap: 4px 20px; margin: 0; padding-top: 12px; border-top: 1px dashed var(--line-warm); font-size: 14px; }
.history-sums dt { color: var(--muted); }
.history-sums dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.history-sums dd.is-total { font-family: var(--font-head); font-size: 17px; font-weight: 600; color: var(--emerald-900); }
.history-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.history-empty { text-align: center; }
.history-empty a { color: var(--gold-600); }
.history-note { margin-top: 24px; font-size: 13px; text-align: center; }
@media (max-width: 720px) {
  .history-stats { grid-template-columns: 1fr 1fr; }
  .history-stats > div:first-child { grid-column: 1 / -1; }
  .history-stats dd { font-size: 21px; }
  .history-card { padding: 18px 16px; }
  .history-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* วิดีโอบทเรียนจาก Vimeo */
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
