/* ========================================
   Green Energy Atlas — Zentrales Stylesheet
   ======================================== */

:root {
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-head: 'Playfair Display', Georgia, serif;

  /* Basisfarben – hell & freundlich */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f0fdf4;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Grüne Akzentpalette */
  --accent: #2b7a4b;
  --accent-light: #4caf84;
  --accent-glow: rgba(44, 135, 78, 0.12);
  --accent-glow-strong: rgba(44, 135, 78, 0.20);

  --card-main-bg: var(--bg-card);
  --card-main-border: var(--border);
  --card-other-bg: #f8fafc;
  --card-other-border: #e2e8f0;

  /* Technologiefarben */
  --c-solar: #f59e0b;
  --c-wind-onshore: #06b6d4;
  --c-wind-offshore: #0e7490;
  --c-wasser: #3b82f6;
  --c-bio: #22c55e;
  --c-geo: #ef4444;
  --c-h2: #8b5cf6;
  --c-storage: #ec4899;
  --c-grid: #64748b;
  --c-industry: #f97316;
  --c-eco: #14b8a6;
  --c-conv: #78716c;
  --c-data: #0ea5e9;
  /* Rückwärtskompatible Aliase (veraltet, aber noch referenziert) */
  --c-wind: #06b6d4;   /* Alias für wind-onshore */
  --c-water: #3b82f6;  /* Alias für wasser */

  --radius: 20px;
  --radius-lg: 24px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  --shadow-glow: 0 8px 32px rgba(44, 135, 78, 0.10);
}

[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-card: #242424;
  --bg-hover: #1a2a1f;
  --bg-tertiary: #2d2d2d;
  --text-primary: #f5f5f5;
  --text-secondary: #d1d1d1;
  --text-muted: #9e9e9e;
  --border: #383838;
  --border-strong: #4a4a4a;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.6), 0 2px 4px -2px rgb(0 0 0 / 0.6);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.7), 0 4px 6px -4px rgb(0 0 0 / 0.7);
  --shadow-glow: 0 8px 32px rgba(44, 135, 78, 0.25);
  --accent-glow: rgba(44, 135, 78, 0.15);
  --accent-glow-strong: rgba(44, 135, 78, 0.30);
  --card-main-bg: var(--bg-card);
  --card-main-border: var(--border);
  --card-other-bg: #242424;
  --card-other-border: #383838;
}

/* ========== Reset & Base ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s, color 0.3s;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
a {
  color: var(--text-primary);
  text-decoration: none !important;
}
ul {
  list-style: none;
}
img,
svg {
  max-width: 100%;
  display: block;
}

/* ========== Navbar ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(var(--bg-secondary), 0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo span {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}
.nav-link {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-link:hover,
.nav-link:focus {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.search-wrapper {
  position: relative;
}
.global-search {
  width: 180px;
  padding: 0.4rem 2rem 0.4rem 0.9rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.8rem;
  transition: all var(--transition);
}
.global-search:focus {
  outline: none;
  border-color: var(--accent);
  width: 260px;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-clear {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.8rem;
}
.search-clear:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.global-search:not(:placeholder-shown)+.search-clear {
  opacity: 1;
  pointer-events: auto;
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 340px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  display: none;
  padding: 0.4rem;
}
.search-dropdown.active {
  display: block;
}
.search-item {
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.search-item:hover {
  background: var(--bg-hover);
}
.search-item strong {
  color: var(--text-primary);
  font-weight: 500;
}
.search-item small {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: all var(--transition);
  font-size: 1.1rem;
}
.theme-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}
/* Dark mode active: show sun (click = go to light) */
.theme-icon-sun {
  display: block;
}
.theme-icon-moon {
  display: none;
}
/* Light mode active: show moon (click = go to dark) */
[data-theme="light"] .theme-icon-moon {
  display: block;
}
[data-theme="light"] .theme-icon-sun {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: background var(--transition);
  background: transparent;
  border: none;
}
.nav-toggle:hover {
  background: var(--bg-hover);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  padding: 85px 1.5rem 2.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu .nav-link {
  font-size: 1.15rem;
  font-weight: 500;
  padding: 0.65rem 1.2rem;
  width: 100%;
  max-width: 280px;
  text-align: center;
  border-radius: var(--radius-xs);
}

/* ========== Main & Pages ========== */
main {
  padding-top: 68px;
  min-height: calc(100vh - 68px);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== Hero ========== */
.hero {
  text-align: center;
  padding: 4rem 2rem 3rem;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 70%);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  background: var(--bg-card);
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}
.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin-bottom: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ========== Section Header ========== */
.section-header {
  margin-bottom: 2.5rem;
}
.section-header h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 600;
}
.section-header h2 .accent {
  color: var(--accent);
}
.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 600px;
  line-height: 1.6;
}

