:root {
  --background: #f6faf8;
  --foreground: #163234;
  --surface: #ffffff;
  --surface-soft: #eef7f2;
  --brand-primary: #067a4f;
  --brand-secondary: #0b7ea4;
  --brand-accent: #e39a23;
  --border-soft: #d6e7df;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(6, 122, 79, 0.13) 0%, transparent 33%),
    radial-gradient(circle at 90% 8%, rgba(11, 126, 164, 0.15) 0%, transparent 35%),
    linear-gradient(180deg, #f7fcfa 0%, var(--background) 44%, #edf7f3 100%);
  color: var(--foreground);
  font-family: "Sarabun", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

h1,
h2,
h3,
p,
a,
.hero-copy,
.news-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(11, 126, 164, 0.15);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(14px);
}

.nav {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1120px;
  padding: 10px 20px;
}

.brand {
  align-items: center;
  color: var(--brand-secondary);
  display: flex;
  font-weight: 800;
  gap: 10px;
}

.brand img { height: 42px; width: 42px; }

.nav-links {
  align-items: center;
  color: var(--brand-secondary);
  display: flex;
  font-weight: 700;
  gap: 28px;
}

.nav-links a:hover { color: var(--brand-primary); }

.hero {
  background: #0b1417;
  min-height: 520px;
  overflow: hidden;
  position: relative;
}

.blog-hero {
  min-height: clamp(420px, 54vw, 560px);
}

.hero::before {
  background:
    linear-gradient(90deg, rgba(5, 17, 18, 0.86) 0%, rgba(5, 17, 18, 0.5) 45%, rgba(5, 17, 18, 0.14) 100%),
    url("/fahsiam/hero/cover-1.webp") center / cover no-repeat;
  content: "";
  inset: 0;
  position: absolute;
}

.hero-inner {
  align-items: end;
  display: grid;
  margin: 0 auto;
  max-width: 1120px;
  min-height: 520px;
  padding: 48px 20px;
  position: relative;
}

.blog-hero .hero-inner {
  min-height: clamp(420px, 54vw, 560px);
}

.hero-copy {
  border-left: 5px solid var(--brand-accent);
  max-width: 680px;
  padding-left: 22px;
}

.eyebrow {
  color: #a8f0d2;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 1.08;
  margin: 0;
}

.hero p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
  line-height: 1.75;
  margin: 18px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
}

