/* ============================================================
   The Field Alliance - Main Stylesheet
   Color Palette: #0B132B | #1C2541 | #3A506B | #FFFFFF
   Fonts: Prompt (headings) + Sarabun (body)
   TailwindCSS v4.3.3 is loaded via CDN in header.php
   This file adds custom components, animations, dark mode.
   ============================================================ */

/* ── Google Fonts (Fallback - loaded in header) ── */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700;800&family=Sarabun:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

/* ── CSS Custom Properties ──────────────────────────────── */
:root {
  --clr-darkest:   #0B132B;
  --clr-dark:      #1C2541;
  --clr-mid:       #3A506B;
  --clr-white:     #FFFFFF;
  --clr-accent:    #5BC0EB;
  --clr-gold:      #F4A261;
  --clr-green:     #52B788;

  --font-heading:  'Prompt', sans-serif;
  --font-body:     'Sarabun', sans-serif;

  --header-h:      72px;
  --transition-speed: 300ms;
  --parallax-opacity: 0.92;

  /* Light mode tokens */
  --bg-body:       #F5F7FA;
  --bg-card:       #FFFFFF;
  --text-primary:  #0B132B;
  --text-secondary:#3A506B;
  --border-color:  #DDE3EE;
}

[data-theme="dark"] {
  --bg-body:       #0B132B;
  --bg-card:       #1C2541;
  --text-primary:  #E8EDF5;
  --text-secondary:#8FB4D4;
  --border-color:  #2A3A5A;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

body.grayscale-mode { filter: grayscale(100%); }

/* ── Skip to Content ─────────────────────────────────────── */
.skip-to-content {
  position: absolute; top: -40px; left: 0; z-index: 9999;
  background: var(--clr-accent); color: #000; padding: 8px 16px;
  font-weight: 700; text-decoration: none;
  transition: top 0.2s;
}
.skip-to-content:focus { top: 0; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
p { margin-bottom: 1rem; }
a { color: var(--clr-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--clr-gold); }

/* ── Container ───────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}
.container-wide { max-width: 1440px; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.65em 1.5em;
  border-radius: 8px; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  text-decoration: none; transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-primary   { background: var(--clr-accent); color: var(--clr-darkest); }
.btn-primary:hover { background: #49AEE0; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(91,192,235,0.35); color: var(--clr-darkest); }
.btn-secondary { background: transparent; color: var(--clr-white); border: 2px solid var(--clr-white); }
.btn-secondary:hover { background: var(--clr-white); color: var(--clr-darkest); }
.btn-gold      { background: var(--clr-gold); color: var(--clr-darkest); }
.btn-gold:hover{ background: #E8955A; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(244,162,97,0.35); color: var(--clr-darkest); }
.btn-sm        { padding: 0.4em 1em; font-size: 0.875rem; }
.btn-lg        { padding: 0.85em 2em; font-size: 1.1rem; }

/* ── Header / Navigation ──────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(11, 19, 43, 0.96);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  height: var(--header-h);
  transition: transform 0.35s ease, background 0.35s ease, top 0.35s ease;
}
.site-header.scrolled { background: rgba(11, 19, 43, 0.99); }
.site-header.hide-up  { transform: translateY(-100%); }

/* ── Admin Quick Bar & Body Offset ────────────────────────── */
body.has-admin-bar {
  --admin-bar-h: 38px;
}
body.has-admin-bar .site-header {
  top: var(--admin-bar-h, 38px);
}
body.has-admin-bar main {
  padding-top: calc(var(--header-h) + var(--admin-bar-h, 38px));
}

.admin-quick-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 38px;
  z-index: 1002;
  background: linear-gradient(90deg, #070D1E 0%, #1C2541 50%, #070D1E 100%);
  border-bottom: 1px solid rgba(91, 192, 235, 0.35);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  color: #ffffff;
  font-family: 'Sarabun', system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.admin-quick-bar .admin-user-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.admin-quick-bar .admin-tag {
  background: rgba(91, 192, 235, 0.18);
  color: #5BC0EB;
  border: 1px solid rgba(91, 192, 235, 0.4);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-quick-bar .admin-quick-links {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.admin-quick-bar .admin-quick-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.78rem;
  padding: 0.22rem 0.65rem;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-quick-bar .admin-quick-link:hover {
  background: rgba(91, 192, 235, 0.2);
  color: #5BC0EB;
  border-color: rgba(91, 192, 235, 0.4);
  transform: translateY(-1px);
}

.admin-quick-bar .admin-quick-link.edit-link {
  color: #F4A261;
  background: rgba(244, 162, 97, 0.14);
  border-color: rgba(244, 162, 97, 0.3);
  font-weight: 600;
}

.admin-quick-bar .admin-quick-link.edit-link:hover {
  background: rgba(244, 162, 97, 0.25);
  color: #FFB703;
  border-color: rgba(244, 162, 97, 0.5);
  box-shadow: 0 0 10px rgba(244, 162, 97, 0.25);
}

.admin-quick-bar .admin-quick-link.logout-link {
  padding: 0.22rem 0.45rem;
  color: rgba(255, 255, 255, 0.65);
}

.admin-quick-bar .admin-quick-link.logout-link:hover {
  color: #e63946;
  background: rgba(230, 57, 70, 0.15);
  border-color: rgba(230, 57, 70, 0.3);
}

@media (max-width: 640px) {
  .admin-quick-bar {
    padding: 0 0.6rem;
    font-size: 0.75rem;
  }
  .admin-quick-bar .admin-user-info span:not(.admin-tag) {
    font-size: 0.72rem;
  }
  .admin-quick-bar .admin-tag span {
    display: none;
  }
  .admin-quick-bar .admin-quick-link {
    padding: 0.15rem 0.4rem;
    font-size: 0.72rem;
  }
}

.header-container {
  max-width: 1400px; margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
  display: flex; align-items: center; gap: 1.5rem;
  height: 100%;
}

.logo-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-wrapper:hover {
  background: #ffffff;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.2);
  transform: translateY(-1px);
}
.logo-wrapper img { height: 38px; width: auto; display: block; }

.main-nav {
  display: flex; align-items: center; gap: 0.25rem;
  flex: 1; flex-wrap: nowrap;
}

.nav-link {
  color: rgba(255,255,255,0.85); font-weight: 500;
  padding: 0.4em 0.8em; border-radius: 6px;
  font-size: 0.93rem; white-space: nowrap;
  display: flex; align-items: center; gap: 0.4em;
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover, .nav-link.active { background: rgba(91,192,235,0.15); color: var(--clr-accent); }
.nav-link i { font-size: 0.85em; }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: #0D1B3E; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 0.4rem 0; min-width: 240px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 200;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu a {
  display: flex; align-items: center; gap: 0.6em;
  padding: 0.6em 1.2em; color: rgba(255,255,255,0.8);
  font-size: 0.9rem; transition: background 0.15s, color 0.15s;
}
.dropdown-menu a:hover { background: rgba(91,192,235,0.12); color: var(--clr-accent); }
.dropdown-arrow { font-size: 0.65em; margin-left: 2px; }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.icon-btn {
  background: transparent; border: none; cursor: pointer;
  color: rgba(255,255,255,0.75); width: 40px; height: 40px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.1); color: var(--clr-accent); }
.btn-donate {
  background: var(--clr-gold); color: var(--clr-darkest); font-weight: 700;
  padding: 0.4em 1.1em; border-radius: 8px; font-size: 0.9rem;
  display: flex; align-items: center; gap: 0.4em; white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}
.btn-donate:hover { background: #E8955A; transform: translateY(-1px); color: var(--clr-darkest); }

/* Mobile Toggle */
.mobile-toggle { display: none; }

/* Search Overlay */
.search-bar-overlay {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  background: rgba(11,19,43,0.98); border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem; opacity: 0; visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.search-bar-overlay.open { opacity: 1; visibility: visible; transform: translateY(0); }
.search-container { display: flex; gap: 0.75rem; max-width: 700px; margin-inline: auto; }
.search-input {
  flex: 1; padding: 0.65em 1em; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08);
  color: #fff; font-family: var(--font-body); font-size: 1rem; outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.search-input::placeholder { color: rgba(255,255,255,0.4); }
.search-input:focus { border-color: var(--clr-accent); background: rgba(255,255,255,0.1); }

/* ── Page Body Offset ─────────────────────────────────────── */
main { padding-top: var(--header-h); min-height: 70vh; }

/* ── Hero Banner ──────────────────────────────────────────── */
.hero-banner {
  position: relative; overflow: hidden;
  min-height: clamp(320px, 55vh, 680px);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background-color: var(--clr-dark, #0b132b);
}
.hero-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg,rgba(11,19,43,0.78) 0%,rgba(28,37,65,0.62) 100%);
  pointer-events: none;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 1;
  background-size: cover; background-position: center;
  will-change: transform;
  transition: opacity 0.5s ease;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg,rgba(11,19,43,0.78) 0%,rgba(28,37,65,0.62) 100%);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2; padding: 3rem 1.5rem;
  max-width: 860px; animation: fadeInUp 0.8s ease both;
}
@media (prefers-reduced-motion: reduce) {
  .hero-video-bg { display: none !important; }
}
.hero-content h1 { color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,0.4); margin-bottom: 1rem; }
.hero-content h2, .hero-subtitle {
  color: rgba(255,255,255,0.9);
  font-weight: 300;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  max-width: 680px;
  margin-inline: auto;
  line-height: 1.6;
}
.hero-content h2 a, .hero-subtitle a {
  color: var(--clr-accent, #5BC0EB);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s;
}
.hero-content h2 a:hover, .hero-subtitle a:hover {
  color: var(--clr-gold, #F4A261);
}
.hero-content h2 img, .hero-subtitle img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0.5rem auto;
  display: block;
}
.hero-content h2 p, .hero-subtitle p {
  margin-bottom: 0.5rem;
}
.hero-content h2 p:last-child, .hero-subtitle p:last-child {
  margin-bottom: 0;
}

/* ── Sections ─────────────────────────────────────────────── */
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section-dark { background: var(--clr-dark); color: #fff; }
.section-darkest { background: var(--clr-darkest); color: #fff; }
.section-mid { background: var(--clr-mid); color: #fff; }
.section-light { background: var(--bg-card); }
.section-accent { background: linear-gradient(135deg, var(--clr-darkest), var(--clr-dark)); color: #fff; }

.section-label {
  display: inline-flex; align-items: center; gap: 0.5em;
  color: var(--clr-accent); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.75rem;
}
.section-title { margin-bottom: 1.25rem; }
.section-lead { font-size: 1.1rem; color: var(--text-secondary); max-width: 680px; margin-bottom: 2.5rem; }
.section-dark .section-lead,
.section-darkest .section-lead { color: rgba(255,255,255,0.72); }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border-radius: 14px;
  border: 1px solid var(--border-color);
  overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0,0,0,0.15); }
.card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.card-body { padding: 1.5rem; }
.card-title { font-size: 1.15rem; margin-bottom: 0.5rem; font-family: var(--font-heading); }
.card-text  { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 1rem; }

/* Dark variant */
.card-dark {
  background: var(--clr-dark); border-color: rgba(255,255,255,0.08); color: #fff;
}
.card-dark .card-text { color: rgba(255,255,255,0.7); }

/* ── Grid Layouts ────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }

/* ── Partner Carousel ─────────────────────────────────────── */
.partner-carousel-section {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(28, 37, 65, 0.75) 0%, rgba(7, 13, 30, 0.98) 100%);
  padding-block: 4rem 4.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.partner-carousel-wrap {
  position: relative;
  overflow: hidden;
  padding-block: 1rem 1.5rem;
  margin-top: 1.5rem;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, transparent 100%);
}

.partner-track {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  animation: scrollPartners var(--partner-carousel-speed, 28s) linear infinite;
  width: max-content;
  will-change: transform;
}

.partner-track:hover {
  animation-play-state: paused;
}

.partner-card-wrap {
  flex-shrink: 0;
}

.partner-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.1rem 1.25rem 0.9rem;
  width: 220px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1),
              background 0.35s ease,
              border-color 0.35s ease,
              box-shadow 0.35s ease;
  position: relative;
}

.partner-card-link:hover {
  transform: translateY(-6px) scale(1.02);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(91, 192, 235, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(91, 192, 235, 0.2);
}

.partner-logo-box {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-card-link:hover .partner-logo-box {
  transform: scale(1.03);
  box-shadow: inset 0 0 0 1px rgba(91, 192, 235, 0.3), 0 6px 18px rgba(0, 0, 0, 0.25);
}

.partner-logo-img {
  max-height: 55px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
  transition: transform 0.3s ease;
}

.partner-card-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
  width: 100%;
  text-align: center;
}

.partner-card-name {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color 0.25s ease;
}

.partner-card-link:hover .partner-card-name {
  color: var(--clr-accent);
}

.partner-card-country {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.partner-flag-img {
  width: 15px;
  height: 11px;
  border-radius: 2px;
  object-fit: cover;
}

@keyframes scrollPartners {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.3333%); }
}

/* ── Animated Counter ────────────────────────────────────── */
.counter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2rem; text-align: center; }
.counter-item { padding: 2rem 1rem; }
.counter-icon { font-size: 2.4rem; color: var(--clr-accent); margin-bottom: 0.75rem; }
.counter-number { font-family: var(--font-heading); font-size: 3rem; font-weight: 800; color: var(--clr-white); line-height: 1; }
.counter-suffix { color: var(--clr-gold); }
.counter-label { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin-top: 0.4rem; }

/* ── Parallax Section ────────────────────────────────────── */
.parallax-section {
  position: relative; overflow: hidden;
  min-height: 400px; display: flex; align-items: center; justify-content: center;
}
.parallax-bg {
  position: absolute; inset: -20%; z-index: 0;
  background-size: cover; background-attachment: fixed; background-position: center;
  filter: brightness(var(--parallax-opacity));
  will-change: transform;
}
.parallax-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg,rgba(11,19,43,0.72),rgba(58,80,107,0.68));
}
.parallax-content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 4rem 1.5rem; }

