/* Thai HIV Map — Portal Violet (ref.png) */
:root {
  --bg: #f7f8fc;
  --bg-card: #ffffff;
  --bg-soft: #eef0fb;
  --bg-subtle: #fafbff;

  --ink: #1a1b2e;
  --text-main: #1a1b2e;
  --text-muted: #6b728f;
  --text-light: #98a0b8;
  --text-inverse: #ffffff;

  --accent: #5b4cf4;
  --accent-hot: #4636e0;
  --accent-light: #eeebff;
  --accent-blue: #2d68ff;
  --accent-cyan: #3b9cff;

  --pink: #ff6b9d;
  --pink-soft: #ffe8f1;
  --orange: #ff8a4c;
  --orange-soft: #fff0e6;
  --green: #22c55e;
  --green-soft: #e8f9ef;
  --blue-soft: #e8f0ff;
  --cyan-soft: #e6f6ff;
  --violet-soft: #eeebff;

  --border: #e6e8f2;
  --border-focus: #5b4cf4;

  --font: "Sarabun", "Noto Sans Thai", sans-serif;
  --font-display: "Prompt", "Sarabun", sans-serif;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(26, 27, 46, 0.04);
  --shadow-md: 0 10px 28px rgba(26, 27, 46, 0.08);
  --shadow-lg: 0 18px 40px rgba(91, 76, 244, 0.14);

  --max-w: 1180px;
  --header-top: 72px;
  --header-cats: 46px;
  --header-height: 118px;
}

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

html {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-top: var(--header-height);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; transition: .2s ease; }
a:hover { color: var(--accent-hot); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

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

.site-main { flex: 1; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: .2s ease;
  text-decoration: none;
  line-height: 1.2;
}
.btn-primary {
  background: var(--accent);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(91, 76, 244, 0.28);
}
.btn-primary:hover { background: var(--accent-hot); color: #fff !important; transform: translateY(-1px); }
.btn-secondary, .btn-outline-blue {
  background: #fff;
  color: var(--accent-blue) !important;
  border: 1.5px solid var(--accent-blue);
}
.btn-secondary:hover, .btn-outline-blue:hover { background: var(--blue-soft); }
.btn-ghost, .btn-ghost-light {
  background: transparent;
  color: var(--text-main) !important;
  border: 1.5px solid var(--border);
}
.btn-ghost-light { color: #fff !important; border-color: rgba(255,255,255,.35); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); }
.btn-nav {
  background: var(--accent-blue);
  color: #fff !important;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
}
.btn-nav:hover { background: #1f56e8; color: #fff !important; }
.btn-block { width: 100%; }
.btn-hot { background: var(--accent); color: #fff !important; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255,255,255,.2);
  color: #fff;
  backdrop-filter: blur(6px);
}
.pill-violet { background: var(--violet-soft); color: var(--accent); }
.pill-blue { background: var(--blue-soft); color: var(--accent-blue); }
.pill-pink { background: var(--pink-soft); color: #d9487a; }
.pill-orange { background: var(--orange-soft); color: #d97706; }

.text-accent { color: var(--accent); }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-top {
  height: var(--header-top);
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink) !important;
  flex-shrink: 0;
}
.brand-logo:hover { color: var(--ink) !important; opacity: .92; }
.brand-mark { display: flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
}
.brand-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .04em;
}
.header-search {
  flex: 1;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--text-muted);
}
.header-search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font: inherit;
  color: var(--text-main);
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.nav-link {
  color: var(--text-main) !important;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--accent) !important; background: var(--accent-light); }
.mobile-toggle {
  display: none;
  border: 0;
  background: var(--bg-soft);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
}
.header-cats {
  border-top: 1px solid var(--border);
  background: #fff;
}
.header-cats-inner {
  height: var(--header-cats);
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-cats-inner::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0;
  color: var(--text-muted) !important;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 8px 12px;
  position: relative;
}
.cat-chip:hover { color: var(--ink) !important; }
.cat-chip.is-active {
  color: var(--ink) !important;
}
.cat-chip.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* Portal hero */
.portal-hero {
  position: relative;
  min-height: clamp(420px, 58vw, 560px);
  color: #fff;
  overflow: hidden;
  background: linear-gradient(115deg, #2a1f8f 0%, #5b4cf4 42%, #2d68ff 100%);
}
.portal-hero-bg { position: absolute; inset: 0; }
.portal-hero-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 20% 40%, rgba(255,255,255,.14), transparent 60%),
    radial-gradient(ellipse 40% 50% at 80% 20%, rgba(45,104,255,.35), transparent 55%);
}
.portal-hero-photo {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(54%, 720px);
  object-fit: cover;
  object-position: center 20%;
  mask-image: linear-gradient(90deg, transparent 0%, #000 28%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 28%, #000 100%);
}
.portal-hero-fade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(42,31,143,.92) 0%, rgba(91,76,244,.55) 48%, rgba(45,104,255,.15) 100%);
}
.portal-hero-city {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 90px;
  object-fit: cover;
  opacity: .55;
  pointer-events: none;
}
.portal-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: clamp(420px, 58vw, 560px);
  padding: 48px 24px 72px;
}
.portal-hero-copy { max-width: 560px; }
.portal-kicker {
  font-weight: 600;
  font-size: 0.95rem;
  opacity: .9;
  margin-bottom: 14px;
}
.portal-hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.15rem);
  line-height: 1.18;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}
