/* --- Grundeinstellungen & FDP Farben --- */
:root {
  --fdp-yellow: #FFED00;
  --fdp-blue: #009EE3;
  --fdp-magenta: #E5007D;
  --text-dark: #333;
  --text-light: #555; 
  --bg-color: #F0F4F8; 
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  margin: 0; padding: 0; font-family: var(--font-main); background-color: var(--bg-color);
  overflow-x: hidden; color: var(--text-dark); -webkit-font-smoothing: antialiased;
}

/* --- Navigation --- */
nav {
  position: fixed; top: 0; width: 100%; height: 80px; display: flex; justify-content: space-between;
  align-items: center; padding: 0 30px; background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05); z-index: 1000; box-sizing: border-box;
}
.logo img { height: 50px; width: auto; cursor: pointer; }
.menu { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; justify-content: flex-end; }
.menu li a {
  text-decoration: none; color: var(--fdp-blue); font-weight: 700; font-size: 13px; text-transform: uppercase;
  padding: 10px 12px; border-radius: 6px; transition: all 0.2s ease;
}
.menu li a:hover { background-color: var(--fdp-yellow); color: var(--fdp-magenta); }

/* --- Startseite --- */
#home {
  height: 100vh; width: 100%; position: relative; background-image: url('hintergrund.png'); 
  background-size: cover; background-position: center; display: flex; justify-content: center; align-items: center;
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 30, 60, 0.3); z-index: 1; }
.hero-content { z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 25px; padding: 20px; }
.text-box-1 {
  font-size: 3rem; font-weight: 900; color: var(--fdp-yellow); background-color: var(--fdp-magenta);
  padding: 15px 30px; text-transform: uppercase; box-shadow: 8px 8px 0px var(--fdp-blue); text-align: center; line-height: 1.1;
}
.typing-wrapper { display: inline-block; background-color: var(--fdp-blue); padding: 10px 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.text-box-2 {
  font-size: 1.5rem; color: white; font-weight: 700;
  white-space: nowrap; overflow: hidden; border-right: 3px solid white; width: 0;
  animation: typing 3.5s steps(40, end) forwards, blink .75s step-end infinite;
}
@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink { from, to { border-color: transparent } 50% { border-color: white } }

/* --- Unterseiten Allgemein --- */
.page { min-height: 100vh; box-sizing: border-box; }
.hidden { display: none !important; }
.page:not(#home) { padding-top: 100px; background-color: var(--bg-color); display: flex; justify-content: center; align-items: flex-start; padding-bottom: 60px; }
.content-container { background: transparent; text-align: left; max-width: 1100px; width: 100%; padding: 0 20px; }
.full-width-container { max-width: 1200px; }
.page h1 { font-size: 2.2rem; font-weight: 900; color: var(--fdp-blue); margin-top: 20px; text-transform: uppercase; text-align: center; letter-spacing: -0.5px; }
.page h2 { color: var(--fdp-magenta); text-align: center; font-weight: 700; font-size: 1.2rem; margin-bottom: 60px; text-transform: uppercase; letter-spacing: 1px; }

/* --- ALLGEMEINES AUFKLAPP-DESIGN --- */
.expandable-card {
  background: white; border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.expandable-card:hover { box-shadow: 0 8px 25px rgba(0,158,227,0.15); }

/* WICHTIG: Flexbox richtet den Text links und das + immer perfekt rechts (unten) aus! */
.card-header { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-end; /* Drückt das Icon nach rechts */
    position: relative; cursor: pointer; padding: 25px; 
}
.header-text { width: 100%; } /* Text nimmt volle Breite ein */

.toggle-icon { 
    font-size: 2rem; font-weight: 300; color: var(--fdp-magenta); 
    transition: transform 0.3s ease; line-height: 1; 
    margin-top: 15px; /* Abstand nach oben zum Text */
    display: inline-block;
}

.card-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out, padding 0.4s ease; padding: 0 25px; background: #fafafa; }
.expandable-card.expanded .card-content { max-height: 1500px; padding: 20px 25px 30px; border-top: 1px solid #eee; }
.expandable-card.expanded .toggle-icon { transform: rotate(45deg); }

/* --- KANDIDATEN --- */
.candidates-list { display: flex; flex-direction: column; gap: 40px; max-width: 900px; margin: 0 auto; }
.candidate-card { display: flex; align-items: stretch; border-radius: 20px; opacity: 1; }
.candidate-card:nth-child(even) { flex-direction: row-reverse; text-align: right; }
.candidate-img { width: 40%; min-height: 300px; overflow: hidden; }
.candidate-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.candidate-card:hover .candidate-img img { transform: scale(1.05); }

.candidate-info { width: 60%; position: relative; display: flex; flex-direction: column; justify-content: flex-start; }
.candidate-info .card-header { padding: 40px; padding-right: 60px; }
.candidate-card:nth-child(even) .candidate-info .card-header { padding-right: 40px; padding-left: 60px; align-items: flex-start; /* Plus nach links bei rechten Kacheln */ }

.list-number { position: absolute; top: 20px; right: 30px; font-size: 4rem; font-weight: 900; color: rgba(0,0,0,0.03); pointer-events: none; z-index: 0; }
.candidate-card:nth-child(even) .list-number { right: auto; left: 30px; }

.candidate-info h3 { font-size: 1.6rem; font-weight: 800; color: var(--fdp-blue); margin: 0 0 10px 0; position: relative; z-index: 1;}
.candidate-info p { font-size: 1.1rem; color: var(--text-light); line-height: 1.5; margin: 0; position: relative; z-index: 1;}

.candidate-card .card-content { padding: 0 40px; }
.candidate-card.expanded .card-content { padding: 0 40px 30px 40px; }

/* Listen in Kandidatenkarten (Damit alles wie bei Julius aussieht) */
.candidate-card .card-content ul { list-style: none; padding: 0; margin: 0; text-align: left; }
.candidate-card .card-content li { position: relative; padding-left: 20px; margin-bottom: 12px; color: var(--text-dark); line-height: 1.5; font-size: 1rem; }
.candidate-card .card-content li::before { content: '■'; position: absolute; left: 0; color: var(--fdp-magenta); font-size: 0.9rem; top: 2px; }

/* --- WAHLPROGRAMM --- */
.program-container { max-width: 900px; text-align: center; }
.program-logo { width: 100%; max-width: 350px; margin: 0 auto 40px; display: block; }
.program-lead { font-size: 1.2rem; line-height: 1.6; color: var(--text-dark); margin: 0 auto 40px; max-width: 800px; text-align: center; font-weight: 500; }

.program-hero-section { display: flex; flex-direction: column; align-items: center; margin: 80px 0 60px; position: relative; }
.program-highlight-block {
    background-color: var(--fdp-magenta); color: var(--fdp-yellow); font-size: 2.2rem; font-weight: 900;
    padding: 15px 30px; text-transform: uppercase; box-shadow: 8px 8px 0px var(--fdp-blue);
    z-index: 2; margin-bottom: -25px; text-align: center; width: 90%; max-width: 750px; line-height: 1.2;
    opacity: 0; transform: translateY(40px); transition: all 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.program-highlight-block.visible { opacity: 1; transform: translateY(0); }

.program-hero-img-simple { width: 100%; max-width: 900px; border-radius: 8px; object-fit: cover; z-index: 1; box-shadow: 0 10px 30px rgba(0,0,0,0.1); display: block; }
.program-text-block { text-align: left; margin-bottom: 30px; }
.program-subtitle { font-size: 1.6rem; font-weight: 800; color: var(--fdp-blue); margin-bottom: 15px; }
.program-intro-text { font-size: 1.1rem; color: var(--text-light); line-height: 1.6; }

/* Kacheln im Programm (Flexbox horizontal für Titel & Plus) */
.program-list { display: flex; flex-direction: column; gap: 20px; text-align: left; margin-bottom: 50px; }
.program-card { border-left: 8px solid var(--fdp-blue); transition: all 0.3s ease; }
.program-card:hover { border-left-color: var(--fdp-magenta); transform: translateY(-3px); }

.program-card .card-header { 
    flex-direction: row; /* Hier Titel links, Plus rechts nebeneinander */
    align-items: center; 
}
.program-card .toggle-icon { margin-top: 0; margin-left: 20px; } /* Überschreibt Margin von oben */

.program-card .header-text h3 { margin: 0 0 5px 0; font-weight: 800; color: var(--text-dark); font-size: 1.3rem; }
.program-card .summary { margin: 0; color: var(--text-light); font-size: 1rem; line-height: 1.4; padding-right: 30px; }
.program-card .card-content ul { list-style: none; padding: 0; margin: 0; }
.program-card .card-content li { position: relative; padding-left: 20px; margin-bottom: 12px; color: var(--text-dark); line-height: 1.5; font-size: 1rem; }
.program-card .card-content li::before { content: '■'; position: absolute; left: 0; color: var(--fdp-magenta); font-size: 0.9rem; top: 2px; }

/* Outro */
.program-outro { 
  font-size: 1.2rem; font-style: italic; color: var(--text-dark); margin: 60px auto; 
  border-left: 5px solid var(--fdp-magenta); padding-left: 20px; text-align: left; max-width: 800px; line-height: 1.6;
}

.animate-on-scroll, .animate-fade-in { opacity: 0; transform: translateY(20px); transition: all 0.6s ease-out; }
.animate-on-scroll.visible, .animate-fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- FINALE ANIMATION --- */
.election-finale { margin-top: 60px; margin-bottom: 40px; text-align: center; }
.vote-box { width: 80px; height: 80px; border: 5px solid var(--fdp-blue); border-radius: 12px; margin: 0 auto 20px auto; position: relative; background: white; }
.vote-text { display: flex; flex-direction: column; gap: 5px; }
.vote-date { font-size: 2rem; font-weight: bold; color: var(--text-dark); }
.vote-party { font-size: 4rem; font-weight: 900; color: var(--fdp-magenta); background: var(--fdp-yellow); display: inline-block; padding: 0 20px; margin: 0 auto; transform: rotate(-3deg); }
.cross-line { position: absolute; background: var(--fdp-magenta); border-radius: 4px; }
.line1 { width: 0; height: 8px; top: 15px; left: 10px; transform-origin: top left; transform: rotate(45deg); transition: width 0.4s ease 0.5s; }
.line2 { width: 0; height: 8px; top: 15px; right: 10px; transform-origin: top right; transform: rotate(-45deg); transition: width 0.4s ease 0.9s; }
.election-finale.visible .line1 { width: 80px; }
.election-finale.visible .line2 { width: 80px; }

/* --- ANTRÄGE GRID --- */
.motions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; padding: 10px; }
.motion-card { background: white; border-radius: 12px; padding: 30px 20px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: all 0.3s ease; cursor: pointer; border-bottom: 5px solid var(--fdp-yellow); position: relative; top: 0; }
.motion-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,158,227,0.15); border-bottom-color: var(--fdp-magenta); }
.card-icon { font-size: 3rem; margin-bottom: 15px; }
.motion-card h3 { margin: 10px 0; font-weight: 800; color: var(--fdp-blue); font-size: 1.2rem; }
.motion-card p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 20px; }
.btn-text { color: var(--fdp-magenta); font-weight: bold; font-size: 0.9rem; text-transform: uppercase; }

/* --- PDF Viewer --- */
#pdf-viewer .content-container { background: white; border-radius: 12px; padding: 30px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); }
.back-btn { background: none; border: none; color: var(--fdp-blue); font-weight: bold; font-size: 1rem; cursor: pointer; margin-bottom: 20px; display: inline-block; padding: 0; }
.pdf-wrapper { border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: #eee; min-height: 500px; }
.pdf-fallback { text-align: center; padding: 20px; color: #666; }

/* --- Timeline (Geschichte) --- */
.timeline { position: relative; width: 100%; margin: 0 auto; }
.timeline::after { content: ''; position: absolute; width: 4px; background-color: var(--fdp-yellow); top: 0; bottom: 0; left: 50%; margin-left: -2px; border-radius: 2px; }
.timeline-item { padding: 10px 40px; position: relative; width: 50%; box-sizing: border-box; opacity: 1; }
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }
.timeline-item::after { content: ''; position: absolute; width: 20px; height: 20px; right: -10px; background-color: var(--fdp-magenta); border: 4px solid var(--bg-color); top: 20px; border-radius: 50%; z-index: 1; box-shadow: 0 0 0 2px var(--fdp-yellow); }
.timeline-item:nth-child(even)::after { left: -10px; }
.timeline-item h3 { background: white; padding: 20px 25px 5px 25px; margin: 0; border-radius: 12px 12px 0 0; box-shadow: 0 -5px 15px rgba(0,0,0,0.03); display: inline-block; font-weight: 800; color: var(--fdp-blue); font-size: 1.3rem; }
.timeline-item p { background: white; padding: 5px 25px 20px 25px; margin: 0; border-radius: 0 0 12px 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); color: var(--text-light); line-height: 1.6; }
.timeline-item .date { display: inline-block; background: var(--fdp-blue); color: white; padding: 4px 10px; border-radius: 4px; font-weight: bold; font-size: 0.8rem; margin-bottom: 5px; position: relative; z-index: 2; }

/* --- RECHTLICHES --- */
.legal-text { font-size: 1rem; color: var(--text-dark); line-height: 1.8; background: white; padding: 40px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.legal-heading { text-align: left !important; color: var(--fdp-blue) !important; font-size: 1.6rem !important; margin-top: 0; margin-bottom: 20px; border-bottom: 2px solid var(--fdp-yellow); padding-bottom: 10px; font-weight: 800; }
.legal-text h3 { color: var(--fdp-magenta); font-size: 1.2rem; font-weight: 700; margin-top: 30px; margin-bottom: 10px; }

/* --- MOBILE OPTIMIERUNG --- */
@media (max-width: 768px) {
    nav { padding: 10px; flex-direction: column; height: auto; position: relative; }
    .menu { justify-content: center; width: 100%; gap: 10px; padding-bottom: 10px;}
    .menu li a { font-size: 12px; padding: 10px 15px; background: #f0f0f0; width: 100%; display: block; text-align: center; }
    
    .text-box-1 { font-size: 1.8rem; padding: 10px 20px; }
    
    .candidate-card { flex-direction: column !important; text-align: left !important; height: auto; }
    .candidate-img { width: 100%; height: 250px; min-height: auto; }
    .candidate-info { width: 100%; padding: 0; }
    .candidate-info .card-header { padding: 25px; align-items: flex-end !important; /* + Icon immer unten rechts auf dem Handy */ }
    .candidate-card:nth-child(even) .candidate-info .card-header { padding: 25px; align-items: flex-end !important; }
    .candidate-card .card-content, .candidate-card.expanded .card-content { padding: 0 25px 25px 25px; }
    .list-number { display: none; }
    
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 20px; }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { left: 0; text-align: left; transform: translateY(0); }
    .timeline-item::after { left: 21px; }
    .timeline-item h3, .timeline-item p { display: block; width: 100%; }
    
    .legal-text { padding: 20px; }
    
    .program-logo { max-width: 280px; }
    .program-highlight-block { font-size: 1.5rem; padding: 10px 15px; margin-bottom: -15px; box-shadow: 5px 5px 0px var(--fdp-blue); }
    .program-subtitle { font-size: 1.3rem; }
    .card-header { padding: 20px; }
    .program-card .header-text h3 { font-size: 1.15rem; }
    .program-card .card-header { flex-direction: column; align-items: flex-end; }
    .program-card .toggle-icon { margin-left: 0; margin-top: 15px; }
}