/* Thailand STI Center — National Care Network */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800&family=Sora:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f7faf8;
  --bg-card: #ffffff;
  --bg-soft: #f2f6f3;
  --bg-subtle: #eef4f0;

  --nav-bg: #102820;
  --nav-text: #f4fbf7;
  --ink: #102820;
  --ink-soft: #1b463c;

  --accent: #c9892e;
  --accent-hot: #b45309;
  --accent-alert: #c2410c;
  --accent-soft: #fbf3e6;
  --accent-glow: rgba(201, 137, 46, 0.22);

  --text-main: #15241f;
  --text-muted: #5b6f68;
  --text-light: #8a9a93;
  --text-inverse: #f4fbf7;

  --border: #d9e5de;
  --border-focus: #c9892e;

  --font: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Sora', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(16, 40, 32, 0.05);
  --shadow-md: 0 12px 28px rgba(16, 40, 32, 0.08);
  --shadow-lg: 0 20px 44px rgba(16, 40, 32, 0.12);

  --max-w: 1180px;
  --header-height: 74px;

  /* legacy aliases used by shared templates */
  --navy-dark: var(--ink);
  --navy-slate: #0b1c18;
  --navy-surface: #163a32;
  --accent-cyan: var(--accent);
  --accent-teal: #2f6f5e;
  --accent-light: var(--accent-soft);
  --hot-coral: var(--accent-alert);
  --hot-amber: var(--accent);
  --hot-soft: #fff1eb;
  --max: var(--max-w);
}

*, *::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:
    radial-gradient(900px 420px at 100% -10%, rgba(201, 137, 46, 0.10), transparent 60%),
    radial-gradient(700px 380px at -10% 20%, rgba(47, 111, 94, 0.08), transparent 55%),
    var(--bg);
}

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

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

.text-accent { color: var(--accent); }
.hidden { display: none !important; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: .78rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-hot);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  border-radius: var(--radius-full);
  padding: 12px 20px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #1a1408;
  box-shadow: 0 10px 24px var(--accent-glow);
}
.btn-primary:hover { background: #d6a045; color: #1a1408; }
.btn-secondary {
  background: transparent;
  color: var(--nav-text);
  border: 1px solid rgba(244, 251, 247, 0.28);
}
.btn-secondary:hover { background: rgba(244, 251, 247, 0.08); color: var(--nav-text); }
.home-hero .btn-secondary,
.articles-section .btn-secondary,
.empty-state-card .btn-secondary {
  color: var(--ink);
  border-color: var(--border);
  background: #fff;
}
.home-hero .btn-secondary:hover,
.articles-section .btn-secondary:hover {
  background: var(--bg-soft);
  color: var(--ink);
}
.btn-hot {
  background: var(--accent-alert);
  color: #fff;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(16, 40, 32, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(244, 251, 247, 0.08);
}
.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--nav-text);
  flex-shrink: 0;
}
.brand-logo:hover { color: var(--nav-text); opacity: .92; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.brand-sub {
  font-size: .72rem;
  color: rgba(244, 251, 247, 0.62);
  margin-top: 2px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.nav-link {
  color: rgba(244, 251, 247, 0.78);
  font-size: .9rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(201, 137, 46, 0.16);
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.mobile-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--nav-text);
  width: 42px;
  height: 42px;
  cursor: pointer;
}

/* Hero */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 40px;
  color: var(--text-main);
}
.hero-atmosphere {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(16, 40, 32, 0.04), transparent 45%),
    radial-gradient(700px 320px at 80% 20%, rgba(201, 137, 46, 0.14), transparent 60%);
  pointer-events: none;
}
.home-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-hot);
  margin-bottom: 14px;
}
.hero-heading { margin-bottom: 18px; }
.hero-name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.08;
  margin-bottom: 10px;
}
.hero-tagline {
  display: block;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.45;
}
.hero-desc {
  max-width: 38rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(16, 40, 32, 0.08);
  animation: heroRise .8s ease both;
}
.hero-visual img { width: 100%; height: auto; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.home-hero-copy { animation: copyIn .7s ease both; }
@keyframes copyIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Sections */
.section-header { margin-bottom: 28px; }
.section-header.compact { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-hot);
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 8px;
}
.section-subtitle { color: var(--text-muted); max-width: 46rem; }
.article-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.triage-section,
.hub-section,
.articles-section,
.trust-section { padding: 28px 0 56px; }

.triage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.triage-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.triage-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(201, 137, 46, 0.45);
  color: inherit;
}
.triage-index {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}
.triage-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--ink);
}
.triage-card p { color: var(--text-muted); font-size: .92rem; }

