/* EPS Lawfirm — หน้าตาเว็บสำนักงานทนายความ โทนกรมท่า-ทอง แบบองค์กรน่าเชื่อถือ
   ทุกส่วนต้องยังสวยเมื่อลูกค้าใส่ข้อความสั้นมากหรือยาวมาก และต้องไม่ล้นจอที่ 360px */

:root {
  --accent: #0e1d3b;
  --accent-ink: #ffffff;
  --navy: #0e1d3b;
  --navy-2: #15284d;
  --navy-3: #0a1530;
  --gold: #c09a55;
  --gold-2: #dcc08a;
  --gold-deep: #8f6c2f;
  --ink: #141a26;
  --muted: #5a6170;
  --paper: #faf8f3;
  --paper-2: #f2ede2;
  --line: #e3dccd;
  --radius: 6px;
  --font: 'IBM Plex Sans Thai', -apple-system, 'Segoe UI', sans-serif;
  --display: var(--font);
  --gap: clamp(64px, 9vw, 112px);
  --pad: clamp(16px, 4vw, 32px);
  --max: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper);
  font-size: 16.5px; line-height: 1.75; -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.45; margin: 0; text-wrap: balance; font-weight: 700; }
svg { flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--gold); color: var(--navy); padding: 10px 16px; z-index: 100; border-radius: 4px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
.sec { padding-block: var(--gap); }

