/* Premium English Learning — หน้าบ้าน
   โทน: ทางการ น่าเชื่อถือ เรียบ สะอาดตา · น้ำเงินกรมท่า + ครีมอบอุ่น · ส้มจากโลโก้ใช้เป็นเส้นเน้นเท่านั้น
   สีหลัก/พื้น/ฟอนต์ ฉีดทับจาก site.config.js → brand.color + theme
   กฎเหล็ก: ทุกส่วนต้องยังสวยเมื่อข้อความสั้นมากหรือยาวมาก และต้องไม่ล้นจอที่ 360px */

:root {
  --accent: #1f3a6e;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 8%, var(--paper));
  --deep: #12203f;
  --warm: #c8742a;
  --ink: #14213d;
  --muted: #55607a;
  --paper: #fbf8f1;
  --paper-2: #f3ecdf;
  --card: #ffffff;
  --line: #e5ddcd;
  --line-strong: #d6cbb6;
  --radius: 10px;
  --font: 'IBM Plex Sans Thai', -apple-system, 'Segoe UI', sans-serif;
  --display: var(--font);
  --gap: clamp(64px, 9vw, 120px);
  --pad: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow: 0 1px 2px rgba(20, 33, 61, .05), 0 8px 24px -12px rgba(20, 33, 61, .18);
  --shadow-up: 0 2px 4px rgba(20, 33, 61, .06), 0 18px 36px -16px rgba(20, 33, 61, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper);
  font-size: 17px; line-height: 1.75; -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.42; margin: 0; text-wrap: balance; font-weight: 700; }
