/* ── WEBFONTS ───────────────────────────────────────────────── */
@font-face {
  font-family: 'GrueneTypeNeue';
  src: url('/fonts/GrueneTypeNeue.woff2') format('woff2'),
       url('/fonts/GrueneTypeNeue.woff')  format('woff');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PT Sans';
  src: url('/fonts/ptsans_regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PT Sans';
  src: url('/fonts/ptsans_bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* Offizielle Grünen-Farbwelt */
  /* Offizielle Grünen-Farbwelt */
  --tanne:        #005538;   /* Pantone 7484C – aus Logo gesamplet  */
  --klee:         #007F3B;   /* Pantone 348C  – mittelgrün          */
  --grashalm:     #6AAF1A;   /* Pantone 368C  – hellgrün            */
  --himmel:       #009FDA;   /* Pantone 2925C – blau                */
  --sand:         #F3EFE8;   /* Pantone 663C  – sand                */
  --sonne:        #F0EC78;   /* Pantone 393C  – aus Logo gesamplet  */
  --hellgruen:    #5DB87A;   /* CMYK 60/0/64  – hellgrün            */
  --magenta:      #E5007D;   /* nur für Störer-Elemente             */
  --dunkelgrau:   #3C3C3C;

  /* Mappings für Komponenten */
  --forest:       var(--tanne);
  --leaf:         var(--klee);
  --meadow:       var(--grashalm);
  --pale:         #B8DFC5;
  --cream:        var(--sand);
  --cream-dark:   #EAE6DF;
  --sunflower:    var(--sonne);
  --sunflower-l:  #F5F4A0;
  --soil:         #1E2820;
  --muted:        #5E7265;
  --white:        #FFFFFF;
  --border:       #D0DCCB;
  --danger:       #C0392B;

  --font-display: 'GrueneTypeNeue', system-ui, sans-serif;
  --font-body:    'PT Sans', system-ui, sans-serif;

  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --sh-sm: 0 2px 8px rgba(0,77,36,.07);
  --sh-md: 0 6px 24px rgba(0,77,36,.10);
  --sh-lg: 0 16px 48px rgba(0,77,36,.13);
}

/* ── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--soil);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--leaf); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── APP SHELL ──────────────────────────────────────────────── */
#app-shell {
  max-width: 430px;
  margin: 0 auto;
  background: var(--white);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  box-shadow: var(--sh-lg);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

#page-content {
  flex: 1;
  padding-bottom: 70px;
  overflow-y: auto;
}

/* ── BOTTOM NAV ─────────────────────────────────────────────── */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px 14px;
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(0,77,36,.08);
}

.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; padding: 4px 10px; border-radius: var(--r-sm);
  background: none; border: none; font-family: var(--font-body);
  transition: background .15s;
}
.nav-item:hover { background: var(--cream); }
.nav-item .nav-icon { font-size: 1.3rem; line-height: 1; }
.nav-item .nav-label { font-size: .58rem; font-weight: 500; color: var(--muted); }
.nav-item.active { position: relative; }
.nav-item.active::before {
  content: '';
  position: absolute; top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 3px;
  background: var(--magenta); border-radius: 2px;
}
.nav-item.active .nav-label { color: var(--magenta); font-weight: 700; }

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--forest);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 110% -10%, #1B7A3E 0%, transparent 55%),
    radial-gradient(ellipse 80% 120% at -20% 120%, #003018 0%, transparent 50%),
    radial-gradient(ellipse 60% 60% at 80% 110%, #F4B40022 0%, transparent 40%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 40px; background: var(--white);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-inner { position: relative; z-index: 1; padding: 20px 22px 48px; }

.logo-group { display: flex; align-items: center; gap: 10px; }
.logo-sunflower {
  width: 40px; height: 40px;
  background: var(--sunflower); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(244,180,0,.25);
}
.logo-text strong { display: block; font-size: .85rem; font-weight: 600; color: white; }
.logo-text small  { font-size: .65rem; opacity: .65; font-weight: 300; color: white; }

.election-pill {
  background: rgba(229,0,125,.15); border: 1px solid rgba(229,0,125,.4);
  color: var(--magenta); font-size: .65rem; font-weight: 600;
  letter-spacing: .8px; text-transform: uppercase; border-radius: 20px; padding: 4px 10px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 800; color: white;
  line-height: 1.12; letter-spacing: -.5px; margin-bottom: 12px;
}
.hero-headline em { color: var(--sunflower); font-style: normal; }
.hero-sub { font-size: .88rem; color: rgba(255,255,255,.72); line-height: 1.6; font-weight: 300; margin-bottom: 22px; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  font-family: var(--font-body); font-weight: 600; font-size: .85rem;
  border: none; border-radius: var(--r-sm); padding: 11px 18px;
  cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:active { transform: scale(.97); }
.btn-gold {
  background: var(--sunflower); color: var(--forest);
  box-shadow: 0 4px 14px rgba(244,180,0,.35); flex: 1;
}
.btn-gold:hover { background: #e6a800; }
.btn-ghost {
  background: rgba(255,255,255,.1); color: white;
  border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255,255,255,.18); }
.btn-green {
  background: var(--leaf); color: white;
  box-shadow: 0 4px 14px rgba(42,125,62,.3);
}
.btn-green:hover { background: var(--forest); }

/* ── SECTION HEADER ──────────────────────────────────────── */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 22px 20px 12px;
}
.section-title {
  font-family: var(--font-display); font-size: 1.15rem;
  font-weight: 700; color: var(--forest); letter-spacing: -.2px;
}
.section-link { font-size: .72rem; font-weight: 600; color: var(--magenta); }

/* ── QUICK GRID ──────────────────────────────────────────── */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.quick-tile {
  background: var(--cream); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 14px 14px 12px;
  cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
  display: flex; flex-direction: column; gap: 8px;
}
.quick-tile:hover { background: var(--cream-dark); border-color: var(--meadow); transform: translateY(-2px); }
.quick-tile-icon { font-size: 1.5rem; line-height: 1; }
.quick-tile-title { font-size: .8rem; font-weight: 600; color: var(--forest); }
.quick-tile-sub   { font-size: .67rem; color: var(--muted); font-weight: 300; }

/* ── POLL CARD ───────────────────────────────────────────── */
.poll-card {
  background: var(--forest); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--sh-md); position: relative;
}
.poll-card::before {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(244,180,0,.12) 0%, transparent 70%);
  pointer-events: none;
}
.poll-header { padding: 16px 18px 14px; display: flex; align-items: center; justify-content: space-between; }
.poll-label { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,.55); }
.live-dot { display: flex; align-items: center; gap: 5px; font-size: .65rem; font-weight: 600; color: var(--sunflower); }
.live-dot::before {
  content: ''; width: 6px; height: 6px; background: var(--sunflower); border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(244,180,0,.3); animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 2px rgba(244,180,0,.3); } 50% { box-shadow: 0 0 0 5px rgba(244,180,0,.1); } }