/* ========== Cards ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.5rem;
  min-height: 300px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  position: relative;
  overflow: hidden;
}
.card > *:not(.card-illustration) {
  position: relative;
  z-index: 2;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
  border-color: var(--accent);
}
.card.main-tech {
  background: var(--card-main-bg);
  border-color: var(--card-main-border);
}
.card.main-tech:hover {
  border-color: var(--accent);
}
.card.other-tech {
  background: var(--card-other-bg);
  border-color: var(--card-other-border);
}
.card.other-tech:hover {
  border-color: var(--accent);
}

/* ========================================
   MAIN TECH CARD ILLUSTRATIONS (LINE-ART HOVER EFFECT)
   ======================================== */
.card-illustration {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 145px;
  height: 145px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.20;
  transition: opacity 0.4s ease, transform 0.4s ease;
  color: var(--text-primary);
}

[data-theme="dark"] .card-illustration {
  opacity: 0.25;
}

.card.main-tech:hover .card-illustration {
  opacity: 0.85;
  transform: scale(1.04);
}

/* Ruhezustand: Stehbild! Alle Animationen stehen still */
.card-illustration * {
  animation-play-state: paused !important;
}

/* Hover-Zustand: Das Stehbild erwacht nahtlos zum Leben */
.card:hover .card-illustration * {
  animation-play-state: running !important;
}

/* Animationen */
.rotor-spin-group {
  animation: spinRotor 3.5s linear infinite;
}
@keyframes spinRotor {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.wave-anim-1 {
  animation: waveSway 2.5s ease-in-out infinite;
}
.wave-anim-2 {
  animation: waveSway 3s ease-in-out infinite reverse;
}
@keyframes waveSway {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-6px); }
}

.sun-anim-group .sun-rays {
  transform-origin: 86px 26px;
  animation: sunPulse 2s ease-in-out infinite;
}
@keyframes sunPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

.waterwheel-spin-group {
  animation: spinWheel 4s linear infinite;
}
@keyframes spinWheel {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.water-cascade {
  animation: waterCascadePulse 1.8s ease-in-out infinite;
}
@keyframes waterCascadePulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.water-anim-1 {
  animation: waterFlow 2s ease-in-out infinite;
}
.water-anim-2 {
  animation: waterFlow 2.4s ease-in-out infinite reverse;
}
@keyframes waterFlow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

.stalk-anim-group {
  animation: stalkSway 3.2s ease-in-out infinite;
}
@keyframes stalkSway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(6deg); }
}

.bubble-anim-1 {
  animation: bubbleRise 2s ease-in-out infinite;
}
.bubble-anim-2 {
  animation: bubbleRise 2.5s ease-in-out infinite 0.7s;
}
@keyframes bubbleRise {
  0% { transform: translateY(0); opacity: 0.3; }
  50% { opacity: 0.9; }
  100% { transform: translateY(-12px); opacity: 0; }
}

.steam-anim-group .steam-1 {
  animation: steamRise 2.2s ease-in-out infinite;
}
.steam-anim-group .steam-2 {
  animation: steamRise 2.2s ease-in-out infinite 0.5s;
}
@keyframes steamRise {
  0% { transform: translateY(0); opacity: 0.35; }
  50% { opacity: 0.9; }
  100% { transform: translateY(-8px); opacity: 0.15; }
}
.card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}
.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}
.main-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  letter-spacing: 0.03em;
  margin-bottom: 0.6rem;
  opacity: 0.85;
  text-transform: uppercase;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
  border: 1px solid var(--border);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow-strong);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--bg-hover);
}

