/* ==========================================================================
   freiraum-europa Spenden-Landing-Page v2
   Mobile-first · WCAG 2.1 AA · Conversion-optimiert
   Vorbild: SOS Kinderdorf (Form above the fold, 3 Impact-Karten, FAQ)
   ========================================================================== */

:root {
  /* Farben — freiraum-europa CI: Petrol/Teal + Orange-Akzent */
  --color-primary: #005268;
  --color-primary-hover: #15779b;
  --color-primary-light: #E8F4F8;
  --color-accent: #ff8a00;
  --color-accent-dark: #e07800;
  --color-text: #2b2b2b;
  --color-text-light: #4A4A4A;
  --color-text-muted: #6B6B6B;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F5F7FA;
  --color-bg-warm: #F0F7FA;
  --color-border: #E0E0E0;
  --color-white: #FFFFFF;

  /* System-Fonts (kein Google Fonts = kein DSGVO-Problem) */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 5rem;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
  --container-max: 1100px;
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Base --- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--color-primary-hover); }

h1, h2, h3, h4 { line-height: 1.25; }

/* --- Focus (WCAG) --- */
:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }

/* --- Skip Link --- */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--color-text); color: var(--color-white);
  padding: 0.5rem 1rem; border-radius: var(--radius);
  z-index: 1000; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* --- SR 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;
}

/* --- Container --- */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 1rem; }

/* --- Buttons --- */
.btn {
  display: inline-block; font-family: inherit; font-weight: 700;
  text-align: center; text-decoration: none; border: none;
  border-radius: var(--radius); cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--color-accent); color: var(--color-white); }
.btn-primary:hover { background: var(--color-accent-dark); color: var(--color-white); }

.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.9rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }

/* --- Header (sticky) --- */
.site-header {
  position: sticky; top: 0; background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 100; padding: 0.75rem 0;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.logo-link { display: inline-flex; text-decoration: none; }
.logo { height: 60px; width: auto; }

/* ==========================================================================
   1. HERO + SPENDENFORMULAR (Above the Fold)
   ========================================================================== */
.hero {
  padding: var(--spacing-sm) 0 var(--spacing-lg);
  background: linear-gradient(135deg, var(--color-bg-warm) 0%, var(--color-bg) 100%);
}

/* Hero-Bild: Mobile sichtbar, Desktop versteckt (Platz fuer Form) */
.hero-img {
  width: 100%; border-radius: var(--radius);
  margin-bottom: var(--spacing-sm);
  height: 140px; object-fit: cover;
}

.hero-inner {
  display: flex; flex-direction: column; gap: var(--spacing-lg);
}

.hero-content h1 {
  font-size: 1.75rem; color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.hero-subline {
  font-size: 1.05rem; color: var(--color-text-light);
  margin-bottom: var(--spacing-md); max-width: 480px;
}

/* Trust-Badges unter der Subline */
.hero-trust-bar {
  display: flex; flex-wrap: wrap; gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}
.trust-badge {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 600; color: var(--color-text-muted);
}
.trust-badge img { width: 28px; height: 28px; object-fit: contain; }
.trust-badge svg { color: var(--color-accent); flex-shrink: 0; }

/* Spendenformular-Container */
.hero-form { width: 100%; scroll-margin-top: 160px; }

/* Spenden-Card (rechte Seite / unten auf Mobile) */
.donate-card {
  background: var(--color-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
  border: 2px solid var(--color-primary);
}
.donate-card-title {
  background: var(--color-primary); color: var(--color-white);
  text-align: center; padding: 0.875rem; font-size: 1.2rem;
  margin: 0;
}
/* Twingle JS-Embed Container */
#twingle-container { min-height: 300px; }
.noscript-fallback { padding: var(--spacing-lg); text-align: center; }
.donate-secure {
  display: flex; align-items: center; justify-content: center; gap: 0.3rem;
  padding: 0.625rem; font-size: 0.8rem; color: var(--color-text-muted);
  background: var(--color-bg-alt); border-top: 1px solid var(--color-border);
}
.donate-secure svg { flex-shrink: 0; }

.influencer-note {
  text-align: center; font-size: 0.9rem; color: var(--color-white);
  padding: 0.5rem 0.75rem; background: var(--color-accent);
  margin: 0;
}

/* ==========================================================================
   2. IMPACT
   ========================================================================== */
.impact { padding: var(--spacing-2xl) 0; }

.impact h2, .story h2, .trust h2, .faq h2 {
  font-size: 1.5rem; color: var(--color-primary);
  text-align: center; margin-bottom: var(--spacing-xl);
}

.impact-grid { display: grid; grid-template-columns: 1fr; gap: var(--spacing-md); }

.impact-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  cursor: pointer;
}
.impact-card:hover {
  box-shadow: var(--shadow); transform: translateY(-2px);
  border-color: var(--color-accent); color: inherit;
}
.impact-cta {
  display: inline-block; margin-top: var(--spacing-xs);
  font-weight: 700; font-size: 0.9rem; color: var(--color-accent);
}
.impact-card:hover .impact-cta { text-decoration: underline; }

.impact-amount {
  font-size: 2rem; font-weight: 800; color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.impact-card p { color: var(--color-text-light); font-size: 0.95rem; margin-bottom: var(--spacing-sm); }
.impact-img { border-radius: var(--radius); width: 100%; height: 160px; object-fit: cover; }

/* ==========================================================================
   3. STORY
   ========================================================================== */
.story { background: var(--color-bg-alt); padding: var(--spacing-2xl) 0; }

.story-inner { display: flex; flex-direction: column; gap: var(--spacing-lg); }

.story-image img {
  border-radius: var(--radius-lg); width: 100%;
  object-fit: cover; aspect-ratio: 4 / 3;
}

.story-content h2 {
  text-align: left; font-size: 1.35rem; font-style: italic;
  color: var(--color-primary);
}
.story-content p { color: var(--color-text-light); margin-bottom: var(--spacing-sm); line-height: 1.7; }
.story-cta-text { color: var(--color-text) !important; }
.story-content .btn { margin-top: var(--spacing-xs); }

/* ==========================================================================
   4. REACH BANNER (100.000+)
   ========================================================================== */
.reach-banner {
  background: var(--color-primary); color: var(--color-white);
  padding: var(--spacing-xl) 0;
  text-align: center;
}
.reach-inner {
  display: flex; flex-direction: column; align-items: center; gap: var(--spacing-xs);
}
.reach-number {
  font-size: 3.5rem; font-weight: 800; line-height: 1;
  color: var(--color-accent);
}
.reach-text {
  font-size: 1.1rem; color: rgba(255,255,255,0.9);
  max-width: 500px;
}

/* ==========================================================================
   5. TRUST
   ========================================================================== */
.trust { padding: var(--spacing-2xl) 0; }

.trust-grid { display: grid; grid-template-columns: 1fr; gap: var(--spacing-lg); text-align: center; }

.trust-item img { margin: 0 auto var(--spacing-sm); }

.trust-number {
  font-size: 2.5rem; font-weight: 800; color: var(--color-accent);
  line-height: 1;  margin-bottom: 0.5rem;
}
.trust-item h3 { font-size: 1rem; margin-bottom: 0.25rem; color: var(--color-primary); }
.trust-item p { font-size: 0.9rem; color: var(--color-text-muted); max-width: 300px; margin: 0 auto; }

.trust-partners {
  margin-top: var(--spacing-xl); text-align: center;
  padding-top: var(--spacing-lg); border-top: 1px solid var(--color-border);
}
.partners-label {
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--color-text-muted); font-weight: 600; margin-bottom: var(--spacing-sm);
}
.partner-photo {
  border-radius: var(--radius-lg); max-width: 400px; width: 100%;
  box-shadow: var(--shadow-sm); margin: 0 auto;
}

/* ==========================================================================
   6. FAQ
   ========================================================================== */
.faq { background: var(--color-bg-alt); padding: var(--spacing-2xl) 0; }

.faq-list { max-width: 700px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--color-border); border-radius: var(--radius);
  margin-bottom: 0.5rem; background: var(--color-white);
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.25rem; font-weight: 600; font-size: 1rem;
  cursor: pointer; list-style: none; display: flex;
  justify-content: space-between; align-items: center;
  color: var(--color-text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.4rem; font-weight: 300;
  color: var(--color-accent); transition: transform var(--transition);
  flex-shrink: 0; margin-left: 1rem;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { border-bottom: 1px solid var(--color-border); }

.faq-item p, .faq-item ul {
  padding: 1rem 1.25rem; font-size: 0.95rem;
  color: var(--color-text-light); line-height: 1.7;
}

.faq-cta { text-align: center; margin-top: var(--spacing-xl); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--color-text); color: var(--color-white);
  padding: var(--spacing-xl) 0 var(--spacing-sm);
}

.footer-grid {
  display: flex; flex-direction: column; gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}
.footer-brand {
  font-size: 1.4rem; font-weight: 700; color: var(--color-white);
  margin-bottom: var(--spacing-sm);
}
.footer-brand span { font-weight: 400; }
.footer-about p { font-size: 0.85rem; color: #BBB; line-height: 1.6; }

.footer-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: flex-start; }
.footer-links a { color: #BBB; text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { color: var(--color-white); text-decoration: underline; }

@media (min-width: 768px) {
  .footer-links ul { justify-content: flex-end; }
}

/* Legal Sections (Impressum / Datenschutz) */
.legal-section {
  border-top: 1px solid #333; padding: 0.75rem 0;
}
.legal-section summary {
  color: #BBB; font-size: 0.85rem; cursor: pointer;
  font-weight: 600; list-style: none;
  display: flex; align-items: center; gap: 0.5rem;
}
.legal-section summary::-webkit-details-marker { display: none; }
.legal-section summary::before { content: "▸ "; font-size: 0.75rem; }
.legal-section[open] summary::before { content: "▾ "; }
.legal-section[open] summary { margin-bottom: 0.75rem; color: var(--color-white); }

.legal-content { font-size: 0.8rem; color: #AAA; line-height: 1.7; }
.legal-content p { margin-bottom: 0.5rem; }
.legal-content h4 { color: #CCC; font-size: 0.85rem; margin: 1rem 0 0.25rem; }
.legal-content a { color: #AAA; }
.legal-content a:hover { color: var(--color-white); }
.legal-content ul { margin: 0.5rem 0 0.5rem 1.5rem; }
.legal-content li { margin-bottom: 0.25rem; }

.footer-bottom { border-top: 1px solid #333; padding-top: var(--spacing-sm); text-align: center; }
.footer-bottom p { font-size: 0.8rem; color: #999; }

/* Twingle Embed Responsiveness */
#twingle-container iframe { width: 100%; border: none; }

/* ==========================================================================
   RESPONSIVE — Tablet (768px+)
   ========================================================================== */
@media (min-width: 768px) {
  .container { padding: 0 2rem; }

  .hero { padding: var(--spacing-2xl) 0; }
  .hero-inner { flex-direction: row; align-items: flex-start; gap: var(--spacing-xl); }
  .hero-content { flex: 1; padding-top: var(--spacing-sm); }
  .hero-content h1 { font-size: 2.25rem; }
  .hero-img { display: none; } /* Desktop: Bild verstecken, Formular hat Prioritaet */
  .hero-form { flex: 0 0 380px; }

  .impact-grid { grid-template-columns: repeat(3, 1fr); }

  .story-inner { flex-direction: row; align-items: center; gap: var(--spacing-xl); }
  .story-image { flex: 1; }
  .story-content { flex: 1; }

  .trust-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-grid { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

/* ==========================================================================
   RESPONSIVE — Desktop (1200px+)
   ========================================================================== */
@media (min-width: 1200px) {
  .hero-content h1 { font-size: 2.75rem; }
  .hero-subline { font-size: 1.15rem; }
  .hero-form { flex: 0 0 420px; }
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
}