.button-primary { background: var(--brand-accent); color: #1f2b11; }
.button-secondary { border: 1px solid rgba(255, 255, 255, 0.45); color: #fff; }

.section {
  margin: 0 auto;
  max-width: 1120px;
  padding: 56px 20px;
}

.compact-section {
  padding-block: 42px;
}

.section-head {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  color: #0f3f50;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.2;
  margin: 0;
}

.section-desc {
  color: #57706d;
  line-height: 1.7;
  margin: 8px 0 0;
  max-width: 680px;
}

.feature-band {
  background: rgba(255, 255, 255, 0.65);
  border-block: 1px solid var(--border-soft);
}

.feature-grid,
.news-grid,
.blog-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-grid {
  align-items: stretch;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature,
.news-card,
.article {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.feature { padding: 22px; }
.feature strong { color: var(--brand-primary); display: block; font-size: 1.15rem; margin-bottom: 8px; }
.feature p, .news-card p { color: #58706b; line-height: 1.65; margin: 0; }

.news-card {
  box-shadow: 0 12px 30px rgba(12, 76, 68, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card > a {
  display: block;
  height: 100%;
}

.news-card:hover {
  box-shadow: 0 18px 42px rgba(12, 76, 68, 0.14);
  transform: translateY(-3px);
}

.news-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #e9f7f1, #d9eef3);
  overflow: hidden;
}

.news-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.news-body { padding: 20px; }

.featured-post > a {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.featured-post {
  grid-column: 1 / -1;
}

.featured-post .news-thumb {
  aspect-ratio: auto;
  min-height: 320px;
}

.featured-post .news-body {
  align-content: center;
  display: grid;
  padding: clamp(24px, 4vw, 44px);
}

.news-card h2,
.news-card h3 {
  color: #0f3f50;
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 0 0 10px;
}

.featured-post h2 {
  font-size: clamp(1.45rem, 2.8vw, 2.45rem);
}

.post-meta {
  align-items: center;
  color: var(--brand-primary);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.88rem;
  font-weight: 800;
  gap: 10px;
  margin-bottom: 10px;
}

.post-meta span {
  background: var(--surface-soft);
  border-radius: 999px;
  padding: 5px 10px;
}

.read-more {
  color: var(--brand-secondary);
  display: inline-block;
  font-weight: 800;
  margin-top: 16px;
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border-soft);
  border-radius: 8px;
  color: #58706b;
  padding: 30px;
  text-align: center;
}

.article-wrap {
  margin: 0 auto;
  max-width: 900px;
  padding: 48px 20px 70px;
}

.readable-article {
  max-width: 960px;
}

.article {
  box-shadow: 0 16px 44px rgba(12, 76, 68, 0.1);
  overflow: hidden;
}

.article-hero {
  align-items: end;
  background:
    linear-gradient(180deg, rgba(4, 25, 29, 0.2), rgba(4, 25, 29, 0.72)),
    url("/fahsiam/hero/cover-2.webp") center / cover no-repeat;
  display: flex;
  min-height: 300px;
  padding: 36px;
}

.article-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.13;
  margin: 0;
}

.article-meta {
  color: #d9fff0;
  font-weight: 700;
  margin-top: 10px;
}

.article-content {
  color: #273f3b;
  font-size: 1.06rem;
  line-height: 1.9;
  padding: 34px 36px;
}

.blog-content {
  max-width: 760px;
  margin-inline: auto;
}

.article-content img { border-radius: 8px; margin: 24px auto; }

.back-link {
  color: var(--brand-secondary);
  display: inline-flex;
  font-weight: 800;
  margin-top: 22px;
}

.site-footer { background: #0d6685; color: #fff; }
.footer-accent { background: linear-gradient(90deg, var(--brand-primary), #27c7d8, var(--brand-accent)); height: 8px; }

.footer-inner {
  display: grid;
  gap: 26px;
  grid-template-columns: 1.3fr 1fr 1fr;
  margin: 0 auto;
  max-width: 1120px;
  padding: 36px 20px;
}

.site-footer h3,
.site-footer h4 { margin: 0 0 10px; }

.site-footer p,
.site-footer a { color: rgba(255, 255, 255, 0.86); line-height: 1.7; }

@media (min-width: 821px) and (max-width: 1080px) {
  .nav,
  .hero-inner,
  .section,
  .footer-inner {
    max-width: 920px;
  }

  .nav { padding-inline: 28px; }
  .hero-copy { max-width: 620px; }
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-post > a { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 10px 16px;
  }

  .brand img { height: 36px; width: 36px; }

  .nav-links {
    display: grid;
    font-size: 0.92rem;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .nav-links a {
    background: #f1f8f5;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
  }

  .hero,
  .hero-inner,
  .blog-hero,
  .blog-hero .hero-inner {
    min-height: 420px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(5, 17, 18, 0.38) 0%, rgba(5, 17, 18, 0.9) 100%),
      url("/fahsiam/hero/cover-1.webp") center / cover no-repeat;
  }

  .hero-inner {
    padding: 34px 16px;
  }

  .hero-copy {
    border-left-width: 4px;
    padding-left: 16px;
  }

  .hero h1 {
    font-size: clamp(1.5rem, 5.8vw, 2rem);
    line-height: 1.16;
  }

  .hero p {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .section {
    padding: 42px 16px;
  }

  .compact-section {
    padding-block: 34px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .feature-grid,
  .news-grid,
  .blog-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .featured-post > a {
    display: block;
  }

  .featured-post .news-thumb {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  .news-body,
  .featured-post .news-body {
    padding: 18px;
  }

  .article-wrap {
    padding: 28px 14px 52px;
  }

  .article-hero,
  .article-content {
    padding: 24px;
  }
}

@media (max-width: 430px) {
  .nav-links {
    font-size: 0.86rem;
  }

  .hero,
  .hero-inner,
  .blog-hero,
  .blog-hero .hero-inner {
    min-height: 390px;
  }

  .eyebrow {
    font-size: 0.82rem;
  }

  .hero h1 {
    font-size: clamp(1.35rem, 6.2vw, 1.55rem);
  }

  .section-title {
    font-size: 1.45rem;
  }

  .news-card h2,
  .news-card h3 {
    font-size: 1.08rem;
  }

  .article-hero {
    min-height: 240px;
  }

  .article-hero h1 {
    font-size: 1.65rem;
  }

  .article-content {
    font-size: 1rem;
    padding: 20px;
  }
}

@media (min-width: 641px) and (max-width: 820px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-post {
    grid-column: 1 / -1;
  }

  .featured-post > a {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .featured-post .news-thumb {
    aspect-ratio: auto;
    min-height: 260px;
  }

  .footer-inner {
    grid-template-columns: 1.3fr 0.8fr 1fr;
  }
}

@media (max-width: 640px) {
  .feature-grid,
  .blog-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .featured-post > a {
    display: block;
  }
}
