/* ==========================================================================
   Radar4Flood – site styles
   Brand colours live in :root below – change them once and the whole site follows.
   ========================================================================== */
:root {
  /* Colours sampled directly from the official Radar4Flood logo:
     navy #001E45, radar/cloud blue #429FF3, "4" teal #006D6C */
  --brand-900: #001E45;
  --brand-800: #0A2E63;
  --brand-700: #14479C;
  --brand-600: #1E6FD9;   /* primary */
  --brand-500: #429FF3;
  --brand-300: #93C6F9;
  --brand-100: #E6F1FD;
  --brand-50:  #F3F9FE;
  --accent:    #006D6C;   /* "new / in development" – logo teal */
  --accent-100:#DCEEED;

  --ink:       #001E45;
  --ink-2:     #45526B;
  --ink-3:     #7A879C;
  --line:      #E3E9F3;
  --bg:        #FFFFFF;
  --bg-soft:   #F6F9FE;
  --card:      #FFFFFF;

  /* radar rain-intensity scale, used as a small brand motif */
  --rain: linear-gradient(90deg, #4FC3F7 0%, #22C55E 25%, #FACC15 50%, #F97316 72%, #EF4444 88%, #C026D3 100%);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(14,27,51,.06), 0 2px 8px rgba(14,27,51,.04);
  --shadow:    0 6px 24px rgba(11,68,168,.10), 0 2px 6px rgba(14,27,51,.05);
  --shadow-lg: 0 18px 50px rgba(11,68,168,.16);
  --maxw: 1180px;
  --header-h: 68px;
  --font: 'Inter', 'Noto Sans Thai', 'Sarabun', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.7; font-size: 16px; -webkit-font-smoothing: antialiased;
}
:lang(th) body, html[lang="th"] body { line-height: 1.75; }
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.01em; }
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3 { line-height: 1.35; letter-spacing: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand-700); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-600); margin-bottom: 12px; }
html[lang="th"] .eyebrow { letter-spacing: .02em; text-transform: none; font-size: .88rem; }
.eyebrow::before { content: ""; width: 26px; height: 4px; border-radius: 4px; background: var(--rain); }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
.section-head p { color: var(--ink-2); font-size: 1.05rem; }
.rain-bar { height: 4px; background: var(--rain); border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .98rem; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; font-family: inherit; min-height: 46px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 6px 18px rgba(15,91,216,.28); }
.btn-primary:hover { background: var(--brand-700); color: #fff; }
.btn-ghost { background: #fff; color: var(--brand-700); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand-300); background: var(--brand-50); }
.btn-sm { padding: 8px 16px; min-height: 38px; font-size: .9rem; }

.store-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.store-btn { display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 16px; border-radius: 14px; background: var(--ink); color: #fff; min-height: 56px; transition: transform .15s, box-shadow .15s; }
.store-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.store-btn svg { width: 28px; height: 28px; flex: none; }
.store-btn small { display: block; font-size: .68rem; opacity: .75; line-height: 1.1; }
.store-btn b { display: block; font-size: 1.05rem; line-height: 1.2; font-weight: 600; }
.on-dark .store-btn { background: #fff; color: var(--ink); }
.on-dark .store-btn:hover { color: var(--ink); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand img { width: 38px; height: 38px; }
.brand span b { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { padding: 9px 16px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: .96rem; }
.nav a:hover { background: var(--brand-50); color: var(--brand-700); }
.nav a[aria-current="page"] { background: var(--brand-100); color: var(--brand-700); font-weight: 600; }
.lang { display: inline-flex; padding: 3px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; margin-left: 10px; }
.lang button { border: 0; background: transparent; font: inherit; font-size: .84rem; font-weight: 600; color: var(--ink-3); padding: 6px 12px; border-radius: 999px; cursor: pointer; min-height: 32px; }
.lang button[aria-pressed="true"] { background: var(--brand-600); color: #fff; box-shadow: 0 2px 6px rgba(15,91,216,.3); }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; align-items: center; justify-content: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s, opacity .2s; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { top: 0; transform: rotate(45deg); }
.menu-open .menu-btn span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, var(--brand-100), transparent 60%), linear-gradient(180deg, var(--brand-50), #fff 80%); padding: 48px 0 72px; }
.hero-rings { position: absolute; right: -180px; top: -160px; width: 760px; height: 760px; opacity: .55; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr .98fr; gap: 40px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: .86rem; color: var(--ink-2); box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 800; margin-bottom: 18px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--brand-600), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 540px; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero-app-label { font-size: .86rem; color: var(--ink-3); margin-bottom: 10px; font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 36px; margin-top: 34px; justify-content: start; }
.stat b { display: block; font-size: 1.9rem; font-weight: 800; color: var(--brand-700); line-height: 1.1; }
.stat span { font-size: .86rem; color: var(--ink-2); }

/* ---------- Map ---------- */
.map-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 18px; position: relative; }
.map-wrap { position: relative; background: linear-gradient(180deg, #F2F8FF, #EAF3FF); border-radius: 16px; overflow: hidden; }
.map-wrap svg { width: 100%; height: auto; max-height: 640px; margin: 0 auto; touch-action: manipulation; }
.map-wrap .prov { fill: #D9E6F8; stroke: #fff; stroke-width: .7; }
.map-area { cursor: pointer; outline: none; }
.map-area path { fill: var(--brand-600); stroke: #fff; stroke-width: 1; transition: fill .15s, filter .15s; }
.map-area.new path { fill: var(--accent); }
.map-area:hover path, .map-area:focus-visible path, .map-area.active path { fill: var(--brand-800); filter: drop-shadow(0 3px 5px rgba(7,31,74,.35)); }
.map-area.new:hover path, .map-area.new:focus-visible path, .map-area.new.active path { fill: #0A8CA0; }
.pin circle { fill: #fff; stroke: var(--brand-800); stroke-width: 2; }
.map-area.new .pin circle { stroke: #0A6E7E; }
.pin text { font: 700 13px var(--font); fill: var(--brand-800); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.map-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 6px 12px; border-radius: 10px; font-size: .86rem; font-weight: 600; white-space: nowrap; transform: translate(-50%, -130%); opacity: 0; transition: opacity .12s; z-index: 5; }
.map-tip.show { opacity: 1; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 14px 4px 2px; font-size: .86rem; color: var(--ink-2); }
.map-legend span { display: inline-flex; align-items: center; gap: 8px; }
.map-legend i { width: 14px; height: 14px; border-radius: 4px; background: var(--brand-600); }
.map-legend i.new { background: var(--accent); }
.map-legend i.base { background: #D9E6F8; }
.map-info { margin-top: 14px; padding: 16px 18px; border-radius: 14px; background: var(--brand-50); border: 1px solid var(--brand-100); display: none; }
.map-info.show { display: block; }
.map-info h3 { font-size: 1.05rem; margin-bottom: 4px; }
.map-info p { font-size: .92rem; color: var(--ink-2); margin-bottom: 12px; }

.area-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.area-card { display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s; color: inherit; position: relative; }
.area-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-300); color: inherit; }
.area-card.active { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100), var(--shadow); }
.area-num { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-600); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .95rem; }
.area-card.new .area-num { background: var(--accent); }
.area-card h3 { font-size: 1.12rem; margin: 0; }
.area-card p { font-size: .92rem; color: var(--ink-2); margin: 0; flex: 1; }
.area-card .go { font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; color: var(--brand-600); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--brand-100); color: var(--brand-700); width: fit-content; }
.tag.new { background: var(--accent-100); color: #0A6E7E; }
.tag.sample { background: #FFF4D6; color: #8A5A00; }
.tag.gray { background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); }
.areas-layout { display: grid; grid-template-columns: 1fr; gap: 28px; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.step .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-100); color: var(--brand-600); display: grid; place-items: center; margin-bottom: 16px; }
.step .ico svg { width: 26px; height: 26px; }
.step h3 { font-size: 1.1rem; }
.step p { color: var(--ink-2); font-size: .95rem; margin: 0; }

/* ---------- App band ---------- */
.app-band { background: linear-gradient(135deg, var(--brand-800), var(--brand-600)); color: #fff; border-radius: 28px; padding: 44px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center; position: relative; overflow: hidden; }
.app-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.app-band p { color: rgba(255,255,255,.85); max-width: 520px; }
.app-band .rings { position: absolute; right: -80px; bottom: -120px; width: 420px; opacity: .35; }
.phone { justify-self: center; width: 200px; aspect-ratio: 9/18; border-radius: 30px; background: #0A1A38; padding: 8px; box-shadow: 0 24px 50px rgba(0,0,0,.35); position: relative; z-index: 1; }
.phone-screen { width: 100%; height: 100%; border-radius: 23px; overflow: hidden; background: linear-gradient(180deg, #DCEBFF, #F4F9FF); position: relative; }
.phone-screen svg { width: 100%; height: 100%; }

/* ---------- Cards / news ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; color: inherit; transition: transform .18s, box-shadow .18s; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.08rem; margin: 0; }
.card-body p { font-size: .92rem; color: var(--ink-2); margin: 0; flex: 1; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: var(--ink-3); align-items: center; }
.meta svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }

.cover { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--brand-800); }
.cover svg, .cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .badge { position: absolute; left: 14px; top: 14px; background: rgba(255,255,255,.94); color: var(--brand-800); padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .82rem; }

/* ---------- Page header (inner pages) ---------- */
.page-hero { padding: 56px 0 44px; background: radial-gradient(900px 300px at 90% -20%, var(--brand-100), transparent 60%), linear-gradient(180deg, var(--brand-50), #fff); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; margin-bottom: 10px; }
.page-hero p { color: var(--ink-2); font-size: 1.1rem; max-width: 660px; margin: 0; }
.crumbs { font-size: .86rem; color: var(--ink-3); margin-bottom: 16px; }
.crumbs a { color: var(--ink-3); } .crumbs a:hover { color: var(--brand-600); }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 3px; background: linear-gradient(180deg, var(--brand-600), var(--brand-300)); border-radius: 3px; }
.tl-item { position: relative; padding: 0 0 34px 64px; }
.tl-item::before { content: ""; position: absolute; left: 10px; top: 6px; width: 21px; height: 21px; border-radius: 50%; background: #fff; border: 5px solid var(--brand-600); box-shadow: 0 0 0 5px var(--brand-100); }
.tl-year { display: inline-block; font-weight: 800; font-size: 1.15rem; color: var(--brand-700); margin-bottom: 4px; }
.tl-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow-sm); }
.tl-card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.tl-card p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.tl-item.now::before { background: var(--brand-600); border-color: #fff; box-shadow: 0 0 0 5px var(--brand-100), 0 0 0 10px rgba(15,91,216,.12); }
.tl-item.now .tl-card { border-color: var(--brand-300); background: var(--brand-50); }
.timeline.future::before { background: repeating-linear-gradient(180deg, var(--accent) 0 8px, transparent 8px 14px); width: 3px; }
.timeline.future .tl-item::before { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-100); }
.timeline.future .tl-year { color: #0A6E7E; }
.timeline.future .tl-card { border-style: dashed; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.split-title { position: sticky; top: calc(var(--header-h) + 24px); }

/* ---------- Filters ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink-2); font: inherit; font-size: .92rem; font-weight: 500; padding: 8px 18px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.chip:hover { border-color: var(--brand-300); }
.chip[aria-pressed="true"] { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.empty { padding: 40px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- News list ---------- */
.news-list { display: grid; gap: 16px; }
.news-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 22px; align-items: center; padding: 20px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: inherit; transition: transform .18s, box-shadow .18s, border-color .18s; }
a.news-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand-300); color: inherit; }
.date-box { text-align: center; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 14px; padding: 10px 6px; }
.date-box b { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--brand-700); }
.date-box span { font-size: .78rem; color: var(--ink-2); display: block; line-height: 1.3; }
.news-item h3 { font-size: 1.08rem; margin: 6px 0 4px; }
.news-item p { color: var(--ink-2); font-size: .93rem; margin: 0; }
.news-item .src { font-size: .84rem; color: var(--ink-3); }
.news-item .arrow { color: var(--brand-600); }
.news-item { border-left: 5px solid var(--brand-600); }
.news-item.type-announcement { border-left-color: #7C5CFA; }
.news-item.type-training { border-left-color: var(--accent); }
.news-item.type-meeting { border-left-color: #F59E0B; }
.news-item.type-fieldwork { border-left-color: #22A65B; }
.tt-news { background: var(--brand-100); color: var(--brand-700); }
.tt-announcement { background: #EEE9FF; color: #5B3FD0; }
.tt-training { background: var(--accent-100); color: #0A6E7E; }
.tt-meeting { background: #FFF1D6; color: #8A5A00; }
.tt-fieldwork { background: #DDF5E7; color: #146B3A; }
.tag.area-tag { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.tag.area-tag::before { content: "#"; color: var(--ink-3); margin-right: -2px; }
.tag.upcoming { background: #FFE9D6; color: #9A4A00; }
.filter-group { margin-bottom: 18px; }
.filter-group .chips { margin-bottom: 0; }
.filter-label { font-size: .8rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
html[lang="th"] .filter-label { text-transform: none; letter-spacing: 0; font-size: .86rem; }
.result-count { font-size: .9rem; color: var(--ink-3); margin: 6px 0 16px; }
.event-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: .88rem; color: var(--ink-2); }

/* ---------- Event detail ---------- */
.ev-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.facts.facts-3 { grid-template-columns: repeat(3, 1fr); }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.fact small { color: var(--ink-3); display: block; font-size: .78rem; }
.fact b { font-size: 1rem; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose p { color: var(--ink-2); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery figure { margin: 0; }
.gallery .frame { aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--brand-50); }
.gallery figcaption { font-size: .84rem; color: var(--ink-3); margin-top: 8px; }
.reports { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.reports a { display: flex; gap: 12px; align-items: center; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); font-weight: 500; }
.reports a:hover { border-color: var(--brand-300); background: var(--brand-50); }
.reports small { display: block; color: var(--ink-3); font-weight: 400; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; flex-wrap: wrap; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: start; }
.leader { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow-sm); }
.avatar { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-500), var(--accent)); color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 700; margin-bottom: 16px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.leader h3 { font-size: 1.3rem; margin-bottom: 2px; }
.leader .role { color: var(--brand-600); font-weight: 600; font-size: .95rem; margin-bottom: 10px; }
.contact-lines { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.contact-lines li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: .96rem; }
.contact-lines svg { width: 20px; height: 20px; flex: none; color: var(--brand-600); margin-top: 3px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); }
.form-card h2 { font-size: 1.5rem; }
.form-card > p { color: var(--ink-2); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); min-height: 48px; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-100); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #E5484D; }
.field .err { display: none; color: #C62A2F; font-size: .84rem; margin-top: 4px; }
.field.invalid .err { display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-ok { display: none; padding: 16px 18px; border-radius: 14px; background: #E8F8EE; border: 1px solid #B7E4C7; color: #14532D; margin-top: 16px; }
.form-ok.show { display: block; }
.form-note { font-size: .84rem; color: var(--ink-3); margin-top: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-900); color: rgba(255,255,255,.78); padding: 56px 0 28px; margin-top: 0; }
.site-footer a { color: rgba(255,255,255,.78); } .site-footer a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; } .site-footer .brand span b { color: #3FBFAE; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .94rem; }
.site-footer p { font-size: .94rem; max-width: 380px; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .84rem; color: rgba(255,255,255,.55); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .map-wrap svg { max-height: 560px; }
  .area-list, .grid-3, .steps, .facts.facts-3 { grid-template-columns: repeat(2, 1fr); }
  .app-band { grid-template-columns: 1fr; padding: 34px 28px; }
  .app-band .phone { display: none; }
  .split, .contact-grid, .ev-hero { grid-template-columns: 1fr; gap: 28px; }
  .split-title { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; }
  .nav { position: fixed; left: 0; right: 0; top: var(--header-h); background: #fff; flex-direction: column; align-items: stretch; padding: 12px 16px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); gap: 2px; display: none; margin: 0; max-height: calc(100vh - var(--header-h)); overflow: auto; }
  .menu-open .nav { display: flex; }
  .nav a { padding: 14px 16px; font-size: 1.02rem; border-radius: 12px; }
  .lang { align-self: flex-start; margin: 10px 0 0 8px; }
}
@media (max-width: 620px) {
  .container { padding: 0 16px; }
  .section { padding: 52px 0; }
  .area-list, .grid-3, .steps, .gallery, .row2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, auto); gap: 8px 22px; }
  .stat b { font-size: 1.5rem; }
  .news-item { grid-template-columns: 70px 1fr; padding: 16px; gap: 14px; }
  .news-item .arrow { display: none; }
  .date-box b { font-size: 1.35rem; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts.facts-3 { grid-template-columns: 1fr; }
  .form-card, .leader { padding: 22px; }
  .foot-grid { grid-template-columns: 1fr; }
  .map-card { padding: 12px; border-radius: 20px; }
  .store-btn { flex: 1 1 100%; }
  .hero-cta .btn { flex: 1 1 100%; }
  .tl-item { padding-left: 54px; }
  .timeline::before { left: 14px; } .tl-item::before { left: 5px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* news meta rows */
.event-facts span { display: inline-flex; align-items: center; }
.event-facts svg { display: inline-block; }

/* ==========================================================================
   HOME – single-screen, full-width layout
   ========================================================================== */
/* Header and footer are always full-width and identically padded on every page,
   independent of whether that page's <main> uses the constrained .container or not. */
.site-header .container, .site-footer .container { max-width: none; padding: 0 clamp(20px, 4vw, 72px); }
.home-main { position: relative; overflow: hidden; display: grid; gap: 28px; padding: 28px clamp(16px, 4vw, 72px) 40px;
  background: radial-gradient(1200px 500px at 85% -10%, var(--brand-100), transparent 60%), linear-gradient(180deg, var(--brand-50), #fff 90%); }
.home-main > * { position: relative; }
.home-main > .hero-rings { position: absolute; right: -200px; top: -200px; width: 800px; height: 800px; opacity: .5; }
.home-intro { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.home-intro h1 { font-size: clamp(2.1rem, 8vw, 3.4rem); font-weight: 800; margin-bottom: 16px; }
.home-intro h1 em { font-style: normal; background: linear-gradient(90deg, var(--brand-600), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-intro .lead { font-size: 1.1rem; color: var(--ink-2); max-width: 560px; margin-bottom: 26px; }
.home-areas h2 { font-size: clamp(1.35rem, 2.2vw, 1.9rem); margin-bottom: 6px; }
.areas-lead { color: var(--ink-2); font-size: .96rem; margin-bottom: 16px; }
.area-list.compact { grid-template-columns: 1fr; gap: 10px; }
.area-card.compact { display: grid; grid-template-columns: 34px 1fr auto 20px; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; }
.area-card.compact h3 { font-size: 1.02rem; margin: 0; }
.area-card.compact p { font-size: .84rem; margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.area-card.compact .go { color: var(--brand-600); }
.map-card.home-map { padding: 14px; }
.map-card.home-map #map-host { display: flex; flex-direction: column; height: 100%; }
.home-map .map-wrap { flex: 1; min-height: 0; position: relative; }
body[data-page="home"] .site-footer { padding: 12px 0; }
body[data-page="home"] .foot-grid { display: none; }
body[data-page="home"] .foot-bottom { border: 0; padding: 0; }
body[data-page="home"] .site-footer .container { display: block; }

@media (max-width: 999px), (max-height: 619px) {
  .home-main { grid-template-columns: 1fr; }
  .home-map { order: 2; } .home-areas { order: 3; }
  .home-map .map-wrap { flex: none; }
  .home-map .map-wrap svg { position: static; width: 100%; height: auto; max-height: 560px; }
}
@media (min-width: 1000px) and (min-height: 620px) {
  body[data-page="home"] { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  body[data-page="home"] .site-header, body[data-page="home"] .site-footer { flex: none; }
  .home-main { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.05fr); grid-template-rows: minmax(0, 1fr);
    gap: clamp(28px, 4.5vw, 96px); padding: clamp(14px, 2.4vh, 32px) clamp(24px, 4vw, 72px); }
  .home-intro h1 { font-size: clamp(2.1rem, min(3.6vw, 6.4vh), 4rem); }
  .home-map { height: 100%; aspect-ratio: .53; min-height: 0; }
  .home-map .map-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; }
  .home-areas { display: flex; flex-direction: column; justify-content: center; min-height: 0; overflow-y: auto; }
}
@media (min-width: 1000px) and (max-height: 680px) {
  .area-card.compact p { display: none; }
  .area-card.compact { padding: 10px 16px; }
  .home-intro .lead { margin-bottom: 18px; }
}

/* ==========================================================================
   TONE-DOWN PASS – flatter, more institutional look
   (no gradients / glows / floating cards / pill everything)
   ========================================================================== */
:root {
  --font: 'IBM Plex Sans Thai', 'Noto Sans Thai', 'Sarabun', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --radius: 10px; --radius-sm: 8px;
  --shadow-sm: none; --shadow: 0 1px 3px rgba(14,27,51,.10); --shadow-lg: none;
  --bg-soft: #F5F7FA; --brand-50: #F4F7FC;
  --line: #DDE3EC;
}
h1, h2, h3, h4 { letter-spacing: 0; }
/* buttons / nav / language switch: squarer */
.btn { border-radius: 8px; box-shadow: none !important; }
.btn:hover, .store-btn:hover, a.card:hover, .area-card:hover, a.news-item:hover { transform: none; }
.btn-primary { background: var(--brand-700); }
.btn-primary:hover { background: var(--brand-800); }
.store-btn { border-radius: 8px; background: var(--ink); }
.store-btn:hover { box-shadow: none; background: #24314B; }
.nav a { border-radius: 8px; }
.nav a[aria-current="page"] { background: transparent; color: var(--brand-700); box-shadow: inset 0 -2px 0 var(--brand-700); border-radius: 0; }
.lang { border-radius: 8px; padding: 2px; }
.lang button { border-radius: 6px; }
.lang button[aria-pressed="true"] { background: var(--brand-700); box-shadow: none; }
.site-header { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
/* eyebrow: plain small label instead of the rainbow bar */
.eyebrow::before { display: none; }
.eyebrow { font-size: .78rem; letter-spacing: .06em; color: var(--ink-3); }
html[lang="th"] .eyebrow { font-size: .86rem; letter-spacing: 0; }
/* tags: rectangular, quiet */
.tag { border-radius: 5px; font-weight: 500; padding: 2px 8px; }
.tag.area-tag::before { content: none; }
/* hero / page headers: flat */
.page-hero { background: var(--bg-soft); }
.hero-rings { display: none !important; }
.home-main { background: #fff; }
.home-intro h1 { font-size: clamp(2.2rem, min(4vw, 7vh), 3.6rem); font-weight: 700; color: var(--brand-800); line-height: 1.15; }
.home-intro h1 small { display: block; margin-top: 10px; font-size: clamp(1.05rem, min(1.7vw, 3vh), 1.45rem); font-weight: 500; color: var(--ink); line-height: 1.4; }
.home-intro .lead { color: var(--ink-2); font-size: 1.02rem; border-left: 3px solid var(--brand-300); padding-left: 14px; margin: 22px 0 26px; }
.hero-app-label { font-size: .84rem; color: var(--ink-3); margin-bottom: 8px; }
/* cards / map card */
.card, .area-card, .step, .tl-card, .news-item, .leader, .form-card, .fact, .map-card { box-shadow: none; }
.map-card { border-radius: 12px; }
.map-wrap { background: #F1F5FA; border-radius: 8px; }
.map-wrap .prov { fill: #DCE4EF; }
.map-tip { border-radius: 6px; }
.map-area path { filter: none !important; }
.area-card.compact { border-radius: 8px; }
.area-card:hover, a.news-item:hover, a.card:hover { border-color: var(--brand-500); box-shadow: none; }
.area-card.active { box-shadow: none; border-color: var(--brand-600); background: var(--brand-50); }
.area-num { border-radius: 6px; background: var(--brand-700); }
.area-card.new .area-num { background: #0C8FA1; }
.map-area.new path { fill: #0C9DB3; }
.map-legend i { border-radius: 3px; }
/* news / timeline / events */
.date-box { border-radius: 8px; background: #fff; border-color: var(--line); }
.news-item { border-left-width: 4px; }
.tl-item::before { box-shadow: none; border-width: 4px; }
.tl-item.now::before { box-shadow: none; }
.timeline.future .tl-item::before { box-shadow: none; }
.cover .badge { border-radius: 5px; }
.step .ico { border-radius: 8px; }
.avatar { background: var(--brand-700); border-radius: 12px; }
.field input, .field select, .field textarea { border-radius: 8px; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: 0 0 0 3px var(--brand-100); }
.chip { border-radius: 8px; }
.site-footer { background: #0E1B33; }
/* home fit: hide descriptions only on genuinely short desktop windows so the list never clips */
@media (min-width: 1000px) and (max-height: 680px) {
  .area-card.compact p { display: none; }
  .area-card.compact { padding: 11px 16px; }
}