/* ========== Breadcrumb ========== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--accent);
  font-weight: 500;
}
.breadcrumb span {
  color: var(--text-muted);
}

/* ========== Detail / Steckbrief ========== */
.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.detail-header {
  padding: 2rem 2.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.detail-header h2 {
  font-size: 1.7rem;
  font-weight: 600;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  padding: 0;
}
.detail-metric {
  background: var(--bg-card);
  padding: 1.2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.detail-metric label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 500;
}
.detail-metric span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.detail-academic {
  padding: 2rem 2.5rem;
  border-bottom: 1px solid var(--border);
}
.detail-academic h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
  color: var(--accent);
}
.detail-academic p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.92rem;
}
.detail-section {
  padding: 2rem 2.5rem;
}
.detail-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.timeline-vertical {
  position: relative;
  padding-left: 1.5rem;
}
.timeline-vertical::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
}
.timeline-item {
  position: relative;
  margin-bottom: 1.1rem;
  padding-left: 1.25rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--item-color, var(--text-muted));
  border: 3px solid var(--bg-card);
}
.timeline-item .year {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--item-color, var(--text-primary));
  margin-bottom: 0.1rem;
}
.timeline-item .text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========== Compare ========== */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}
.chip {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  font-weight: 500;
}
.chip:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-hover);
}
.chip.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}
.compare-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.chart-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.chart-box h4 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.chart-bar-wrap {
  display: grid;
  grid-template-columns: minmax(80px, 35%) 1fr minmax(40px, 15%);
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.chart-bar-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: left;
}
.chart-bar-track {
  height: 20px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
}
.chart-bar-value {
  text-align: right;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.chart-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.compare-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.compare-summary h4 {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.compare-summary p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}
.lcoe-info-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.lcoe-info-box h4 {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.lcoe-info-box p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* ========== Calculator ========== */
.calculator-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--text-secondary);
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.calc-results {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}
.calc-result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}
.calc-result-item strong {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 700;
}
.calc-result-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}
.calc-hint {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  background: var(--accent-glow);
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  border-left: 3px solid var(--accent);
}
.calc-explanation {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.calc-explanation h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
  font-weight: 600;
}
.calc-explanation strong {
  color: var(--text-primary);
}
.calc-explanation ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 0.3rem;
}
.calc-explanation ul li {
  margin-bottom: 0.2rem;
}
.quick-select-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}
.quick-select-chips .chip {
  flex: 1 1 140px;
  min-width: 120px;
  padding: 0.5rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  text-align: center;
}
.quick-select-chips .chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.25rem 0;
}
.slider-wrapper input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 4px;
  outline: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  transition: background-size 0.1s ease;
}
.slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-card);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.slider-wrapper input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-card);
}
.slider-value {
  font-weight: 600;
  min-width: 80px;
  text-align: right;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ========== Simulator ========== */
.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2rem;
}
.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.sim-slider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.sim-slider label {
  width: 120px;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}