p { text-wrap: pretty; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
:focus-visible { outline: 2px solid var(--warm); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: #fff;
  padding: 10px 16px; border-radius: 8px; text-decoration: none; transition: top .2s var(--ease);
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
.sec { padding-block: var(--gap); }
.sec-alt { background: var(--paper-2); }
.sec + .sec:not(.sec-alt):not(.cta-band) { border-top: 1px solid var(--line); }

/* หัวข้อของแต่ละส่วน มีเส้นส้มสั้นนำหน้า เป็นลายเซ็นของแบรนด์ */
.sec-head { max-width: 640px; margin-bottom: clamp(32px, 4.5vw, 56px); }
.sec-head h2, .about-text h2, .prose h2 {
  font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.005em; color: var(--deep);
}
.sec-head h2::before, .about-text h2::before {
  content: ''; display: block; width: 40px; height: 3px; border-radius: 2px;
  background: var(--warm); margin-bottom: 18px;
}
.sec-head p { color: var(--muted); margin: 14px 0 0; font-size: 17.5px; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: 8px; font: inherit; font-size: 16.5px; font-weight: 600;
  line-height: 1.45; background: var(--accent); color: var(--accent-ink); text-decoration: none;
  border: 1.5px solid var(--accent); cursor: pointer; min-height: 50px;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: var(--deep); border-color: var(--deep); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; }
.btn-arrow { width: 16px; height: 16px; position: relative; flex: none; order: 2; }
.btn-arrow::before {
  content: ''; position: absolute; inset: 0; margin: auto; width: 8px; height: 8px;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateX(-2px) rotate(45deg);
  transition: transform .2s var(--ease);
}
.btn:hover .btn-arrow::before { transform: translateX(1px) rotate(45deg); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--card); color: var(--deep); border-color: var(--accent); }
.btn-light { background: #fff; color: var(--deep); border-color: #fff; }
.btn-light:hover { background: var(--paper); color: var(--deep); border-color: var(--paper); }
/* ปุ่มไลน์ใช้สีทางการของ LINE */
.btn-line, .btn[href*="line.me"] { background: #06c755; border-color: #06c755; color: #fff; }
.btn-line:hover, .btn[href*="line.me"]:hover { background: #05a647; border-color: #05a647; color: #fff; }
.btn-line svg, .btn[href*="line.me"] svg { fill: #fff; stroke: none; }

.tag {
  display: inline-block; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; color: var(--warm);
  margin-bottom: 6px;
}

/* ---------- เมนูบน ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: saturate(150%) blur(12px); -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(20, 33, 61, .35); }
.nav-in { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; color: var(--deep); min-width: 0; }
.logo img { width: 52px; height: 52px; border-radius: 50%; object-fit: contain; background: #fff; flex: none; }
.logo span { font-size: 18px; line-height: 1.4; letter-spacing: .005em; }
#site-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 2px; }
#site-nav > a:not(.btn) {
  text-decoration: none; padding: 10px 14px; border-radius: 8px; font-size: 16px; color: var(--muted);
  position: relative; transition: color .2s var(--ease);
}
#site-nav > a:not(.btn):hover { color: var(--deep); }
#site-nav > a[aria-current="page"] { color: var(--deep); font-weight: 600; }
#site-nav > a[aria-current="page"]::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--warm); border-radius: 2px;
}
.nav-cta { margin-inline-start: 10px; min-height: 44px; padding: 9px 18px; font-size: 15.5px; }
.nav-toggle { display: none; }

/* ---------- แบนเนอร์ ---------- */
.hero { position: relative; overflow: hidden; background: var(--deep); }
.hero-track { display: flex; transition: transform .7s var(--ease); }
.hero-slide { position: relative; flex: 0 0 100%; }
.hero picture, .hero picture img, .hero picture video { display: block; width: 100%; height: 100%; }
.hero-full .hero-slide, .hero-compact .hero-slide { display: grid; align-items: end; }
.hero-full picture, .hero-compact picture { position: absolute; inset: 0; }
.hero-full picture img, .hero-full picture video, .hero-compact picture img, .hero-compact picture video {
  object-fit: cover; object-position: 55% 30%;
}
.hero-full .hero-slide { min-height: min(86vh, 760px); }
.hero-compact .hero-slide { min-height: clamp(300px, 42vh, 420px); }
.hero-full .hero-slide::after, .hero-compact .hero-slide::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(14, 25, 52, .92) 0%, rgba(14, 25, 52, .72) 38%, rgba(14, 25, 52, .12) 72%, rgba(14, 25, 52, 0) 100%),
    linear-gradient(0deg, rgba(14, 25, 52, .55) 0%, rgba(14, 25, 52, 0) 45%);
}
.hero-slide > .wrap { position: relative; z-index: 2; width: 100%; }
.hero-body { color: #fff; padding-block: clamp(56px, 9vw, 120px); max-width: 620px; }
.hero-compact .hero-body { padding-block: clamp(48px, 6vw, 72px); }
.hero-title {
  font-size: clamp(34px, 5.4vw, 62px); line-height: 1.4; margin: 0 0 18px; font-weight: 700;
  letter-spacing: -.01em; text-wrap: balance;
}
.hero-compact .hero-title { font-size: clamp(30px, 4.4vw, 50px); }
.hero-sub { font-size: clamp(17px, 1.6vw, 20px); margin: 0 0 32px; max-width: 52ch; color: rgba(255, 255, 255, .88); line-height: 1.7; }
.hero-compact .hero-sub { margin-bottom: 0; }
.hero-compact .hero-actions { margin-top: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.hero-call {
  display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600;
  padding-block: 8px; border-bottom: 1px solid rgba(255, 255, 255, .35); transition: border-color .2s var(--ease);
}
.hero-call:hover { border-color: #fff; }
.hero-call svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; }

/* แบบแบ่งครึ่ง รูปกับข้อความคนละฝั่ง ไม่มีตัวหนังสือทับรูป */
.hero-split { background: var(--paper-2); }
.hero-split-in { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; padding-block: clamp(40px, 6vw, 80px); }
.hero-split .hero-body { color: var(--ink); padding: 0; }
.hero-split .hero-sub { color: var(--muted); }
.hero-split .hero-title { color: var(--deep); }
.hero-split .hero-pic img, .hero-split .hero-pic video { border-radius: var(--radius); }

.hero-dots {
  display: flex; gap: 8px; position: absolute; left: 0; right: 0; bottom: 24px; z-index: 3;
  max-width: var(--max); margin: 0 auto; padding-inline: var(--pad);
}
.hero-split .hero-dots { position: static; padding-bottom: 24px; }
.hero-dots button {
  width: 28px; height: 4px; border-radius: 2px; border: 0; padding: 10px 0; cursor: pointer; background-clip: content-box;
  background-color: rgba(255, 255, 255, .4); transition: background-color .25s var(--ease), width .25s var(--ease);
}
.hero-dots button[aria-current="true"] { background-color: #fff; width: 48px; }
.hero-split .hero-dots button { background-color: var(--line-strong); }
.hero-split .hero-dots button[aria-current="true"] { background-color: var(--accent); }

/* ---------- จุดเด่น ---------- */
.features-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 30px);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); border-color: var(--line-strong); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--accent-soft); color: var(--accent);
}
.feature-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.feature h3 { font-size: clamp(17px, 1.5vw, 20px); margin-bottom: 8px; color: var(--deep); }
.feature p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }

/* ---------- เกี่ยวกับ ---------- */
.about { display: grid; gap: clamp(28px, 5vw, 72px); align-items: center; }
.about-pic img, .about-pic video { width: 100%; border-radius: var(--radius); }
.about-text p { color: var(--muted); margin: 0 0 18px; font-size: 17.5px; }
.about-text h2 { margin-bottom: 22px; }
.about-text .btn { margin-top: 10px; }
.about.no-pic { max-width: 760px; }

/* ---------- บริการ ---------- */
.cards { display: grid; gap: clamp(12px, 2vw, 24px); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); border-color: var(--line-strong); }
/* รูปบริการคงสัดส่วนไฟล์จริง ไม่ครอป */
.card-pic { background: var(--paper-2); }
.card-pic img { width: 100%; height: auto; }
.card-pic-none {
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--deep) 100%);
}
.card-pic-none span { font-size: clamp(36px, 5vw, 56px); font-weight: 700; color: rgba(255, 255, 255, .9); letter-spacing: .02em; }
.card-pic-none span::after { content: ''; display: block; width: 28px; height: 3px; background: var(--warm); margin: 6px auto 0; border-radius: 2px; }
.card-body { padding: clamp(18px, 2.2vw, 26px); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: clamp(17px, 1.6vw, 21px); color: var(--deep); }
.card-body p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.card-price { font-weight: 700; font-size: 18px; margin-top: auto; padding-top: 8px; }
.card-price s { color: var(--muted); font-weight: 400; font-size: 15px; margin-inline-start: 8px; }
.card .btn { margin-top: 12px; width: 100%; }
.card-sold { color: var(--muted); font-weight: 600; font-size: 15px; margin-top: auto; padding-top: 8px; }

