/* ฟอนต์ host เองบนเว็บ (variable font ไฟล์เดียวครอบคลุมทุกน้ำหนัก) ไม่ต้องรอเซิร์ฟเวอร์ Google Fonts */
@font-face { font-family: 'Noto Sans Thai'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/noto-sans-thai-thai.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Noto Sans Thai'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/noto-sans-thai-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --brand: #00796e;
  --brand-dark: #005a52;
  --brand-bright: #00d0b4;
  --brand-tint: #e8f7f5;
  --line-green: #06c755;
  --ink: #1d2b2a;
  --muted: #55625f;
  --border: #d9e6e3;
  --bg: #ffffff;
  --bg-alt: #f4faf9;
  --radius: 14px;
  /* ระยะบนล่างของทุก section ใช้ค่าเดียวกันทั้งเว็บ */
  --section-y: 48px;
  --block-gap: 20px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 6px 20px rgb(0 60 55 / 0.07);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Noto Sans Thai', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.35; margin: 0; }
h1 { margin-bottom: 0.45em; }
h2 { margin-bottom: 0.5em; }
h3 { margin-bottom: 0.4em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
svg { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 50; }

/* ---------- หัวเว็บ ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / 0.96); border-bottom: 1px solid var(--border); backdrop-filter: blur(6px); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 84px; padding-top: 10px; padding-bottom: 10px; }
/* โลโก้ห้ามหดเมื่อเมนูยาว */
.brand { flex: none; display: block; line-height: 0; }
.brand img { width: 128px; height: auto; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.header-call { flex: none; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--brand); }
.header-call { padding: 8px 16px; }

.mobile-menu { display: none; margin-left: auto; position: relative; }
.mobile-menu summary { list-style: none; cursor: pointer; padding: 10px; display: grid; gap: 5px; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }
.mobile-menu ul { position: absolute; right: 0; top: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); list-style: none; margin: 4px 0 0; padding: 8px; min-width: 220px; }
.mobile-menu a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 600; border-radius: 8px; }
.mobile-menu a:hover { background: var(--brand-tint); }