/* ── Cookie Consent Banner ───────────────────────────────── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9000;
  background: rgba(11,19,43,0.97);
  border-top: 1px solid rgba(91,192,235,0.3);
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  backdrop-filter: blur(12px);
  transform: translateY(100%); transition: transform 0.4s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-text { flex: 1; font-size: 0.9rem; color: rgba(255,255,255,0.85); min-width: 220px; }
.cookie-text a { color: var(--clr-accent); }
.cookie-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }

/* ── Back to Top ─────────────────────────────────────────── */
.back-to-top {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 800;
  background: var(--clr-mid); color: #fff;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all 0.3s ease;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--clr-accent); transform: translateY(-3px); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--clr-darkest);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-block: 3.5rem 1.5rem;
  color: rgba(255,255,255,0.75);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem; margin-bottom: 3rem;
}
.footer-brand .footer-logo {
  height: 44px;
  width: auto;
  margin-bottom: 1rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
  display: inline-block;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-col h4 {
  color: #fff; font-family: var(--font-heading); font-size: 1rem;
  margin-bottom: 1rem; font-weight: 600;
  padding-bottom: 0.5rem; border-bottom: 2px solid var(--clr-accent); display: inline-block;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: rgba(255,255,255,0.68); font-size: 0.9rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--clr-accent); }
