/* ============================================================
   SP.CONSTRUCTION 1994 — ระบบดีไซน์
   โทนน้ำเงิน เรียบ สะอาดตา น่าเชื่อถือ (ตามบรีฟลูกค้า)
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* น้ำเงินแบรนด์ */
  --navy-900: #0b1d3d;
  --navy-800: #102a54;
  --navy-700: #14305f;
  --navy-600: #1d4382;
  --navy-500: #2a5aa8;
  --navy-100: #dde6f4;
  --navy-050: #eef3fa;

  /* ตัวอักษร */
  --ink: #0f172a;
  --body: #3f4a5c;
  --muted: #6b7787;
  --on-navy: #ffffff;
  --on-navy-soft: #c3d2ea;

  /* พื้นและเส้น */
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --line: #e4e9f0;
  --line-soft: #eff3f8;

  /* แบรนด์ภายนอก */
  --line-green: #06c755;

  /* จังหวะ */
  --gap: 10px;
  --pad: 20px;
  --maxw: 1200px;
  --radius: 4px;

  /* เงา — ใช้เฉพาะการ์ด ไม่ใช้กับรูป */
  --shadow-1: 0 1px 2px rgba(11, 29, 61, .05), 0 1px 3px rgba(11, 29, 61, .04);
  --shadow-2: 0 4px 10px rgba(11, 29, 61, .07), 0 2px 4px rgba(11, 29, 61, .05);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (min-width: 768px) {
  :root { --gap: 16px; --pad: 32px; }
}
@media (min-width: 1024px) {
  :root { --gap: 22px; --pad: 40px; }
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'IBM Plex Sans Thai', 'Noto Sans Thai', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- 3. ตัวอักษร ---------- */
h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.005em;
  text-wrap: balance;
}
h1 { font-size: clamp(30px, 6.2vw, 56px); }
h2 { font-size: clamp(26px, 4.2vw, 40px); }
h3 { font-size: clamp(19px, 2.4vw, 23px); font-weight: 600; }
h4 { font-size: 18px; font-weight: 600; }

p { text-wrap: pretty; }
strong { font-weight: 600; color: var(--ink); }

.lead { font-size: clamp(17px, 2.1vw, 20px); line-height: 1.7; color: var(--body); }
.small { font-size: 15px; }
.muted { color: var(--muted); }

/* ตัวเลขเรียงหลักเท่ากัน — ใช้กับราคา พื้นที่ เบอร์โทร */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------- 4. โครงหน้า ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.wrap-narrow { max-width: 780px; }

