/* Thailand Clinic Guide — shared styles
   Aesthetic: refined editorial / clinical. Warm paper, jade accent, serif display. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Hanken+Grotesk:wght@400;500;600&family=IBM+Plex+Sans+Thai:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  --paper: #FAF8F4;
  --surface: #FFFFFF;
  --ink: #1B211E;
  --muted: #6B736E;
  --faint: #9AA09B;
  --jade: #2F6F5E;
  --jade-soft: #EAF1ED;
  --sand: #B8975A;
  --line: rgba(27, 33, 30, 0.10);
  --line-strong: rgba(27, 33, 30, 0.18);
  /* IBM Plex Sans Thai is included as a fallback so Thai glyphs (e.g. the
     "ไทย" switcher label) render in it on EN/other pages too — Latin still
     uses Fraunces / Hanken Grotesk first, via per-glyph font fallback. */
  --serif: 'Fraunces', 'IBM Plex Sans Thai', Georgia, serif;
  --sans: 'Hanken Grotesk', 'IBM Plex Sans Thai', system-ui, sans-serif;
  --radius: 10px;
  --maxw: 1080px;
}

/* Thai pages (lang="th") use IBM Plex Sans Thai (Google Fonts, loads for all users).
   Redefining --sans/--serif here cascades to every component that uses them,
   so no per-element overrides are needed. */
html[lang="th"] {
  --sans: 'IBM Plex Sans Thai', system-ui, sans-serif;
  --serif: 'IBM Plex Sans Thai', Georgia, serif;
}
html[lang="th"] body { font-size: 18px; line-height: 1.7; }
/* Keep the Latin brand logo in the display serif. */
html[lang="th"] .logo { font-family: 'Fraunces', Georgia, serif; }

/* Simplified Chinese pages (lang="zh-Hans") use Noto Sans SC (Google Fonts,
   auto-subset, loads for all users). Same cascade trick via --sans/--serif. */
html[lang="zh-Hans"] {
  --sans: 'Noto Sans SC', 'IBM Plex Sans Thai', system-ui, sans-serif;
  --serif: 'Noto Sans SC', 'IBM Plex Sans Thai', Georgia, serif;
}
html[lang="zh-Hans"] body { line-height: 1.75; }
html[lang="zh-Hans"] .logo { font-family: 'Fraunces', Georgia, serif; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--jade);
  font-weight: 600;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -0.015em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, 0.85);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.logo span { color: var(--jade); }
.nav { display: flex; gap: 30px; align-items: center; }
.nav a { font-size: 15px; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.lang { display: flex; gap: 4px; align-items: center; font-size: 13px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 6px; }
.lang a { padding: 2px 9px; border-radius: 999px; color: var(--muted); transition: all .2s; }
.lang a.active { background: var(--ink); color: var(--paper); }

/* .header-menu is transparent to layout on desktop (logo | nav | lang stay
   as three flex children); it becomes a real dropdown panel on mobile. */
.header-menu { display: contents; }

.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 128px 0 96px; }
.hero .eyebrow { display: block; margin-bottom: 28px; }
.hero h1 { font-size: clamp(44px, 6.6vw, 78px); max-width: 15ch; line-height: 1.02; }
.hero p.lead { font-size: clamp(19px, 2.2vw, 23px); color: var(--muted); max-width: 50ch; margin-top: 30px; line-height: 1.55; }
.promise {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 34px;
  background: var(--jade-soft); color: var(--jade); font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: 999px;
}
.promise::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--jade); }
.hero-cta { margin-top: 44px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer;
  padding: 15px 30px; border-radius: 999px; transition: transform .15s, background .2s, border-color .2s;
}
.btn-primary { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Section scaffolding ---------- */
section { padding: 92px 0; }
.section-head { margin-bottom: 52px; }
.section-head .eyebrow { display: block; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); }
.section-head p { color: var(--muted); margin-top: 16px; max-width: 56ch; font-size: 17px; }

/* ---------- Procedure grid ---------- */
.proc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.proc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 30px; transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex; flex-direction: column; gap: 16px; min-height: 184px;
}
.proc-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: 0 20px 44px rgba(27,33,30,.06); }
.proc-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--jade-soft);
  display: flex; align-items: center; justify-content: center; color: var(--jade);
}
.proc-card h3 { font-size: 22px; }
.proc-card .go { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--jade); display: inline-flex; align-items: center; gap: 6px; }
.proc-card:hover .go { gap: 10px; }

