:root {
  --color-bg: #ffffff;
  --color-surface: #f5f3ee;
  --color-text: #1f2421;
  --color-muted: #5a615c;
  --color-primary: #2f6b4f;
  --color-primary-hover: #265a42;
  --color-border: #d9d6cf;
  --max-width: 1100px;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --space: 1rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); }
a:hover { color: var(--color-primary-hover); }

h1, h2, h3 { line-height: 1.2; margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.muted { color: var(--color-muted); }

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 10;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 80px;
}
.brand {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--color-primary);
  background: linear-gradient(90deg, var(--color-primary), #4a9d6e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.brand:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.nav-list a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}
.nav-list a:hover { color: var(--color-primary); }

/* Hero */
.hero {
  position: relative;
  min-height: min(70vh, 640px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  background-color: #2a3530;
  padding: 4rem 0;
  overflow: hidden;
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero h1 { color: #ffffff; }
.hero .tagline {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0.5rem 0 1.75rem;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  animation: heroSlide 32s infinite;
}
.hero-slide:nth-child(1) {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.55)),
    url("../assets/images/Hero1.png");
  animation-delay: 0s;
}
.hero-slide:nth-child(2) {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.55)),
    url("../assets/images/Hero2.jpg");
  animation-delay: 8s;
}
.hero-slide:nth-child(3) {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.55)),
    url("../assets/images/Hero3.jpg");
  animation-delay: 16s;
}
.hero-slide:nth-child(4) {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.55)),
    url("../assets/images/Hero4.jpg");
  animation-delay: 24s;
}
@keyframes heroSlide {
  0% { opacity: 0; }
  3.125% { opacity: 1; }
  25% { opacity: 1; }
  28.125% { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; }
  .hero-slide:nth-child(1) { opacity: 1; }
}

/* Sections */
.section {
  padding: 4rem 0;
}
.section-alt {
  background: var(--color-surface);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  color: #ffffff;
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Gallery */
.gallery-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0 0.5rem;
}
.gallery {
  flex: 1;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-border);
  box-shadow: var(--shadow-sm);
}
.gallery-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  visibility: hidden;
}
.gallery-nav {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg, #fff);
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.gallery-nav:hover:not(:disabled) {
  background: var(--color-border);
}
.gallery-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.gallery-status {
  text-align: center;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  opacity: 0.75;
}
@media (min-width: 600px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

.video-wrap {
  position: relative;
  margin-top: 1.5rem;
  background: var(--color-border);
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Donate */
.donate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 3rem auto;
}
.donate-btn {
  flex: 1 1 0;
  max-width: 280px;
  min-width: 200px;
  margin: 0;
  padding: 1.5rem;
  text-align: center;
}

.local-pay-modal {
  width: min(92vw, 480px);
  padding: 2rem 1.75rem 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: var(--shadow-md);
}
.local-pay-modal::backdrop {
  background: rgba(0, 0, 0, 0.45);
}
.local-pay-modal h3 { margin-bottom: 0.5rem; }
.local-pay-modal-close-form {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  margin: 0;
}
.local-pay-modal-close {
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.local-pay-modal-close:hover {
  background: var(--color-surface);
  color: var(--color-text);
}
.local-pay-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin: 1rem 0 0.5rem;
}
.local-pay-details dt {
  font-weight: 600;
  color: var(--color-muted);
}
.local-pay-details dd { margin: 0; }
.local-pay-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  user-select: all;
}
.local-pay-note { margin: 0.75rem 0 0; font-size: 0.95rem; }

/* Books list */
.book-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.book-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}
.book-list li:last-child { border-bottom: none; }

/* Contact form */
.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 600px;
  margin-top: 1.5rem;
}
.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 500;
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* Honeypot — visually hidden but still in DOM */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status {
  min-height: 1.5em;
  font-weight: 500;
}
.status.success { color: var(--color-primary); }
.status.error { color: #b3261e; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.95rem;
}
.site-footer p { margin: 0.25rem 0; }

@media (max-width: 540px) {
  .nav-list { gap: 0.85rem; }
  .nav-row { flex-wrap: wrap; height: auto; padding-top: 0.5rem; padding-bottom: 0.5rem; }
}
