:root {
  --font-base: "Inter", "Noto Sans Thai", sans-serif;
  --color-bg: #f5f7fb;
  --color-surface: rgba(255, 255, 255, 0.92);
  --color-card: #ffffff;
  --color-ink: #101828;
  --color-muted: #475467;
  --color-accent: #2563eb;
  --color-accent-soft: rgba(37, 99, 235, 0.14);
  --color-border: rgba(15, 23, 42, 0.1);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 30px 60px rgba(15, 23, 42, 0.16);
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

figure {
  margin: 0;
}

figure img {
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

figure:hover img,
figure:focus-within img {
  transform: translateY(-4px);
}

.container {
  width: min(var(--max-width), 100% - 48px);
  margin: 0 auto;
}

.section {
  padding: 96px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--color-muted);
  margin: 0;
}

.hero-banner {
  padding: 120px 0 80px;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 55%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.16), transparent 60%), var(--color-bg);
}

.hero-grid {
  display: grid;
  gap: 64px;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--color-accent);
  margin: 0 0 12px;
  font-weight: 600;
}

.hero-banner h1 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  margin: 0 0 16px;
  line-height: 1.1;
}

.lead {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.primary-button,
.ghost-button {
  border-radius: 999px;
  padding: 14px 28px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.primary-button:hover,
.primary-button:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.ghost-button {
  color: var(--color-accent);
  border: 1px solid rgba(37, 99, 235, 0.4);
  background: var(--color-accent-soft);
}

.ghost-button:hover,
.ghost-button:focus {
  transform: translateY(-2px);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.stat {
  display: block;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.1;
}

.hero-media {
  display: grid;
  gap: 24px;
}

.hero-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hero-gallery img {
  border-radius: var(--radius-sm);
}

.interactive-figure {
  position: relative;
  isolation: isolate;
}

.interactive-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), transparent 60%);
  z-index: -1;
  transform: scale(1.04);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  padding: 32px;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40% -40% auto;
  height: 60%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before,
.card:focus-within::before {
  opacity: 1;
}

.card h3 {
  margin: 0 0 16px;
  font-size: 1.4rem;
}

.card p {
  color: var(--color-muted);
  margin: 0 0 24px;
}

.card-chip {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  font-weight: 600;
  margin-bottom: 24px;
}

.link-arrow {
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}

.link-arrow:hover,
.link-arrow:focus {
  text-decoration: underline;
}

.accent {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.07));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.panel {
  padding: 32px;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.panel:hover,
.panel:focus-within {
  transform: translateY(-4px);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.impact-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.impact-stat {
  display: block;
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.resource-card {
  padding: 32px;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.resource-card ul {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--color-muted);
}

.module-hero {
  padding: 120px 0 72px;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 60%),
    var(--color-bg);
}

.module-grid {
  display: grid;
  gap: 56px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
}

.module-highlights {
  margin: 24px 0 0;
  padding-left: 20px;
  color: var(--color-muted);
}

.module-section {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

.module-figure {
  max-width: 520px;
}

.module-section.reverse .module-copy {
  order: 2;
}

.module-section.reverse .module-figure {
  order: 1;
}

.module-copy h2 {
  margin-top: 0;
  font-size: 2rem;
}

.module-copy p {
  color: var(--color-muted);
}

.module-list {
  margin: 24px 0 0;
  padding-left: 20px;
  color: var(--color-muted);
}

.module-sidebar {
  display: grid;
  gap: 18px;
}

.fact-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--color-card);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.fact-card .impact-stat {
  margin-bottom: 8px;
}

.slider {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.slider-viewport {
  overflow: hidden;
}

.slider-track {
  display: flex;
  gap: 24px;
  overflow: hidden;
  transition: transform 0.5s ease;
}

.slider-track figure {
  margin: 0;
  flex: 0 0 100%;
}

.slider-control {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--color-card);
  box-shadow: var(--shadow-sm);
  color: var(--color-ink);
  font-size: 1.4rem;
  cursor: pointer;
}

.slider-control:hover,
.slider-control:focus {
  background: var(--color-accent);
  color: #ffffff;
}

.module-figure figcaption {
  color: var(--color-muted);
  margin-top: 12px;
}

.breadcrumb {
  margin: 24px 0;
  font-size: 0.9rem;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
  color: var(--color-muted);
}

.breadcrumb a {
  color: var(--color-accent);
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus {
  text-decoration: underline;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--color-muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--color-ink);
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
}

.tagline {
  font-size: 0.8rem;
  color: var(--color-muted);
  font-weight: 400;
}

.site-nav {
  margin-left: auto;
  position: relative;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.site-nav a,
.dropdown-toggle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-ink);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus,
.dropdown-toggle:hover,
.dropdown-toggle:focus {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.site-nav a[aria-current="page"],
.site-nav a[data-active="home"].is-active {
  background: var(--color-accent);
  color: #ffffff;
}

.dropdown-toggle.is-active,
.dropdown-toggle.has-active {
  background: var(--color-accent);
  color: #ffffff;
}

.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--color-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  display: none !important;
  flex-direction: column;
  gap: 4px;
  z-index: 1001;
}

.dropdown-menu a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.nav-dropdown.open .dropdown-menu {
  display: flex !important;
}

@media (min-width: 1081px) {
  .nav-dropdown:hover .dropdown-menu,
  .nav-dropdown:focus-within .dropdown-menu {
    display: flex !important;
  }
}

.language-switcher {
  display: flex;
  gap: 8px;
}

.lang-btn {
  border-radius: 999px;
  border: 1px solid var(--color-accent);
  background: transparent;
  color: var(--color-accent);
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lang-btn.active,
.lang-btn:hover,
.lang-btn:focus {
  background: var(--color-accent);
  color: #ffffff;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
  background: rgba(15, 23, 42, 0.04);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--color-muted);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--color-accent);
}

.lang {
  display: none;
}

body.lang-en .lang-en,
body.lang-th .lang-th {
  display: block;
}

body.lang-en .lang-th,
body.lang-th .lang-en {
  display: none;
}

/* Utility, animation, and accessibility */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0s);
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 2000;
}

.lightbox-content {
  position: relative;
  max-width: min(1100px, 90vw);
  max-height: 90vh;
}

.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  color: var(--color-ink);
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.lightbox-close:hover,
.lightbox-close:focus {
  background: var(--color-accent);
  color: #ffffff;
}

/* Responsive styles */

@media (max-width: 1080px) {
  .site-nav ul {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--color-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    display: none;
    min-width: 240px;
  }

  .site-nav ul.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-card);
    font-size: 1.4rem;
    cursor: pointer;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    padding: 12px 0 0;
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-banner {
    padding-top: 100px;
  }

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

  .hero-gallery img:last-child {
    display: none;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .module-section.reverse .module-copy {
    order: 1;
  }

  .module-section.reverse .module-figure {
    order: 2;
  }
}

@media (max-width: 560px) {
  .container {
    width: calc(100% - 32px);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-gallery {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