.portal-hero-title span { color: #c9c2ff; }
.portal-hero-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  opacity: .92;
  max-width: 480px;
  margin-bottom: 28px;
}
.portal-hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 16px;
  padding: 8px 8px 8px 16px;
  box-shadow: var(--shadow-lg);
  color: var(--text-muted);
  max-width: 520px;
}
.portal-hero-search input {
  flex: 1;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 1rem;
  color: var(--text-main);
  background: transparent;
  min-width: 0;
}
.portal-hero-search .btn { padding: 12px 22px; border-radius: 12px; }

/* Service tiles */
.service-tiles {
  margin-top: -36px;
  position: relative;
  z-index: 3;
  padding-bottom: 20px;
}
.service-tiles-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-md);
}
.service-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 12px;
  border-radius: 14px;
  color: var(--ink) !important;
  transition: .2s ease;
}
.service-tile:hover { transform: translateY(-2px); }
.service-tile strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
}
.service-tile > span:last-child {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.service-tile-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 4px;
}
.tone-violet { background: var(--violet-soft); }
.tone-violet .service-tile-icon { background: #ddd7ff; color: var(--accent); }
.tone-blue { background: var(--blue-soft); }
.tone-blue .service-tile-icon { background: #d5e4ff; color: var(--accent-blue); }
.tone-cyan { background: var(--cyan-soft); }
.tone-cyan .service-tile-icon { background: #cfefff; color: #0284c7; }
.tone-pink { background: var(--pink-soft); }
.tone-pink .service-tile-icon { background: #ffd6e6; color: #d9487a; }
.tone-orange { background: var(--orange-soft); }
.tone-orange .service-tile-icon { background: #ffe0c7; color: #d97706; }
.tone-green { background: var(--green-soft); }
.tone-green .service-tile-icon { background: #c9f5d8; color: #16a34a; }

/* Sections */
.section-title {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  color: var(--ink);
}
.section-head-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.link-more {
  font-weight: 700;
  color: var(--accent) !important;
  white-space: nowrap;
}

.featured-board { padding: 48px 0 24px; }
.featured-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr .85fr;
  gap: 18px;
  align-items: stretch;
}
.featured-hero-card {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 480px;
  height: 100%;
  color: #fff !important;
  box-shadow: var(--shadow-md);
}
.featured-hero-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.featured-hero-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(180deg, transparent 35%, rgba(18,16,48,.88) 100%);
  gap: 10px;
}
.featured-hero-overlay h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
}
.featured-hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  font-size: 0.85rem; opacity: .9;
}
.featured-stack { display: flex; flex-direction: column; gap: 12px; }
.featured-stack-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: inherit !important;
  transition: .2s ease;
}
.featured-stack-item:hover {
  border-color: #d2ccff;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.featured-stack-item img {
  width: 96px; height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-soft);
}
.stack-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.stack-meta time { font-size: 0.78rem; color: var(--text-muted); }
.featured-stack-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 6px;
}
.featured-stack-item em {
  font-style: normal;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.popular-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
}
.popular-panel h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.popular-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.popular-list a {
  display: grid;
  grid-template-columns: 28px 1fr 18px;
  gap: 10px;
  align-items: start;
  padding: 10px 6px;
  border-radius: 10px;
  color: inherit !important;
}
.popular-list a:hover { background: var(--bg-soft); }
.popular-rank {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--accent);
  font-size: 1.05rem;
}
.popular-body strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink);
}
.popular-body em {
  display: block;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.popular-trend { font-weight: 800; font-size: 0.85rem; }
.popular-trend.is-up { color: var(--green); }
.popular-trend.is-down { color: #ef4444; }

/* Dual CTA */
.dual-cta { padding: 28px 0 16px; }
.dual-cta-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
}
.dual-cta-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 28px 28px 28px 28px;
  min-height: 190px;
  color: #fff;
}
.dual-cta-news {
  background: linear-gradient(135deg, #6a5af8 0%, #5b4cf4 55%, #3f32d4 100%);
}
.dual-cta-qa {
  background: linear-gradient(135deg, #3b82f6 0%, #2d68ff 100%);
}
.dual-cta-copy { position: relative; z-index: 1; max-width: 420px; }
.dual-cta-copy h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 750;
  margin-bottom: 8px;
}
.dual-cta-copy p { opacity: .92; margin-bottom: 18px; }
.dual-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dual-cta-art {
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 160px;
  height: 160px;
  border-radius: 36px;
  background: rgba(255,255,255,.12);
  transform: rotate(18deg);
  pointer-events: none;
}
.dual-cta-art::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 28px;
  background: rgba(255,255,255,.14);
}
.dual-cta-art-qa {
  border-radius: 50%;
  right: 10px;
  bottom: -40px;
}