/* ---------- How we rank ---------- */
.rank-section { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.criteria { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
.criterion { display: flex; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.criterion:nth-last-child(1), .criterion:nth-last-child(2) { border-bottom: none; }
.criterion .num { font-family: var(--serif); font-size: 26px; color: var(--sand); font-weight: 500; line-height: 1; min-width: 30px; }
.criterion h3 { font-size: 18px; font-family: var(--sans); font-weight: 600; }
.criterion p { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* ---------- About strip ---------- */
.about { text-align: center; }
.about p { font-family: var(--serif); font-size: clamp(22px, 3vw, 30px); line-height: 1.4; max-width: 28ch; margin: 0 auto; color: var(--ink); }
.about p .hl { color: var(--jade); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C9CEC9; padding: 56px 0 40px; margin-top: 24px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-top .logo { color: var(--paper); }
.footer-top .logo span { color: #8FBFAE; }
.footer-nav { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
.footer-nav a { color: #C9CEC9; font-size: 15px; }
.footer-nav a:hover { color: #fff; }
.disclaimer { font-size: 13px; color: #9AA39C; margin-top: 28px; max-width: 70ch; line-height: 1.7; }
.copyright { font-size: 13px; color: #79827B; margin-top: 18px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); padding-top: 40px; }
.breadcrumb a:hover { color: var(--jade); }

/* ---------- Ranked list (procedure page) ---------- */
.intro-block { padding: 32px 0 8px; }
.intro-block h1 { font-size: clamp(36px, 5.2vw, 60px); max-width: 17ch; line-height: 1.05; }
.intro-block p { color: var(--muted); margin-top: 22px; max-width: 58ch; font-size: 18px; line-height: 1.6; }
.criteria-note {
  background: var(--jade-soft); border-radius: var(--radius); padding: 20px 24px; margin: 30px 0 8px;
  font-size: 15px; color: #2a5447; display: flex; gap: 12px; align-items: flex-start;
}
.criteria-note strong { color: var(--jade); }

.ranked { display: flex; flex-direction: column; gap: 20px; }
.rank-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; display: grid; grid-template-columns: 56px 1fr; gap: 26px; transition: border-color .25s, box-shadow .25s;
}
.rank-card:hover { border-color: var(--line-strong); box-shadow: 0 18px 40px rgba(27,33,30,.06); }
.rank-num { font-family: var(--serif); font-size: 46px; color: var(--sand); font-weight: 500; line-height: 1; }
.rank-card h3 { font-size: 26px; margin-bottom: 4px; }
.rank-meta { font-size: 14px; color: var(--faint); margin-bottom: 14px; }
.rank-why { color: var(--muted); font-size: 16px; line-height: 1.65; }
.rank-why .label { color: var(--jade); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; display: block; margin-bottom: 6px; }
.rank-foot { margin-top: 18px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.tag { font-size: 13px; color: var(--jade); background: var(--jade-soft); padding: 5px 12px; border-radius: 999px; }
.rank-link { font-size: 14px; font-weight: 600; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.rank-link:hover { color: var(--jade); }

/* ---------- Clinic cards (researched listings) ---------- */
.clinic-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.clinic-logo { width: 56px; height: 56px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); object-fit: contain; padding: 8px; flex-shrink: 0; }
.clinic-links { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.clinic-links a { font-size: 13px; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 13px; transition: border-color .2s, color .2s; }
.clinic-links a:hover { border-color: var(--jade); color: var(--jade); }
.clinic-branches { font-size: 13px; color: var(--muted); margin-top: 16px; display: flex; align-items: center; gap: 7px; }

/* Single FB-cover-style banner per clinic (fill assets/covers/<slug>.jpg) */
.clinic-cover { width: 100%; aspect-ratio: 820 / 312; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 16px; display: block; }


/* ---------- Clinic profile ---------- */
.profile-head { padding: 28px 0 8px; display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.profile-logo { width: 96px; height: 96px; border-radius: 18px; background: var(--jade-soft); display: flex; align-items: center; justify-content: center; color: var(--jade); font-family: var(--serif); font-size: 38px; font-weight: 600; flex-shrink: 0; }
.profile-head h1 { font-size: clamp(30px, 4.5vw, 44px); }
.profile-facts { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; }
.fact { font-size: 14px; color: var(--muted); display: flex; gap: 7px; align-items: center; }
.fact .k { color: var(--faint); }

.profile-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; margin-top: 20px; }
.block-why p { color: var(--muted); font-size: 17px; margin-top: 14px; }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.pc { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.pc h4 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.pc.pros h4 { color: var(--jade); }
.pc.cons h4 { color: var(--sand); }
.pc ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.pc li { font-size: 15px; color: var(--muted); padding-left: 22px; position: relative; }
.pc.pros li::before { content: '+'; position: absolute; left: 0; color: var(--jade); font-weight: 700; }
.pc.cons li::before { content: '–'; position: absolute; left: 0; color: var(--sand); font-weight: 700; }

.sidecard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.sidecard h4 { font-family: var(--sans); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.check { display: flex; flex-direction: column; gap: 12px; }
.check-item { display: flex; gap: 10px; font-size: 15px; align-items: flex-start; }
.check-item .tick { color: var(--jade); flex-shrink: 0; }
.map-placeholder { height: 150px; border-radius: 10px; background: var(--jade-soft); display: flex; align-items: center; justify-content: center; color: var(--jade); font-size: 14px; margin-top: 20px; }
.sidecard .btn { width: 100%; justify-content: center; margin-top: 16px; }

.note-flag { background: #FCF7EC; border: 1px solid #E9DDBF; color: #7A6326; border-radius: var(--radius); padding: 16px 20px; font-size: 14px; margin-top: 36px; }

/* ---------- About page ---------- */
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about-cols p { color: var(--muted); font-size: 17px; line-height: 1.7; }

.bio-card { display: flex; gap: 28px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.bio-avatar { width: 88px; height: 88px; border-radius: 50%; background: var(--jade-soft); display: flex; align-items: center; justify-content: center; color: var(--jade); font-family: var(--serif); font-size: 28px; font-weight: 600; flex-shrink: 0; }
.bio-text h3 { font-size: 24px; margin-bottom: 6px; }
.bio-role { color: var(--muted); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; display: block; }
.bio-body { color: var(--muted); font-size: 16px; line-height: 1.7; }

.values-list { display: flex; flex-direction: column; }
.value-item { display: flex; gap: 22px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.value-item:last-child { border-bottom: none; }
.value-no { font-size: 18px; color: var(--sand); font-weight: 700; min-width: 26px; line-height: 1.4; }
.value-item h3 { font-size: 20px; margin-bottom: 8px; }
.value-item p { color: var(--muted); font-size: 16px; }

/* ---------- Procedure explain box (Oligio / Acne Scar) ---------- */
.proc-explain { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 28px 0 4px; background: var(--surface); }
.proc-explain-col { padding: 26px 28px; }
.proc-explain-col:first-child { border-right: 1px solid var(--line); }
.proc-explain-col h3 { font-size: 16px; font-family: var(--sans); font-weight: 600; margin-bottom: 14px; color: var(--ink); }
.proc-explain-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.proc-explain-col li { font-size: 15px; color: var(--muted); padding-left: 20px; position: relative; }
.proc-explain-col li::before { content: '–'; position: absolute; left: 0; color: var(--faint); }

/* ---------- FAQ (native <details> accordion) ---------- */
.faq { border-top: 1px solid var(--line); }
.faq-list { display: flex; flex-direction: column; max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 22px 0; gap: 16px;
  font-family: var(--serif); font-size: 19px; font-weight: 500; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; color: var(--jade); font-size: 26px; font-weight: 400; line-height: 1;
  flex-shrink: 0; transition: transform .2s;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-a { padding: 0 0 24px; color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 68ch; }
.faq-a p { margin-bottom: 12px; }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .15s; } .d3 { animation-delay: .25s; } .d4 { animation-delay: .35s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  /* Hamburger button */
  .menu-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0; cursor: pointer;
    background: transparent; border: 1px solid var(--line-strong); border-radius: 11px;
  }
  .menu-toggle span { display: block; width: 18px; height: 2px; margin: 0 auto; background: var(--ink); transition: transform .2s, opacity .2s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Dropdown panel: anchored full-width under the sticky header */
  .header-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(27,33,30,.08);
    padding: 8px 28px 22px;
  }
  .header-menu.open { display: block; }

  .nav { display: flex; flex-direction: column; gap: 0; }
  .nav a { font-size: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .lang { display: inline-flex; margin-top: 18px; }
  .lang a { padding: 6px 14px; }

  .proc-grid { grid-template-columns: 1fr; }
  .criteria { grid-template-columns: 1fr; }
  .criterion:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .profile-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
  .about-cols { grid-template-columns: 1fr; }
  .bio-card { flex-direction: column; }
  .proc-explain { grid-template-columns: 1fr; }
  .proc-explain-col:first-child { border-right: none; border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .proscons { grid-template-columns: 1fr; }
  .rank-card { grid-template-columns: 1fr; gap: 10px; }
}
