/* ============================================
   THAI BIOMASS - Global Stylesheet
   Supports: Dark mode (default) & Light mode
   Toggle via [data-theme="light"] on <html>
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============ DARK THEME (default) ============ */
:root {
  --primary: #2EE8A5;
  --primary-dark: #00C48C;
  --primary-glow: rgba(46, 232, 165, 0.18);
  --primary-glow-strong: rgba(46, 232, 165, 0.28);
  --secondary: #38BDF8;
  --bg-page: #0A0F1E;
  --bg-dark: #0A0F1E;   /* alias kept for backward compat with inline styles */
  --bg-card: #111827;
  --bg-card-2: #0D1526;
  --bg-card-hover: #152035;
  --border: #1E2A3A;
  --border-light: #243044;
  --text: #E2E8F0;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --gradient-primary: linear-gradient(135deg, #2EE8A5 0%, #38BDF8 100%);
  --gradient-hero: linear-gradient(135deg, #0A0F1E 0%, #0D1E35 50%, #0A1A0F 100%);
  --gradient-section: linear-gradient(180deg, #0A0F1E 0%, #0D1526 100%);
  --shadow-glow: 0 0 40px rgba(46, 232, 165, 0.12);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-nav: 0 4px 32px rgba(0,0,0,0.5);
  --nav-bg: rgba(10, 15, 30, 0.85);
  --nav-bg-scrolled: rgba(10, 15, 30, 0.98);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Spec table */
  --spec-row-hover: rgba(46, 232, 165, 0.05);
  --input-bg: #0A0F1E;
  --select-arrow-color: %2364748B;
}

/* ============ LIGHT THEME ============ */
[data-theme="light"] {
  --primary: #00A870;
  --primary-dark: #007F55;
  --primary-glow: rgba(0, 168, 112, 0.12);
  --primary-glow-strong: rgba(0, 168, 112, 0.22);
  --secondary: #0284C7;
  --bg-page: #F5F5F0;
  --bg-dark: #F5F5F0;   /* alias kept for backward compat with inline styles */
  --bg-card: #FFFFFF;
  --bg-card-2: #ECEEE9;
  --bg-card-hover: #F0FAF5;
  --border: #D8DDD6;
  --border-light: #C5CCBF;
  --text: #1A2314;
  --text-muted: #6B7A62;
  --text-light: #4A5C42;
  --gradient-primary: linear-gradient(135deg, #00A870 0%, #0284C7 100%);
  --gradient-hero: linear-gradient(135deg, #E8F5EE 0%, #EDF4FF 50%, #E8F5EE 100%);
  --gradient-section: linear-gradient(180deg, #F5F5F0 0%, #ECEEE9 100%);
  --shadow-glow: 0 0 40px rgba(0, 168, 112, 0.1);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-nav: 0 2px 20px rgba(0,0,0,0.1);
  --nav-bg: rgba(255, 255, 255, 0.88);
  --nav-bg-scrolled: rgba(255, 255, 255, 0.98);
  --spec-row-hover: rgba(0, 168, 112, 0.05);
  --input-bg: #F5F5F0;
  --select-arrow-color: %236B7A62;
}

/* ============ RESET ============ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-page);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 3px; }

/* ============ THEME TOGGLE ============ */

/* Wrapper: flanking "Light" and "Dark" labels around the pill */
.theme-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  user-select: none;
}

/* Labels hidden — toggle pill only */
.theme-toggle-wrap .tl-label { display: none; }

/* The <label> pill itself */
.theme-toggle {
  position: relative;
  width: 56px;
  height: 30px;
  flex-shrink: 0;
}

.theme-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

/* ---- TRACK ---- */
.theme-toggle-label {
  display: block;
  width: 56px;
  height: 30px;
  border-radius: 100px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease, box-shadow 0.4s ease;
  /* Default = dark mode track: deep navy-black */
  background: #1A1F35;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.6), 0 0 8px rgba(99,120,255,0.2);
}

/* Checked = light mode track: site primary green */
.theme-toggle input:checked + .theme-toggle-label,
[data-theme="light"] .theme-toggle-label {
  background: #2EE8A5;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15), 0 4px 12px rgba(46,232,165,0.3);
}

/* ---- DOTS hidden (stars + light dots removed) ---- */
.theme-toggle-label .tt-stars,
.theme-toggle-label .tt-dots { display: none; }

/* ---- THUMB ---- */
.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
}

/* Default = dark mode: thumb on RIGHT */
.theme-toggle-label .theme-toggle-thumb {
  transform: translateX(26px);
}

/* Checked = light mode: thumb on LEFT */
.theme-toggle input:checked + .theme-toggle-label .theme-toggle-thumb,
[data-theme="light"] .theme-toggle-label .theme-toggle-thumb {
  transform: translateX(0);
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

/* ---- THUMB ICONS ---- */
/* Default = dark mode: moon visible on thumb */
.theme-toggle-thumb .tt-sun {
  font-size: 12px;
  color: #F59E0B;
  line-height: 1;
  position: absolute;
  opacity: 0;               /* hidden in dark mode */
  transition: opacity 0.25s ease;
}

.theme-toggle-thumb .tt-moon {
  font-size: 11px;
  color: #1A1F35;
  line-height: 1;
  position: absolute;
  opacity: 1;               /* visible in dark mode */
  transition: opacity 0.25s ease;
}

/* Checked = light mode: sun visible on thumb */
.theme-toggle input:checked + .theme-toggle-label .theme-toggle-thumb .tt-sun,
[data-theme="light"] .theme-toggle-label .theme-toggle-thumb .tt-sun {
  opacity: 1;
}

.theme-toggle input:checked + .theme-toggle-label .theme-toggle-thumb .tt-moon,
[data-theme="light"] .theme-toggle-label .theme-toggle-thumb .tt-moon {
  opacity: 0;
}

/* ============ NAVIGATION ============ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: var(--nav-bg-scrolled);
  box-shadow: var(--shadow-nav);
}

/* Brand – always visible, never shrinks */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  z-index: 2;
}

.navbar-brand img {
  height: 44px;
  width: auto;
  display: block;
}

[data-theme="light"] .navbar-brand img { filter: none; }

/* Desktop centre area: nav links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: nowrap;   /* never wrap on desktop */
}

.nav-link {
  white-space: nowrap;
  padding: 0.45rem 0.85rem;
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-glow);
}

[data-theme="light"] .nav-link { color: var(--text-muted); }
[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
  color: var(--primary);
  background: var(--primary-glow);
}

.nav-cta {
  white-space: nowrap;
  margin-left: 0.35rem;
  padding: 0.45rem 1.1rem;
  background: var(--gradient-primary);
  color: #fff !important;
  font-weight: 700;
  border-radius: 8px;
  font-size: 0.85rem;
}

[data-theme="light"] .nav-cta { color: #fff !important; }

.nav-cta:hover {
  background: var(--gradient-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(46, 232, 165, 0.35);
  color: #fff !important;
}

/* Specificity 0,3,1 — beats [data-theme="light"] .nav-link:hover (0,2,1) */
[data-theme="light"] .nav-link.nav-cta:hover {
  background: var(--gradient-primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(46, 232, 165, 0.35) !important;
}

/* Desktop right area: theme toggle */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Hamburger button – hidden on desktop, shown on mobile */
.navbar-toggle {
  display: none;          /* shown via media query */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
  z-index: 2;
}

.navbar-toggle:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
}

/* ---- MOBILE DRAWER (hidden until .open) ---- */
/* The entire <ul>.navbar-nav + theme toggle slide down as one panel */
.navbar-menu {
  /* wrapper that groups nav + theme toggle for mobile */
  display: contents; /* on desktop: children render in normal flow */
}

/* Mobile: full-width dropdown panel */
@media (max-width: 1024px) {
  .navbar {
    padding: 0 1.25rem;
  }

  /* Show hamburger */
  .navbar-toggle {
    display: flex;
  }

  /* Hide desktop navbar-right (theme toggle moves into drawer) */
  .navbar-right {
    display: none;
  }

  /* The nav list becomes a hidden drawer */
  .navbar-nav {
    display: none;                     /* hidden by default */
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;                            /* no gap — spacing comes from padding inside each item */
    padding: 0.75rem 1rem 1rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    z-index: 999;
    transform: translateY(-8px);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .navbar-nav.open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
  }

  /* Every list item gets comfortable vertical breathing room */
  .navbar-nav > li {
    margin-bottom: 0.25rem;
  }

  .navbar-nav > li:last-child {
    margin-bottom: 0;
  }

  .nav-link {
    width: 100%;
    text-align: left;
    padding: 0.9rem 1.1rem;            /* tall touch target */
    border-radius: 10px;
    font-size: 0.95rem;
    display: block;                    /* fill full width so hover area = full row */
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
  }

  /* Theme toggle row inside the drawer */
  .nav-theme-row {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.1rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--border);
  }
}

@media (min-width: 1025px) {
  /* Make sure theme row inside nav is never shown on desktop */
  .nav-theme-row {
    display: none !important;
  }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(46, 232, 165, 0.35);
}

[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 8px 30px rgba(0, 168, 112, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-glow);
  transform: translateY(-2px);
}

.btn-lg { padding: 1rem 2.5rem; font-size: 1.05rem; }

/* ============ SECTION LAYOUT ============ */
.section { padding: 6rem 0; }
.section-sm { padding: 3rem 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

.section-header { text-align: center; margin-bottom: 3.5rem; }

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid rgba(46, 232, 165, 0.3);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

[data-theme="light"] .section-badge {
  border-color: rgba(0, 168, 112, 0.3);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 1rem;
}

.section-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============ CARDS ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(46, 232, 165, 0.3);
  box-shadow: var(--shadow-glow), var(--shadow-card);
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}

[data-theme="light"] .card:hover {
  border-color: rgba(0, 168, 112, 0.3);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--primary-glow);
  border: 1px solid rgba(46, 232, 165, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--primary);
}

[data-theme="light"] .card-icon {
  border-color: rgba(0, 168, 112, 0.3);
}

/* ============ DIVIDER ============ */
.gradient-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  margin: 0;
  opacity: 0.4;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--bg-card-2);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  transition: background 0.4s ease;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand img { height: 48px; margin-bottom: 1rem; }