/* Latest */
.latest-articles { padding: 40px 0 24px; }
.latest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.latest-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: .2s ease;
}
.latest-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.latest-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16/11;
  background: var(--bg-soft);
}
.latest-card-media img { width: 100%; height: 100%; object-fit: cover; }
.latest-card-media .pill {
  position: absolute;
  left: 12px; bottom: 12px;
}
.latest-card-body { padding: 14px 16px 18px; }
.latest-card-body time {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.latest-card-body h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 8px 0 10px;
}
.latest-card-body h3 a { color: var(--ink) !important; }
.latest-card-body h3 a:hover { color: var(--accent) !important; }
.latest-mins { font-size: 0.8rem; color: var(--text-muted); }

/* Hub lite */
.hub-lite { padding: 24px 0 48px; }
.hub-lite-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.hub-lite-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: inherit !important;
  transition: .2s ease;
}
.hub-lite-item:hover { border-color: #d2ccff; box-shadow: var(--shadow-sm); }
.hub-lite-item strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--ink);
  line-height: 1.35;
}
.hub-lite-item > span:last-child {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.partners-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
  padding: 22px 0;
}
.partners-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 34px;
  color: var(--text-light);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: .02em;
}

/* Footer */
.site-footer {
  background: #12131f;
  color: rgba(255,255,255,.78);
  padding: 56px 0 28px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 28px;
  margin-bottom: 36px;
}
.footer-brand-logo .brand-title { color: #fff; }
.footer-tagline {
  margin-top: 14px;
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 280px;
  color: rgba(255,255,255,.65);
}
.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08);
  color: #fff !important;
  font-size: 0.7rem;
  font-weight: 800;
}
.footer-social a:hover { background: var(--accent); }
.footer-col h4 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: rgba(255,255,255,.7) !important; font-size: 0.9rem; }
.footer-links a:hover { color: #fff !important; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 20px;
  font-size: 0.85rem;
  color: rgba(255,255,255,.5);
}
.back-top {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff !important;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(91,76,244,.35);
}
.back-top:hover { background: var(--accent-hot); color: #fff !important; }

/* Generic page helpers */
.section-header { margin-bottom: 24px; }
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.section-subtitle { color: var(--text-muted); margin-top: 6px; }
.empty-state-card {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 36px 24px;
  text-align: center;
}
.breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.breadcrumbs a { color: var(--text-muted) !important; }
.breadcrumbs a:hover { color: var(--accent) !important; }

/* Articles listing */
.articles-section, .articles-page, .map-page, .static-page { padding: 36px 0 64px; }
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.article-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: .2s ease;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-thumb-wrap { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-soft); }
.article-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; transition: .35s ease; }
.article-card:hover .article-thumb-wrap img { transform: scale(1.04); }
.article-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.article-cat-badge {
  align-self: flex-start;
  background: var(--violet-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.article-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}
.article-card-title a { color: var(--ink) !important; }
.article-card-title a:hover { color: var(--accent) !important; }
.article-card-excerpt { color: var(--text-muted); font-size: 0.9rem; }
.byline-meta { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.byline-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.byline-info { font-size: 0.8rem; color: var(--text-muted); }
.byline-author-cat a { color: var(--ink) !important; font-weight: 600; }

/* Article detail */
.article-page { padding: 28px 0 72px; }
.article-header { margin-bottom: 24px; max-width: 820px; }
.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.article-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
}
.article-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
}
.article-content h2, .article-content h3 {
  font-family: var(--font-display);
  margin: 28px 0 12px;
  line-height: 1.3;
}
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin: 0 0 18px 22px; list-style: disc; }
.article-content li { margin-bottom: 8px; }
.article-sidebar { display: flex; flex-direction: column; gap: 14px; }
.sidebar-card, .sidebar-widget {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}
.sidebar-card h4, .sidebar-widget h4 {
  font-family: var(--font-display);
  margin-bottom: 10px;
}
.guide-conclusion {
  margin-top: 28px;
  padding: 18px;
  background: var(--violet-soft);
  border-radius: 14px;
}

