:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #c8102e;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.04);
}

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

body {
  font-family: 'Sarabun', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, .logo { font-family: 'Prompt', 'Sarabun', sans-serif; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { font-size: 24px; font-weight: 700; color: var(--brand); }
.logo span { color: var(--text); }
.nav { display: flex; gap: 22px; flex: 1; }
.nav a { font-weight: 500; color: var(--muted); font-size: 15px; padding: 4px 0; border-bottom: 2px solid transparent; transition: .15s; }
.nav a:hover, .nav a.active { color: var(--text); border-color: var(--brand); }
.header-date { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Ticker */
.ticker { background: var(--brand); color: #fff; overflow: hidden; }
.ticker-inner { display: flex; align-items: center; gap: 14px; height: 40px; }
.ticker-label { background: rgba(0,0,0,.2); font-weight: 700; font-size: 13px; padding: 3px 12px; border-radius: 20px; white-space: nowrap; }
.ticker-track { overflow: hidden; white-space: nowrap; flex: 1; }
.ticker-track span { display: inline-block; font-size: 14px; animation: scroll 28s linear infinite; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* Hero */
.hero { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin: 28px 0; }
.hero-main { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card-img { display: block; aspect-ratio: 16/9; background-size: cover; background-position: center; position: relative; }
.card-img.sm { width: 96px; aspect-ratio: 1; border-radius: 10px; flex-shrink: 0; }
.hero-body { padding: 20px 22px 24px; }
.hero-body h1 { font-size: 28px; line-height: 1.3; margin-bottom: 10px; }
.hero-body p { color: var(--muted); margin-bottom: 12px; }
.meta { font-size: 13px; color: var(--muted); }

.badge { display: inline-block; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.card-img .badge { position: absolute; top: 12px; left: 12px; }
.badge.green { background: #059669; } .badge.purple { background: #7c3aed; } .badge.orange { background: #ea580c; }

.hero-side { display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--surface); border-radius: var(--radius); padding: 12px; display: flex; gap: 14px; box-shadow: var(--shadow); transition: transform .15s; }
.side-card:hover { transform: translateY(-2px); }
.side-card h3 { font-size: 16px; line-height: 1.35; margin-top: 6px; }

/* Section */
.section { margin: 36px 0; }
.section-title { font-size: 20px; padding-left: 12px; border-left: 4px solid var(--brand); margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.news-card:hover { transform: translateY(-3px); }
.news-card .card-img { aspect-ratio: 16/10; }
.news-card .body { padding: 14px 16px 18px; }
.news-card h3 { font-size: 17px; line-height: 1.4; margin-bottom: 8px; }
.news-card .meta { font-size: 12px; }

/* Footer */
.site-footer { background: #16181d; color: #d1d5db; margin-top: 50px; padding: 36px 0 24px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid #2d3138; }
.site-footer .logo span { color: #fff; }
.site-footer p { color: #9ca3af; font-size: 14px; margin-top: 6px; }
.footer-cols { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.footer-cols a { color: #d1d5db; font-size: 14px; }
.footer-cols a:hover { color: #fff; }
.copyright { font-size: 13px; color: #9ca3af; padding-top: 18px; }

/* Responsive */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .hero-body h1 { font-size: 23px; }
}
@media (max-width: 540px) {
  .grid { grid-template-columns: 1fr; }
  .header-date { display: none; }
}