.footer-col .contact-item { display: flex; align-items: flex-start; gap: 0.6em; font-size: 0.9rem; margin-bottom: 0.6rem; }
.footer-col .contact-item i { color: var(--clr-accent); margin-top: 3px; flex-shrink: 0; }
.footer-social { display: flex; gap: 0.75rem; margin-top: 1rem; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; transition: background 0.2s, color 0.2s;
}
.footer-social a:hover { background: var(--clr-accent); color: var(--clr-darkest); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 0.75rem; font-size: 0.85rem; color: rgba(255,255,255,0.45);
}
.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: var(--clr-accent); }

.admin-discreet-link {
  color: rgba(255, 255, 255, 0.25) !important;
  font-size: 0.72rem;
  text-decoration: none;
  opacity: 0.35;
  transition: opacity 0.25s ease, color 0.25s ease;
  display: inline-flex;
  align-items: center;
  padding: 2px 4px;
  border-radius: 3px;
}
.admin-discreet-link:hover,
.admin-discreet-link:focus {
  opacity: 0.95;
  color: var(--clr-accent) !important;
  background: rgba(255, 255, 255, 0.08);
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb-nav { padding-block: 0.75rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; font-size: 0.875rem; align-items: center; }
.breadcrumb-item + .breadcrumb-item::before { content: '/'; margin-inline: 0.3em; color: var(--text-secondary); }
.breadcrumb-item a { color: var(--clr-accent); }
.breadcrumb-item.active { color: var(--text-secondary); }

/* ── Accordion ───────────────────────────────────────────── */
.accordion-item { border-bottom: 1px solid var(--border-color); }
.accordion-btn {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 1.1rem 0; font-family: var(--font-heading); font-weight: 600;
  font-size: 1rem; color: var(--text-primary);
  display: flex; justify-content: space-between; align-items: center;
  transition: color 0.2s;
}
.accordion-btn:hover, .accordion-btn.open { color: var(--clr-accent); }
.accordion-btn i { transition: transform 0.3s; }
.accordion-btn.open i { transform: rotate(180deg); }
.accordion-body { display: none; padding-bottom: 1rem; }
.accordion-body.open { display: block; animation: fadeInDown 0.25s ease; }

/* ── Tabs ────────────────────────────────────────────────── */
.tabs-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; border-bottom: 2px solid var(--border-color); margin-bottom: 2rem; }
.tab-btn {
  padding: 0.65em 1.2em; border: none; background: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  color: var(--text-secondary); border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.tab-btn:hover { color: var(--clr-accent); }
.tab-btn.active { color: var(--clr-accent); border-bottom-color: var(--clr-accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeInUp 0.25s ease; }

/* ── Form Styles ─────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.95rem; }
.form-control {
  width: 100%; padding: 0.7em 1em;
  border: 1.5px solid var(--border-color); border-radius: 8px;
  background: var(--bg-card); color: var(--text-primary);
  font-family: var(--font-body); font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.form-control:focus { border-color: var(--clr-accent); box-shadow: 0 0 0 3px rgba(91,192,235,0.2); }
.form-control::placeholder { color: var(--text-secondary); opacity: 0.6; }
textarea.form-control { resize: vertical; min-height: 120px; }
.captcha-group { display: flex; align-items: center; gap: 0.75rem; }
.captcha-label { background: var(--clr-dark); color: var(--clr-accent); padding: 0.5em 0.9em; border-radius: 8px; font-weight: 700; font-size: 1rem; }
.form-error { color: #e74c3c; font-size: 0.875rem; margin-top: 0.3rem; }
.form-success { color: var(--clr-green); font-size: 0.95rem; }
.alert { padding: 1rem 1.25rem; border-radius: 8px; margin-bottom: 1rem; }
.alert-success { background: rgba(82,183,136,0.15); border: 1px solid var(--clr-green); color: var(--clr-green); }
.alert-error   { background: rgba(231,76,60,0.12); border: 1px solid #e74c3c; color: #e74c3c; }

/* ── Issue Icons Grid ────────────────────────────────────── */
.issue-card {
  background: var(--bg-card); border-radius: 12px; padding: 2rem 1.5rem;
  text-align: center; border: 1px solid var(--border-color);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.issue-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.12); border-color: var(--clr-accent); }
.issue-icon { font-size: 2.5rem; color: var(--clr-accent); margin-bottom: 1rem; }
.issue-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.issue-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* ── Project Cards ───────────────────────────────────────── */
.project-card .card-img { aspect-ratio: 16/9; }
.project-badge {
  display: inline-block; background: var(--clr-accent); color: var(--clr-darkest);
  font-size: 0.75rem; font-weight: 700; padding: 0.2em 0.7em; border-radius: 4px; margin-bottom: 0.75rem;
}

/* Project: Timeline Layout */
.project-timeline { position: relative; padding-left: 2rem; }
.project-timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(to bottom, var(--clr-accent), var(--clr-mid)); border-radius: 2px; }
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-dot { position: absolute; left: -2.35rem; top: 0.25rem; width: 16px; height: 16px; border-radius: 50%; background: var(--clr-accent); border: 3px solid var(--bg-body); }