/* Listings */
.listings-page { padding: 28px 0 80px; }
.listings-hero { margin-bottom: 24px; max-width: 720px; }
.listings-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.3rem);
  font-weight: 800;
  margin: 8px 0 10px;
}
.listings-lead { color: var(--text-muted); }
.listings-filter {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.listings-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.listings-field { display: flex; flex-direction: column; gap: 6px; }
.listings-field span {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.listings-field select,
.listings-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  background: #fff;
}
.listings-field select:focus,
.listings-field input:focus {
  outline: 2px solid var(--accent-light);
  border-color: var(--accent);
}
.listings-filter-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.listings-near-status { margin-top: 10px; color: var(--accent); font-size: 0.9rem; }
.listings-meta {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 18px; color: var(--text-muted);
}
.listing-grid { display: flex; flex-direction: column; gap: 12px; }
.listing-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: .2s ease;
}
.listing-row:hover { border-color: #d2ccff; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.listing-row.is-featured { box-shadow: inset 3px 0 0 var(--accent); }
.listing-row-media { min-height: 140px; background: var(--bg-soft); display: block; }
.listing-row-media img { width: 100%; height: 100%; object-fit: cover; }
.listing-row-placeholder {
  min-height: 140px; height: 100%;
  background: linear-gradient(145deg, #5b4cf4, #2d68ff);
}
.listing-row-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.listing-row-topline { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.listing-row-loc { color: var(--accent); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.listing-row-type, .listing-row-dist { color: var(--text-muted); font-size: .75rem; font-weight: 600; }
.listing-row-featured { color: var(--pink); font-size: .75rem; font-weight: 700; }
.listing-row-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0;
}
.listing-row-title a { color: var(--ink) !important; }
.listing-row-title a:hover { color: var(--accent) !important; }
.listing-row-excerpt, .listing-row-address { color: var(--text-muted); font-size: .9rem; margin: 0; }
.listing-row-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.listing-row-tags span, .listing-row-tags a {
  font-size: .75rem; color: var(--accent); font-weight: 600;
}
.listing-row-actions { display: flex; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.listing-row-cta { font-weight: 700; color: var(--accent) !important; }
.listing-row-call { color: var(--text-muted) !important; font-size: .9rem; }
.listings-pagination {
  display: flex; justify-content: center; align-items: center; gap: 16px;
  margin-top: 32px; color: var(--text-muted);
}
.listing-hero-image {
  margin: 0 0 22px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.listing-tagline { color: var(--text-muted); margin-top: 10px; }
.listing-header-meta { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.listing-facts .listing-fact { margin: 0 0 14px; }
.listing-fact-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* Map / static */
.hub-section, .map-page, .hub-grid { /* keep legacy class usable */ }
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.hub-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  color: inherit !important;
  transition: .2s ease;
}
.hub-card:hover { border-color: #d2ccff; box-shadow: var(--shadow-sm); }
.hub-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 10px 0 8px;
  color: var(--ink);
}
.hub-card-lead { color: var(--text-muted); font-size: .92rem; }
.hub-card-meta, .hub-card-footer {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: .8rem; color: var(--text-muted);
}
.static-mast, .page-hero {
  padding: 28px 0 8px;
}
.static-mast h1, .page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 800;
}
.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: var(--violet-soft);
  color: var(--accent);
}

/* Cookie */
.cookie-bar {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 1100;
  max-width: 720px;
  margin: 0 auto;
  background: #12131f;
  color: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
}
.cookie-bar.hidden { display: none; }
.cookie-text { font-size: .9rem; opacity: .9; }
.cookie-text a { color: #c9c2ff !important; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Legacy home leftovers safe */
.home-hero, .era-strip, .listings-home-section, .soft-cta-band, .trust-section { display: none; }
.page-home .home-hero, .page-home .era-strip, .page-home .listings-home-section,
.page-home .soft-cta-band, .page-home .trust-section { display: none !important; }

/* Responsive */
.main-nav { gap: 2px; }
.nav-link { padding: 8px 9px; font-size: 0.84rem; }
.header-search { max-width: 280px; }

@media (max-width: 1280px) {
  .header-search { display: none; }
}
@media (max-width: 1100px) {
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .popular-panel { grid-column: 1 / -1; }
  .service-tiles-grid { grid-template-columns: repeat(3, 1fr); }
  .latest-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --header-height: 72px; }
  .header-cats { display: none; }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-top);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .main-nav.is-open { display: flex; }
  .mobile-toggle { display: inline-grid; place-items: center; margin-left: auto; }
  .portal-hero-photo { width: 70%; opacity: .55; }
  .portal-hero-fade {
    background: linear-gradient(180deg, rgba(42,31,143,.7) 0%, rgba(42,31,143,.92) 100%);
  }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-hero-card { min-height: 360px; }
  .dual-cta-grid { grid-template-columns: 1fr; }
  .hub-lite-grid, .hub-grid, .article-grid { grid-template-columns: 1fr 1fr; }
  .article-main-grid { grid-template-columns: 1fr; }
  .listings-filter-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .service-tiles-grid { grid-template-columns: 1fr 1fr; }
  .latest-grid, .hub-lite-grid, .hub-grid, .article-grid, .footer-grid { grid-template-columns: 1fr; }
  .listing-row { grid-template-columns: 1fr; }
  .listing-row-media { aspect-ratio: 16/9; min-height: 0; }
  .portal-hero-search { flex-wrap: wrap; padding: 12px; border-radius: 14px; }
  .portal-hero-search .btn { width: 100%; }
  .cookie-bar { flex-direction: column; align-items: stretch; }
}

/* Keep desktop nav on one line; earlier hamburger when it would wrap */
.main-nav {
  flex-wrap: nowrap;
  min-width: 0;
}
.nav-link {
  white-space: nowrap;
}
@media (max-width: 1240px) {
  .main-nav { display: none; }
  .mobile-toggle { display: block; color: inherit; }
}

.about-foundation {
  margin: 8px 0 28px;
  padding: 22px 24px;
  background: var(--accent-light);
  border: 1px solid #ddd6fe;
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
}
.about-foundation p {
  margin: 0;
  flex: 1 1 280px;
  color: #334155;
  line-height: 1.65;
}
.about-expanded, .contact-expanded, .privacy-expanded { line-height: 1.75; }
.about-expanded p, .contact-expanded p, .privacy-expanded p { margin: 0 0 14px; color: #334155; }
.btn-cookie-necessary { color: #f8fafc !important; background: rgba(255,255,255,0.08) !important; border: 1.5px solid rgba(255,255,255,0.7) !important; }

.article-promo,
.article-ad {
  margin: 1.75rem auto;
  text-align: center;
  max-width: 720px;
}
.article-promo a,
.article-ad a { display: block; line-height: 0; }
.article-promo img,
.article-ad img,
.article-sidebar-ad img {
  width: 100%;
  max-width: 100%;
  height: auto !important;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}
.article-sidebar-ad { padding: 12px; }

/* Contact desk — thaihivmap unique */
.contact-desk { width: min(860px, calc(100% - 32px)); margin: 8px auto 72px; }
.contact-card {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  gap: 19px 22px;
  padding: 24px 32px;
  margin: 0 auto 28px;
  border-radius: 22px;
  background: var(--bg-card, var(--surface, #fff));
  border: 1px solid var(--border, rgba(15,23,42,.1)); border-left: 8px solid var(--accent,#0f766e);
  box-shadow: 0 22px 50px rgba(15,23,42,.12);
}
.contact-card__kicker {
  margin: 0 0 6px;
    font-size: 0.7999999999999999rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, #0f766e);
}
.contact-card__email {
  display: inline-block;
  margin: 0 0 8px;
  font-size: clamp(1.05rem, 2.2vw, 1.29rem);
  font-weight: 700;
  line-height: 1.3;
  word-break: break-all;
  color: var(--navy-dark, var(--ink, var(--black, #0f172a)));
  text-decoration: none;
}
.contact-card__email:hover { text-decoration: underline; }
.contact-card__hint {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted, var(--grey-4, #64748b));
}
.contact-card .btn, .contact-card .btn--primary, .contact-card .btn-primary, .contact-card .btn-accent {
  flex: 0 0 auto; white-space: nowrap;
}

.contact-expanded {
  max-width: 860px;
  margin: 0 auto 48px;
  padding: 8px 0 8px 22px;
  border-radius: 16px;
  background: #fff;
  border: none;
  box-shadow: none;
  line-height: 1.85;
  color: var(--text, var(--ink, #1e293b));
}
.contact-expanded p { margin: 0 0 15px; }
.contact-expanded p:first-child { font-size:1.12rem;font-weight:650;border-left:3px solid var(--accent,#0f766e);padding-left:14px; color: var(--navy-dark, var(--ink, #0f172a)); }
.contact-expanded p:last-child { margin-bottom: 0; }
.contact-expanded a { color: var(--accent, #0f766e); font-weight: 650; text-underline-offset: 2px; }
.contact-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto 40px;
}
@media (max-width: 720px) {
  .contact-card, .contact-expanded { padding: 20px; text-align: left; }
  .contact-card { flex-direction: column; align-items: flex-start; }
  .contact-action-grid { grid-template-columns: 1fr; }
}

/* In-article ads as spaced sections, not a pile */
.article-ad-section {
  display: block;
  margin: 2.75rem 0;
  padding: 1.4rem 0;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  clear: both;
  text-align: center;
}
.article-ad-section a {
  display: block;
  line-height: 0;
}
.article-ad-section img {
  width: 100%;
  max-width: 100%;
  height: auto !important;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
}
.article-ad-section + .article-ad-section {
  margin-top: 3.25rem;
}
