/* ============================================================
   Miracle Clinic System (MCS) — Design System
   Brand: #0047C4 (primary) / #FF4081 (accent) / Noto Sans Thai
   Mobile-first, responsive, no framework
   ============================================================ */

:root {
  --blue: #0047C4;
  --blue-deep: #002E8A;
  --blue-ink: #0B1B3F;
  --blue-soft: #EAF1FF;
  --blue-softer: #F5F8FF;
  --accent: #FF4081;
  --accent-soft: #FFE9F1;
  --ink: #16233B;
  --text: #454545;
  --muted: #6B7A90;
  --line: #E3EAF6;
  --white: #FFFFFF;
  --green: #00B67A;
  --amber: #FFB020;

  --font-display: "IBM Plex Sans Thai", "Noto Sans Thai", sans-serif;
  --font-body: "Noto Sans Thai", sans-serif;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(11, 27, 63, .06);
  --shadow-md: 0 8px 28px rgba(11, 27, 63, .10);
  --shadow-lg: 0 20px 60px rgba(0, 71, 196, .16);

  --container: 1180px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
ul { padding-left: 1.2em; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.35;
  margin: 0 0 .5em;
  font-weight: 600;
}
h1 { font-size: clamp(1.9rem, 5.5vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); letter-spacing: -.01em; }
h3 { font-size: clamp(1.1rem, 2.6vw, 1.3rem); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

section { padding: 64px 0; }
@media (min-width: 768px) { section { padding: 96px 0; } }

.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head p { color: var(--muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--blue);
  background: var(--blue-soft); border-radius: 999px;
  padding: 6px 16px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  border-radius: 999px; padding: 13px 28px; cursor: pointer;
  border: 2px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, #2E6BFF 100%);
  color: #fff; box-shadow: 0 8px 24px rgba(0, 71, 196, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0, 71, 196, .45); }
.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #FF6B9C 100%);
  color: #fff; box-shadow: 0 8px 24px rgba(255, 64, 129, .35);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255, 64, 129, .45); }
.btn-outline { border-color: var(--blue); color: var(--blue); background: #fff; }
.btn-outline:hover { background: var(--blue-soft); }
.btn-ghost-light { border-color: rgba(255,255,255,.55); color: #fff; background: rgba(255,255,255,.08); backdrop-filter: blur(4px); }
.btn-ghost-light:hover { background: rgba(255,255,255,.18); }
.btn-lg { padding: 16px 36px; font-size: 1.08rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 1px solid var(--line);
}
/* เบลอพื้นหลังต้องอยู่ที่ pseudo-element ไม่ใช่ตัว header เอง: ถ้า header มี backdrop-filter
   เมนูมือถือ (position: fixed ที่อยู่ข้างใน) จะถูกจำกัดขนาดตาม header สูงแค่ 68px จนมองไม่เห็นเมนู */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 40px; width: auto; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 999;
  background: #fff; padding: 16px 20px 40px; overflow-y: auto;
  /* ซ่อนแบบจางหาย ไม่พักไว้นอกจอด้านขวา (translateX) เพราะทำให้หน้าล้นแนวนอนและเลื่อนเอียงบนมือถือ */
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-10px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.nav-open .main-nav {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
  transition: opacity .25s ease, transform .25s ease, visibility 0s;
}
.nav-open { overflow: hidden; } /* ล็อกการเลื่อนหน้าด้านหลังเมื่อเปิดเมนูมือถือ */
@media (min-width: 1200px) { .nav-open { overflow: visible; } }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul > li { border-bottom: 1px solid var(--line); }
.main-nav a, .main-nav .submenu-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 14px 4px; font-family: var(--font-display); font-weight: 500;
  font-size: 1rem; color: var(--ink); background: none; border: 0; cursor: pointer; text-align: left;
}
.main-nav a:hover, .main-nav .submenu-toggle:hover { color: var(--blue); }
.main-nav a[aria-current="page"] { color: var(--blue); font-weight: 600; }
.submenu-toggle .chev { transition: transform .25s ease; flex-shrink: 0; }
.submenu-open > .submenu-toggle .chev { transform: rotate(180deg); }
.submenu { display: none; padding: 0 0 10px 14px; }
.submenu-open > .submenu { display: block; }
.submenu a { font-weight: 400; font-size: .95rem; color: var(--text); padding: 9px 4px; }
.nav-cta { margin-top: 20px; }
.nav-cta .btn { width: 100%; }

@media (min-width: 1200px) {
  .nav-toggle { display: none; }
  .main-nav {
    position: static; transform: none; padding: 0; overflow: visible;
    background: none; display: flex; align-items: center; gap: 8px;
    opacity: 1; visibility: visible; pointer-events: auto; transition: none;
  }
  .main-nav > ul { display: flex; align-items: center; gap: 2px; }
  .main-nav > ul > li { border: 0; position: relative; }
  .main-nav a, .main-nav .submenu-toggle { width: auto; padding: 10px 14px; font-size: .95rem; white-space: nowrap; }
  .submenu {
    display: block; position: absolute; top: 100%; left: 0; min-width: 320px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-md); padding: 10px;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .has-submenu:hover > .submenu, .has-submenu:focus-within > .submenu, .submenu-open > .submenu {
    opacity: 1; visibility: visible; transform: translateY(0);
  }
  .submenu a { border-radius: 8px; padding: 9px 12px; }
  .submenu a:hover { background: var(--blue-softer); color: var(--blue); }
  .nav-cta { margin: 0 0 0 10px; }
  .nav-cta .btn { width: auto; padding: 10px 22px; font-size: .92rem; }
}

/* ---------- Hero (sales page) ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(255, 64, 129, .18), transparent 60%),
    radial-gradient(1200px 700px at -10% 110%, rgba(46, 107, 255, .35), transparent 55%),
    linear-gradient(150deg, var(--blue-ink) 0%, var(--blue-deep) 55%, var(--blue) 100%);
  color: #fff; padding: 72px 0 96px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, transparent, black 40%, transparent);
}
.hero-grid { position: relative; z-index: 1; display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } .hero { padding: 96px 0 120px; } }

.hero h1 { color: #fff; margin-bottom: 18px; }
.hero h1 .hl { color: #8FD3FF; }
.hero p.lead { font-size: clamp(1rem, 2.4vw, 1.18rem); color: rgba(255,255,255,.85); max-width: 54ch; margin: 0 0 28px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; padding: 7px 18px; font-size: .88rem; font-weight: 500; backdrop-filter: blur(6px);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(74,222,128,.1); } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; color: rgba(255,255,255,.75); font-size: .9rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust svg { flex-shrink: 0; }

.hero-visual { position: relative; }
.hero-visual .main-shot {
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.25);
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty { 50% { transform: translateY(-12px); } }
.float-card {
  position: absolute; background: #fff; color: var(--ink);
  border-radius: 14px; box-shadow: var(--shadow-md);
  padding: 12px 18px; font-size: .85rem; font-weight: 600; font-family: var(--font-display);
  display: flex; align-items: center; gap: 10px;
}
.float-card .num { font-size: 1.25rem; color: var(--blue); line-height: 1; }
.float-card small { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; }
.fc-1 { top: -18px; right: 6px; animation: floaty 6s 1s ease-in-out infinite; }
.fc-2 { bottom: -16px; left: -6px; animation: floaty 8s .5s ease-in-out infinite; }
@media (max-width: 899px) { .fc-1 { top: -14px; right: 0; } }

/* ---------- Stats bar ---------- */
.stats-bar { background: #fff; padding: 0; }
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  margin-top: -52px; position: relative; z-index: 5; box-shadow: var(--shadow-md);
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; text-align: center; padding: 26px 14px; }
.stat .num { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.3rem); color: var(--blue); line-height: 1.15; }
.stat .num em { font-style: normal; color: var(--accent); }
.stat .label { font-size: .88rem; color: var(--muted); }

/* ---------- Cards / features ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }
@media (max-width: 699px) { .grid-pricing { grid-template-columns: 1fr; } } /* การ์ดราคาเรียงทีละใบบนมือถือ ไม่ให้ล้นจอ */
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #C9D9F5; }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); margin-bottom: 16px; font-size: 1.4rem;
}
.card:nth-child(4n+2) .icon { background: var(--accent-soft); color: var(--accent); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: .95rem; color: var(--muted); }

/* ---------- Pain points ---------- */
.pain { background: var(--blue-softer); }
.pain-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border-radius: var(--radius); padding: 20px 22px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.pain-item .x {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700;
}
.pain-item p { margin: 0; font-size: .95rem; }
.pain-item b { color: var(--ink); font-family: var(--font-display); }

/* ---------- Segments (target groups) ---------- */
.segment-card {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius-lg); overflow: hidden; padding: 30px 26px;
  background: linear-gradient(160deg, var(--blue-ink), var(--blue-deep));
  color: #fff; min-height: 250px; transition: transform .25s ease, box-shadow .25s ease;
}
.segment-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.segment-card::before {
  content: ""; position: absolute; right: -50px; top: -50px; width: 180px; height: 180px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,64,129,.4), transparent 70%);
}
.segment-card:nth-child(2) { background: linear-gradient(160deg, #013A9E, #2E6BFF); }
.segment-card:nth-child(3) { background: linear-gradient(160deg, #7A1240, #FF4081); }
.segment-card:nth-child(4) { background: linear-gradient(160deg, #0F3D33, #00B67A); }
.segment-card h3 { color: #fff; font-size: 1.25rem; position: relative; }
.segment-card p { color: rgba(255,255,255,.82); font-size: .92rem; flex-grow: 1; position: relative; margin: 0 0 18px; }
.segment-card .seg-icon { font-size: 2rem; margin-bottom: 14px; position: relative; }
.segment-card .link {
  position: relative; color: #fff; font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  display: inline-flex; align-items: center; gap: 6px;
}
.segment-card .link::after { content: "→"; transition: transform .2s ease; }
.segment-card:hover .link::after { transform: translateX(5px); }

/* ---------- Clinic type chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px; font-size: .9rem; color: var(--ink); font-weight: 500;
  transition: border-color .2s, background .2s, transform .2s;
}
a.chip:hover { border-color: var(--blue); background: var(--blue-soft); transform: translateY(-2px); }
.chip::before { content: "✓"; color: var(--green); font-weight: 700; }

/* ---------- Steps ---------- */
.step { text-align: center; padding: 10px 16px; position: relative; }
.step .n {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display);
  font-weight: 700; font-size: 1.5rem; color: #fff;
  background: linear-gradient(135deg, var(--blue), #2E6BFF);
  box-shadow: 0 10px 24px rgba(0,71,196,.3);
}
.step:nth-child(2) .n { background: linear-gradient(135deg, var(--accent), #FF6B9C); box-shadow: 0 10px 24px rgba(255,64,129,.3); }
.step:nth-child(3) .n { background: linear-gradient(135deg, #00875C, var(--green)); box-shadow: 0 10px 24px rgba(0,182,122,.3); }
.step p { color: var(--muted); font-size: .95rem; }

/* ---------- Testimonials ---------- */
.testimonials { background: linear-gradient(180deg, var(--blue-softer), #fff); }
.t-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.t-card .stars { color: var(--amber); letter-spacing: 3px; margin-bottom: 12px; font-size: .95rem; }
.t-card blockquote { margin: 0 0 18px; font-size: .97rem; color: var(--text); flex-grow: 1; }
.t-card .who { display: flex; align-items: center; gap: 12px; }
.t-card .avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700;
  background: linear-gradient(135deg, var(--blue), #2E6BFF);
}
.t-card:nth-child(2) .avatar { background: linear-gradient(135deg, var(--accent), #FF6B9C); }
.t-card:nth-child(3) .avatar { background: linear-gradient(135deg, #00875C, var(--green)); }
.t-card:nth-child(4) .avatar { background: linear-gradient(135deg, #B45309, var(--amber)); }
.t-card .who b { font-family: var(--font-display); color: var(--ink); display: block; line-height: 1.3; }
.t-card .who small { color: var(--muted); }

/* ---------- Pricing ---------- */
.price-card {
  position: relative; background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius-lg); padding: 34px 28px; display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.price-card.featured { border-color: var(--blue); box-shadow: var(--shadow-lg); }
.price-card .plan-tag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), #FF6B9C); color: #fff;
  font-size: .78rem; font-weight: 600; padding: 5px 18px; border-radius: 999px; white-space: nowrap;
}
.price-card h3 { font-size: 1.15rem; color: var(--muted); font-weight: 600; }
.price-card .amount { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; color: var(--ink); line-height: 1.1; }
.price-card .amount small { font-size: 1rem; font-weight: 400; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 22px 0 26px; flex-grow: 1; }
.price-card li { padding: 7px 0 7px 30px; position: relative; font-size: .93rem; border-bottom: 1px dashed var(--line); }
.price-card li:last-child { border-bottom: 0; }
.price-card li::before {
  content: "✓"; position: absolute; left: 0; top: 7px;
  width: 20px; height: 20px; border-radius: 50%; font-size: .72rem;
  display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 700;
}
.price-card li.plus::before { content: "+"; background: var(--accent-soft); color: var(--accent); }
.price-note { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 26px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 18px 22px; font-family: var(--font-display); font-weight: 600; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.4rem; color: var(--blue); line-height: 1; transition: transform .25s ease; flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { color: var(--blue); }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--muted); font-size: .95rem; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(255,64,129,.35), transparent 60%),
    linear-gradient(140deg, var(--blue-ink), var(--blue));
  color: #fff; padding: 56px 28px; text-align: center;
}
@media (min-width: 768px) { .cta-band { padding: 72px 60px; } }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 60ch; margin: 0 auto 30px; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(255,64,129,.14), transparent 55%),
    linear-gradient(150deg, var(--blue-ink), var(--blue-deep) 70%, var(--blue));
  color: #fff; padding: 64px 0; position: relative; overflow: hidden;
}
.page-hero h1 { color: #fff; }
.page-hero .lead { color: rgba(255,255,255,.85); max-width: 62ch; font-size: clamp(1rem, 2.2vw, 1.12rem); }
.page-hero .breadcrumbs { font-size: .85rem; margin-bottom: 18px; color: rgba(255,255,255,.65); }
.page-hero .breadcrumbs a { color: rgba(255,255,255,.85); }
.page-hero .hero-actions { margin-top: 26px; margin-bottom: 0; }

/* ---------- Feature rows (inner pages) ---------- */
.feature-row { display: grid; gap: 28px; align-items: center; padding: 34px 0; border-bottom: 1px solid var(--line); }
.feature-row:last-child { border-bottom: 0; }
@media (min-width: 860px) {
  .feature-row { grid-template-columns: 1fr 1fr; gap: 60px; }
  .feature-row:nth-child(even) .fr-text { order: 2; }
}
.fr-visual {
  border-radius: var(--radius-lg); min-height: 220px;
  background: linear-gradient(150deg, var(--blue-soft), #fff);
  border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 3.4rem; color: var(--blue);
}
.feature-row:nth-child(even) .fr-visual { background: linear-gradient(150deg, var(--accent-soft), #fff); color: var(--accent); }
.fr-visual.has-img { padding: 0; background: none; border: 0; }
.fr-visual.has-img img { width: 100%; height: auto; max-height: 440px; object-fit: contain; border-radius: var(--radius-lg); }
.fr-text ul { list-style: none; padding: 0; margin: 14px 0 0; }
.fr-text li { padding: 6px 0 6px 28px; position: relative; font-size: .96rem; }
.fr-text li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* ---------- Offer strip ---------- */
.offer-strip {
  display: grid; gap: 16px; grid-template-columns: 1fr;
  background: var(--blue-softer); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; text-align: center;
}
@media (min-width: 768px) { .offer-strip { grid-template-columns: repeat(3, 1fr); } }
.offer-strip .o b { font-family: var(--font-display); font-size: 1.2rem; color: var(--blue); display: block; }
.offer-strip .o span { color: var(--muted); font-size: .9rem; }

/* ---------- Products (peripherals) ---------- */
.product-card { display: flex; flex-direction: column; }
.product-card .p-photo {
  background: var(--blue-softer); border-radius: 14px; margin: -8px -6px 16px;
  display: grid; place-items: center; padding: 18px; aspect-ratio: 1 / 1;
}
.product-card .p-photo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.product-card .p-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.product-card .price { font-family: var(--font-display); font-weight: 700; color: var(--accent); font-size: 1.2rem; white-space: nowrap; }
.product-card ul { list-style: none; padding: 0; margin: 12px 0 0; flex-grow: 1; }
.product-card li { padding: 4px 0 4px 24px; position: relative; font-size: .9rem; color: var(--muted); }
.product-card li::before { content: "•"; position: absolute; left: 8px; color: var(--blue); }
.product-card .warranty {
  margin-top: 14px; display: inline-flex; align-self: flex-start; align-items: center; gap: 6px;
  background: #EDFBF5; color: var(--green); font-size: .8rem; font-weight: 600;
  border-radius: 999px; padding: 4px 14px;
}

/* ---------- Contact page ---------- */
.contact-card { text-align: center; }
.contact-card .icon { margin-inline: auto; }
.contact-card a.big { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.contact-card a.big:hover { color: var(--blue); }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-ink); color: rgba(255,255,255,.75); padding: 64px 0 0; font-size: .93rem; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr; padding-bottom: 44px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer img.f-logo { height: 44px; width: auto; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(255,255,255,.75); transition: color .2s; }
.site-footer a:hover { color: #fff; }
.f-contact li { display: flex; gap: 10px; align-items: flex-start; }
.f-contact svg { flex-shrink: 0; margin-top: 4px; opacity: .7; }
.f-contact li.f-phone-row { flex-direction: column; gap: 2px; margin: -4px 0 9px 25px; }
.f-contact li.f-phone-row a { white-space: nowrap; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; text-align: center; font-size: .84rem;
  color: rgba(255,255,255,.5);
}
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.1); transition: background .2s, transform .2s;
}
.socials a:hover { background: var(--blue); transform: translateY(-3px); }

/* ---------- Floating LINE button ---------- */
.float-line {
  position: fixed; right: 18px; bottom: 18px; z-index: 900;
  display: inline-flex; align-items: center; gap: 10px;
  background: #06C755; color: #fff; font-family: var(--font-display); font-weight: 600;
  border-radius: 999px; padding: 12px 22px; box-shadow: 0 10px 30px rgba(6,199,85,.4);
  transition: transform .2s ease, box-shadow .2s ease;
}
.float-line:hover { transform: translateY(-3px); color: #fff; box-shadow: 0 14px 36px rgba(6,199,85,.5); }
@media (max-width: 600px) { .float-line span.txt { display: none; } .float-line { padding: 14px; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-visual .main-shot, .float-card { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Hero background video ---------- */
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
}
/* overlay ไล่เฉดโปร่งแสงทับวิดีโอ เพื่อให้ตัวอักษรอ่านชัดแต่วิดีโอยังมองเห็น */
.hero.has-video::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(255, 64, 129, .14), transparent 60%),
    linear-gradient(150deg, rgba(11, 27, 63, .93) 0%, rgba(0, 46, 138, .82) 55%, rgba(0, 71, 196, .62) 100%);
}
.hero.has-video::after { z-index: 1; }
.hero > .container { position: relative; z-index: 2; }

/* ---------- Language switcher ---------- */
.lang-switch { position: relative; flex-shrink: 0; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; font-family: var(--font-display);
  font-size: .85rem; font-weight: 600; color: var(--ink);
}
.lang-btn:hover { border-color: var(--blue); color: var(--blue); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 160px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 6px; z-index: 1100;
  display: none;
}
.lang-switch.open .lang-menu { display: block; }
.lang-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 9px 12px; border-radius: 8px; font-family: var(--font-body);
  font-size: .92rem; color: var(--ink);
}
.lang-menu button:hover { background: var(--blue-softer); color: var(--blue); }
.lang-menu button.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
/* hide Google Translate chrome */
body { top: 0 !important; }
.goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame, .skiptranslate { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* ---------- Client logo marquee ---------- */
.clients-band { overflow: hidden; }
.marquee { overflow: hidden; position: relative; padding: 8px 0;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent); }
.marquee-track { display: flex; gap: 28px; padding-right: 28px; width: max-content; animation: marquee 60s linear infinite; }
.marquee.reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.client-logo {
  flex-shrink: 0; width: 96px; height: 96px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: grid; place-items: center; overflow: hidden;
}
.client-logo img { max-width: 78px; max-height: 78px; object-fit: contain; }
/* โหมดลดการเคลื่อนไหว: เปลี่ยนเป็นกริดนิ่งเต็มกว้าง ทุกแถวเต็มบรรทัด (4 / 6 / 10 คอลัมน์ x 60 โลโก้ หารลงตัวพอดี) */
@media (prefers-reduced-motion: reduce) {
  .marquee-wrap {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
    max-width: var(--container); margin: 0 auto; padding: 0 20px;
  }
  .marquee, .marquee-track { display: contents; }
  .client-logo { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .client-logo img { max-width: 80%; max-height: 80%; }
  .client-logo.dup, .client-logo.x { display: none; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 480px) { .marquee-wrap { grid-template-columns: repeat(6, 1fr); gap: 16px; } }
@media (prefers-reduced-motion: reduce) and (min-width: 900px) { .marquee-wrap { grid-template-columns: repeat(10, 1fr); gap: 18px; } }

/* ---------- Certification badges ---------- */
.cert-badges { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: stretch; }
.cert-badge {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; width: 150px; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cert-badge:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cert-badge img { height: 64px; width: auto; object-fit: contain; }
.cert-badge b { font-family: var(--font-display); font-size: .8rem; color: var(--ink); line-height: 1.35; }
.cert-badge small { font-size: .72rem; color: var(--muted); line-height: 1.4; }

/* ---------- Add-on cards ---------- */
.addon-card { display: flex; gap: 16px; align-items: flex-start; }
.addon-card .icon { flex-shrink: 0; }
.addon-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.addon-card p { font-size: .9rem; }
.pricing-note-box {
  background: var(--accent-soft); border: 1px solid #FFD1E1; color: var(--ink);
  border-radius: 14px; padding: 16px 22px; font-size: .93rem; text-align: center;
  max-width: 720px; margin: 28px auto 0;
}

/* แบนเนอร์ QuickDesk บนหน้าอุปกรณ์เสริม */
.qd-promo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 22px 26px; color: #fff;
  border-radius: var(--radius-lg); position: relative; overflow: hidden;
  background: linear-gradient(120deg, #071230 0%, #1b3fd6 55%, #8b5cf6 100%);
  box-shadow: 0 16px 40px rgba(60, 80, 220, .35); transition: transform .2s ease, box-shadow .2s ease;
}
.qd-promo:hover { transform: translateY(-3px); box-shadow: 0 22px 50px rgba(60, 80, 220, .5); color: #fff; }
.qd-promo-tag { font-family: var(--font-display); font-weight: 700; font-size: .78rem; padding: 5px 14px; border-radius: 999px; background: var(--accent); }
.qd-promo-body { flex: 1 1 280px; display: grid; gap: 2px; }
.qd-promo-body strong { font-family: var(--font-display); font-size: clamp(1.05rem, 2.6vw, 1.3rem); }
.qd-promo-body span { color: rgba(255,255,255,.82); font-size: .92rem; }
.qd-promo-go { font-family: var(--font-display); font-weight: 600; padding: 9px 20px; border-radius: 999px; background: rgba(255,255,255,.16); }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.section-alt { background: var(--blue-softer); }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--blue); color: #fff;
  padding: 10px 18px; z-index: 2000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============================================================
   Wearable Device page (Remote Patient Monitoring)
   ============================================================ */
.nav-new {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .62rem; font-weight: 700;
  letter-spacing: .06em; line-height: 1.6; vertical-align: middle;
}
.ic { flex-shrink: 0; }

/* phone mockup */
.phone {
  position: relative; border-radius: 34px; padding: 7px;
  background: linear-gradient(160deg, #27385f, #0b1633);
  box-shadow: 0 28px 60px rgba(8, 18, 48, .35), inset 0 0 0 1.5px rgba(255,255,255,.14);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 28px; background: #fff; }

/* floating data chips */
.wd-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.97); color: var(--ink); padding: 10px 16px;
  border-radius: 14px; box-shadow: var(--shadow-md); font-family: var(--font-display);
  animation: floaty 6s ease-in-out infinite;
}
.wd-chip b { display: block; font-size: 1.02rem; line-height: 1.15; color: var(--blue); }
.wd-chip small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; line-height: 1.3; }
.wd-chip .beat { display: inline-flex; color: var(--accent); animation: wd-beat 1.1s ease-in-out infinite; }
@keyframes wd-beat { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.28); } 40% { transform: scale(1); } }

/* hero */
.wd-hero {
  position: relative; overflow: hidden; color: #fff; padding: 56px 0 130px;
  background:
    radial-gradient(900px 520px at 88% 0%, rgba(255, 64, 129, .30), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(46, 107, 255, .40), transparent 55%),
    linear-gradient(150deg, #071230 0%, #002E8A 60%, #0047C4 100%);
}
.wd-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.wd-hero-grid { position: relative; z-index: 2; display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .wd-hero { padding: 88px 0 150px; } .wd-hero-grid { grid-template-columns: 1.02fr .98fr; } }
.wd-hero h1 { color: #fff; margin-bottom: 18px; }
.wd-hero h1 .hl {
  background: linear-gradient(90deg, #8FD3FF, #FF8FB8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wd-hero p.lead { font-size: clamp(1rem, 2.4vw, 1.16rem); color: rgba(255,255,255,.86); max-width: 56ch; margin: 0 0 26px; }
.wd-hero .hero-badge { margin-bottom: 20px; }
.wd-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.wd-hero .hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; color: rgba(255,255,255,.78); font-size: .9rem; }
.wd-hero .hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.wd-hero .hero-trust svg { color: #4ADE80; }

.wd-visual { position: relative; width: 100%; max-width: 540px; margin: 0 auto; padding-bottom: 64px; }
.wd-visual .bands {
  display: block; width: 90%; height: auto; margin-left: auto; border-radius: 30px;
  box-shadow: 0 30px 70px rgba(0, 10, 40, .5); border: 1px solid rgba(255,255,255,.25);
}
.wd-visual .phone { position: absolute; left: 0; bottom: 0; width: 38%; }
.wd-visual .chip-1 { top: 18px; left: 0; }
.wd-visual .chip-2 { top: 44%; right: 0; }
.wd-visual .chip-3 { bottom: 4px; right: 2%; }
@media (max-width: 480px) {
  .wd-chip { padding: 8px 12px; gap: 8px; }
  .wd-chip b { font-size: .88rem; } .wd-chip small { font-size: .66rem; }
  .wd-visual .chip-3 { right: 0; }
}

/* animated ECG line */
.wd-ecg { position: absolute; left: 0; right: 0; bottom: 28px; width: 100%; height: 100px; z-index: 1; pointer-events: none; }
.wd-ecg path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.wd-ecg .base { stroke: rgba(255,255,255,.16); stroke-width: 2; }
.wd-ecg .pulse {
  stroke: #FF4081; stroke-width: 3; stroke-dasharray: 16 84;
  filter: drop-shadow(0 0 6px rgba(255, 64, 129, .95)); animation: wd-ecg 4.5s linear infinite;
}
@keyframes wd-ecg { from { stroke-dashoffset: 16; } to { stroke-dashoffset: -84; } }

/* data-flow diagram */
.wd-flow-track { display: flex; flex-direction: column; align-items: stretch; max-width: 1140px; margin: 0 auto; }
.wd-step {
  position: relative; flex: 1 1 0; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 22px; box-shadow: var(--shadow-sm);
}
.wd-step .ico {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: #fff;
  margin-bottom: 14px; background: linear-gradient(135deg, var(--blue), #2E6BFF);
  box-shadow: 0 10px 24px rgba(0, 71, 196, .28);
}
.wd-step.s2 .ico { background: linear-gradient(135deg, var(--accent), #FF6B9C); box-shadow: 0 10px 24px rgba(255, 64, 129, .3); }
.wd-step.s3 .ico { background: linear-gradient(135deg, #0A3A9E, #0047C4); }
.wd-step.s4 .ico { background: linear-gradient(135deg, #00875C, var(--green)); box-shadow: 0 10px 24px rgba(0, 182, 122, .3); }
.wd-step .tag {
  display: inline-block; margin-bottom: 8px; font-size: .7rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--blue); background: var(--blue-soft); border-radius: 999px; padding: 3px 12px;
}
.wd-step h3 { margin-bottom: 6px; }
.wd-step p { margin: 0; font-size: .92rem; color: var(--muted); }
.wd-link {
  position: relative; flex: 0 0 48px; width: 2px; margin: 0 auto;
  background: repeating-linear-gradient(to bottom, #B9CBF3 0 6px, transparent 6px 12px);
}
.wd-link::after {
  content: ""; position: absolute; left: 50%; top: 0; width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent);
  animation: wd-down 2.4s linear infinite;
}
@keyframes wd-down { 0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: calc(100% - 10px); opacity: 0; } }
@keyframes wd-right { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: calc(100% - 10px); opacity: 0; } }
.wd-link:nth-child(4)::after { animation-delay: .6s; }
.wd-link:nth-child(6)::after { animation-delay: 1.2s; }
@media (min-width: 900px) {
  .wd-flow-track { flex-direction: row; }
  .wd-link {
    flex: 0 0 58px; width: auto; height: 2px; align-self: center; margin: 0;
    background: repeating-linear-gradient(to right, #B9CBF3 0 6px, transparent 6px 12px);
  }
  .wd-link::after { top: 50%; left: 0; margin: -5px 0 0; animation-name: wd-right; }
}

/* dashboard console (Command Center / Patient 360) */
.wd-console {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(700px 420px at 12% 0%, rgba(255, 64, 129, .22), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(46, 107, 255, .35), transparent 60%),
    linear-gradient(165deg, #071230, #0B1B3F 55%, #102a6b);
}
.wd-console::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px); background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}
.wd-console .container { position: relative; }
.wd-console .section-head h2 { color: #fff; }
.wd-console .section-head p { color: rgba(255,255,255,.8); }
.wd-console .eyebrow { background: rgba(255,255,255,.12); color: #fff; }
.wd-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 auto 28px; }
.wd-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.07); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem; transition: background .2s, transform .2s, box-shadow .2s;
}
.wd-tab small { font-weight: 400; opacity: .72; font-size: .78rem; }
.wd-tab:hover { background: rgba(255,255,255,.14); }
.wd-tab:focus-visible { outline: 3px solid #8FD3FF; outline-offset: 2px; }
.wd-tab[aria-selected="true"] {
  background: linear-gradient(135deg, var(--accent), #FF6B9C); border-color: transparent;
  box-shadow: 0 10px 26px rgba(255, 64, 129, .38);
}
.wd-win {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255,255,255,.14);
}
.wd-win + .wd-win { margin-top: 22px; }
.wd-bar { display: flex; align-items: center; gap: 7px; padding: 10px 16px; background: #0f1b3d; color: rgba(255,255,255,.78); font-size: .8rem; }
.wd-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.wd-bar i:nth-child(2) { background: #febc2e; }
.wd-bar i:nth-child(3) { background: #28c840; }
.wd-bar span { margin-left: 8px; font-family: var(--font-display); font-weight: 500; }
.wd-bar em { margin-left: auto; font-style: normal; font-size: .72rem; padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.12); }
.wd-shot { overflow-x: auto; background: #f3f6fb; -webkit-overflow-scrolling: touch; }
.wd-inner { position: relative; min-width: 900px; container-type: inline-size; }
.wd-inner img { display: block; width: 100%; height: auto; }
@media (min-width: 960px) { .wd-inner { min-width: 0; } }
/* ข้อความสรุป AI ตัวอย่าง วางทับช่อง AI Clinical Summary ในภาพ (ขนาดตัวอักษรย่อขยายตามความกว้างภาพด้วยหน่วย cqw) */
.wd-ai {
  --u: calc(100cqw / 1150);
  position: absolute; left: 64%; top: 50.8%; width: 34.8%; height: 47.6%; box-sizing: border-box;
  padding: calc(var(--u) * 6) calc(var(--u) * 4) 0; overflow: hidden; background: #fff;
  font-size: calc(var(--u) * 10); line-height: 1.55; color: #4b5870;
}
.wd-ai-box {
  background: #eaf2ff; border: 1px solid #d4e3ff; border-radius: calc(var(--u) * 7);
  padding: calc(var(--u) * 7) calc(var(--u) * 10); margin-bottom: calc(var(--u) * 12);
}
.wd-ai-box b { display: block; font-weight: 600; font-size: calc(var(--u) * 9.5); color: var(--blue); margin-bottom: calc(var(--u) * 2); }
.wd-ai-box p { margin: 0; font-size: calc(var(--u) * 10); color: #243049; }
.wd-ai h4 {
  display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--u) * 8); margin: 0 0 calc(var(--u) * 6);
  font-family: var(--font-display); font-size: calc(var(--u) * 12.5); color: #16233b; line-height: 1.3;
}
.wd-ai .lvl {
  font-family: var(--font-body); font-weight: 600; font-size: calc(var(--u) * 9); line-height: 1.6;
  padding: 0 calc(var(--u) * 9); border-radius: 999px; background: #FFF1B8; color: #8a6400;
}
.wd-ai ul { margin: 0; padding-left: calc(var(--u) * 14); }
.wd-ai li { margin-bottom: calc(var(--u) * 3); font-size: calc(var(--u) * 9.6); }
.wd-ai small { display: block; margin-top: calc(var(--u) * 6); font-size: calc(var(--u) * 8.4); color: #8a96a8; }
@supports not (width: 1cqw) { .wd-ai { display: none; } }
.wd-hint { margin: 10px 0 0; text-align: center; font-size: .78rem; color: rgba(255,255,255,.6); }
@media (min-width: 960px) { .wd-hint { display: none; } }
.pin {
  position: absolute; z-index: 2; width: 28px; height: 28px; border-radius: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; background: var(--accent); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: .85rem; line-height: 1;
  box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 6px 14px rgba(0,0,0,.35);
}
/* วงแหวนกะพริบใช้ transform + opacity เท่านั้น (GPU ทำงานเบา ไม่ต้องวาดใหม่ทุกเฟรมเหมือนอนิเมชัน box-shadow) */
.pin::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--accent);
  animation: wd-pin 2.4s ease-out infinite; pointer-events: none;
}
@keyframes wd-pin { 0% { transform: scale(1); opacity: .85; } 80%, 100% { transform: scale(2.2); opacity: 0; } }
.wd-legend { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 18px 36px; }
@media (min-width: 900px) { .wd-legend { grid-template-columns: repeat(2, 1fr); } }
.wd-legend li { display: flex; gap: 14px; align-items: flex-start; }
.wd-legend li > b {
  flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; margin-top: 2px;
  background: var(--accent); color: #fff; font-family: var(--font-display); font-size: .85rem;
}
.wd-legend strong { display: block; color: #fff; font-family: var(--font-display); font-size: 1rem; line-height: 1.4; margin-bottom: 2px; }
.wd-legend span { display: block; color: rgba(255,255,255,.78); font-size: .9rem; }
.wd-console .wd-note { color: rgba(255,255,255,.6); margin-top: 34px; }

/* vitals */
.wd-vitals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 900px) { .wd-vitals { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.vital {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.vital:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #C9D9F5; }
.vital .vi { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 12px; background: var(--blue-soft); color: var(--blue); }
.vital:nth-child(even) .vi { background: var(--accent-soft); color: var(--accent); }
.vital h3 { font-size: 1rem; margin-bottom: 4px; }
.vital p { margin: 0; font-size: .85rem; color: var(--muted); }
.vital .star, .wd-note .star { color: var(--accent); }
.wd-note { margin: 22px auto 0; max-width: 820px; font-size: .8rem; color: var(--muted); }

/* device (dark) */
.wd-device { position: relative; overflow: hidden; color: #fff; background: linear-gradient(160deg, #071230, #0B1B3F 55%, #12307a); }
.wd-device::before {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 64, 129, .25), transparent 70%); pointer-events: none;
}
.wd-device h2 { color: #fff; }
.wd-device p { color: rgba(255,255,255,.82); }
.wd-device .eyebrow { background: rgba(255,255,255,.12); color: #fff; margin-bottom: 14px; }
.wd-device-grid { position: relative; display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .wd-device-grid { grid-template-columns: 1fr 1fr; gap: 60px; } }
.wd-device .bands { width: 100%; height: auto; border-radius: 28px; box-shadow: 0 30px 70px rgba(0, 0, 0, .45); border: 1px solid rgba(255,255,255,.2); }
.wd-badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 22px 0 0; }
@media (min-width: 600px) { .wd-badges { grid-template-columns: repeat(3, 1fr); } }
.wd-badge {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: .88rem;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 14px;
}
.wd-badge svg { color: #8FD3FF; }
.wd-badge b { display: block; font-family: var(--font-display); color: #fff; line-height: 1.25; font-size: .88rem; }
.wd-badge small { display: block; color: rgba(255,255,255,.66); font-size: .72rem; line-height: 1.35; }
.wd-safety { position: relative; display: grid; gap: 14px; margin-top: 44px; }
@media (min-width: 760px) { .wd-safety { grid-template-columns: repeat(3, 1fr); } }
.wd-safe {
  padding: 22px 20px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(160deg, rgba(255, 64, 129, .18), rgba(255,255,255,.05));
}
.wd-safe svg { color: #FF8FB8; }
.wd-safe h3 { color: #fff; font-size: 1.04rem; margin: 12px 0 6px; }
.wd-safe p { margin: 0; font-size: .88rem; color: rgba(255,255,255,.8); }

/* app showcase */
.wd-app { background: linear-gradient(180deg, #FFF3F8 0%, #fff 60%); }
.phone-rail {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 18px 20px 30px; margin: 0 -20px; -webkit-overflow-scrolling: touch;
}
.phone-rail figure { flex: 0 0 62%; max-width: 250px; margin: 0; scroll-snap-align: center; }
.phone-rail figcaption { margin-top: 14px; text-align: center; font-size: .86rem; color: var(--muted); line-height: 1.5; }
.phone-rail figcaption b { display: block; font-family: var(--font-display); color: var(--ink); font-size: .96rem; }
@media (min-width: 1000px) {
  .phone-rail { overflow: visible; justify-content: center; gap: 26px; padding: 18px 0 48px; margin: 0; }
  .phone-rail figure { flex: 1 1 0; max-width: none; }
  .phone-rail figure:nth-child(even) { transform: translateY(36px); }
}
.wd-programs { display: grid; gap: 16px; }
@media (min-width: 800px) { .wd-programs { grid-template-columns: repeat(3, 1fr); } }
.wd-prog {
  display: flex; gap: 16px; align-items: center; padding: 16px; background: #fff;
  border: 1px solid #F7D3E1; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.wd-prog .thumb { flex: 0 0 92px; height: 124px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.wd-prog .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.wd-prog .thumb.noimg {
  display: grid; place-items: center; color: #fff; border: 0;
  background: linear-gradient(150deg, #00875C, var(--green));
  box-shadow: 0 10px 24px rgba(0, 182, 122, .28);
}
.wd-prog h3 { font-size: 1.02rem; margin-bottom: 4px; }
.wd-prog p { margin: 0; font-size: .88rem; color: var(--muted); }

/* use cases */
.wd-use { display: flex; flex-direction: column; color: inherit; }
.wd-use p { flex-grow: 1; }
.wd-use .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--blue); }
.wd-use:hover .more svg { transform: translateX(4px); }
.wd-use .more svg { transition: transform .2s ease; }

/* trust strip */
.wd-trust {
  display: grid; gap: 26px; align-items: center; padding: 30px 24px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
@media (min-width: 900px) { .wd-trust { grid-template-columns: 1.1fr .9fr; padding: 38px 46px; } }
.wd-trust h3 { margin: 12px 0 8px; }
.wd-trust p { margin: 0; color: var(--muted); font-size: .95rem; }
.wd-trust .logos { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; }
.wd-trust .logos img { height: 64px; width: auto; border-radius: 10px; }
/* โลโก้ ETDA-DPS เป็น SVG สีขาวล้วน (ทำมาสำหรับพื้นเข้ม) จึงต้องวางบนพื้นกรมท่าเสมอ */
img[src$="etda-dps.svg"] { background: #0B2A6B; padding: 10px 14px; border-radius: 10px; box-sizing: content-box; }

@media (prefers-reduced-motion: reduce) {
  .wd-chip, .wd-chip .beat, .wd-ecg .pulse { animation: none; }
  .pin::after { animation: none; display: none; }
  .wd-link::after { animation: none; opacity: 1; top: calc(50% - 5px); left: calc(50% - 5px); margin: 0; }
}