/* Project: Slider Layout */
.project-slider-wrap { overflow: hidden; }
.project-slider-track { display: flex; gap: 1.5rem; transition: transform 0.5s ease; }
.project-slider-track .card { flex: 0 0 calc(33.33% - 1rem); min-width: 280px; }

/* Project: Accordion Layout */
.project-accordion-item { border: 1px solid var(--border-color); border-radius: 10px; margin-bottom: 1rem; overflow: hidden; }
.project-accordion-header { padding: 1.2rem 1.5rem; display: flex; justify-content: space-between; align-items: center; cursor: pointer; background: var(--bg-card); }
.project-accordion-body { display: none; padding: 0 1.5rem 1.5rem; border-top: 1px solid var(--border-color); }
.project-accordion-body.open { display: block; }

/* ── Gallery Grid ────────────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gallery-item { border-radius: 10px; overflow: hidden; cursor: pointer; }
.gallery-item img, .gallery-item video { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform 0.3s; }
.gallery-item:hover img, .gallery-item:hover video { transform: scale(1.05); }

/* ── Page Content (RTE output) ───────────────────────────── */
.rte-content h2, .rte-content h3 { margin-top: 1.75rem; margin-bottom: 0.75rem; }
.rte-content ul, .rte-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.rte-content ul li, .rte-content ol li { margin-bottom: 0.4rem; }
.rte-content img { max-width: 100%; border-radius: 8px; height: auto; }
.rte-content a { color: var(--clr-accent); }
.rte-content blockquote { border-left: 4px solid var(--clr-accent); padding-left: 1rem; margin: 1.5rem 0; color: var(--text-secondary); font-style: italic; }
.rte-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.rte-content th, .rte-content td { border: 1px solid var(--border-color); padding: 0.6em 0.9em; }
.rte-content th { background: var(--clr-dark); color: #fff; }
/* Image float / text-wrap (set via TinyMCE alignment toolbar) */
/* Per-image spacing: edit via image dialog → Advanced tab → hspace / vspace */
.rte-content img[style*="float: left"],
.rte-content img[style*="float:left"]  { float: left; }
.rte-content img[style*="float: right"],
.rte-content img[style*="float:right"] { float: right; }
.rte-content img[style*="margin: auto"],
.rte-content img[style*="margin:auto"] { display: block; margin-left: auto; margin-right: auto; float: none; }
/* Clearfix so container height wraps floated images */
.rte-content::after { content: ''; display: table; clear: both; }
/* Mobile: collapse floats to full width */
@media (max-width: 600px) {
  .rte-content img[style*="float: left"],
  .rte-content img[style*="float:left"],
  .rte-content img[style*="float: right"],
  .rte-content img[style*="float:right"] { float: none; margin: 0.75rem 0 !important; width: 100% !important; max-width: 100% !important; }
}

/* ── 404 Page ─────────────────────────────────────────────── */
.page-404 { min-height: 80vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.page-404-icon { font-size: 6rem; color: var(--clr-mid); margin-bottom: 1.5rem; opacity: 0.6; }
.page-404 h1 { font-size: 6rem; color: var(--clr-accent); line-height: 1; margin-bottom: 0; }
.page-404 h2 { font-size: 1.5rem; margin-bottom: 1rem; }

/* ── Search Results ──────────────────────────────────────── */
.search-result-item { padding: 1.5rem; border-bottom: 1px solid var(--border-color); }
.search-result-item:last-child { border-bottom: none; }
.result-type { display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; padding: 0.2em 0.6em; border-radius: 4px; margin-bottom: 0.5rem; }
.result-type.page     { background: rgba(91,192,235,0.15); color: var(--clr-accent); }
.result-type.project  { background: rgba(244,162,97,0.15); color: var(--clr-gold); }
.result-type.issue    { background: rgba(82,183,136,0.15); color: var(--clr-green); }
.result-type.document { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
.search-result-item h3 { margin-bottom: 0.4rem; }
.search-result-item h3 a { color: var(--text-primary); }
.search-result-item h3 a:hover { color: var(--clr-accent); }
.search-result-item p { font-size: 0.9rem; color: var(--text-secondary); margin: 0; }

/* ── Scroll Reveal Animation ────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeInUp   { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn     { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse      { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .main-nav { display: none; flex-direction: column; align-items: flex-start; gap: 0; }
  .main-nav.open { display: flex; position: absolute; top: var(--header-h); left: 0; right: 0; background: rgba(11,19,43,0.98); padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.08); z-index: 999; }
  .nav-link { width: 100%; }
  .nav-dropdown .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: rgba(0,0,0,0.2); border-radius: 6px; margin-top: 0.25rem; border: none; padding: 0; }
  .mobile-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .project-slider-track .card { flex: 0 0 85%; }
  .cookie-banner { flex-direction: column; }
}

@media (max-width: 480px) {
  .logo-wrapper { padding: 0.25rem 0.65rem; border-radius: 8px; }
  .logo-wrapper img { height: 30px; }
  .counter-grid { grid-template-columns: repeat(2, 1fr); }
  .header-actions .btn-donate span { display: none; }
}

/* ── Utility Classes ─────────────────────────────────────── */
.text-center   { text-align: center; }
.text-left     { text-align: left; }
.text-white    { color: #fff; }
.text-accent   { color: var(--clr-accent); }
.text-gold     { color: var(--clr-gold); }
.text-muted    { color: var(--text-secondary); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.hidden { display: none !important; }
.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; }

/* ── Volunteer Application Form Theme Adaptation ─────────── */
.volunteer-card {
  background-color: var(--bg-card, #ffffff);
  border-radius: 16px;
  padding: 2.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color, rgba(11, 19, 43, 0.1));
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.volunteer-card-title {
  font-family: var(--font-heading, 'Prompt', sans-serif);
  font-weight: 700;
  color: var(--text-primary, #0b132b);
  margin-bottom: 1.5rem;
  font-size: 1.35rem;
}

.volunteer-label {
  display: block;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #3a506b);
  margin-bottom: 0.4rem;
}

.volunteer-input {
  width: 100%;
  border: 1px solid var(--border-color, rgba(11, 19, 43, 0.18));
  border-radius: 8px;
  padding: 0.7rem 0.95rem;
  font-family: var(--font-body, 'Sarabun', sans-serif);
  font-size: 0.92rem;
  color: var(--text-primary, #0b132b);
  background-color: var(--bg-body, #f8fafc);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.3s ease, color 0.3s ease;
}

.volunteer-input:focus {
  border-color: var(--clr-accent, #5bc0eb);
  box-shadow: 0 0 0 3px rgba(91, 192, 235, 0.25);
}

.volunteer-input option {
  background-color: var(--bg-card, #ffffff);
  color: var(--text-primary, #0b132b);
}

.volunteer-captcha-box {
  background-color: var(--bg-body, rgba(11, 19, 43, 0.05));
  border: 1px solid var(--border-color, rgba(11, 19, 43, 0.15));
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary, #0b132b);
  white-space: nowrap;
}

.volunteer-skill-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text-primary, #0b132b);
  font-size: 0.95rem;
}

.volunteer-skill-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(91, 192, 235, 0.12);
  border: 1px solid rgba(91, 192, 235, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--clr-accent, #5bc0eb);
  font-size: 0.9rem;
}

/* ── Homepage Intro Quote Component ─────────────────────── */
.intro-quote {
  position: relative;
  background: var(--bg-card);
  border-left: 4px solid var(--clr-gold);
  border-radius: 0 12px 12px 0;
  padding: 1.25rem 1.5rem 1.25rem 3rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

[data-theme="dark"] .intro-quote {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  background: rgba(28, 37, 65, 0.7);
}

.intro-quote .quote-icon {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 1.25rem;
  color: var(--clr-gold);
  opacity: 0.9;
}

.intro-quote .quote-text {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.intro-quote .quote-author {
  display: block;
  font-style: normal;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.intro-quote .quote-author strong {
  color: var(--clr-green);
  font-weight: 600;
}

.intro-quote .quote-title {
  color: var(--text-secondary);
  font-weight: 400;
}