section { padding-block: clamp(56px, 9vw, 104px); }
.sec-soft { background: var(--bg-soft); }
.sec-navy { background: var(--navy-900); color: var(--on-navy-soft); }
.sec-navy h2, .sec-navy h3, .sec-navy h4 { color: #fff; }

/* หัวข้อส่วน — เลขกำกับ + เส้นบาง แบบหัวกระดาษแบบก่อสร้าง */
.sec-head { margin-bottom: clamp(28px, 4vw, 48px); }
.sec-num {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: .14em;
  color: var(--navy-600); text-transform: uppercase;
  margin-bottom: 14px;
}
.sec-num::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.sec-navy .sec-num { color: var(--navy-100); }
.sec-navy .sec-num::after { background: rgba(255, 255, 255, .18); }
.sec-head p { margin-top: 14px; max-width: 62ch; }

/* ---------- 5. ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 12px 26px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 16px; font-weight: 600; line-height: 1.4;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 19px; height: 19px; flex: none; }

.btn-primary { background: var(--navy-700); color: #fff; }
.btn-primary:hover { background: var(--navy-600); }

.btn-ghost { background: transparent; color: var(--navy-700); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy-600); background: var(--navy-050); }

.btn-onnavy { background: #fff; color: var(--navy-800); }
.btn-onnavy:hover { background: var(--navy-050); }

.btn-outline-navy { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .34); }
.btn-outline-navy:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

.btn-line { background: var(--line-green); color: #fff; }
.btn-line:hover { background: #05b34c; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 6. ส่วนหัวเว็บ ---------- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-in { display: flex; align-items: center; gap: 16px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.brand img { width: 42px; height: 42px; border-radius: 50%; flex: none; }
.brand-tx { display: flex; flex-direction: column; line-height: 1.25; }
.brand-th { font-size: 15px; font-weight: 700; color: var(--ink); }
.brand-en { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; color: var(--muted); }

.nav { display: none; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 13px; border-radius: var(--radius);
  font-size: 15.5px; font-weight: 500; color: var(--body); text-decoration: none;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav a:hover { color: var(--navy-700); background: var(--navy-050); }
.nav a[aria-current="page"] { color: var(--navy-700); font-weight: 600; }

.head-cta { display: none; }

.burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; padding: 0;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; color: var(--ink);
}
.burger svg { width: 22px; height: 22px; }
.burger .ic-close { display: none; }
.burger[aria-expanded="true"] .ic-open { display: none; }
.burger[aria-expanded="true"] .ic-close { display: block; }

.mnav { display: none; border-top: 1px solid var(--line); background: #fff; }
.mnav.open { display: block; }
.mnav a {
  display: block; padding: 15px 0; border-bottom: 1px solid var(--line-soft);
  font-size: 17px; font-weight: 500; color: var(--ink); text-decoration: none;
}
.mnav a:last-of-type { border-bottom: 0; }
.mnav .btn { width: 100%; margin-block: 14px 20px; }

@media (min-width: 900px) {
  .nav, .head-cta { display: flex; }
  .burger { display: none; }
  .mnav { display: none !important; }
  .head-in { min-height: 76px; gap: 22px; }
  .brand img { width: 46px; height: 46px; }
  .brand-th { font-size: 16px; }
}

/* ---------- 7. Hero — เต็มจอ ครอปได้ กำหนดจุดโฟกัสไว้ ---------- */
.hero { position: relative; isolation: isolate; background: var(--navy-900); }
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 62%;   /* กันหลังคาโกดังโดนตัดตอนจอแคบ */
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(11, 29, 61, .94) 0%, rgba(11, 29, 61, .74) 38%, rgba(11, 29, 61, .3) 72%, rgba(11, 29, 61, .42) 100%),
    linear-gradient(to right, rgba(11, 29, 61, .58) 0%, rgba(11, 29, 61, 0) 62%);
}
.hero-in {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: min(62vh, 540px);
  padding-block: 72px 36px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; align-self: flex-start;
  padding: 6px 13px 6px 10px; margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, .26); border-radius: 100px;
  font-size: 13px; font-weight: 600; letter-spacing: .03em; color: #fff;
  background: rgba(255, 255, 255, .08);
}
.hero-eyebrow svg { width: 16px; height: 16px; }
.hero h1 { color: #fff; max-width: 17ch; }
.hero-sub { margin-top: 18px; max-width: 54ch; color: var(--on-navy-soft); font-size: clamp(16px, 2vw, 19px); line-height: 1.7; }
.hero .btn-row { margin-top: 28px; }
@media (max-width: 519px) { .hero .btn-row .btn { flex: 1 1 100%; } }

/* แถบตัวเลข — แยกออกมาเป็นแถบของตัวเอง ใต้ hero */
.statband { background: var(--navy-800); }
.hero-stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: rgba(255, 255, 255, .15);
  border-block: 1px solid rgba(255, 255, 255, .15);
}
.hero-stats > div { background: var(--navy-800); padding: 16px 16px 18px; }
.hero-stats dt { font-size: 13px; color: var(--on-navy-soft); line-height: 1.5; }
.hero-stats dd { font-size: clamp(20px, 3vw, 26px); font-weight: 700; color: #fff; line-height: 1.35; }

@media (min-width: 768px) {
  .hero-in { min-height: min(76vh, 700px); padding-block: 120px 52px; }
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
  .hero-stats > div { padding: 24px 20px 26px; }
}

/* ---------- 8. จุดเด่น (ไอคอน) ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (min-width: 480px) { .feat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .feat-grid { grid-template-columns: repeat(4, 1fr); } }

.feat {
  padding: 22px 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.feat:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--navy-100); }
.feat svg { width: 26px; height: 26px; color: var(--navy-600); margin-bottom: 14px; }
.feat h3 { font-size: 17px; margin-bottom: 7px; }
.feat p { font-size: 15px; line-height: 1.65; }

/* ---------- 9. บริการ ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (min-width: 768px) { .svc-grid { grid-template-columns: repeat(3, 1fr); } }

.svc {
  display: flex; flex-direction: column; gap: 11px;
  padding: 26px 22px 28px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.svc:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--navy-100); }
.svc-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: var(--radius);
  background: var(--navy-050); color: var(--navy-700);
}
.svc-ic svg { width: 24px; height: 24px; }
.svc h3 { font-size: 18px; }
.svc p { font-size: 15.5px; line-height: 1.7; }
.svc ul { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.svc li { position: relative; padding-left: 20px; font-size: 14.5px; line-height: 1.6; }
.svc li::before {
  content: ''; position: absolute; left: 3px; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--navy-500);
}

/* ---------- 10. ผลงาน — masonry ไม่ครอปรูป ---------- */
.works { columns: 2; column-gap: var(--gap); }
@media (min-width: 768px) { .works { columns: 3; } }
@media (min-width: 1024px) { .works { columns: 3; } }

.work {
  display: block; break-inside: avoid; margin-bottom: var(--gap);
  text-decoration: none; color: inherit;
  transition: transform .2s var(--ease);
}
.work:hover { transform: translateY(-3px); }
.work-img { display: block; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--navy-050); }
/* รูปคงสัดส่วนไฟล์จริง — aspect-ratio ใส่ inline ต่อรูป ไม่บังคับให้เท่ากัน */
.work-img img { width: 100%; height: auto; }
.work-cat {
  position: absolute; left: 10px; top: 10px;
  padding: 4px 10px; border-radius: 3px;
  background: rgba(11, 29, 61, .86); color: #fff;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis;
}
.work-body { display: block; padding: 13px 2px 4px; }
.work-body h3 { font-size: 16.5px; line-height: 1.45; margin-bottom: 5px; }
.work:hover .work-body h3 { color: var(--navy-700); }
.work-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.work-price { display: block; font-size: 15px; font-weight: 700; color: var(--navy-700); margin-top: 6px; }

