/* ============================================================
   Course 399
   ============================================================ */
:root {
  --green: #2f6f2c;
  --green-d: #1d4a1b;
  --coral: #f2565d;
  --coral-d: #e03f49;
  --brown: #4b2d18;
  --ink: #2b2a25;
  --muted: #5d5c55;
  --cream: #f8f6ea;
  --line: #06c755;
  --shadow: 0 14px 30px -18px rgba(60, 50, 30, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: "Kanit", system-ui, sans-serif; font-weight: 300; font-size: 17px; line-height: 1.6;
  color: var(--ink); background: var(--cream); overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
svg { width: 1em; height: 1em; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.script { font-family: "Mali", cursive; font-style: italic; font-weight: 500; }
.coral { color: var(--coral); }
.green { color: var(--green); }
.brown { color: var(--brown); }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: .5em 1.4em; white-space: nowrap; border-radius: 999px; color: #fff; font-weight: 500; font-size: 1.25rem; line-height: 1.2;
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .45); transition: transform .18s ease, filter .18s ease;
}
.btn svg { font-size: 1.5em; margin-right: .45em; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-green { background: linear-gradient(180deg, #3f9140, #2b7430); }
.btn-coral { background: linear-gradient(180deg, #f8696d, #e8434c); }

/* ---------- HEADER ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 88px; }
.logo { align-self: flex-start; position: relative; z-index: 2; }
.logo img { height: 84px; width: auto; margin-top: 2px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .18)); }
.nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 8px 16px 16px; box-shadow: 0 16px 24px -16px rgba(0, 0, 0, .3); }
.nav.open { display: grid; }
.nav a { padding: 12px 8px; font-weight: 400; border-bottom: 1px solid #eee; }
.nav a.on { color: var(--green); font-weight: 500; }
.header-cta { display: none; min-height: 46px; font-size: 1rem; padding: .4em 1.5em; }
.nav-toggle { width: 46px; height: 46px; border: 0; background: none; display: grid; place-content: center; gap: 6px; cursor: pointer; }
.nav-toggle span { width: 26px; height: 2.5px; border-radius: 2px; background: var(--green-d); }

/* ---------- HERO ---------- */
.hero { --u: 2.25vw; position: relative; display: flex; flex-direction: column; background: linear-gradient(180deg, #e9f4f6, #fbf6ea 70%); }
.hero-copy { position: relative; z-index: 2; order: -1; padding: calc(var(--u) * 5) 16px calc(var(--u) * 3); text-align: center; }
.hero h1 { transform: rotate(-4deg); margin: calc(var(--u) * 1.2) 0 calc(var(--u) * 1.4); font-weight: 700; font-style: italic; line-height: 1.12; }
.hero h1 span { display: block; }
.h-course { font-size: calc(var(--u) * 5.8); color: var(--green-d); line-height: 1; }
.h-course em { font-size: 1.28em; color: var(--coral); padding: 0 .12em; background: radial-gradient(ellipse at center, rgba(250, 205, 200, .95) 0 55%, rgba(250, 205, 200, 0) 72%); text-shadow: 0 2px 0 rgba(255, 255, 255, .5); }
.h-line { font-size: calc(var(--u) * 3.5); background: linear-gradient(90deg, #1d4a1b, #4b2d18 70%); -webkit-background-clip: text; background-clip: text; color: transparent; padding: .1em .2em; }
.h-line svg { color: #c8704f; font-size: .7em; vertical-align: .05em; }
.hero-sub { display: inline-block; transform: rotate(-3deg); font-weight: 400; font-size: calc(var(--u) * 2); line-height: 1.35; padding-bottom: .35em; border-bottom: 3px solid var(--coral); border-radius: 0 0 60% 40% / 0 0 8px 8px; }
.price-pill {
  display: flex; align-items: center; justify-content: center; gap: .25em; width: fit-content; margin: calc(var(--u) * 2) auto calc(var(--u) * 2);
  padding: .12em 1.1em; border-radius: 999px; color: #fff; font-weight: 700; font-style: italic; font-size: calc(var(--u) * 2.7); line-height: 1.2;
  background: linear-gradient(180deg, #f96f72, #e8434c); box-shadow: 0 12px 22px -10px rgba(226, 63, 74, .8); transition: transform .18s ease;
}
.price-pill:hover { transform: scale(1.03); }
.price-pill b { font-size: 1.55em; font-weight: 700; }
.price-pill svg { font-size: .7em; align-self: flex-start; margin-top: .5em; }
.hero-points { display: grid; grid-template-columns: repeat(3, 1fr); font-weight: 400; font-size: max(12px, calc(var(--u) * 1.32)); line-height: 1.35; }
.hero-points li { padding: 0 .4em; border-left: 1px solid rgba(0, 0, 0, .14); }
.hero-points li:first-child { border-left: 0; }
.hero-points svg { display: block; margin: 0 auto .15em; font-size: 2.6em; color: var(--green); }
.hero-photo { position: relative; height: 110vw; background: url("../images/hero-coach.jpg") center 18% / cover no-repeat; }
.hero-note {
  position: absolute; right: 3%; top: 60%; width: 36vw; height: 36vw; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: rgba(253, 226, 221, .93); box-shadow: 0 0 0 6px rgba(253, 226, 221, .45); transform: rotate(-9deg);
  font-size: calc(var(--u) * 1.6); line-height: 1.5; color: #2b2a25;
}
.hero-note svg { color: var(--coral); vertical-align: -.15em; font-size: 1.2em; }

/* ---------- VIDEO ---------- */
.video { background: var(--cream); padding: 36px 16px 8px; }
.video-frame { position: relative; height: 0; padding-top: 56.25%; max-width: 1000px; margin: 0 auto; background: #000; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 44px -24px rgba(40, 50, 30, .6); }
.video-frame iframe, .video-frame img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-frame .play { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-items: center; }
.video-frame .play i { width: 84px; height: 58px; border-radius: 16px; background: #f00; position: relative; }
.video-frame .play i::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -13px 0 0 -9px; border: 13px solid transparent; border-left: 22px solid #fff; border-right: 0; }

/* ---------- หัวข้อ ---------- */
.section { position: relative; padding: 44px 0 48px; }
.sec-title { text-align: center; font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.7rem); font-weight: 600; line-height: 1.25; color: var(--green-d); }
.sec-title svg { color: #a9c79a; font-size: 1em; vertical-align: -.1em; margin: 0 .25em; }
.sec-title .flip { transform: scaleX(-1); }
.stroke { display: block; width: 9.5em; max-width: 60%; height: 5px; margin: 2px auto 26px; border-radius: 50%; background: var(--green); transform: rotate(-1.2deg); }
.sec-lead { text-align: center; max-width: 720px; margin: -10px auto 26px; color: var(--muted); }

/* ---------- การ์ด 6 ใบ ---------- */
.cards { display: grid; gap: 16px; }
.card { position: relative; overflow: hidden; background: #fff; border-radius: 20px; box-shadow: var(--shadow); min-height: 176px; padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; }
.card > img { position: absolute; right: 0; top: 0; height: 100%; width: auto; max-width: 58%; object-fit: cover; object-position: right center; -webkit-mask-image: linear-gradient(90deg, transparent, #000 34%); mask-image: linear-gradient(90deg, transparent, #000 34%); }
.card > * { position: relative; }
.card .ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 30px; margin-bottom: 8px; background: #5d9247; }
.card .ico.c { background: #f26a6c; }
.card .ico.t { background: #2aa3dc; }
.card h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.3; color: #26251f; max-width: 62%; text-shadow: 0 0 6px #fff, 0 0 6px #fff; }
.card p { font-weight: 300; color: var(--muted); line-height: 1.45; margin-top: 4px; max-width: 58%; text-shadow: 0 0 6px #fff, 0 0 6px #fff; }

/* ---------- เหมาะกับใคร ---------- */
.who { background: #fbfaf2; }
.who-grid { display: grid; gap: 34px; align-items: center; }
.who-pics { position: relative; width: min(420px, 88%); margin: 0 auto 0 0; padding: 0 0 34px 0; }
.who-pics::before { content: ""; position: absolute; left: -14px; top: 22px; right: 20px; bottom: 16px; border-radius: 34px; background: #dbe8cf; transform: rotate(-3deg); }
.who-a { position: relative; width: 100%; border-radius: 30px; box-shadow: var(--shadow); }
.who-b { position: absolute; right: -11%; bottom: 0; width: 44%; border-radius: 50%; border: 6px solid #fff; box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .45); }
.who-note { position: absolute; left: 6%; bottom: 8px; padding: 8px 16px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); font-size: .95rem; line-height: 1.45; transform: rotate(-3deg); }
.who-note svg, .who-quote svg { color: var(--coral); vertical-align: -.15em; }
.who-body .sec-title { text-align: left; color: var(--brown); }
.who-body .stroke { margin: 2px 0 24px 2.2em; }
.checks { display: grid; gap: 12px; font-weight: 400; font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); }
.checks li { display: flex; align-items: center; line-height: 1.35; padding: 13px 18px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.checks svg { font-size: 1.7em; color: #3c8a3a; margin-right: .4em; }
.who-quote { margin-top: 22px; font-size: 1.15rem; color: var(--brown); }

/* ---------- แถบจุดเด่น ---------- */
.feats { background: #fbf4ea; padding: 22px 0; }
.feats ul { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 10px; }
.feats li { display: flex; align-items: center; font-weight: 400; line-height: 1.4; }
.feats li > svg { font-size: 2.6rem; color: var(--green); margin-right: 12px; }
.feats li > svg.coral { color: var(--coral); }
.feats .sprig { display: none; }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; text-align: center; padding-top: 250px; background: #f3efe2 url("../images/cta-beach.jpg") right top / auto 270px no-repeat; }
.cta-body { position: relative; padding: 26px 16px 40px; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 22px); }
.cta h2 { font-size: clamp(1.3rem, .7rem + 2.9vw, 2.9rem); font-weight: 600; line-height: 1.3; color: var(--brown); }
.cta-sub { font-weight: 400; font-size: clamp(1.05rem, .9rem + .8vw, 1.5rem); margin: 4px 0 18px; }
.cta-sub svg { color: var(--coral); vertical-align: -.12em; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; margin: -7px; }
.cta-actions .btn { margin: 7px; flex: 1 1 220px; max-width: 300px; min-height: 64px; font-size: 1.45rem; }
.cta-tag { margin-top: 18px; font-weight: 400; }
.cta-tag svg { color: var(--green); font-size: 1.5em; vertical-align: -.25em; margin-right: .3em; }

/* ---------- หัวหน้าเพจย่อย ---------- */
.page-head { position: relative; padding: 46px 16px 40px; text-align: center; background: #dff0f1 url("../images/beach.jpg") center 60% / cover no-repeat; }
.page-head::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: radial-gradient(ellipse at center, rgba(255, 255, 255, .94) 0 35%, rgba(255, 255, 255, .35) 80%); }
.page-head > * { position: relative; }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.2rem); font-weight: 700; font-style: italic; line-height: 1.2; color: var(--green-d); }
.page-head p { font-weight: 400; font-size: 1.1rem; }

/* ---------- แกลเลอรี ---------- */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.gallery a { display: block; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery.square a, .gallery.tall a { position: relative; height: 0; padding-top: 100%; }
.gallery.tall a { padding-top: 133.33%; }
.gallery.square img, .gallery.tall img { position: absolute; top: 0; left: 0; }
.gallery.tall img { object-position: 50% 20%; }
.gallery.full img { height: auto; }
.reviews { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.reviews img { width: 130px; height: auto; border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.lightbox { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100; display: none; place-items: center; padding: 16px; background: rgba(20, 20, 15, .88); cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 32px); border-radius: 10px; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.faq-list details { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 0 18px; }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; font-weight: 500; font-size: 1.1rem; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary svg { font-size: 1.4rem; color: var(--coral); transition: transform .2s ease; }
.faq-list details[open] summary svg { transform: rotate(45deg); }
.faq-list details p { padding: 0 0 16px; color: var(--muted); }

/* ---------- ปุ่มลอยบนมือถือ (Facebook / LINE) ---------- */
.fab { position: fixed; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; display: grid; gap: 12px; }
.fab-btn { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 6px 16px -4px rgba(0, 0, 0, .4); transition: transform .18s ease; }
.fab-btn[hidden] { display: none; }
.fab-btn:active { transform: scale(.94); }
.fab-fb { background: #fff; }
.fab-fb img { width: 100%; height: 100%; border-radius: 50%; }
.fab-line { background: var(--line); color: #fff; }
.fab-line svg { width: 36px; height: 36px; }

/* ============================================================
   แท็บเล็ตขึ้นไป
   ============================================================ */
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .feats ul { grid-template-columns: repeat(4, auto); justify-content: space-between; }
  .cta { padding: 0; min-height: 33vw; display: grid; align-items: center; background-size: cover; background-position: right center; }
  .cta-body { margin-right: 38%; padding: 30px 3vw; background: none; }
  .cta-body::before { content: ""; position: absolute; top: -12%; bottom: -12%; left: -4%; right: -4%; background: radial-gradient(ellipse at center, rgba(255, 255, 255, .96) 0 48%, rgba(255, 255, 255, 0) 72%); }
  .cta-body > * { position: relative; }
}

/* ============================================================
   จอคอมพิวเตอร์
   ============================================================ */
@media (min-width: 1000px) {
  .header-inner { height: 80px; }
  .logo img { height: 158px; }
  .nav-toggle { display: none; }
  .nav { display: flex; position: static; gap: 34px; padding: 0; background: none; box-shadow: none; }
  .nav a { padding: 6px 0; border-bottom: 2px solid transparent; }
  .nav a:hover, .nav a.on { color: var(--green); border-bottom-color: var(--green); }
  .header-cta { display: inline-flex; }

  .hero { --u: 1vw; display: block; height: 50vw; background: linear-gradient(115deg, #eaf3e1, #fbf6ea 55%, #fdece6); }
  .hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 46%; height: auto; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24%); mask-image: linear-gradient(90deg, transparent, #000 24%); }
  .hero-copy { position: absolute; left: 6vw; top: 53%; width: 49vw; padding: 0; transform: translateY(-50%); }
  .hero-copy::before { content: ""; position: absolute; top: -4vw; bottom: -4vw; left: -3vw; right: -3vw; z-index: -1; background: radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, .96) 0 46%, rgba(255, 255, 255, 0) 73%); }
  .hero-note { right: 4%; top: 60%; width: 15.6vw; height: 15.6vw; }

  .video { padding: 64px 16px 10px; }
  .section { padding: 54px 0 60px; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .card { min-height: 215px; padding: 20px 26px; }
  .card .ico { width: 62px; height: 62px; font-size: 34px; }

  .who-grid { grid-template-columns: 42% 1fr; gap: 70px; }
  .who-pics { margin: 0 auto; }
  .feats { padding: 28px 0; }
  .feats ul { align-items: center; padding: 0 70px; position: relative; }
  .feats li { font-size: 1.05rem; }
  .feats li + li { border-left: 1px solid rgba(0, 0, 0, .14); padding-left: 44px; }
  .feats .sprig { display: block; position: absolute; top: 50%; left: 0; font-size: 3.6rem; color: #b9d0a9; transform: translateY(-50%) rotate(-25deg); }
  .feats .sprig.r { left: auto; right: 0; transform: translateY(-50%) scaleX(-1) rotate(-25deg); }

  .cta-body { margin: 0 40% 0 3%; }
  .cta-actions .btn { min-height: 72px; font-size: 1.6rem; }
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .gallery.full { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .gallery.tall { grid-template-columns: repeat(5, 1fr); }
  .fab { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