/* ---------- ปุ่ม ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 700; text-decoration: none; font-size: 1rem; line-height: 1.2; border: 2px solid transparent; transition: background-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgb(0 60 55 / 0.15); }
.btn:active { transform: none; box-shadow: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-line { background: var(--line-green); color: #fff; }
.btn-line:hover { filter: brightness(0.93); }
.btn-outline { border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand-tint); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 var(--block-gap); }
.text-link { font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- หน้าแรก ---------- */
.hero { background: linear-gradient(180deg, var(--brand-tint), #fff); padding: 48px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.nw { white-space: nowrap; }
.hero h1 .sub { display: block; color: var(--brand); font-size: 0.72em; margin-top: 6px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.hero-img img { border-radius: 20px; box-shadow: var(--shadow); }
.facts { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.facts li { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; font-size: 0.85rem; color: var(--muted); line-height: 1.4; }
.facts strong { display: block; color: var(--brand); font-size: 1.35rem; }

.section { padding: var(--section-y) 0; scroll-margin-top: 70px; }
.section.alt { background: var(--bg-alt); }
.section-lead { color: var(--muted); max-width: 680px; margin-top: -0.1em; margin-bottom: 1.4em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.two-col.top { align-items: start; }
.rounded { border-radius: 18px; box-shadow: var(--shadow); }

/* การ์ดเลือกสาขาในหน้าแรก */
.branch-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0 20px; }
.pick { background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pick img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pick-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pick h3 { margin: 0; font-size: 1.2rem; }
.pick h3 a { color: var(--ink); text-decoration: none; }
.pick-note { display: flex; gap: 6px; align-items: flex-start; color: var(--muted); margin: 0; font-size: 0.95rem; }
.pick-note svg { margin-top: 4px; color: var(--brand); }
.pick-hours { margin: 0; font-weight: 600; color: var(--brand-dark); font-size: 0.95rem; }
.pick-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 10px; flex-wrap: wrap; }
.pick-actions .btn { padding: 10px 18px; }
.hours-line { display: flex; gap: 6px; align-items: flex-start; color: var(--brand-dark); font-weight: 600; }
.hours-line svg { margin-top: 5px; }
.checks.two-up { grid-template-columns: 1fr 1fr; gap: 18px 32px; }
.gallery { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.service-grid { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service-grid.home-articles { grid-template-columns: repeat(4, 1fr); }
.home-articles .service-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.service-card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.service-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.service-name { font-weight: 700; font-size: 1.15rem; color: var(--brand-dark); }
.service-summary { color: var(--muted); font-size: 0.93rem; flex: 1; }
.service-price { font-weight: 700; color: var(--brand); }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { padding-left: 34px; position: relative; }
.checks li::before { content: ''; position: absolute; left: 0; top: 5px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z' fill='%2300796e'/%3E%3C/svg%3E") center/16px no-repeat; }
.checks strong { display: block; }

.doctor-grid { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.doctor img { border-radius: var(--radius); aspect-ratio: 3 / 4; object-fit: cover; width: 100%; background: var(--bg-alt); margin-bottom: 10px; }
.doctor p { margin: 0; line-height: 1.45; }
.doctor-name { font-weight: 700; }
.doctor-field { color: var(--brand-dark); font-size: 0.92rem; }
.doctor-license { color: var(--muted); font-size: 0.85rem; }
.doctor-edu { list-style: none; padding: 0; margin: 4px 0; font-size: 0.85rem; line-height: 1.45; color: var(--ink); }
.doctor-edu li { padding-left: 12px; position: relative; margin-bottom: 2px; }
.doctor-edu li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: var(--brand-bright); }
.doctor { scroll-margin-top: 80px; }
.doctor-name a { color: inherit; text-decoration: none; }
.doctor-name a:hover { color: var(--brand); }
.text-link.small { font-size: 0.85rem; }

/* หน้าโปรไฟล์ทันตแพทย์ */
.expertise { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.expertise a, .expertise span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-weight: 600; color: var(--brand-dark); text-decoration: none; }
.expertise a::after { content: '→'; color: var(--brand); }
.expertise a:hover { border-color: var(--brand); }
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.profile-photo { border-radius: 18px; box-shadow: var(--shadow); aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.profile-role { font-size: 1.15rem; font-weight: 700; color: var(--brand); margin-top: -0.4em; }
.profile-quote { margin: 0 0 20px; padding: 12px 18px; border-left: 4px solid var(--brand-bright); background: #fff; border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; }
@media (max-width: 900px) {
  :root { --section-y: 36px; --block-gap: 16px; }
  .profile-grid { grid-template-columns: 1fr; gap: 20px; }
  .profile-photo { max-width: 240px; }
}
.verify-link { display: inline-block; margin-top: 2px; font-size: 0.78rem; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.verify-link:hover { color: var(--brand); }

.branch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.branch { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.branch p { margin-bottom: 0.5em; }

/* แถบนัดหมาย ระยะเท่ากับ footer และไล่สีต่อเนื่องลงไปที่ footer */
.cta-block { background: radial-gradient(120% 140% at 50% 0%, #0a8a7e 0%, var(--brand) 45%, #0d4a44 100%); color: #fff; padding: 28px 0 24px; text-align: center; }
.cta-block p { opacity: 0.92; margin: 0 0 2px; font-size: 0.95rem; }
.cta-block .cta-hours { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; }
.cta-block .cta-row { margin: 14px 0 0; }
.cta-block .cta-row { justify-content: center; }
.cta-block .btn-primary { background: #fff; color: var(--brand-dark); }

/* ---------- หน้าย่อย ---------- */
.page-head { padding-top: 28px; padding-bottom: 12px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; font-size: 0.88rem; color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-right: 6px; }
.crumbs a { color: var(--muted); }

.prices { width: 100%; border-collapse: collapse; margin: 8px 0 18px; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.prices th, .prices td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prices th { background: var(--brand-tint); font-size: 0.9rem; }
.prices td:last-child, .prices th:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
.prices tr:last-child td { border-bottom: 0; }
.note { color: var(--muted); font-size: 0.9rem; }
.verify-box { background: var(--brand-tint); border-radius: var(--radius); padding: 18px 20px; margin: 8px 0 16px; }
.verify-box p { margin: 0 0 0.4em; }
.verify-box p:last-child { margin: 0; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding-left: 44px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 0.9rem; }

.faq { border: 1px solid var(--border); border-radius: var(--radius); padding: 0 18px; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style-position: inside; }
.faq p { margin: 0 0 14px; color: var(--muted); }

.chip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chip-list a { display: inline-block; padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; font-weight: 600; background: #fff; }
.chip-list a:hover { border-color: var(--brand); }
.chip-list a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.more-link { margin-top: var(--block-gap); }

.info { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 20px; }
.info dt { font-weight: 700; color: var(--muted); }
.info dd { margin: 0; }
.map { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--bg-alt); }
.prose h2 { margin-top: 2em; margin-bottom: 0.55em; }
.prose h3 { margin-top: 1.6em; margin-bottom: 0.45em; }
.prose h2 + p, .prose h3 + p { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose table { margin-bottom: 1.1em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35em; }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--brand-tint); }
.article-body { font-size: 1.05rem; }
.article-cat { display: inline-block; font-size: 0.8rem; font-weight: 700; color: var(--brand); background: var(--brand-tint); padding: 2px 10px; border-radius: 999px; margin-bottom: 6px; }
.service-card .article-cat { align-self: flex-start; margin-bottom: 0; }
.byline { color: var(--muted); font-size: 0.9rem; }

/* ---------- ท้ายเว็บ ---------- */
.site-footer { background: #10302d; color: #cfe3df; padding: 28px 0 20px; font-size: 0.9rem; line-height: 1.55; }
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; }
.footer-brand, .footer-title { color: #fff; font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.copyright { margin-top: 14px; opacity: 0.7; font-size: 0.82rem; }

.action-bar { display: none; }

/* ---------- มือถือ ---------- */
/* เมนูเต็มต้องการพื้นที่ประมาณ 1,060px — แคบกว่านั้นใช้ปุ่มเมนูแทน */
@media (max-width: 1080px) {
  .nav { display: none; }
  .mobile-menu { display: block; margin-left: 0; }
  .header-call { margin-left: auto; }
}
@media (max-width: 900px) {
  .nav, .header-call { display: none; }
  .mobile-menu { display: block; margin-left: auto; }
  .header-row { min-height: 72px; padding-top: 8px; padding-bottom: 8px; }
  .brand img { width: 112px; }
  .hero { padding-top: 28px; }
  .hero-grid, .two-col, .branch-grid, .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { gap: 16px; }
  /* เว้นที่ให้แถบปุ่มด้านล่างจอ (สูงประมาณ 64px) */
  .site-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .hero-img { order: -1; }
  .service-grid, .service-grid.home-articles { grid-template-columns: 1fr 1fr; }
  .doctor-grid { grid-template-columns: repeat(3, 1fr); }
  .action-bar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgb(0 0 0 / 0.06); padding-bottom: env(safe-area-inset-bottom); }
  .action-bar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; text-decoration: none; font-weight: 700; font-size: 0.85rem; color: var(--brand-dark); }
  .action-bar.four { grid-template-columns: repeat(4, 1fr); }
  .action-bar a.line { color: var(--line-green); }
  .branch-pick, .checks.two-up { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .action-bar svg { width: 22px; height: 22px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .service-grid, .service-grid.home-articles { grid-template-columns: 1fr; }
  .doctor-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .facts { grid-template-columns: 1fr 1fr; gap: 8px; }
  .facts li { padding: 10px 8px; font-size: 0.78rem; }
  .facts strong { font-size: 1.1rem; }
  .cta-row .btn { flex: 1 1 100%; justify-content: center; }
}
.profile-grid + * .doctor-edu, .section .two-col .doctor-edu { font-size: 1rem; }
/* กล่องตัวเลขที่เป็นลิงก์ทั้งกล่อง (LINE) */
.facts li.fact-link { padding: 0; border-color: var(--line-green); }
.facts li.fact-link a { display: block; height: 100%; padding: 12px; color: var(--muted); text-decoration: none; border-radius: var(--radius); }
.facts li.fact-link strong { color: var(--line-green); }
.facts li.fact-link a:hover { background: #f1fbf4; }
@media (max-width: 560px) { .facts li.fact-link a { padding: 10px 8px; } }
.facts li.fact-doc { border-color: var(--brand); }
.facts li.fact-doc strong { color: var(--brand); }
.facts li.fact-doc a:hover { background: var(--brand-tint); }
/* ภาพประกอบบทความ */
.prose p:has(> img.illus) { margin: 24px 0 28px; }
.prose img.illus { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.prose .caption { display: block; margin-top: 8px; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* การ์ดทันตแพทย์ (ปรับใหม่): ชื่อ ป้ายสาขา และบรรทัดสั้น */
.doctor { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.doctor img { margin-bottom: 4px; }
.doctor-name { font-size: 1.02rem; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-dark); font-size: 0.82rem; font-weight: 700; line-height: 1.5; }
.pill-gp { background: #f1f3f2; color: var(--muted); }
.doctor-meta { color: var(--muted); font-size: 0.85rem; margin: 0; }
.doctor-more { font-size: 0.88rem; font-weight: 700; text-decoration: none; margin-top: 2px; }
.doctor-more:hover { text-decoration: underline; }

/* ข้อมูลหลักในหน้าโปรไฟล์ */
.profile-grid h1 { margin-bottom: 0.3em; }
.profile-facts { display: grid; grid-template-columns: max-content 1fr; gap: 12px 24px; margin: 22px 0 24px; padding: 20px 22px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.profile-facts dt { font-weight: 700; color: var(--muted); font-size: 0.92rem; }
.profile-facts dd { margin: 0; }
.profile-facts dd span { display: block; }
.profile-facts dd span + span { margin-top: 4px; }
.profile-facts .verify-link { margin-left: 8px; }
@media (max-width: 560px) {
  .profile-facts { grid-template-columns: 1fr; gap: 2px; padding: 16px; }
  .profile-facts dd { margin-bottom: 10px; }
}

/* หน้ารวมทันตแพทย์: การ์ดแนวนอน วุฒิครบ */
.doctor-list { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.doctor-row { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: start; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 18px; scroll-margin-top: 90px; }
.doctor-row img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); background: var(--bg-alt); }
.doctor-row .doctor-name { margin: 0 0 6px; font-size: 1.08rem; font-weight: 700; }
.doctor-row .doctor-name a { color: inherit; text-decoration: none; }
.doctor-cv { margin: 14px 0 10px; font-size: 0.9rem; line-height: 1.5; }
.doctor-cv dt { font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-top: 10px; }
.doctor-cv dt:first-child { margin-top: 0; }
.doctor-cv dd { margin: 2px 0 0; padding-left: 12px; position: relative; }
.doctor-cv dd::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 5px; height: 5px; border-radius: 50%; background: var(--brand-bright); }
@media (max-width: 900px) { .doctor-list { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .doctor-row { grid-template-columns: 104px 1fr; gap: 14px; padding: 14px; } }
.doctor-cv dd.plain { padding-left: 0; }
.doctor-cv dd.plain::before { display: none; }

/* การ์ดบทความมีภาพประกอบด้านบน */
.article-card { padding: 0; overflow: hidden; }
.article-card > span:not(.article-thumb) { margin-left: 20px; margin-right: 20px; }
.article-card .article-cat { margin-top: 16px; }
.article-card .service-summary { margin-bottom: 4px; }
/* อ่านต่อ ชิดล่างการ์ดทุกใบให้อยู่ระดับเดียวกัน */
.article-card .card-more { margin-top: auto; padding-bottom: 18px; color: var(--brand); font-weight: 600; font-size: 0.92rem; }
.article-card:hover .card-more { text-decoration: underline; }
.article-thumb { display: block; background: #fff; border-bottom: 1px solid var(--border); }
.article-thumb img { width: 100%; height: 160px; object-fit: contain; padding: 8px; }
.article-thumb.photo img { height: 180px; object-fit: cover; padding: 0; }
.article-hero { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin: 0 0 var(--block-gap); }

/* ระยะห่างใต้หัวข้อให้สม่ำเสมอ */
.service-grid, .doctor-grid, .doctor-list, .branch-pick, .gallery, .expertise { margin-top: var(--block-gap); margin-bottom: var(--block-gap); }
h2 + .service-grid, h2 + .doctor-grid, h2 + .doctor-list, h2 + .expertise, h2 + .chip-list { margin-top: 18px; }
.section-lead + .service-grid, .section-lead + .doctor-grid, .section-lead + .doctor-list, .section-lead + .expertise { margin-top: 0; }
.hero h1 .sub { margin-top: 6px; }
.page-head h1 + .lead, .page-head h1 + p { margin-top: 0.2em; }
.profile-grid .pill { margin-bottom: 4px; }
.cta-block h2 { margin-bottom: 0.3em; }
.faq:first-of-type { margin-top: 16px; }

/* ระยะใต้หัวข้อหน้า: section แรกที่พื้นสีเดียวกับหัวหน้าไม่ต้องเว้นบนเต็ม */
.page-head { padding-bottom: 4px; }
.page-head > :last-child { margin-bottom: 0; }
/* section แรกที่พื้นสีเดียวกับหัวหน้า เว้นบนครึ่งหนึ่ง ส่วนพื้นสีเว้นเต็มเพื่อให้ขอบสีบนล่างเท่ากัน */
.page-head + .section:not(.alt), .hero + .section:not(.alt) { padding-top: calc(var(--section-y) / 2); }
.page-head + .section > .wrap > :first-child,
.hero + .section > .wrap > :first-child { margin-top: 0; }
.hero { padding-bottom: calc(var(--section-y) / 2); }
/* section ติดกันที่พื้นสีเดียวกัน ไม่ต้องเว้นบนซ้ำ (ไม่งั้นช่องว่างจะเป็นสองเท่า) */
.section:not(.alt) + .section:not(.alt), .section.alt + .section.alt { padding-top: 0; }
/* ไม่ให้ระยะท้ายของเนื้อหาซ้อนกับระยะของ section */
.section > .wrap > :last-child, .section > .wrap > :last-child > :last-child,
.section > .wrap > .two-col > * > :last-child { margin-bottom: 0; }

/* หัวหน้าบริการ: ข้อความซ้าย รูปขวา */
.service-head { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.service-head img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 900px) {
  .service-head { grid-template-columns: 1fr; gap: 20px; }
  .service-head img { order: -1; }
}
.gallery { grid-template-columns: repeat(3, 1fr); }

@media (prefers-reduced-motion: reduce) { .btn, .service-card { transition: none; } .btn:hover, .service-card:hover { transform: none; } }

/* ---------- สถานะกำลังโหลด ---------- */
/* แถบโหลดด้านบนตอนเปลี่ยนหน้า */
#page-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100; background: linear-gradient(90deg, var(--brand-bright), var(--brand)); box-shadow: 0 0 8px rgb(0 208 180 / 0.6); opacity: 0; pointer-events: none; }
#page-progress.go { opacity: 1; animation: page-progress 2.5s cubic-bezier(0.1, 0.7, 0.3, 1) forwards; }
@keyframes page-progress { from { width: 0; } to { width: 85%; } }
/* skeleton: พื้นหลังวิบวับระหว่างรอรูปและแผนที่โหลด */
@keyframes skeleton { from { background-position: 100% 0; } to { background-position: -100% 0; } }
main img:not(.ld), iframe.map:not(.ld) { background: linear-gradient(100deg, #e9f2f0 30%, #f6fbfa 50%, #e9f2f0 70%) 0 0 / 200% 100%; animation: skeleton 1.3s linear infinite; }
/* ข้อความบอกว่าแผนที่กำลังโหลด อยู่ด้านหลัง iframe */
.map-wrap { position: relative; }
/* การ์ดสำรองอยู่ใต้แผนที่: เห็นระหว่างรอโหลด และใช้แทนแผนที่ในเบราว์เซอร์ของ LINE/Facebook/Instagram ที่มักไม่แสดงแผนที่ฝัง */
.map-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; text-align: center; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.map-fallback > svg { width: 32px; height: 32px; color: var(--brand); }
.map-fallback span:not(.btn) { color: var(--muted); font-size: 0.9rem; max-width: 34ch; }
.map-fallback .btn { margin-top: 8px; }
.map-wrap iframe { position: relative; }
.map-wrap.no-embed { aspect-ratio: 4 / 3; }
.map-wrap.no-embed iframe { display: none; }
@media (prefers-reduced-motion: reduce) { #page-progress.go { animation: none; width: 85%; } main img:not(.ld), iframe.map:not(.ld) { animation: none; } }


/* ---------- โปรโมชัน ---------- */
.promo-strip { display: block; margin: 4px 0 16px; padding: 12px 16px; border-radius: var(--radius); background: #fff6e0; border: 1px solid #f1d38a; color: var(--ink); text-decoration: none; }
.promo-strip strong { color: #8a5a00; }
.promo-head { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: center; }
.promo-price { background: var(--brand-tint); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; text-align: center; }
.promo-price p { margin: 0; }
.promo-label { font-weight: 700; color: var(--brand-dark); }
.promo-was { color: var(--muted); }
.promo-now { font-size: 3rem; font-weight: 800; color: var(--brand); line-height: 1.2; }
.promo-now span { font-size: 1.2rem; font-weight: 700; }
.promo-ends { font-size: 0.9rem; color: var(--muted); }
.promo-cases figure { margin: 0; }
.promo-cases img { aspect-ratio: auto; }
.promo-cases figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 900px) { .promo-head { grid-template-columns: 1fr; gap: 18px; } }
.promo-banner { margin-top: 24px; width: 100%; }
.promo-cases { grid-template-columns: 1fr 1fr; max-width: 860px; }
.promo-device { max-width: 360px; margin-bottom: 16px; }
@media (max-width: 560px) { .promo-cases { grid-template-columns: 1fr; } }

/* ---------- รีวิวเคส ---------- */
.case-grid { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.case-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; padding-bottom: 12px; height: 100%; }
.case-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; margin-bottom: 6px; }
.case-card .article-cat, .case-card .service-name { padding: 0 14px; }
.case-head { display: grid; grid-template-columns: minmax(0, 440px) 1fr; gap: 32px; align-items: start; }
.promo-home { padding: 20px 0 0; }
.promo-home .promo-strip, .page-head > .promo-strip { margin: 0 0 12px; }
@media (max-width: 900px) { .case-grid { grid-template-columns: repeat(2, 1fr); } .case-head { grid-template-columns: 1fr; gap: 18px; } }
.case-head img { width: 100%; max-width: 440px; }