/* ไอคอนเส้นทั้งเว็บ หนา 1.6 */
.ic svg, .topbar svg, .nav svg, .mnav svg, .foot svg, .contact-list svg, .float-contact svg,
.hs-tel svg, .faq-call svg, .why-mark svg, .about-seal svg, .cta-mark svg {
  width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* หัวข้อของส่วน — ตัวกำกับสีทองมีเส้นสองข้าง หัวข้อกรมท่า */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; color: var(--gold-deep);
  font-size: 14px; font-weight: 600; letter-spacing: .06em; margin-bottom: 10px;
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.sec-head { max-width: 680px; margin: 0 auto clamp(32px, 4.5vw, 52px); text-align: center; }
.sec-head .eyebrow::after { content: ''; width: 28px; height: 1px; background: currentColor; }
.sec-head h2 { font-size: clamp(28px, 4vw, 42px); color: var(--navy); }
.sec-head p { color: var(--muted); margin: 12px 0 0; font-size: 17px; }

/* ปุ่ม */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: 4px; font: inherit; font-size: 16.5px; font-weight: 600;
  background: var(--navy); color: #fff; text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--navy); min-height: 50px; line-height: 1.45;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: var(--gold); color: var(--navy-3); }
.btn-gold:hover { background: var(--gold-2); }
.btn-line { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-line:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }

/* ---------- แถบบน + หัวเว็บ ---------- */
.topbar { background: var(--navy-3); color: #e7e1d3; font-size: 14px; }
.topbar .wrap { display: flex; gap: 22px; justify-content: center; align-items: center; min-height: 40px; flex-wrap: wrap; }
.topbar span, .topbar a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.topbar svg { width: 16px; height: 16px; color: var(--gold-2); }
.topbar a:hover { color: #fff; }

/* ห้ามใส่ backdrop-filter / transform / filter ที่หัวเว็บ — เมนูมือถือเต็มจอจะพัง */
.nav { position: sticky; top: 0; z-index: 60; background: var(--paper); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.logo img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--gold); }
.logo-t { display: grid; line-height: 1.45; min-width: 0; }
.logo-t b { font-size: 21px; color: var(--navy); letter-spacing: .01em; }
.logo-t small { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-links { margin-inline-start: auto; display: none; gap: 4px; }
.nav-links a {
  text-decoration: none; padding: 8px 14px; font-size: 16px; color: var(--ink); position: relative; font-weight: 600;
}
.nav-links a::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--navy); }
.nav-cta { display: none; min-height: 46px; padding: 10px 20px; }
.nav-toggle {
  margin-inline-start: auto; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 4px;
  background: transparent; display: grid; place-content: center; gap: 5px; cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--navy); transition: transform .25s var(--ease), opacity .2s; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* เมนูมือถือ เต็มจอ อยู่นอกหัวเว็บ */
.mnav {
  position: fixed; inset: 0; z-index: 55; background: var(--navy); color: #fff;
  padding: 140px var(--pad) 40px; display: flex; flex-direction: column; gap: 22px;
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s; overflow-y: auto;
}
body.nav-open { overflow: hidden; }
body.nav-open .mnav { opacity: 1; visibility: visible; }
.mnav nav { display: grid; }
.mnav nav a {
  text-decoration: none; font-size: 22px; font-weight: 600; padding: 14px 0;
  border-bottom: 1px solid rgba(220, 192, 138, .2);
}
.mnav nav a[aria-current="page"] { color: var(--gold-2); }
.mnav .btn { width: 100%; }
.mnav p { margin: 0; color: var(--gold-2); text-align: center; }

@media (min-width: 1000px) {
  .nav-links, .nav-cta { display: flex; }
  .nav-toggle, .mnav { display: none; }
}

/* ---------- ภาพหัวเว็บแบบแบ่งครึ่ง ---------- */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero-track { display: flex; }
.hero-slide { position: relative; flex: 0 0 100%; display: grid; }
.hs-pic { position: absolute; inset: 0; }
.hs-pic picture, .hs-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 72% center; }
.hs-pic::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 21, 48, .55) 0%, rgba(10, 21, 48, .78) 55%, rgba(10, 21, 48, .95) 100%);
}
.hs-text { position: relative; z-index: 2; display: flex; align-items: flex-end; min-height: min(68vh, 600px); }
.hs-inner { padding: 56px var(--pad) 44px; max-width: 620px; }
.hero .eyebrow { color: var(--gold-2); }
.hs-title { font-size: clamp(32px, 6.4vw, 60px); line-height: 1.4; margin-bottom: 16px; }
.hs-inner p { font-size: clamp(16.5px, 1.8vw, 19px); margin: 0 0 28px; color: rgba(255, 255, 255, .86); max-width: 46ch; }
.hs-cta { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.hs-tel { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 19px; font-weight: 700; min-height: 48px; }
.hs-tel svg { color: var(--gold-2); width: 22px; height: 22px; }
.hero-dots { display: flex; gap: 8px; position: absolute; left: var(--pad); bottom: 18px; z-index: 3; }
.hero-dots button { width: 10px; height: 10px; border: 0; padding: 0; cursor: pointer; background: rgba(255,255,255,.4); transition: width .25s var(--ease); }
.hero-dots button[aria-current="true"] { width: 28px; background: var(--gold); }

@media (min-width: 900px) {
  .hero-slide { grid-template-columns: 46% 54%; min-height: clamp(520px, 72vh, 640px); }
  .hs-text { align-items: center; min-height: 0; }
  .hs-inner { padding: 64px 40px 64px max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); max-width: none; }
  .hs-pic { position: relative; inset: auto; clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); }
  .hs-pic::after { background: linear-gradient(90deg, rgba(10, 21, 48, .35), transparent 40%); }
  .hero-slide::before {
    content: ''; position: absolute; z-index: 3; top: 0; bottom: 0; left: 46%; width: 2px;
    background: linear-gradient(180deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
    transform: skewX(-7.6deg); transform-origin: bottom left;
  }
  .hero-dots { left: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); }
}