.hub-grid,
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.hub-card,
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}
.hub-card:hover,
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.hub-card-meta,
.article-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--text-light);
  font-size: .8rem;
}
.hub-card-title,
.article-card-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 10px;
}
.hub-card-lead,
.article-card-excerpt { color: var(--text-muted); font-size: .92rem; flex: 1; }
.hub-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: .84rem;
  color: var(--accent-hot);
  font-weight: 600;
}

.empty-state-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
}
.empty-state-card p { color: var(--text-muted); margin-bottom: 18px; }

.eeat-strip {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: linear-gradient(135deg, #163a32, #102820);
  color: var(--nav-text);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.eeat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(201, 137, 46, 0.18);
  color: var(--accent);
  flex-shrink: 0;
}
.eeat-content h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.eeat-content p { color: rgba(244, 251, 247, 0.78); margin-bottom: 12px; }
.eeat-content a { color: #f0d39a; font-weight: 600; }
.eeat-content a:hover { color: #fff; }

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--nav-bg);
  color: rgba(244, 251, 247, 0.78);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}
.footer-tagline { margin-top: 14px; font-size: .92rem; line-height: 1.6; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.footer-contact a,
.footer-links a { color: rgba(244, 251, 247, 0.78); }
.footer-contact a:hover,
.footer-links a:hover { color: #f0d39a; }
.footer-hotline { font-weight: 700; color: #f0d39a !important; }
.eeat-badge-box {
  margin-top: 14px;
  font-size: .82rem;
  line-height: 1.5;
  background: rgba(255,255,255,0.04);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
}
.eeat-badge-box strong { color: #f0d39a; display: block; margin-bottom: 4px; }
.footer-heading {
  font-family: var(--font-display);
  color: #fff;
  font-size: .95rem;
  margin-bottom: 14px;
}
.footer-links { list-style: none; display: grid; gap: 8px; font-size: .9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 18px;
  font-size: .84rem;
  color: rgba(244, 251, 247, 0.55);
}

/* Cookie */
.cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 40, 32, 0.96);
  color: var(--nav-text);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-lg);
}
.cookie-text { font-size: .9rem; }
.cookie-text a { color: #f0d39a; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Shared page chrome leftovers */
.site-main { flex: 1; }
.static-mast,
.page-mast {
  padding: 42px 0 18px;
  background:
    linear-gradient(180deg, rgba(16, 40, 32, 0.04), transparent);
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent-hot); }

.article-content,
.guide-content,
.prose {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #24352f;
}
.article-content h2,
.guide-content h2,
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 1.6em 0 .6em;
  color: var(--ink);
}
.article-content h3,
.guide-content h3,
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 1.3em 0 .5em;
  color: var(--ink-soft);
}
.article-content p,
.guide-content p,
.prose p { margin-bottom: 1em; }
.article-content ul,
.guide-content ul,
.prose ul {
  margin: 0 0 1em 1.2em;
}
.article-content li,
.guide-content li,
.prose li { margin-bottom: .4em; }

@media (max-width: 980px) {
  .home-hero-grid,
  .footer-grid,
  .hub-grid,
  .article-grid { grid-template-columns: 1fr 1fr; }
  .triage-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .mobile-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(16, 40, 32, 0.98);
    padding: 18px 24px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-lg);
  }
}

@media (max-width: 640px) {
  .home-hero { padding-top: 36px; }
  .home-hero-grid,
  .footer-grid,
  .hub-grid,
  .article-grid,
  .triage-grid { grid-template-columns: 1fr; }
  .article-section-header { flex-direction: column; align-items: flex-start; }
  .cookie-bar { flex-direction: column; align-items: stretch; }
  .eeat-strip { flex-direction: column; }
  .hero-name { font-size: 2rem; }
}

/* Article / guide detail layout */
.article-page { padding: 28px 0 72px; }
.article-header { margin-bottom: 28px; max-width: 760px; }
.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 10px 0 12px;
}
.article-lead { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 18px; }
.article-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}
.article-sidebar { display: grid; gap: 16px; }
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--ink);
}
.article-card-thumb { border-radius: 12px; overflow: hidden; margin-bottom: 14px; aspect-ratio: 16/10; background: var(--bg-soft); }
.article-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-cat-badge {
  display: inline-flex;
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent-hot);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.byline-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
}
@media (max-width: 900px) {
  .article-main-grid { grid-template-columns: 1fr; }
}