.footer-brand p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.footer-social { display: flex; gap: 0.75rem; }

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary-glow);
  color: var(--primary);
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.footer-col ul li { margin-bottom: 0.6rem; }

.footer-col ul li a {
  color: var(--text-light);
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer-col ul li a:hover { color: var(--primary); padding-left: 4px; }

.footer-col .contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-light);
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

.footer-col .contact-item i { color: var(--primary); margin-top: 2px; min-width: 16px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ============ PAGE HERO (sub pages) ============ */
.page-hero {
  padding: 4rem 0 4rem;
  background: var(--gradient-hero);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.page-hero p { font-size: 1.1rem; color: var(--text-light); max-width: 600px; margin: 0 auto; }


/* ============ FORM STYLES ============ */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { resize: vertical; min-height: 120px; }

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

/* ============ STATS BAR ============ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-item {
  padding: 2rem;
  text-align: center;
  border-right: 1px solid var(--border);
  transition: var(--transition);
}

.stat-item:last-child { border-right: none; }
.stat-item:hover { background: var(--primary-glow); }

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-label { font-size: 0.82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ============ GRID ============ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ============ UTILITIES ============ */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.73rem;
  font-weight: 600;
}

.badge-green {
  background: rgba(46, 232, 165, 0.15);
  color: var(--primary);
  border: 1px solid rgba(46, 232, 165, 0.3);
}

[data-theme="light"] .badge-green {
  background: rgba(0, 168, 112, 0.1);
  border-color: rgba(0, 168, 112, 0.3);
}

.badge-blue {
  background: rgba(56, 189, 248, 0.15);
  color: var(--secondary);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

[data-theme="light"] .badge-blue {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.3);
}

/* ============ ALERT ============ */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(46, 232, 165, 0.1);
  border: 1px solid rgba(46, 232, 165, 0.3);
  color: var(--primary);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #F87171;
}

/* ============ SPINNER ============ */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(46, 232, 165, 0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ FADE IN ============ */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ SECTION BG ALTERNATION ============ */
.bg-page    { background: var(--bg-page); }
.bg-card    { background: var(--bg-card); }
.bg-card-2  { background: var(--bg-card-2); }

/* ============ BUTTONS – additional ============ */
.btn-white {
  background: white;
  color: var(--primary-dark);
  font-weight: 700;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.2); }

.btn-white-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-white-outline:hover { background: rgba(255,255,255,0.1); border-color: white; transform: translateY(-2px); }

/* ============ RESPONSIVE – non-nav ============ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(1),
  .stat-item:nth-child(2) { border-bottom: 1px solid var(--border); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .section { padding: 4rem 0; }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }
}