/* แบบรายการ เหมาะกับหน้าบริการ เน้นข้อมูล */
.rows { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
.row-item {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: start;
  padding: clamp(22px, 3vw, 34px) 0; border-bottom: 1px solid var(--line-strong);
}
.row-no { font-size: clamp(28px, 3vw, 40px); font-weight: 700; color: var(--warm); line-height: 1.4; min-width: 2.2ch; }
.row-pic { grid-column: 2; max-width: 520px; }
.row-pic img { border-radius: var(--radius); }
.row-text { grid-column: 2; }
.row-text h3 { font-size: clamp(20px, 2.2vw, 26px); color: var(--deep); }
.row-text p { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.row-cta { grid-column: 2; display: flex; align-items: center; gap: 16px; margin-top: 8px; }

/* ---------- ผลงาน — masonry คงสัดส่วนรูปจริง ไม่ครอป ไม่มีกรอบ ---------- */
.gal { columns: 2; column-gap: 10px; }
.gal-item { break-inside: avoid; margin: 0 0 10px; }
.gal-item a { display: block; overflow: hidden; border-radius: 8px; cursor: zoom-in; }
.gal-item img { width: 100%; transition: transform .5s var(--ease); }
.gal-item a:hover img { transform: scale(1.025); }
.gal-item video { width: 100%; border-radius: 8px; background: #000; }
.gal-item figcaption { padding: 10px 2px 6px; font-size: 15px; line-height: 1.55; }
.gal-item figcaption b { display: block; color: var(--deep); font-weight: 600; }
.gal-item figcaption span { color: var(--muted); }

dialog.light { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; overflow: visible; }
dialog.light::backdrop { background: rgba(10, 16, 32, .9); }
dialog.light img { max-height: 88vh; width: auto; border-radius: 8px; }
dialog.light button {
  position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer;
}
dialog.light button svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }

/* ---------- เสียงจากลูกค้า ---------- */
.quotes { display: grid; gap: clamp(12px, 2vw, 24px); }
.quote {
  margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column;
}
.quote-mark { width: 30px; height: 22px; fill: var(--warm); margin-bottom: 16px; opacity: .9; }
.quote blockquote { margin: 0 0 22px; flex: 1; }
.quote blockquote p { margin: 0; font-size: 17px; line-height: 1.8; color: var(--ink); }
.quote figcaption { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.quote figcaption img, .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.quote b { display: block; font-size: 16px; color: var(--deep); line-height: 1.5; }
.quote figcaption span span { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* ---------- คำถามที่พบบ่อย ---------- */
.faq-wrap { display: grid; gap: 8px 64px; }
.faq-head { margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq details:first-child { border-top: 1px solid var(--line-strong); }
.faq summary {
  cursor: pointer; padding: 22px 48px 22px 0; font-weight: 600; position: relative; list-style: none;
  font-size: 18px; line-height: 1.55; color: var(--deep);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ''; position: absolute; right: 10px; top: 50%; width: 16px; height: 2px; background: var(--accent);
  border-radius: 2px; transition: transform .25s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { color: var(--accent); }
.faq .faq-a { padding: 0 48px 24px 0; color: var(--muted); margin: 0; white-space: pre-line; }

/* ---------- แถบชวนติดต่อ ---------- */
.cta-band { position: relative; overflow: hidden; }
.cta-dark { background: var(--deep); color: #fff; }
.cta-dark::before {
  content: ''; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 0 0 60px rgba(255, 255, 255, .025), 0 0 0 140px rgba(255, 255, 255, .02);
  pointer-events: none;
}
.cta-soft { background: var(--accent-soft); }
.cta-in { display: grid; gap: 28px; justify-items: start; position: relative; }
.cta-band h2 { font-size: clamp(26px, 3.4vw, 40px); max-width: 26ch; line-height: 1.45; }
.cta-soft h2 { color: var(--deep); }

/* ---------- ติดต่อ ---------- */
.contact { display: grid; gap: clamp(28px, 4vw, 56px); align-items: start; }
.contact-info .note { color: var(--muted); margin-bottom: 26px; }
.contact-info .note p { margin: 0 0 10px; }
.contact-list { display: grid; gap: 0; margin: 0 0 8px; padding: 0; list-style: none; }
.contact-list li, .hours-box {
  display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line);
}
.contact-list svg, .hours-box svg {
  width: 22px; height: 22px; flex: none; margin-top: 3px; stroke: var(--accent); fill: none; stroke-width: 1.6;
}
.contact-list small, .hours-box small { display: block; font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 2px; }
.contact-list span, .hours-box span { min-width: 0; overflow-wrap: anywhere; }
.contact-list a { text-decoration: none; font-weight: 600; color: var(--deep); }
.contact-list a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.hours-box { border-bottom: 0; font-weight: 600; color: var(--deep); }
.hours { margin: 0; padding: 0; list-style: none; font-size: 15.5px; }
.hours li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed var(--line); max-width: 360px; }
.hours .closed { color: var(--muted); }
.map-box { margin-top: clamp(28px, 4vw, 48px); position: relative; }
.map { border: 0; width: 100%; height: clamp(300px, 40vw, 440px); border-radius: var(--radius); display: block; background: var(--paper-2); }
.map-open { margin-top: 14px; }

form.lead {
  display: grid; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 36px); box-shadow: var(--shadow);
}
form.lead h3 { font-size: clamp(20px, 2vw, 24px); color: var(--deep); margin-bottom: 4px; }
form.lead label { font-size: 15px; font-weight: 600; display: block; margin-bottom: 6px; }
form.lead .opt { font-weight: 400; color: var(--muted); }
form.lead input:not([type=radio]), form.lead textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; min-height: 50px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
form.lead input:focus, form.lead textarea:focus {
  outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
form.lead textarea { min-height: 128px; resize: vertical; }
form.lead textarea::placeholder { color: #99a0b0; }
form.lead .two { display: grid; gap: 16px; }
form.lead .role { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
form.lead .role legend { font-size: 15px; font-weight: 600; margin-bottom: 8px; padding: 0; }
form.lead .role label { margin: 0; font-weight: 500; font-size: 15px; cursor: pointer; }
form.lead .role input { position: absolute; opacity: 0; pointer-events: none; }
form.lead .role span {
  display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper); transition: all .2s var(--ease);
}
form.lead .role input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
form.lead .role input:focus-visible + span { outline: 2px solid var(--warm); outline-offset: 2px; }
form.lead .btn { width: 100%; }
form.lead .btn:disabled { opacity: .6; cursor: progress; }
form.lead .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
form.lead .msg { font-size: 15px; margin: 0; min-height: 1em; }
form.lead .msg.ok { color: #13784a; font-weight: 600; }
form.lead .msg.bad { color: #b3261e; font-weight: 600; }

/* ---------- ข้อความอิสระ ---------- */
.prose { max-width: 720px; }
.prose-wide { max-width: none; }
.prose h2 { margin-bottom: 18px; }
.prose p { color: var(--muted); }

/* ---------- บทความ (ใช้เมื่อเปิดระบบบทความ) ---------- */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.a-wrap { max-width: 760px; }
.a-wrap h1 { font-size: clamp(28px, 4.2vw, 42px); margin-bottom: 12px; color: var(--deep); }
.a-meta { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.a-cover { margin: 0 0 26px; }
.a-cover img { width: 100%; border-radius: var(--radius); }
.a-lead { font-size: 19px; color: var(--muted); margin: 0 0 26px; line-height: 1.8; }
.a-toc { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 32px; }
.a-toc b { display: block; font-size: 15px; margin-bottom: 8px; }
.a-toc ol { margin: 0; padding-inline-start: 20px; }
.a-toc a { color: var(--muted); text-decoration: none; }
.a-toc a:hover { color: var(--accent); text-decoration: underline; }
.a-body > * { margin-block: 0 20px; }
.a-body h2 { font-size: clamp(22px, 3vw, 28px); margin-block: 44px 14px; scroll-margin-top: 96px; color: var(--deep); }
.a-body h3 { font-size: clamp(19px, 2.4vw, 22px); margin-block: 30px 10px; }
.a-body p { line-height: 1.9; }
/* :not(.btn) สำคัญ — ไม่งั้นกฎนี้จะทับสีตัวอักษรของปุ่ม */
.a-body a:not(.btn) { color: var(--accent); text-underline-offset: 3px; }
.a-body ul, .a-body ol { padding-inline-start: 24px; line-height: 1.9; }
.a-body blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-inline-start: 3px solid var(--warm); }
.a-body blockquote p { font-size: 18px; margin-bottom: 8px; }
.a-body blockquote cite { color: var(--muted); font-size: 15px; font-style: normal; }
.a-fig { margin: 28px 0; }
.a-fig img { width: 100%; border-radius: var(--radius); }
.a-fig figcaption { color: var(--muted); font-size: 14.5px; margin-top: 8px; text-align: center; }
.a-cta { background: var(--accent-soft); border-radius: var(--radius); padding: 24px; text-align: center; margin: 32px 0; }
.a-cta p { margin: 0 0 14px; }
.a-embed { margin: 32px 0; }
.a-embed h3 { margin-block: 0 14px; font-size: 19px; }
.a-embed .card-body h4 { margin: 0; font-size: 16px; }
.a-related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.a-related li a { display: block; padding: 13px 16px; background: var(--paper-2); border-radius: 8px; text-decoration: none; font-weight: 600; }
.a-related li a:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- ท้ายเว็บ ---------- */
.foot { background: var(--deep); color: rgba(255, 255, 255, .9); padding-block: clamp(56px, 7vw, 88px) 28px; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-grid { display: grid; gap: 36px; }
.foot-logo img { width: 64px; height: 64px; border-radius: 50%; background: #fff; object-fit: contain; margin-bottom: 16px; }
.foot-brand b { font-size: 20px; color: #fff; display: block; }
.foot-tag { color: #e9a868 !important; font-weight: 600; margin: 4px 0 14px !important; }
.foot p { margin: 0 0 8px; color: rgba(255, 255, 255, .72); font-size: 15.5px; line-height: 1.7; }
.foot-h { font-size: 14px; letter-spacing: .06em; color: rgba(255, 255, 255, .55); margin-bottom: 14px; font-weight: 600; }
.foot-nav { display: grid; gap: 6px; }
.foot-nav a { color: rgba(255, 255, 255, .8); font-size: 15.5px; }
.foot-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12);
}
.foot small { color: rgba(255, 255, 255, .55); font-size: 14px; }
.social { display: flex; gap: 10px; }
.social a {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); color: #fff; transition: background-color .2s var(--ease);
}
.social a:hover { background: rgba(255, 255, 255, .18); }
.social svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* ปุ่มติดต่อลอยบนมือถือ — ไลน์กับโทรเท่านั้น */
.float-contact { display: none; }

/* ---------- เนื้อหาปรากฏตอนเลื่อนถึง (เปิดเฉพาะเมื่อ JS ทำงาน) ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: calc(min(var(--d, 0), 6) * 70ms); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }

/* ---------- จอกลางขึ้นไป ---------- */
@media (min-width: 480px) {
  .gal { columns: 3; }
  .features-grid { grid-template-columns: repeat(min(var(--cols, 3), 3), 1fr); }
  form.lead .two { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .cards { grid-template-columns: repeat(var(--cols, 3), 1fr); }
  .quotes { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .about { grid-template-columns: 1.05fr 1fr; }
  .about.pic-right .about-text { order: -1; }
  .about.pic-right { grid-template-columns: 1fr 1.05fr; }
  .hero-split-in { grid-template-columns: 1fr 1fr; }
  .row-item { grid-template-columns: 5ch 1fr minmax(0, 300px); gap: 8px 32px; }
  .row-pic { grid-column: 3; grid-row: 1 / span 2; }
  .row-text { grid-column: 2; grid-row: 1; }
  .row-cta { grid-column: 2; }
  .foot-grid { grid-template-columns: 1.4fr 1fr .8fr; gap: 48px; }
}
@media (min-width: 1024px) {
  .gal { columns: var(--cols, 4); column-gap: 14px; }
  .gal-item { margin-bottom: 14px; }
  .features-grid { grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 20px; }
  .contact { grid-template-columns: 1fr 1.15fr; }
  .faq-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
  .faq-head { position: sticky; top: 110px; align-self: start; }
}

/* ---------- มือถือ ---------- */
@media (max-width: 899px) {
  .nav-in { min-height: 66px; }
  .logo img { width: 44px; height: 44px; }
  .logo span { font-size: 16px; }
  .nav-toggle {
    display: grid; place-items: center; margin-inline-start: auto; width: 48px; height: 48px; border-radius: 8px;
    border: 1px solid var(--line-strong); background: var(--card); cursor: pointer; flex: none; padding: 0;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    display: block; width: 20px; height: 2px; background: var(--deep); border-radius: 2px; position: relative;
    transition: transform .25s var(--ease), background-color .25s var(--ease);
  }
  .nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; }
  .nav-toggle span::before { top: -6px; }
  .nav-toggle span::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] span { background: transparent; }
  .nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
  #site-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--pad) 20px;
    box-shadow: 0 18px 30px -20px rgba(20, 33, 61, .35);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s;
  }
  .nav-open #site-nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  #site-nav > a:not(.btn) { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
  #site-nav > a[aria-current="page"]::after { left: 4px; right: auto; width: 24px; bottom: 8px; }
  .nav-cta { margin: 16px 0 0; }

  .float-contact {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; gap: 10px;
    background: color-mix(in srgb, var(--paper) 96%, transparent); border-top: 1px solid var(--line);
    padding: 8px var(--pad) calc(8px + env(safe-area-inset-bottom, 0px));
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .float-contact .btn { flex: 1; min-height: 44px; padding: 8px 12px; font-size: 16px; }
  .float-contact .btn-ghost { background: var(--card); }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 719px) {
  .hero-full .hero-slide { min-height: 0; height: 70vh; max-height: 640px; min-height: 520px; }
  .hero-full .hero-slide::after, .hero-compact .hero-slide::after {
    background: linear-gradient(0deg, rgba(14, 25, 52, .95) 0%, rgba(14, 25, 52, .78) 42%, rgba(14, 25, 52, .15) 78%, rgba(14, 25, 52, .05) 100%);
  }
  .hero-full picture img, .hero-full picture video { object-position: 50% 20%; }
  .hero-body { padding-block: 40px 44px; }
  .hero-compact .hero-slide { min-height: 300px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cta-dark::before { display: none; }
}
@media (max-width: 479px) {
  .card-body { padding: 14px; }
  .card-body h3 { font-size: 16px; }
  .card-body p { font-size: 14.5px; }
  .card-pic-none span { font-size: 30px; }
  .features-grid { gap: 8px; }
  .feature { padding: 16px; }
  .feature-icon { width: 44px; height: 44px; margin-bottom: 12px; }
  .feature p { font-size: 15px; }
  .gal { column-gap: 8px; }
  .gal-item { margin-bottom: 8px; }
  .faq summary { font-size: 17px; }
  .row-item { grid-template-columns: 1fr; }
  .row-no, .row-pic, .row-text, .row-cta { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}

/* พื้นที่กดอย่างน้อย 44px บนจอสัมผัส (ลิงก์ติดต่อและท้ายเว็บ) */
.contact-list a, .foot a:not(.social a), .hero-call { display: inline-flex; align-items: center; min-height: 44px; }
.foot p { margin-bottom: 2px; }
.foot-nav { gap: 0; }
form.lead .role input { font-size: 16px; }

/* ---------- แบนเนอร์หน้าแรก: รูปหมู่ทีมครู คนอยู่ครึ่งล่างของรูป ----------
   จอใหญ่: ข้อความอยู่บนท้องฟ้าด้านบน เงาเข้มเฉพาะด้านบน ไม่ทับหน้าคน
   มือถือ: รูปอยู่บน ข้อความอยู่ใต้รูปบนพื้นน้ำเงิน เห็นคนครบไม่โดนบัง */
@media (min-width: 720px) {
  .hero-full .hero-slide { align-items: start; }
  .hero-full picture img, .hero-full picture video { object-position: 50% 100%; }
  .hero-full .hero-slide::after {
    background:
      linear-gradient(180deg, rgba(14, 25, 52, .9) 0%, rgba(14, 25, 52, .7) 30%, rgba(14, 25, 52, .18) 52%, rgba(14, 25, 52, 0) 62%),
      linear-gradient(90deg, rgba(14, 25, 52, .35) 0%, rgba(14, 25, 52, 0) 55%);
  }
  .hero-full .hero-body { padding-block: clamp(40px, 5vw, 64px) 0; max-width: 760px; }
  .hero-full .hero-title { font-size: clamp(34px, 4.4vw, 54px); margin-bottom: 12px; }
  .hero-full .hero-sub { margin-bottom: 24px; max-width: 60ch; }
}
@media (min-width: 1200px) {
  .hero-full .hero-slide { min-height: min(92vh, 820px); }
}
@media (max-width: 719px) {
  .hero-full .hero-slide { height: auto; min-height: 0; max-height: none; display: block; }
  .hero-full picture { position: relative; inset: auto; height: auto; aspect-ratio: 16 / 10; overflow: hidden; }
  .hero-full picture img, .hero-full picture video { position: absolute; inset: 0; height: 100%; }
  .hero-full picture img, .hero-full picture video { object-position: 50% 82%; }
  .hero-full .hero-slide::after { display: none; }
  .hero-full .hero-body { padding-block: 24px 32px; }
  .hero-full .hero-title { font-size: clamp(28px, 7.6vw, 34px); margin-bottom: 10px; }
  .hero-full .hero-sub { font-size: 16px; margin-bottom: 20px; }
  .hero-full .hero-call { display: none; }
}

/* ---------- ผลงาน: กรอบขนาดเท่ากันทุกรูป เรียงเป็นแถว (ลูกค้าขอ 2026-10-20) ----------
   กรอบ 16:9 ตรงกับรูปถ่ายแนวนอน รูปแนวตั้ง (.is-tall) แสดงเต็มรูปบนพื้นครีม ไม่ครอป */
.gal { columns: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gal-item { margin: 0; }
.gal-item a, .gal-item video { aspect-ratio: 16 / 9; width: 100%; }
.gal-item a { background: var(--card); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; }
.gal-item.is-tall img { object-fit: contain; }
.gal-item video { object-fit: cover; }
@media (min-width: 480px) { .gal { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .gal { grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 14px; } }


/* ---------- ปุ่มสลับภาษา TH / EN (ของเสริม i18n) ---------- */
.lang-switch {
  display: inline-flex; align-items: center; flex: none; padding: 3px; gap: 2px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--card); text-decoration: none; margin-inline-start: 12px;
  font-size: 14px; font-weight: 600; line-height: 1.4; min-height: 44px;
}
.lang-switch span {
  display: grid; place-items: center; min-width: 38px; height: 36px; padding: 0 8px; border-radius: 999px;
  color: var(--muted); transition: background-color .2s var(--ease), color .2s var(--ease);
}
.lang-switch span[aria-current="true"] { background: var(--accent); color: #fff; }
.lang-switch:hover span:not([aria-current="true"]) { color: var(--deep); }
@media (max-width: 899px) {
  .lang-switch { margin-inline-start: auto; }
  .lang-switch + .nav-toggle { margin-inline-start: 8px; }
  .logo span { font-size: 15px; }
}
@media (max-width: 380px) {
  .logo span { display: none; }
}
