/* =====================================================
1) DESIGN TOKENS / VARIABLEN
===================================================== */
:root {
  --color-primary: #5e8f31;
  --color-primary-dark: #4a7327;
  --color-primary-light: #7fb24a;

  --color-bg: #ffffff;
  --color-bg-alt: #f6f8f4;

  --color-text: #111827;
  --color-text-muted: #4b5563;

  --color-border: #e5e7eb;

  --radius-lg: 1.25rem;
  --radius-md: 0.75rem;

  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 14px 35px rgba(0, 0, 0, 0.10);

  --container: 1200px;
}

/* =====================================================
2) RESET / BASIS
===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Screenreader only */
.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;
}

/* =====================================================
3) TYPOGRAFIE
===================================================== */
h1,
h2,
h3 {
  line-height: 1.15;
}

h2 {
  color: var(--color-primary);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

p {
  color: var(--color-text-muted);
  max-width: 70ch;
}

/* =====================================================
4) HEADER / NAV
===================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 48px;
  width: auto;
}

/* Links */
.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-list a {
  text-decoration: none;
  font-weight: 600;
  color: var(--color-text);
  position: relative;
  padding: 0.25rem 0;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.2s ease;
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  width: 100%;
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.6rem 0.7rem;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 4px 0;
}

/* =====================================================
5) BUTTONS
===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;

  border-radius: 0.9rem;
  padding: 0.75rem 1.15rem;

  background: var(--color-primary);
  color: #fff;
  border: 2px solid var(--color-primary);

  transition: transform 0.12s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-2px);
}

/* Outline (Standard: für dunkle Hintergründe wie Hero/CTA) */
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: var(--color-primary);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-donate {
  padding-inline: 1.1rem;
}

/* Cards: kleine Buttons */
.btn-small {
  align-self: flex-start;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
}

/* =====================================================
6) HERO
===================================================== */
.hero {
  position: relative;
  min-height: 82vh;
  display: grid;
  place-items: center;
  padding: 3rem 0;
}

.hero-bg {
  background: url("../assets/images/hero-bg.jpg") center / cover no-repeat;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}

.hero-content {
  position: relative;
  text-align: center;
}

.hero-eyebrow {
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
}

.hero-slogan {
  color: #fff;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
}

.hero-slogan--sub {
  margin-top: 0.5rem;
  font-size: clamp(1.2rem, 3.2vw, 2rem);
  color: rgba(255, 255, 255, 0.95);
}

.hero-lead {
  margin: 1.25rem auto 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.6;
  max-width: 60ch;
}

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =====================================================
7) SECTIONS (Basis)
===================================================== */
.section {
  padding: 4.5rem 0;
}

.section-lead {
  margin-top: 1rem;
}

/* =====================================================
8) INTRO
===================================================== */
.section-intro {
  text-align: center;
}

.section-intro p {
  margin: 1.5rem auto 0;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #374151;
}

.intro-motto {
  display: inline-block;
  margin-top: 1.2rem;
  font-weight: 800;
  color: var(--color-primary);
}

/* =====================================================
9) FEATURES
===================================================== */
.section-features {
  background: var(--color-bg-alt);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2.2rem;
}

.feature {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.7rem;
  box-shadow: var(--shadow-sm);
}

.feature h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

/* Video */
.video-wrapper {
  position: relative;
  margin: 3rem auto 0;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =====================================================
10) VERTRAUEN
===================================================== */
.section-trust {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.trust-grid {
  margin-top: 2.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.trust-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.trust-number {
  font-weight: 900;
  color: var(--color-primary);
  letter-spacing: 0.02em;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
}

.trust-text {
  margin-top: 0.4rem;
  color: var(--color-text-muted);
}

/* =====================================================
11) SPENDENZIEL (Goal)
===================================================== */
.section-goal {
  background: linear-gradient(180deg, var(--color-bg-alt), #ffffff);
}

.goal-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.goal-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.goal-content p {
  margin-top: 1rem;
}

.goal-thanks {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  color: var(--color-text);
}

/* Mini-Ausblick unter dem Button */
.goal-outlook {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

.goal-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.goal-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #f3f4f6;
}

.goal-image img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
}

/* Outline-Button auf hellem Hintergrund lesbar (nur in dieser Sektion) */
.section-goal .btn-outline {
  color: var(--color-primary);
  background: transparent;
  border-color: var(--color-primary);
}

.section-goal .btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

/* Wenn abgeschlossen, soll der „primäre“ Spenden-Button ggf. nicht erscheinen */
.section-goal.is-completed .btn:not(.btn-outline) {
  display: none;
}

/* =====================================================
12) PROJEKTE (Cards)
===================================================== */
.section-head {
  text-align: center;
  margin-bottom: 2rem;
}

.section-head p {
  margin-inline: auto;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.7rem;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  /* neu: einheitliche Card-Höhe durch flex layout */
  display: flex;
  flex-direction: column;
  position: relative; /* wichtig für "ganze Card klickbar" */
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;

  /* NEU: per Prozent steuerbar wie beim Hero */
  object-position: var(--img-x, 50%) var(--img-y, 30%);
}


.card h3 {
  padding: 1.1rem 1.2rem 0.2rem;
  color: var(--color-text);
}

.card p {
  padding: 0 1.2rem 1rem;
  flex: 1; /* sorgt dafür, dass Buttons/Links unten gleich stehen */
}

.card-link {
  display: inline-block;
  margin: 0 1.2rem 1.3rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
}

/* Ganze Card klickbar (stretched link) */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card-link:hover,
.card-link:focus-visible {
  text-decoration: underline;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

/* =====================================================
13) SO KANNST DU HELFEN
===================================================== */
.section-help {
  background: var(--color-bg-alt);
}

.help-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.help-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.help-card h3 {
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

/* Kurze Unterzeile unter der Überschrift */
.help-subline {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.help-card p {
  margin-bottom: 1.5rem;
}

.help-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

/* Outline-Button innerhalb der Help-Sektion lesbar machen */
.section-help .btn-outline {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: transparent;
}

.section-help .btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

/* =====================================================
14) FOOTER
===================================================== */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  align-items: start;
}

.footer-title {
  font-weight: 900;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.footer-text {
  color: var(--color-text-muted);
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

/* Footer: Kontakt & Social */
.footer-text a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-text a:hover,
.footer-text a:focus-visible {
  color: var(--color-text);
  text-decoration: underline;
}

.footer-social {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
}

.social-link {
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.95rem;
}

.social-link:hover,
.social-link:focus-visible {
  text-decoration: underline;
}


.footer-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-weight: 650;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--color-text);
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 2rem;
  text-align: center;
  color: var(--color-text-muted);
}

/* =====================================================
15) RESPONSIVE
===================================================== */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .btn-donate {
    display: none;
  }

  .nav-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.25rem 1.25rem;
    flex-direction: column;
    gap: 0.75rem;
    display: none;
  }

  .nav-list.is-open {
    display: flex;
  }

  .goal-grid {
    grid-template-columns: 1fr;
  }

  .goal-image {
    order: -1;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 78vh;
    padding: 2.5rem 0;
  }

  .btn {
    width: 100%;
    max-width: 320px;
  }

  .logo img {
    height: 40px;
  }
}