@media (min-width: 768px) {
  .work-body h3 { font-size: 18px; }
  .work-meta { font-size: 14.5px; }
}

/* ---------- 11. ตัวกรอง ---------- */
.filters {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap);
  padding: 20px; margin-bottom: 26px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
}
@media (min-width: 768px) { .filters { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .filters { grid-template-columns: repeat(6, 1fr); padding: 24px; } }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field select, .field input, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 13px;
  font-size: 16px;               /* ห้ามต่ำกว่า 16px — กัน iOS ซูมเอง */
  color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 128px; resize: vertical; line-height: 1.65; }
.field select {
  appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7787' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.field select:focus-visible, .field input:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(29, 67, 130, .14);
}
.field-err { font-size: 13.5px; color: #b42318; display: none; }
.field.invalid .field-err { display: block; }
.field.invalid select, .field.invalid input, .field.invalid textarea { border-color: #d92d20; }

.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.filter-count { font-size: 15px; color: var(--muted); margin-right: auto; }
.btn-reset {
  padding: 9px 16px; min-height: 42px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 14.5px; font-weight: 600; color: var(--navy-700); cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.btn-reset:hover { border-color: var(--navy-600); background: var(--navy-050); }

.empty {
  padding: 56px 24px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg-soft);
}
.empty svg { width: 34px; height: 34px; color: var(--muted); margin: 0 auto 14px; }

/* ---------- 12. หน้ารายละเอียดผลงาน ---------- */
.crumb { display: flex; flex-wrap: wrap; gap: 7px; font-size: 14px; color: var(--muted); padding-top: 26px; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--navy-700); text-decoration: underline; }

.detail-head { padding-block: 24px clamp(30px, 4vw, 44px); }
.detail-head h1 { font-size: clamp(27px, 4.6vw, 44px); max-width: 22ch; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag {
  padding: 5px 12px; border-radius: 100px;
  background: var(--navy-050); color: var(--navy-700);
  font-size: 13px; font-weight: 600;
}

/* เส้นคั่นวาดจากขอบของแต่ละช่อง ไม่ใช่พื้นหลังของกริด
   เพราะถ้าจำนวนช่องไม่ลงตัวกับจำนวนคอลัมน์ ที่ว่างจะกลายเป็นบล็อกสีเทา */
.spec {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
  margin-block: 28px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.spec > div {
  background: #fff; padding: 16px 18px;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.spec > div:nth-child(-n+2) { border-top: 0; }
.spec > div:nth-child(2n+1) { border-left: 0; }

@media (min-width: 640px) {
  .spec { grid-template-columns: repeat(4, 1fr); }
  .spec > div:nth-child(-n+2) { border-top: 1px solid var(--line); }
  .spec > div:nth-child(2n+1) { border-left: 1px solid var(--line); }
  .spec > div:nth-child(-n+4) { border-top: 0; }
  .spec > div:nth-child(4n+1) { border-left: 0; }
}
.spec dt { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 3px; }
.spec dd { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.4; }

/* แกลเลอรี — คงสัดส่วนจริงทุกรูป ไม่มีกรอบ ไม่มีเงา */
.gal { columns: 2; column-gap: var(--gap); }
@media (min-width: 768px) { .gal { columns: 3; } }
@media (min-width: 1024px) { .gal { columns: 4; } }
.gal figure { break-inside: avoid; margin: 0 0 var(--gap); }
.gal img { width: 100%; height: auto; border-radius: var(--radius); background: var(--navy-050); cursor: zoom-in; }

/* ภาพใหญ่เต็มจอ */
.lb {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 18px; background: rgba(11, 29, 61, .95);
}
.lb.open { display: flex; }
.lb img { max-width: 100%; max-height: 88vh; width: auto; border-radius: var(--radius); }
.lb-close {
  position: absolute; top: 14px; right: 14px;
  width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--radius); color: #fff; cursor: pointer;
}
.lb-close svg { width: 22px; height: 22px; }
.lb-cap {
  position: absolute; left: 0; right: 0; bottom: 16px;
  text-align: center; color: var(--on-navy-soft); font-size: 14.5px; padding-inline: 60px;
}

/* ---------- 13. รูป + ข้อความ สลับข้าง ---------- */
.split { display: grid; gap: clamp(26px, 4vw, 52px); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.rev > :first-child { order: 2; } }
.split img { width: 100%; height: auto; border-radius: var(--radius); }
.split-tx h2 { margin-bottom: 16px; }
.split-tx p + p { margin-top: 14px; }

/* ---------- 14. รายการเอกสาร ---------- */
.docs-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: var(--gap); }
@media (min-width: 560px) { .docs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .docs-grid { grid-template-columns: repeat(4, 1fr); } }
.doc {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 18px 16px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
}
.doc svg { width: 21px; height: 21px; color: var(--navy-100); flex: none; margin-top: 3px; }
.doc span { font-size: 15.5px; line-height: 1.6; color: #fff; }

/* ---------- 15. ขั้นตอนทำงาน ---------- */
.steps { display: grid; gap: var(--gap); counter-reset: st; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding: 26px 20px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); counter-increment: st; }
.step::before {
  content: counter(st, decimal-leading-zero);
  display: block; margin-bottom: 12px;
  font-size: 28px; font-weight: 700; color: var(--navy-100); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 17px; margin-bottom: 7px; }
.step p { font-size: 15px; line-height: 1.65; }

/* ---------- 16. คำถามที่พบบ่อย ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px 0; cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.55;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 20px; height: 20px; margin-left: auto; margin-top: 4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314305f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 34px 22px 0; font-size: 16px; line-height: 1.75; }

/* ---------- 17. ฟอร์ม ---------- */
.form-card {
  padding: clamp(22px, 3vw, 36px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.form-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, 1fr); } .form-grid .col-2 { grid-column: 1 / -1; } }
.req { color: #d92d20; }
.form-note { font-size: 14px; color: var(--muted); line-height: 1.6; }

.form-msg { display: none; padding: 15px 17px; border-radius: var(--radius); font-size: 15.5px; line-height: 1.6; margin-bottom: 18px; }
.form-msg.show { display: block; }
.form-msg.ok { background: #ecfdf3; border: 1px solid #abefc6; color: #067647; }
.form-msg.err { background: #fef3f2; border: 1px solid #fecdc9; color: #b42318; }

/* ---------- 18. ติดต่อ ---------- */
.contact-grid { display: grid; gap: var(--gap); }
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: repeat(4, 1fr); } }
.cc {
  display: flex; flex-direction: column; gap: 9px;
  padding: 22px 20px; text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
a.cc:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--navy-100); }
.cc svg { width: 23px; height: 23px; color: var(--navy-600); }
.cc dt { font-size: 13.5px; color: var(--muted); }
.cc dd { font-size: 16.5px; font-weight: 600; color: var(--ink); line-height: 1.55; word-break: break-word; }

.map-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.map-frame iframe { display: block; width: 100%; height: 340px; border: 0; }
@media (min-width: 768px) { .map-frame iframe { height: 420px; } }

/* ---------- 19. แถบชวนติดต่อ ---------- */
.cta-band { background: var(--navy-700); color: #fff; }
.cta-band h2 { color: #fff; max-width: 20ch; }
.cta-band p { color: var(--on-navy-soft); margin-top: 14px; max-width: 56ch; }
.cta-band .btn-row { margin-top: 26px; }

/* ---------- 20. ท้ายเว็บ ---------- */
.site-foot { background: var(--navy-900); color: var(--on-navy-soft); padding-block: clamp(40px, 6vw, 64px) 0; }
.foot-grid { display: grid; gap: 30px; }
@media (min-width: 768px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 44px; } }
.foot-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.foot-brand img { width: 52px; height: 52px; border-radius: 50%; background: #fff; }
.foot-brand b { display: block; color: #fff; font-size: 16px; line-height: 1.35; }
.foot-brand span { font-size: 11px; letter-spacing: .09em; color: var(--on-navy-soft); }
.site-foot p { font-size: 15px; line-height: 1.7; }
.site-foot h4 { color: #fff; font-size: 15px; margin-bottom: 14px; letter-spacing: .02em; }
.foot-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.foot-list a { font-size: 15px; text-decoration: none; transition: color .2s var(--ease); }
.foot-list a:hover { color: #fff; text-decoration: underline; }
.foot-bar {
  margin-top: 38px; padding-block: 20px 22px;
  border-top: 1px solid rgba(255, 255, 255, .13);
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between;
  font-size: 13.5px;
}

/* ---------- 21. ปุ่มลอยบนมือถือ — ไลน์ + โทร เท่านั้น ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: grid; grid-template-columns: 1fr 1fr;
  height: 58px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  padding-bottom: env(safe-area-inset-bottom);
}
.dock a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 600; color: #fff; text-decoration: none;
}
.dock svg { width: 20px; height: 20px; }
.dock .d-line { background: var(--line-green); }
.dock .d-tel { background: var(--navy-700); }
body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .dock { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- 22. อนิเมชัน — เลื่อนถึงแล้วค่อยปรากฏ เล่นครั้งเดียว ---------- */
.rv { opacity: 0; transform: translateY(20px); }
.rv-in { opacity: 1; transform: none; transition: opacity .55s var(--ease), transform .55s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; }
  .rv-in { transition: none; }
  .work:hover, .feat:hover, .svc:hover, a.cc:hover { transform: none; }
  .btn { transition: none; }
}

/* ---------- 23. เข้าถึงได้ ---------- */
:where(a, button, select, input, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--navy-600); outline-offset: 2px; border-radius: 3px;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 11px 18px; background: var(--navy-700); color: #fff;
  border-radius: var(--radius); font-weight: 600; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip:focus { top: 12px; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 24. แบบบ้าน ---------- */
.dz-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (min-width: 640px)  { .dz-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .dz-grid { grid-template-columns: repeat(4, 1fr); } }

.dz {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-align: left; padding: 0; cursor: zoom-in;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.dz:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--navy-100); }
/* รูปคงสัดส่วนเดิมของไฟล์ที่ตัดออกมา ไม่ครอปซ้ำ */
.dz img { width: 100%; height: auto; background: var(--navy-050); }
.dz-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 5px; }
.dz-no {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  color: var(--navy-600); font-variant-numeric: tabular-nums;
}
.dz-name { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
@media (min-width: 768px) { .dz-name { font-size: 15.5px; } }

/* แถวปุ่มกรองแบบชิป */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  padding: 9px 16px; min-height: 42px;
  background: #fff; border: 1px solid var(--line); border-radius: 100px;
  font-size: 14.5px; font-weight: 600; color: var(--body); cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.chip:hover { border-color: var(--navy-600); color: var(--navy-700); }
.chip[aria-pressed="true"] { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