.sim-slider input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  height: 4px;
  cursor: pointer;
  background: var(--border);
  border-radius: 2px;
  -webkit-appearance: none;
  appearance: none;
}
.sim-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-card);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.sim-slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-card);
}
.sim-slider span {
  width: 44px;
  text-align: right;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.sim-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
#simChart {
  max-width: 300px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
}
.sim-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  width: 100%;
}
.sim-metric {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.sim-metric .value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}
.sim-metric .label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
  font-weight: 500;
}
.info-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.info-box h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
  font-weight: 600;
}
.info-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== Map ========== */
.map-wrapper {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #e9f0f8;
  transition: background var(--transition), border-color var(--transition);
}
[data-theme="dark"] .map-wrapper {
  background: #090e17;
  border-color: #1e293b;
}
.map-background-img {
  display: none;
}
.map-wrapper svg {
  display: block;
  width: 100%;
  height: auto;
}
.country {
  fill: #ffffff;
  stroke: #cbd5e1;
  stroke-width: 0.5px;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
}
[data-theme="dark"] .country {
  fill: #151e2e;
  stroke: #253347;
  vector-effect: non-scaling-stroke;
}
.country:hover {
  stroke: #ffffff !important;
  stroke-width: 1.6px !important;
  filter: brightness(1.22) drop-shadow(0 0 6px rgba(0, 0, 0, 0.35));
}
[data-theme="dark"] .country:hover {
  stroke: #ffffff !important;
  stroke-width: 1.6px !important;
  filter: brightness(1.32) drop-shadow(0 0 8px rgba(255, 255, 255, 0.35));
}
.mode-projects .country:hover {
  fill: var(--accent, #2b7a4b) !important;
}

/* Universelle Filterleiste über der Weltkarte */
.map-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.1rem;
  padding: 0.5rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.25s ease;
}
.map-filter-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.map-filter-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.map-filter-item.active {
  background: var(--bg-primary);
  border-color: var(--border);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.map-filter-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.country-tooltip {
  position: absolute;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 500;
  pointer-events: none;
  z-index: 20;
  white-space: nowrap;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -130%);
  transition: opacity 0.15s ease;
}
.map-marker {
  cursor: pointer;
  transition: all var(--transition);
}
.map-popup {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  max-width: 260px;
  z-index: 10;
  font-size: 0.85rem;
  pointer-events: none;
  animation: fadeIn 0.25s ease;
}
.map-popup h4 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
}
.map-popup p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.15rem;
}
.map-popup p strong {
  color: var(--text-primary);
  font-weight: 500;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
  justify-content: center;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ========== Map Zoom Controls (Unten links) ========== */
.map-zoom-controls {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: var(--radius-sm, 8px);
  padding: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  z-index: 30;
  user-select: none;
  backdrop-filter: blur(8px);
  transition: opacity 0.2s ease, border-color var(--transition), background var(--transition);
}

[data-theme="dark"] .map-zoom-controls {
  background: rgba(30, 41, 59, 0.92);
  border-color: #334155;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.map-zoom-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--text-primary, #0f172a);
  border-radius: var(--radius-xs, 6px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.map-zoom-btn:hover:not(:disabled) {
  background: var(--bg-card-hover, rgba(0, 0, 0, 0.07));
  color: var(--accent, #10b981);
}

[data-theme="dark"] .map-zoom-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent, #34d399);
}

.map-zoom-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.map-zoom-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  pointer-events: none;
}

/* Panning-Cursor auf der Karte */
.map-wrapper.can-pan svg {
  cursor: grab;
}

.map-wrapper.is-panning svg {
  cursor: grabbing;
}

.map-wrapper.can-pan .country,
.map-wrapper.can-pan .map-marker,
.map-wrapper.can-pan .potential-zone {
  cursor: pointer;
}

.map-wrapper.is-panning .country,
.map-wrapper.is-panning .map-marker,
.map-wrapper.is-panning .potential-zone {
  cursor: grabbing !important;
}

@media (max-width: 640px) {
  .map-zoom-controls {
    left: 10px;
    bottom: 10px;
    padding: 2px;
  }
  .map-zoom-btn {
    width: 32px;
    height: 32px;
  }
}

/* ========== Quiz ========== */
.quiz-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.quiz-mode-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.quiz-mode-btn:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.quiz-mode-btn strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
  font-weight: 600;
}
.quiz-mode-btn span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.quiz-progress {
  width: 100%;
  height: 5px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.quiz-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 3px;
}
.quiz-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.quiz-question {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  line-height: 1.45;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.quiz-option {
  text-align: left;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all var(--transition);
  font-size: 0.9rem;
  font-weight: 500;
}
.quiz-option:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--bg-hover);
}
.quiz-option:disabled {
  cursor: default;
}
.quiz-option.correct {
  background: rgba(34, 197, 94, 0.12);
  border-color: var(--c-bio);
  color: #166534;
}
[data-theme="dark"] .quiz-option.correct {
  color: #6fcf97;
}
.quiz-option.wrong {
  background: rgba(239, 68, 68, 0.10);
  border-color: var(--c-geo);
  color: #991b1b;
}
[data-theme="dark"] .quiz-option.wrong {
  color: #f87171;
}
.quiz-explanation {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.quiz-explanation strong {
  color: var(--text-primary);
  font-weight: 600;
}
.quiz-result {
  text-align: center;
  padding: 3rem 1rem;
}
.result-score {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  margin: 1rem 0;
}

/* ========== Timeline ========== */
.timeline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}
.filter-chip {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  font-weight: 500;
  user-select: none;
}
.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-hover);
}
.filter-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.timeline-accordion {
  position: relative;
  padding: 2rem 0;
}
.timeline-accordion::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 25%;
  width: 4px;
  background: var(--border-strong);
  transform: translateX(-50%);
  z-index: 0;
}
.timeline-epoch {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.timeline-epoch:hover { transform: scale(1.02); }
.epoch-left {
  width: 25%;
  display: flex;
  justify-content: flex-end;
  padding-right: 1.5rem;
  position: relative;
}
.epoch-left .epoch-connector {
  position: absolute;
  right: 0;
  top: 50%;
  width: 1.5rem;
  height: 2px;
  background: var(--border-strong);
  transform: translateY(-50%);
}
.epoch-hexagon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  background: var(--accent);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.2;
  padding: 0.5rem;
  box-shadow: var(--shadow-sm);
}
.epoch-right {
  width: 75%;
  display: flex;
  justify-content: flex-start;
  padding-left: 2rem;
  position: relative;
}
.epoch-right .epoch-connector {
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.5rem;
  height: 2px;
  background: var(--border-strong);
  transform: translateY(-50%);
}
.epoch-summary {
  background: var(--bg-card);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.8rem;
  transition: border-color 0.3s ease;
  flex: 1;
}
.timeline-epoch:hover .epoch-summary { border-color: var(--accent); }
.epoch-summary h4 {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}
.epoch-summary p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}
.epoch-details-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 1rem;
}
.timeline-epoch.open + .epoch-details-wrapper { max-height: 2000px; }
.epoch-details-inner {
  padding: 1rem 0 2rem 0;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-top: 0.5rem;
  margin-left: 0;
}
.sub-timeline-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  padding: 0.5rem 0;
}
.sub-left {
  width: 25%;
  display: flex;
  justify-content: flex-end;
  padding-right: 2rem;
  position: relative;
}
.sub-right {
  width: 75%;
  display: flex;
  justify-content: flex-start;
  padding-left: 2rem;
  position: relative;
}
.sub-hexagon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #fff;
  font-weight: 700;
  font-size: 0.7rem;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.sub-text {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex: 1;
  box-shadow: var(--shadow-sm);
}
.sub-connector {
  position: absolute;
  top: 50%;
  width: 1.5rem;
  height: 2px;
  background: var(--border-strong);
  transform: translateY(-50%);
}
.sub-left .sub-connector { right: 0; }
.sub-right .sub-connector { left: 0; }
@media (max-width: 768px) {
  .timeline-accordion::before { left: 25px; }
  .epoch-left, .sub-left { width: 35px; padding-right: 0.5rem; }
  .epoch-right, .sub-right { width: calc(100% - 35px - 1rem); padding-left: 1rem; }
  .epoch-left .epoch-connector, .sub-left .sub-connector { width: 10px; }
  .epoch-right .epoch-connector, .sub-right .sub-connector { width: 10px; left: -10px; }
  .epoch-hexagon { width: 60px; height: 60px; font-size: 0.7rem; }
  .sub-hexagon { width: 30px; height: 30px; font-size: 0.6rem; }
  .epoch-summary { padding: 0.8rem; }
  .epoch-summary h4 { font-size: 1rem; }
  .epoch-summary p { font-size: 0.8rem; }
  .sub-text { font-size: 0.75rem; padding: 0.3rem 0.5rem; }
  .epoch-details-inner { margin-left: 0; padding: 0.8rem; }
}