.poll-question { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: white; line-height: 1.3; padding: 0 18px 16px; }
.poll-bars { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.poll-item-row { display: flex; justify-content: space-between; margin-bottom: 5px; }
.poll-item-label { font-size: .75rem; color: rgba(255,255,255,.8); }
.poll-item-pct   { font-size: .75rem; color: var(--sunflower); font-weight: 700; }
.poll-track { height: 8px; background: rgba(255,255,255,.1); border-radius: 4px; overflow: hidden; }
.poll-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--meadow), #8ED4A0);
  transform-origin: left; animation: growBar .9s cubic-bezier(.4,0,.2,1) both;
}
.poll-fill.top { background: linear-gradient(90deg, var(--sunflower), #FFD55A); }
@keyframes growBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.poll-meta { padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; }
.poll-votes { font-size: .68rem; color: rgba(255,255,255,.45); }
.poll-vote-btn {
  background: rgba(255,255,255,.1); color: white;
  border: 1px solid rgba(255,255,255,.2); border-radius: 20px;
  padding: 5px 12px; font-size: .68rem; font-weight: 600;
  cursor: pointer; font-family: var(--font-body); transition: background .15s;
}
.poll-vote-btn:hover { background: rgba(255,255,255,.18); }
.poll-voted { font-size: .72rem; color: var(--sunflower); font-weight: 600; padding: 8px 18px 14px; }

/* ── EVENT CARD ──────────────────────────────────────────── */
.events-list { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.event-card {
  display: flex; align-items: stretch; gap: 12px;
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 13px 14px;
  box-shadow: var(--sh-sm); cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.event-card:hover { box-shadow: var(--sh-md); border-color: var(--pale); }
.event-date-block {
  background: var(--forest); color: white; border-radius: var(--r-sm);
  min-width: 42px; text-align: center; padding: 7px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
}
.event-date-day   { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; line-height: 1; }
.event-date-month { font-size: .6rem; font-weight: 500; opacity: .7; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.event-title { font-size: .85rem; font-weight: 600; color: var(--soil); margin-bottom: 4px; line-height: 1.3; }
.event-meta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.event-meta-item { font-size: .68rem; color: var(--muted); font-weight: 300; }
.event-tag { font-size: .6rem; font-weight: 600; border-radius: 4px; padding: 2px 6px; background: var(--cream); color: var(--leaf); border: 1px solid var(--border); margin-top: 5px; display: inline-block; }

/* ── FEED CARD ───────────────────────────────────────────── */
.feed-list { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.feed-card {
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--sh-sm); cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.feed-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.feed-accent { height: 4px; }
.accent-news      { background: linear-gradient(90deg, var(--forest), var(--meadow)); }
.accent-action    { background: linear-gradient(90deg, var(--sunflower), #FFD55A); }
.accent-community { background: linear-gradient(90deg, var(--leaf), var(--pale)); }
.feed-body { padding: 13px 14px; }
.feed-tag-row { margin-bottom: 7px; }
.feed-tag { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; border-radius: 4px; padding: 3px 7px; }
.tag-Wahlkampf         { background: rgba(229,0,125,.08); color: var(--magenta); border: 1px solid rgba(229,0,125,.25); }
.tag-Mitmachen         { background: var(--sunflower-l); color: #7A5A00; border: 1px solid #F4B40040; }
.tag-Brgerbeteiligung  { background: #E8F4EE; color: var(--leaf); border: 1px solid #B8DFC540; }
.tag-Pressemitteilung  { background: #F0F0F0; color: #444; border: 1px solid #ddd; }
.feed-title   { font-family: var(--font-display); font-size: .95rem; font-weight: 700; color: var(--soil); line-height: 1.35; margin-bottom: 5px; }
.feed-excerpt { font-size: .75rem; color: var(--muted); line-height: 1.55; font-weight: 300; margin-bottom: 9px; }
.feed-footer-row { display: flex; align-items: center; justify-content: space-between; }
.feed-date  { font-size: .65rem; color: var(--muted); font-weight: 300; }
.feed-more  { font-size: .7rem; font-weight: 600; color: var(--magenta); }

/* ── CTA BANNER ──────────────────────────────────────────── */
.cta-banner {
  margin: 16px 16px 0;
  background: linear-gradient(135deg, var(--leaf) 0%, var(--forest) 100%);
  border-radius: var(--r-lg); padding: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: var(--sh-md); position: relative; overflow: hidden;
}
.cta-banner::before { content: '🌻'; position: absolute; right: -10px; bottom: -10px; font-size: 5rem; opacity: .12; pointer-events: none; }
.cta-banner-text strong { display: block; font-size: 1rem; font-weight: 700; color: white; margin-bottom: 3px; }
.cta-banner-text span   { font-size: .75rem; color: rgba(255,255,255,.7); font-weight: 300; }
.btn-banner { background: var(--sunflower); color: var(--forest); border-radius: var(--r-sm); padding: 9px 14px; font-size: .78rem; font-weight: 700; white-space: nowrap; cursor: pointer; border: none; font-family: var(--font-body); flex-shrink: 0; }

/* ── SPINNER ─────────────────────────────────────────────── */
.spinner-wrap { display: flex; justify-content: center; padding: 40px 0; }
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--leaf); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty p { font-size: .85rem; line-height: 1.5; }

/* ── FORM ────────────────────────────────────────────────── */
.form-wrap { padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: .75rem; font-weight: 600; color: var(--forest); }
.form-input, .form-textarea, .form-select {
  font-family: var(--font-body); font-size: .85rem;
  background: var(--cream); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 10px 12px; color: var(--soil);
  transition: border-color .15s;
  width: 100%;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(229,0,125,.1);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-submit { margin-top: 4px; }
.form-success { background: var(--cream); border: 1.5px solid var(--pale); border-radius: var(--r-md); padding: 16px; text-align: center; }
.form-success p { font-size: .85rem; color: var(--forest); font-weight: 500; }
.form-error { font-size: .75rem; color: var(--danger); margin-top: 4px; }

/* ── DETAIL VIEW ─────────────────────────────────────────── */
.detail-back { display: flex; align-items: center; gap: 6px; padding: 14px 16px; font-size: .82rem; font-weight: 600; color: var(--magenta); cursor: pointer; }
.detail-back::before { content: '←'; }
.detail-body { padding: 0 20px 32px; }
.detail-tag-row { margin-bottom: 10px; }
.detail-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--soil); line-height: 1.25; margin-bottom: 10px; }
.detail-meta  { font-size: .72rem; color: var(--muted); margin-bottom: 20px; }
.detail-content { font-size: .88rem; line-height: 1.7; color: var(--soil); }
.detail-content p  { margin-bottom: 12px; }
.detail-content h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 20px 0 8px; color: var(--forest); }

/* ── CANDIDATE CARD ──────────────────────────────────────── */
.candidate-list { padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.candidate-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 14px; box-shadow: var(--sh-sm);
}
.candidate-photo {
  width: 60px; height: 60px; border-radius: 50%; object-fit: cover;
  background: var(--cream-dark); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
}
.candidate-num { font-size: .65rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.candidate-name { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--soil); }
.candidate-position { font-size: .75rem; color: var(--leaf); font-weight: 600; margin-bottom: 5px; }
.candidate-bio {
  font-size: .75rem; color: var(--muted); line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.candidate-bio-more {
  display: none;
  font-size: .72rem; font-weight: 600; color: var(--leaf);
  margin-top: 2px;
}

/* ── PAGE TRANSITIONS ────────────────────────────────────── */
.page-enter { animation: fadeUp .3s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── APP FOOTER ─────────────────────────────────────────────── */
#app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--cream-dark, #ede9e3);
  border-top: 1px solid var(--border, #ddd);
}
.footer-link {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: .68rem;
  color: var(--muted, #888);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-link:hover { color: var(--forest, #004D24); }
.footer-sep { font-size: .65rem; color: var(--border, #ccc); }
.footer-copy { font-size: .65rem; color: var(--muted, #aaa); }