/* หัวหน้ารอง */
.pg-head { padding-block: clamp(56px, 9vw, 104px) clamp(44px, 7vw, 80px); }
.pg-bg { position: absolute; inset: 0; }
.pg-bg picture, .pg-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 75% center; }
.pg-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,21,48,.97) 0%, rgba(10,21,48,.88) 45%, rgba(10,21,48,.55) 100%); }
.pg-text { position: relative; z-index: 1; }
.pg-text h1 { font-size: clamp(30px, 5vw, 52px); margin: 6px 0 12px; max-width: 18ch; }
.pg-text p { color: rgba(255,255,255,.85); margin: 0 0 24px; max-width: 54ch; font-size: 17.5px; }
.crumbs { font-size: 14.5px; color: var(--gold-2); display: flex; gap: 10px; flex-wrap: wrap; }
.crumbs { align-items: center; }
.crumbs a { text-decoration: none; color: rgba(255,255,255,.8); min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; }
@media (min-width: 900px) {
  .pg-bg { left: 50%; }
  .pg-bg::after { background: linear-gradient(90deg, rgba(14,29,59,1) 0%, rgba(14,29,59,.7) 35%, rgba(10,21,48,.35) 100%); }
}
.crumbs a:hover { color: #fff; }

/* ---------- แถบข้อเท็จจริง ---------- */
.facts { background: var(--navy-2); color: #fff; border-top: 1px solid rgba(192,154,85,.45); }
.facts .sec-head { padding-top: 40px; margin-bottom: 0; }
.facts .sec-head h2 { color: #fff; }
.facts-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; }
.facts-list li { display: flex; gap: 12px; align-items: center; padding: 22px 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.facts-list .ic { color: var(--gold-2); }
.facts-list .ic svg { width: 30px; height: 30px; stroke-width: 1.4; }
.facts-list b { display: block; font-size: clamp(17px, 2.2vw, 24px); line-height: 1.45; color: var(--gold-2); }
.facts-list span { display: block; font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.5; }
@media (max-width: 599px) {
  .facts-list li { flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 10px; }
  .facts-list li:nth-child(odd) { border-inline-end: 1px solid rgba(255,255,255,.08); }
}
@media (min-width: 900px) {
  .facts-list { grid-template-columns: repeat(4, 1fr); }
  .facts-list li { padding: 28px 24px; border-bottom: 0; border-inline-start: 1px solid rgba(255,255,255,.12); justify-content: center; }
  .facts-list li:first-child { border-inline-start: 0; }
}

/* ---------- บริการ ---------- */
.svc-filter { display: grid; gap: 14px; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 15px; padding: 9px 16px; border: 1px solid var(--line); background: #fff;
  border-radius: 999px; cursor: pointer; color: var(--ink); min-height: 44px;
}
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.svc-search input {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 16px; border: 1px solid var(--line);
  border-radius: 4px; background: #fff; min-height: 48px;
}
@media (min-width: 760px) { .svc-filter { grid-template-columns: 1fr 320px; align-items: center; } }
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.svc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.svc::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.svc:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(14, 29, 59, .1); border-color: #d6cbb3; }
.svc:hover::before { transform: scaleX(1); }
.svc-pic { aspect-ratio: 4 / 3; background: var(--paper-2); }
.svc-pic img { width: 100%; height: 100%; object-fit: cover; }
.svc-body { padding: 16px 14px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.svc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.svc-n { font-size: 15px; font-weight: 700; color: var(--gold-deep); letter-spacing: .04em; }
.svc-cat { font-size: 14px; color: var(--muted); border: 1px solid var(--line); padding: 1px 10px; border-radius: 999px; }
.svc h3 { font-size: clamp(17px, 2vw, 20px); color: var(--navy); }
.svc p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.svc .btn { margin-top: auto; }
.svc-empty { text-align: center; color: var(--muted); padding: 24px 0 0; }
@media (max-width: 400px) { .svc-body { padding: 14px 12px 16px; } .svc h3 { font-size: 16.5px; } .svc p { font-size: 14px; } }
@media (min-width: 768px) { .svc-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } .svc-body { padding: 24px 24px 26px; } }

/* ---------- เกี่ยวกับ ---------- */
.sec-about { background: var(--paper-2); }
.about { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
.about-pic { position: relative; margin: 0 12px 12px 0; }
.about-pic::before { content: ''; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--gold); border-radius: var(--radius); }
.about-pic img { position: relative; width: 100%; height: auto; border-radius: var(--radius); }
.about-seal {
  position: absolute; right: -6px; bottom: -6px; width: 76px; height: 76px; border-radius: 50%;
  background: var(--navy); color: var(--gold-2); display: grid; place-items: center; box-shadow: 0 0 0 4px var(--paper-2);
}
.about-seal svg { width: 34px; height: 34px; stroke-width: 1.3; }
/* รูปแนวตั้งไม่ขยายเกินความละเอียดไฟล์ */
.about.pic-right .about-pic { max-width: 520px; justify-self: center; width: 100%; }
.about-text h2 { font-size: clamp(27px, 3.6vw, 38px); color: var(--navy); margin-bottom: 18px; }
.about-text p { color: var(--muted); margin: 0 0 18px; }
.about-text .btn { margin-top: 8px; }
@media (min-width: 860px) { .about { grid-template-columns: 1fr 1fr; } .about.pic-right .about-text { order: -1; } }

/* ---------- ขั้นตอน ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: 6px 16px; padding: 0 0 26px; position: relative; }
.steps li::before { content: ''; position: absolute; left: 23px; top: 48px; bottom: 0; width: 1px; background: var(--gold); opacity: .5; }
.steps li:last-child::before { display: none; }
.st-n {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--navy); color: var(--gold-2); font-size: 16px; grid-row: span 2;
}
.steps .ic { display: none; }
.steps h3 { font-size: 18.5px; color: var(--navy); margin-top: 8px; }
.steps p { margin: 4px 0 0; color: var(--muted); font-size: 15.5px; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(var(--n, 4), 1fr); gap: 24px; }
  .steps li { grid-template-columns: 1fr; padding: 0; text-align: center; justify-items: center; }
  .steps li::before { left: calc(50% + 34px); right: calc(-50% + 10px); top: 24px; bottom: auto; width: auto; height: 1px; }
  .st-n { grid-row: auto; }
  .steps .ic { display: block; color: var(--gold-deep); margin-top: 6px; }
}

/* ---------- มาตรฐาน (ตารางเส้นบาง) ---------- */
.sec-std { padding-block: calc(var(--gap) * .7); border-top: 1px solid var(--line); }
.std-grid { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.std-cell { padding: 18px 16px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
@media (max-width: 767px) {
  .std-cell { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; }
  .std-cell .ic { grid-row: span 2; margin: 2px 0 0; }
}
.std-cell .ic { color: var(--gold-deep); display: block; margin-bottom: 8px; }
.std-cell .ic svg { width: 28px; height: 28px; stroke-width: 1.4; }
.std-cell h3 { font-size: 17px; color: var(--navy); }
.std-cell p { margin: 4px 0 0; font-size: 14.5px; color: var(--muted); line-height: 1.6; }
@media (min-width: 768px) { .std-grid { grid-template-columns: repeat(var(--cols, 3), 1fr); } .std-cell { padding: 28px 26px; } }

/* ---------- ทำไมต้องเรา ---------- */
.why { display: grid; gap: 14px; }
.why-head { background: var(--navy); color: #fff; padding: clamp(28px, 4vw, 48px); border-radius: var(--radius); position: relative; overflow: hidden; }
.why-head .eyebrow { color: var(--gold-2); }
.why-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 12px; }
.why-head p { color: rgba(255,255,255,.8); margin: 0; }
.why-mark { position: absolute; right: -20px; bottom: -24px; color: rgba(220,192,138,.14); }
.why-mark svg { width: 180px; height: 180px; stroke-width: .8; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.why-cell { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px; }
.why-cell .ic { color: var(--gold-deep); }
.why-cell .ic svg { width: 28px; height: 28px; stroke-width: 1.4; }
.why-cell h3 { font-size: 17.5px; color: var(--navy); margin: 8px 0 4px; }
.why-cell p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
@media (min-width: 900px) { .why { grid-template-columns: 5fr 7fr; gap: 18px; } .why-grid { gap: 18px; } .why-cell { padding: 28px 26px; } }

/* ---------- ผลงาน (พื้นเข้ม ก่อกำแพงตามสัดส่วนจริง ไม่ครอป) ---------- */
.sec-dark { background: var(--navy); color: #fff; }
.sec-dark .sec-head h2 { color: #fff; }
.sec-dark .sec-head p { color: rgba(255,255,255,.75); }
.sec-dark .eyebrow { color: var(--gold-2); }
.gal { columns: 2; column-gap: 10px; }
.gal-item { break-inside: avoid; margin: 0 0 10px; }
.gal-item a { display: block; overflow: hidden; border-radius: 4px; }
.gal-item img { width: 100%; height: auto; transition: transform .5s var(--ease); }
.gal-item a:hover img { transform: scale(1.03); }
.gal-item video { width: 100%; height: auto; border-radius: 4px; }
.gal-item figcaption { padding: 10px 2px 6px; display: grid; gap: 2px; }
.gal-item figcaption b { color: var(--gold-2); font-size: 15.5px; }
.gal-item figcaption span { color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.6; }
@media (min-width: 768px) { .gal { columns: var(--cols, 3); column-gap: 18px; } .gal-item { margin-bottom: 18px; } }

dialog.light { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
dialog.light::backdrop { background: rgba(6, 12, 26, .9); }
dialog.light img { max-height: 88vh; width: auto; border-radius: 4px; }
dialog.light button {
  position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 24px; cursor: pointer;
}

/* ---------- รีวิว ---------- */
.quotes { display: grid; gap: 14px; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; margin: 0; position: relative; display: flex; flex-direction: column; }
.quote::before { content: '\201C'; position: absolute; right: 18px; top: -6px; font-size: 84px; line-height: 1; color: var(--gold-2); opacity: .55; font-family: Georgia, serif; }
.stars { display: flex; gap: 3px; color: var(--gold); margin-bottom: 12px; }
.stars svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.quote blockquote { margin: 0 0 18px; flex: 1; }
.quote p { margin: 0; font-size: 16.5px; line-height: 1.8; }
.quote figcaption { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.quote img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.quote b { display: block; font-size: 15.5px; color: var(--navy); }
.q-tag { display: inline-block; font-size: 14px; color: var(--gold-deep); }
@media (min-width: 860px) { .quotes { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

/* ทนายความของเรา — รูปแนวตั้ง 4:5 กรอบทองเยื้อง ชื่อ+ตำแหน่งใต้รูป */
.team { display: grid; gap: 40px 28px; max-width: 860px; margin-inline: auto; }
.lawyer { margin: 0; text-align: center; }
.lawyer-pic { position: relative; margin: 0 14px 26px 0; }
.lawyer-pic::before { content: ''; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--gold); border-radius: var(--radius); }
.lawyer-pic img, .lawyer-mark { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius); background: var(--paper-2); }
.lawyer-mark { display: grid; place-items: center; color: var(--gold); }
.lawyer-mark svg { width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.lawyer-role { display: block; font-size: 14.5px; font-weight: 600; color: var(--gold-deep); }
.lawyer b { display: block; font-size: clamp(19px, 2.3vw, 23px); line-height: 1.5; color: var(--navy); margin-top: 2px; }
.lawyer p { margin: 10px auto 0; max-width: 34ch; color: var(--muted); font-size: 16px; }
@media (min-width: 640px) { .team { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px) { .team { max-width: 400px; } }

/* ---------- คำถามที่พบบ่อย ---------- */
.sec-faq { background: var(--paper-2); }
.faq-wrap { display: grid; gap: 28px; }
.faq-side .sec-head { text-align: start; margin: 0 0 20px; }
.faq-side .sec-head .eyebrow::after { display: none; }
.faq-call { display: grid; gap: 4px; padding: 18px 20px; background: var(--navy); color: #fff; border-radius: var(--radius); }
.faq-call span { font-size: 14.5px; color: rgba(255,255,255,.75); }
.faq-call a { display: inline-flex; gap: 10px; align-items: center; font-size: 21px; font-weight: 700; text-decoration: none; color: var(--gold-2); }
.faq details { border-bottom: 1px solid var(--line); background: transparent; }
.faq summary {
  cursor: pointer; padding: 18px 44px 18px 0; font-weight: 600; position: relative; list-style: none;
  font-size: 17px; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 10px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--gold-deep); border-bottom: 2px solid var(--gold-deep);
  transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .faq-a { padding: 0 0 20px; color: var(--muted); margin: 0; white-space: pre-line; }
@media (min-width: 900px) { .faq-wrap { grid-template-columns: 4fr 7fr; gap: 56px; } .faq-side { position: sticky; top: 110px; align-self: start; } }

/* ---------- แถบชวนติดต่อ ---------- */
.cta-band { padding-block: clamp(56px, 8vw, 96px); text-align: center; }
.cta-dark { background: radial-gradient(120% 140% at 50% 0%, var(--navy-2), var(--navy-3)); color: #fff; }
.cta-soft { background: var(--paper-2); color: var(--navy); }
.cta-in { display: grid; justify-items: center; gap: 22px; }
.cta-mark { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; color: var(--gold-2); }
.cta-mark svg { width: 30px; height: 30px; stroke-width: 1.3; }
.cta-band h2 { font-size: clamp(24px, 3.6vw, 38px); max-width: 24ch; }

/* ---------- ติดต่อ ---------- */
.sec-contact { background: var(--navy); color: #fff; }
.contact { display: grid; gap: 32px; }
.contact-info .eyebrow { color: var(--gold-2); }
.contact-info h2 { font-size: clamp(27px, 3.6vw, 40px); margin-bottom: 12px; }
.contact-info > p { color: rgba(255,255,255,.8); margin: 0 0 20px; }
.contact-list { display: grid; gap: 18px; margin: 0 0 24px; padding: 0; list-style: none; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list svg { width: 22px; height: 22px; color: var(--gold-2); margin-top: 6px; }
.contact-list small { display: block; color: rgba(255,255,255,.65); font-size: 14px; line-height: 1.4; }
.contact-list a { text-decoration: none; font-size: 20px; font-weight: 700; color: #fff; }
.contact-list span { color: #fff; }
.line-qr { display: flex; gap: 16px; align-items: center; margin: 0 0 24px; padding: 12px; max-width: 400px; border: 1px solid rgba(220,192,138,.4); border-radius: var(--radius); color: #fff; text-decoration: none; }
.line-qr img { flex: none; width: 112px; height: 112px; padding: 6px; background: #fff; border-radius: 4px; }
.line-qr b { display: block; color: var(--gold-2); font-size: 17px; }
.line-qr small { display: block; color: rgba(255,255,255,.75); font-size: 14px; line-height: 1.5; margin-top: 4px; }
.foot-qr { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 16px; text-decoration: none; font-size: 14px; color: inherit; }
.foot-qr img { width: 96px; height: 96px; padding: 5px; background: #fff; border-radius: 4px; }
.hours { margin: 0; padding: 0; list-style: none; font-size: 15px; max-width: 360px; }
.hours li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed rgba(255,255,255,.18); }
.hours .closed { color: rgba(255,255,255,.55); }
.h24 { display: inline-flex; gap: 10px; align-items: center; margin: 0; padding: 10px 16px; border: 1px solid rgba(220,192,138,.4); border-radius: 4px; color: var(--gold-2); }
.h24 svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.contact-form { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: clamp(22px, 3.5vw, 36px); border-top: 3px solid var(--gold); }
.map-wrap { margin-top: 28px; }
.map { border: 0; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); }
@media (min-width: 900px) { .contact { grid-template-columns: 5fr 6fr; gap: 56px; align-items: start; } }

form.lead { display: grid; gap: 16px; }
form.lead .f2 { display: grid; gap: 16px; }
@media (min-width: 560px) { form.lead .f2 { grid-template-columns: 1fr 1fr; } }
form.lead label { font-size: 15px; font-weight: 600; display: block; margin-bottom: 6px; color: var(--navy); }
form.lead input, form.lead textarea, form.lead select {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; min-height: 50px;
  border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink);
}
form.lead input:focus, form.lead textarea:focus, form.lead select:focus { border-color: var(--gold); outline: 2px solid color-mix(in srgb, var(--gold) 35%, transparent); outline-offset: 0; }
form.lead textarea { min-height: 120px; resize: vertical; }
form.lead .hp { position: absolute; left: -9999px; }
form.lead .btn { width: 100%; }
form.lead .form-note { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
form.lead .msg { font-size: 15px; margin: 0; }
form.lead .msg:empty { display: none; }
form.lead .msg.ok { color: #1f6b43; }
form.lead .msg.bad { color: #b3261e; }

/* ข้อความอิสระ */
.rt h2 { font-size: clamp(24px, 3.2vw, 34px); color: var(--navy); margin-bottom: 14px; }
.rt p { color: var(--muted); }
.rt-narrow { max-width: 760px; }

/* ---------- ท้ายเว็บ ---------- */
.foot { background: var(--navy-3); color: rgba(255,255,255,.82); padding-block: clamp(48px, 6vw, 72px) 28px; font-size: 15px; }
.foot-grid { display: grid; gap: 32px; }
.foot h3 { color: var(--gold-2); font-size: 16px; margin-bottom: 12px; }
.foot-brand img { width: 64px; height: 64px; border-radius: 50%; margin-bottom: 12px; box-shadow: 0 0 0 2px var(--gold); }
.foot-brand b { display: block; font-size: 21px; color: #fff; margin-bottom: 6px; }
.foot-brand p { margin: 0; line-height: 1.7; max-width: 36ch; }
.foot-links { display: grid; gap: 6px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover, .foot-contact a:hover { color: var(--gold-2); }
.foot-svc, .foot-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-contact li { display: flex; gap: 10px; align-items: flex-start; }
.foot-contact svg { width: 18px; height: 18px; color: var(--gold-2); margin-top: 5px; }
.foot-contact a { text-decoration: none; }
.foot .social { display: flex; gap: 10px; margin-top: 14px; }
.foot .social a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(220,192,138,.4); color: var(--gold-2); }
.foot .social svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.copy { display: block; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 14px; color: rgba(255,255,255,.6); text-align: center; }
@media (min-width: 640px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1.2fr 1.4fr; } }

/* ปุ่มติดต่อลอยบนมือถือ */
.float-contact { display: none; }
@media (max-width: 760px) {
  .float-contact {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; gap: 10px;
    background: var(--navy-3); padding: 8px var(--pad) calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .float-contact .btn { flex: 1; min-height: 44px; padding: 8px 10px; gap: 8px; white-space: nowrap; }
  .float-contact .fc-line { background: #06c755; border-color: #06c755; color: #fff; }
  .float-contact .fc-fb { background: #1877f2; border-color: #1877f2; color: #fff; }
  body { padding-bottom: 64px; }
  .topbar .tb-loc { display: none; }
  .topbar .wrap { gap: 16px; }
}

/* ---------- การ์ดทั่วไป (หน้าบทความ) ---------- */
.cards { display: grid; gap: clamp(16px, 2.5vw, 24px); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-pic { aspect-ratio: 4 / 3; background: var(--paper-2); display: block; }
.card-pic img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h2, .card-body h3 { font-size: 17px; color: var(--navy); }
.card-body h2 a { text-decoration: none; }
.card-body p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.card-price { font-weight: 700; font-size: 17px; margin-top: auto; padding-top: 8px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(var(--cols, 3), 1fr); } }
@media (max-width: 719px) { .cards { grid-template-columns: repeat(2, 1fr); } }

/* ---------- บทความ ---------- */
.a-wrap { max-width: 760px; }
.a-wrap .crumbs { color: var(--muted); margin-bottom: 18px; }
.a-wrap .crumbs a { color: var(--muted); }
.a-wrap h1 { font-size: clamp(26px, 4.2vw, 40px); margin-bottom: 12px; color: var(--navy); }
.a-meta { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }
.a-cover { margin: 0 0 26px; }
.a-cover img { width: 100%; border-radius: var(--radius); }
.a-lead { font-size: 18px; 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: 14.5px; margin-bottom: 8px; }
.a-toc ol { margin: 0; padding-inline-start: 20px; }
.a-toc a { color: var(--muted); text-decoration: none; }
.a-body > * { margin-block: 0 20px; }
.a-body h2 { font-size: clamp(21px, 3vw, 27px); margin-block: 44px 14px; scroll-margin-top: 100px; color: var(--navy); }
.a-body h3 { font-size: clamp(18px, 2.4vw, 21px); margin-block: 30px 10px; }
.a-body p { line-height: 1.9; }
.a-body a:not(.btn) { color: var(--gold-deep); 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(--gold); }
.a-body blockquote cite { color: var(--muted); font-size: 14.5px; 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: 14px; margin-top: 8px; text-align: center; }
.a-cta { background: var(--paper-2); 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: 18px; }
.a-related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.a-related li a { display: block; padding: 13px 16px; background: var(--paper-2); border-radius: 4px; text-decoration: none; font-weight: 600; }

/* ---------- จุดกดอย่างน้อย 44px ---------- */
.topbar a, .faq-call a, .contact-list a, .foot-links a, .foot-contact a { min-height: 44px; display: inline-flex; align-items: center; }
.foot-links { gap: 0; }
.foot-contact li { align-items: center; }
.foot-contact svg { margin-top: 0; }
.topbar .wrap { min-height: 44px; }

/* ---------- เนื้อหาค่อยปรากฏ (เฉพาะเมื่อมี JS) ---------- */
html.js [data-rv] { opacity: 0; transform: translateY(20px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
html.js [data-rv].in { opacity: 1; transform: none; }

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