/* ========== News ========== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.news-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}
.news-card .news-tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-xs);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.news-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.news-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.news-card .news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.8rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.news-card .news-meta a {
  color: var(--accent);
  font-weight: 500;
}

/* ========== Footer ========== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  gap: 2.5rem;
  padding: 3rem 0;
}
.footer-col-wide {
  max-width: 320px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-head);
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.footer-logo span {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-col a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-col a:hover {
  color: var(--accent);
}
.footer-col a.active,
.footer a.active {
  color: var(--text-secondary) !important;
  background: transparent !important;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.2rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========== Imprint ========== */
.imprint-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.imprint-card h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.4rem;
  font-weight: 600;
  color: var(--accent);
}
.imprint-card h3 a,
.imprint-heading-link {
  color: inherit !important;
  text-decoration: none !important;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  cursor: pointer;
  display: inline;
}
.imprint-card h3 a:hover,
.imprint-card h3 a:focus,
.imprint-card h3 a:active {
  color: inherit !important;
  text-decoration: none !important;
}
.imprint-card h3:first-child {
  margin-top: 0;
}
.imprint-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.imprint-date {
  margin-top: 2rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
}

/* ========== Utilities ========== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.text-center {
  text-align: center;
}
.hidden {
  display: none !important;
}
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }

/* ========== Print ========== */
@media print {
  .navbar, .footer, .btn, .search-wrapper, .mobile-menu, .breadcrumb {
    display: none !important;
  }
  main { padding-top: 0 !important; }
  .detail-card { box-shadow: none !important; border: 1px solid #ccc !important; zoom: 82%; }
  body { background: #fff; color: #000; }
}

/* ========== Responsive ========== */
@media (min-width: 1025px) and (max-width: 1180px) {
  .nav-container { padding: 0 1.2rem; }
  .nav-menu { gap: 0.1rem; }
  .nav-link { padding: 0.35rem 0.5rem; font-size: 0.78rem; }
  .global-search { width: 140px; }
  .global-search:focus { width: 175px; }
}

@media (max-width: 1080px) {
  .nav-menu { display: none; }
  .nav-toggle { display: flex; }
  .global-search { width: 140px; }
  .global-search:focus { width: 160px; }
  .search-dropdown { width: 280px; right: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .simulator-layout { grid-template-columns: 1fr; }
  .nav-container { padding: 0 1.5rem; }
  .container { padding: 2.5rem 1.5rem; }
}

@media (max-width: 768px) {
  .nav-menu { display: none; }
  .nav-toggle { display: flex; }
  .global-search { width: 135px; }
  .global-search:focus { width: 155px; }
  .search-dropdown { width: 260px; right: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .compare-charts { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 1.2rem 2rem; }
  .section-header { margin-bottom: 1.6rem; }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }
  .card {
    min-height: auto;
    padding: 1.15rem 1rem 1rem;
    border-radius: var(--radius-md, 14px);
  }
  .card h3 {
    font-size: 1.05rem;
    line-height: 1.25;
    margin-bottom: 0.35rem;
  }
  .card p {
    font-size: 0.8rem;
    line-height: 1.4;
  }
  .card-illustration {
    width: 75px;
    height: 75px;
    right: -4px;
    bottom: -4px;
    opacity: 0.15;
  }
  .sim-metrics { grid-template-columns: 1fr 1fr; }
  .detail-header { padding: 1.25rem 1.5rem; }
  .detail-academic, .detail-section { padding: 1.25rem 1.5rem; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .calculator-card { padding: 1.5rem; }
  .quiz-modes { grid-template-columns: 1fr; }
  .imprint-card { padding: 1.5rem; }
  .calc-results { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .nav-container { padding: 0 0.8rem; }
  .global-search, .search-wrapper { display: none; }
  .hero { padding: 2rem 0.8rem 1.5rem; }
  .hero-title { font-size: 1.85rem; }
  .hero-subtitle { font-size: 0.88rem; }
  .hero-badge { font-size: 0.7rem; margin-bottom: 0.8rem; }
  .section-header { margin-bottom: 1.2rem; }
  .section-header h2 { font-size: 1.45rem; }
  .section-desc { font-size: 0.82rem; }
  .container { padding: 1.2rem 0.75rem; }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .card {
    min-height: auto;
    padding: 0.85rem 0.7rem 0.75rem;
    border-radius: var(--radius-sm, 10px);
  }
  .card h3 {
    font-size: 0.9rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  .card p {
    font-size: 0.73rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card-illustration {
    width: 52px;
    height: 52px;
    right: -3px;
    bottom: -3px;
    opacity: 0.12;
  }
  .card span {
    font-size: 0.68rem !important;
  }
  .detail-header { padding: 1rem 0.85rem; }
  .detail-academic, .detail-section { padding: 1rem 0.85rem; }
  .detail-metric { padding: 0.75rem 0.85rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .sim-metrics { grid-template-columns: 1fr; }
  .simulator-layout { gap: 1.5rem; }
  .map-popup { max-width: 200px; font-size: 0.75rem; padding: 0.7rem; }
}

@media (max-width: 360px) {
  .card-grid {
    gap: 0.45rem;
  }
  .card {
    padding: 0.75rem 0.55rem 0.65rem;
  }
  .card h3 {
    font-size: 0.82rem;
  }
  .card p {
    font-size: 0.68rem;
    -webkit-line-clamp: 3;
  }
}

/* ========================================
   Search Enhancements
   ======================================== */
.search-item mark {
  background: var(--accent-glow, rgba(44, 135, 78, 0.2));
  color: var(--accent, #2b7a4b);
  padding: 0 0.1rem;
  border-radius: 2px;
  font-weight: 600;
}
.search-item.search-active {
  background: var(--bg-hover, #f0fdf4);
  border-left: 3px solid var(--accent, #2b7a4b);
}
.search-item .search-type {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}
.search-glossary-def {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-style: italic;
  line-height: 1.4;
}

/* ========================================
   PRINT / PDF EXPORT STYLES
   ======================================== */
@media print {
  /* 1. Alles in Schwarz/Weiß bzw. hohem Kontrast für den Druck */
  :root {
    --bg-primary: #ffffff !important;
    --bg-secondary: #ffffff !important;
    --bg-card: #ffffff !important;
    --bg-tertiary: #f8f9fa !important;
    --text-primary: #000000 !important;
    --text-secondary: #333333 !important;
    --text-muted: #666666 !important;
    --border: #cccccc !important;
    --border-strong: #999999 !important;
  }

  body {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt; /* Besser lesbar auf Papier */
    line-height: 1.5;
  }

  /* 2. UI-Elemente ausblenden */
  .navbar,
  .header,
  .footer,
  .btn,
  .btn-primary,
  .btn-secondary,
  .search-wrapper,
  .theme-toggle,
  .nav-toggle,
  .mobile-menu,
  .glossary-tooltip {
    display: none !important;
  }

  /* 3. Layout anpassen (Container verbreitern, Margins entfernen) */
  .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  main {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* 4. Karten & Infoboxen stylen (Schatten entfernen, Ränder hinzufügen) */
  .card, 
  .info-box {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid; /* Verhindert Seitenumbruch innerhalb der Karte */
    page-break-inside: avoid;
    margin-bottom: 20px !important;
  }
  
  .detail-card {
    box-shadow: none !important;
    border: none !important;
    margin-bottom: 20px !important;
  }

  /* 5. Tabellen und Grids druckfreundlich machen */
  .compare-grid, 
  .card-grid {
    display: block !important; /* Fallback für alte Browser/PDF-Generatoren */
  }
  
  table {
    border-collapse: collapse !important;
    width: 100% !important;
    break-inside: auto;
  }
  tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  th, td {
    border: 1px solid #ccc !important;
    padding: 8px !important;
  }

  /* --- Spezieller Seitenumbruch für Detail-Seite --- */
  .detail-section {
    page-break-before: always;
    break-before: page;
    margin-top: 2rem !important;
  }

  /* 6. Überschriften und Texte */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    break-after: avoid;
    color: #000000 !important;
  }
  
  p, li, .academic-text, .detail-text {
    orphans: 3; /* Mindestens 3 Zeilen unten */
    widows: 3;  /* Mindestens 3 Zeilen oben */
  }

  /* 7. Links im Text */
  a {
    text-decoration: none !important;
    color: #000 !important;
  }
  
  /* Optional: URLs hinter Links im Text anzeigen (außer Bilder) */
  /* main a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 90%;
    color: #555;
  } */

  /* 8. Kopf-Information für das PDF hinzufügen (Quasi-Header) */
  @page {
    size: A4;
    margin: 2cm 1.5cm;
  }
  
  body::before {
    content: "Green Energy Atlas - Akademisches Dossier";
    display: block;
    font-family: var(--font-head);
    font-size: 14pt;
    font-weight: bold;
    text-align: center;
    border-bottom: 2px solid #000;
    margin-bottom: 15px; padding-bottom: 5px;
  }
}

/* Map Legend – Negativ-Filter Hover */
.map-legend-item {
  transition: opacity 0.2s, transform 0.15s;
  user-select: none;
}
.map-legend-item:hover {
  transform: scale(1.08);
}
.map-legend-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* ========================================
   Interaktive Weltkarten-Modi
   ======================================== */
.map-mode-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.9rem;
}
.map-mode-btn {
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}
.map-mode-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-hover);
}
.map-mode-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.map-subfilter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1.25rem;
  animation: fadeIn 0.25s ease;
}
.subfilter-chip {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
}
.subfilter-chip:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.subfilter-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(43, 122, 75, 0.3);
}

/* Handelsrouten Animation (Idee B) */
@keyframes flowDash {
  to {
    stroke-dashoffset: -30;
  }
}
.trade-route-path {
  stroke-dasharray: 6 4;
  animation: flowDash 1.5s linear infinite;
  cursor: pointer;
  transition: stroke-width 0.2s ease, opacity 0.2s ease;
}
.trade-route-path:hover {
  stroke-width: 4px !important;
  opacity: 1 !important;
  filter: drop-shadow(0 0 6px currentColor);
}

/* Gunstzonen (Idee A) */
.potential-zone {
  cursor: pointer;
  transition: fill-opacity 0.2s ease, stroke-width 0.2s ease;
}
.potential-zone:hover {
  fill-opacity: 0.75 !important;
  stroke-width: 2.5px !important;
}

/* Gradient Legenden (Idee C & Strommix) */
.map-gradient-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  flex-wrap: wrap;
}
.map-gradient-bar {
  height: 10px;
  width: 220px;
  border-radius: 5px;
  box-shadow: inset 0 0 2px rgba(0,0,0,0.25);
}

/* Popup-Layout für Länder-Strommix */
.country-mix-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0 0.8rem 0;
  background: #e2e8f0;
}
.country-mix-segment {
  height: 100%;
  transition: width 0.3s ease;
}
.country-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.6rem;
  font-size: 0.76rem;
  margin-top: 0.4rem;
}

/* ========================================
   Testphase-Passwortschutz (Gatekeeper)
   ======================================== */
.gea-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gea-gate-overlay.gea-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gea-gate-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius, 20px);
  padding: 2.25rem 2rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  text-align: center;
  position: relative;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.gea-gate-card .gate-logo {
  height: 52px;
  width: auto;
  margin: 0 auto 0.75rem auto;
  display: block;
}

.gea-gate-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.gea-gate-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.gea-gate-card p.gate-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.gea-gate-card form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.gea-gate-card input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border-radius: var(--radius-xs, 8px);
  border: 1.5px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.gea-gate-card input[type="password"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.gea-gate-card button[type="submit"] {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-xs, 8px);
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  transition: filter 0.2s, transform 0.1s;
}

.gea-gate-card button[type="submit"]:hover {
  filter: brightness(1.1);
}

.gea-gate-card button[type="submit"]:active {
  transform: scale(0.98);
}

.gea-gate-error {
  color: #ef4444;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: -0.25rem;
  display: none;
}

.gea-gate-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  line-height: 1.4;
}

@keyframes geaShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.gea-shake {
  animation: geaShake 0.4s ease-in-out;
}

