/* ==========================================================================
   LAHIS - Lao Animal Health Information System
   Clean, Lightweight & Modern Single-Page Stylesheet
   ========================================================================== */

:root {
  /* Design Tokens */
  --primary-h: 158;
  --primary-s: 65%;
  --primary-l: 36%;
  --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
  --primary-light: hsl(var(--primary-h), var(--primary-s), 45%);
  --primary-surface: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.08);

  --accent-blue: #0284c7;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-lao: 'Noto Sans Lao', 'Noto Sans Lao Looped', 'Phetsarath OT', sans-serif;

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.08);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;

  /* Light Theme */
  color-scheme: light;
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.9);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-page: #0b1120;
  --bg-surface: #131c31;
  --bg-surface-elevated: #1e293b;
  --bg-glass: rgba(19, 28, 49, 0.9);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --border-subtle: #1e293b;
  --border-strong: #334155;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg-page: #0b1120;
    --bg-surface: #131c31;
    --bg-surface-elevated: #1e293b;
    --bg-glass: rgba(19, 28, 49, 0.9);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --border-subtle: #1e293b;
    --border-strong: #334155;
  }
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans), var(--font-lao);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

:lang(lo) {
  font-family: var(--font-lao), var(--font-sans);
  line-height: 1.8;
}

h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.75rem 0;
}

p {
  margin: 0 0 1rem 0;
  color: var(--text-secondary);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #ffffff;
}

.brand-title {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ctrl:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-surface);
  color: var(--primary);
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem 0;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--primary-surface);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto 2rem auto;
  line-height: 1.7;
}

.hero-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: 3.5rem;
  background: var(--bg-surface);
}

.hero-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* Content Sections */
.section-block {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-subtle);
}

.section-heading {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* 4 Core Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.pillar-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.pillar-icon {
  font-size: 1.75rem;
  margin-bottom: 0.85rem;
}

.pillar-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.pillar-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Surveillance Flow */
.flow-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 780px;
  margin: 1.5rem auto 0 auto;
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

.flow-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.flow-content h4 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.flow-content p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Institutional Partners */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.partner-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.partner-emblem {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.partner-box h4 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.partner-box p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-meta {
  margin-top: 0.5rem;
  font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 900px) {
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .hero-lead {
    font-size: 1rem;
  }
  .pillars-grid, .partners-grid {
    grid-template-columns: 1fr;
  }
}
