/* ========================================= */
/* Generelle Einstellungen & Farb-Variablen  */
/* ========================================= */
:root {
  --primary-color: #d6a419; /* Ockerfarbene Akzentfarbe */
  --secondary-color: #fff;  /* Weiße Akzentfarbe */
  --background-color: #000;
  --dark-gray: #111;
  --medium-gray: #222;
  --light-gray: #ccc;
}

/* ========================================= */
/* Navigation                                */
/* ========================================= */
nav {
  background-color: var(--medium-gray);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid var(--primary-color);
}

nav a {
  padding: 1em;
  color: var(--primary-color);
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

nav a:hover {
  background-color: #333;
}

nav a.active {
  background-color: var(--primary-color);
  color: var(--background-color);
}



html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: sans-serif;
  background-color: var(--dark-gray);
  color: var(--primary-color);
}


/* ========================================= */
/* Bild-Layout & Galerien                    */
/* ========================================= */
.image-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 10px;
  background: var(--background-color);
}

.image-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.bild-container {
  text-align: center;
  margin: 20px 0;
}

.bild-container img {
  max-width: 100%;
  height: auto;
  border: 2px solid var(--light-gray);
}

.bild-unterschrift {
  font-size: 14px;
  color: aqua !important;
  margin-top: 8px;
  font-style: italic;
  text-align: center;
}

/* ========================================= */
/* Hauptinhalt & Karten                      */
/* ========================================= */
main {
  width: 100%;
  max-width: 1400px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 auto;
  padding: 20px;
  background: var(--background-color);
  display: block;
}


.card {
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  padding: 20px;
  color: var(--primary-color);
  background-blend-mode: overlay;
  background-color: rgba(0, 0, 0, 0.5);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }

/* ========================================= */
/* Hilfsklassen                              */
/* ========================================= */
.left {
  float: left;
}

.right {
  float: right;
}

/* ========================================= */
/* Footer                                    */
/* ========================================= */
footer {
  background-color: #444;
  color: var(--secondary-color);
  text-align: center;
  padding: 20px;
}

footer a {
  color: var(--secondary-color);
  margin: 0 10px;
  text-decoration: none;
}

/* ========================================= */
/* Lightbox-Overlay                          */
/* ========================================= */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.overlay img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 20px #000;
  animation: fadein 0.4s ease;
}

@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========================================= */
/* Zeitleiste                                */
/* ========================================= */
.timeline {
  width: 100%;
  padding: 40px 10px;
  background-color: var(--background-color);
  color: var(--primary-color);
  text-align: center;
  grid-column: 1 / -1; /* Wichtig: Spannt die Zeitleiste über alle Spalten des Grids */
}

.timeline-title {
  font-size: 2.5em;
  margin-bottom: 2em;
  color: var(--secondary-color);
}

.timeline-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  padding: 20px 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transform: translateY(-50%);
  z-index: 0;
}

.timeline-item {
  position: relative;
  flex-basis: 120px;
  flex-shrink: 0;
  text-align: center;
  margin: 10px 5px;
  z-index: 1;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  width: 10px;
  height: 10px;
  background-color: var(--primary-color);
  border-radius: 50%;
  transform: translateX(-50%);
  border: 2px solid var(--background-color);
  z-index: 2;
}

.timeline-date {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--secondary-color);
}

.timeline-item p {
  font-size: 0.9em;
  margin: 0;
}

/* Anpassungen für mobile Ansicht (vertikale Zeitleiste) */
@media (max-width: 768px) {
  .timeline-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-container::before {
    top: 0;
    left: 20px;
    width: 2px;
    height: 100%;
    transform: none;
  }

  .timeline-item {
    flex-basis: auto;
    width: 100%;
    text-align: left;
    padding-left: 40px;
    margin: 20px 0;
  }

  .timeline-item::before {
    top: 5px;
    left: 17px;
  }
}

/* CSS-Variablen (aus style.css) */
:root {
  --primary-color: #d6a419;
  --secondary-color: #fff;
  --background-color: #000;
  --dark-gray: #111;
  --medium-gray: #222;
  --light-gray: #ccc;
}

/* Spezifische Anpassungen */
main {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  display: block;
}

h1 {
  color: var(--secondary-color);
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 0.5em;
  text-shadow: 0 0 8px rgba(214, 164, 25, 0.7); /* Stärkerer Leuchteffekt */
}

h2 {
  color: var(--primary-color);
  font-size: 1.8em;
  border-bottom: 2px solid var(--medium-gray);
  padding-bottom: 0.3em;
  margin-top: 2.5em; /* Mehr Abstand nach oben */
}

h3 {
  color: var(--secondary-color);
  font-size: 1.3em;
  margin-top: 1em;
}

section {
  padding: 20px 0;
  margin-bottom: 40px;
}

.infobox {
  background-color: var(--medium-gray);
  border-left: 4px solid var(--primary-color);
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}

/* Visuelle CO2-Kachel */
.co2-card {
  background: linear-gradient(145deg, var(--medium-gray), var(--dark-gray));
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7);
  margin: 30px 0;
}

.co2-chart-svg {
  display: block;
  margin: 20px auto;
  width: 100%;
  max-width: 600px;
  height: 150px;
}

/* Listenelemente */
.list-style {
  list-style: none; /* Entfernen der Standardpunkte */
  margin-left: 0;
  padding-left: 0;
  color: var(--light-gray);
}

.list-style li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 10px;
}

/* Emojis/Icons für Listen */
.list-style li::before {
  content: '🌿'; /* Standard-Icon */
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 1.2em;
}

.list-style .policy-item::before { content: '🏛️'; }
.list-style .consumer-item::before { content: '🛒'; }
.list-style .co2-item::before { content: '🔬'; }

.glossar-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-top: 10px;
}

.glossar-item dt {
  font-size: 1.5em;
  font-weight: bold;
  color: #B22222;
  margin-top: 10px;
}

.glossar-item dd {
  margin-left: 0;
  padding-left: 10px;
  border-left: 2px solid var(--medium-gray);
}

/* Statistik-Kacheln */
.data-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.card {
  background-color: var(--medium-gray);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s;
}

.card-value {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.card-label {
  color: var(--light-gray);
  font-size: 1.1em;
}

/* ========================================= */
/* Externe Links als Button-Stil              */
/* ========================================= */

/* Basisstil für den Link-Button */
.btn-link-external {
  display: inline-block; /* Muss inline-block oder block sein, um Padding zu akzeptieren */
  padding: 10px 20px;
  margin: 10px 0;
  border-radius: 8px; /* Leicht abgerundete Ecken */
  text-decoration: none;
  font-weight: bold;
  color: var(--background-color); /* Textfarbe soll dunkel sein, für besseren Kontrast */

  /* Gradient-Verlauf */
  background: linear-gradient(135deg, var(--primary-color), #fccb00); /* Von Ocker zu einem helleren Goldton */
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Leichte Schattierung */
  transition: all 0.3s ease;
}

/* Hover-Effekt für Interaktion */
.btn-link-external:hover {
  color: var(--dark-gray);
  background: linear-gradient(135deg, #fccb00, var(--primary-color)); /* Umkehrung des Gradients */
  transform: translateY(-2px); /* Leichter 'Lift'-Effekt */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Bildstile */
.img-container {
  margin: 30px 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--medium-gray);
}

.img-container img {
  width: 100%;
  height: auto;
  display: block;
}

/* Platzhalter für Grafik */
.chart-placeholder {
  height: 300px;
  background-color: var(--medium-gray);
  border: 2px dashed var(--primary-color);
  color: var(--light-gray);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1em;
  margin: 20px 0;
  border-radius: 10px;
}

@media (min-width: 768px) {
  .glossar-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Warming Stripes Styling */

/* Container für die Responsive-Anzeige */
.warming-stripes-container {
  display: flex; /* Ordnet die Streifen nebeneinander an */
  width: 100%; /* Passt sich der vollen Breite an */
  height: 150px; /* Höhe der Grafik */
  margin: 20px 0;
  border: 1px solid #ccc; /* Optional: Rahmen zur Abgrenzung */
}

/* Basis-Stil für jeden Streifen */
.stripe {
  flex-grow: 1; /* Jeder Streifen nimmt gleich viel Platz ein */
  min-width: 0; /* Wichtig für Flexbox in einigen Browsern */
  cursor: help; /* Zeigt an, dass der Tooltip (Title) Infos enthält */
}

/* Farbpalette für Temperaturabweichungen (angepasste 20-Jahres-Daten) */
/* Blaue Töne (Kühler) */
.stripe.s-1 { background-color: #054881; } /* Stark kühl (-0.8°C) */
.stripe.s-2 { background-color: #0b69b5; } /* Kühl (-0.5°C) */
.stripe.s-3 { background-color: #3b90d2; } /* Leicht kühl (-0.2°C) */

/* Grünton (Durchschnitt/Leicht über Durchschnitt) */
.stripe.s-4 { background-color: #c0c0c0; } /* Durchschnitt (+0.1°C) - Hier eher ein neutrales Grau */
.stripe.s-5 { background-color: #f7a858; } /* Leicht warm (+0.3°C) */
.stripe.s-6 { background-color: #d2c84e; } /* Grün/Gelb für nahe Durchschnitt (+0.2°C) */

/* Orange/Rote Töne (Wärmer) */
.stripe.s-7 { background-color: #f59146; } /* Warm (+0.4°C) */
.stripe.s-8 { background-color: #e5b95a; } /* Wieder näher am Durchschnitt (+0.1°C) */
.stripe.s-9 { background-color: #f77f3e; } /* Warm (+0.6°C) */
.stripe.s-10 { background-color: #f56d35; } /* Warm (+0.5°C) */
.stripe.s-11 { background-color: #e85d2e; } /* Deutlich warm (+0.8°C) */
.stripe.s-12 { background-color: #d14425; } /* Sehr warm (+0.9°C) */
.stripe.s-13 { background-color: #f56d35; } /* Zurück auf Warm (+0.5°C) */
.stripe.s-14 { background-color: #c22920; } /* Heiß (+1.1°C) */
.stripe.s-15 { background-color: #a31818; } /* Sehr heiß (+1.3°C) */
.stripe.s-16 { background-color: #c22920; } /* Heiß (+1.0°C) */
.stripe.s-17 { background-color: #8c0f12; } /* Extrem heiß (+1.5°C) */
.stripe.s-18 { background-color: #9d1515; } /* Sehr heiß (+1.2°C) */
.stripe.s-19 { background-color: #7b0a11; } /* Rekordverdächtig (+1.6°C) */
.stripe.s-20 { background-color: #610404; } /* Aktuelles Extrem (+1.9°C) */

/* Legende */
.stripes-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  padding-top: 5px;
}

.stripes-legend span {
  padding: 2px 5px;
  border-radius: 3px;
  background-color: #0b69b5; /* Blau für kühler */
  color: white;
}

.stripes-legend .legend-warm {
  background-color: #d14425; /* Rot für wärmer */
}

/* Container anpassen, um relative Positionierung zu erlauben */
.warming-stripes-container {
  display: flex;
  width: 100%;
  height: 150px;
  margin: 20px 0 40px 0; /* Mehr Platz unten für die Jahreszahlen */
  border: 1px solid #ccc;
  position: relative; /* WICHTIG: Erlaubt absolute Positionierung von Kind-Elementen */
}

/* Basis-Stil für jeden Streifen */
.stripe {
  flex-grow: 1;
  min-width: 0;
  cursor: help;
  position: relative; /* WICHTIG: Erlaubt, dass ::after relativ zu diesem Streifen positioniert wird */
}

/* Pseudo-Element für die Jahreszahl */
.stripe::after {
  content: attr(data-year); /* Holt den Inhalt aus dem data-year Attribut */
  position: absolute;
  bottom: -25px; /* Platziert die Jahreszahl 25px unterhalb des Streifens */
  left: 50%;
  transform: translateX(-50%); /* Zentriert die Zahl */
  font-size: 0.8em;
  color: #333;
  white-space: nowrap; /* Verhindert das Umbrechen der Zahl */
  /* Standardmäßig sind die Zahlen NICHT sichtbar */
  opacity: 0;
  transition: opacity 0.3s;
}

/* Nur die Jahreszahl des ERSTEN und LETZTEN Streifens anzeigen */
.stripe:first-child::after,
.stripe:last-child::after {
  opacity: 1;
}

/* Optische Trennung des letzten Streifens für "aktuelles Jahr" */
.stripe:last-child {
  border-right: 2px solid #333;
}

/* ----- Farben wie zuvor, nur gekürzt zur Übersicht ----- */

/* Blaue Töne (Kühler) */
.stripe.s-1 { background-color: #054881; }
.stripe.s-2 { background-color: #0b69b5; }
.stripe.s-3 { background-color: #3b90d2; }

/* Durchschnitt/Leicht warm */
.stripe.s-4 { background-color: #c0c0c0; }
.stripe.s-5 { background-color: #f7a858; }
.stripe.s-6 { background-color: #d2c84e; }

/* Orange/Rote Töne (Wärmer) */
.stripe.s-7 { background-color: #f59146; }
.stripe.s-8 { background-color: #e5b95a; }
.stripe.s-9 { background-color: #f77f3e; }
.stripe.s-10 { background-color: #f56d35; }
.stripe.s-11 { background-color: #e85d2e; }
.stripe.s-12 { background-color: #d14425; }
.stripe.s-13 { background-color: #f56d35; }
.stripe.s-14 { background-color: #c22920; }
.stripe.s-15 { background-color: #a31818; }
.stripe.s-16 { background-color: #c22920; }
.stripe.s-17 { background-color: #8c0f12; }
.stripe.s-18 { background-color: #9d1515; }
.stripe.s-19 { background-color: #7b0a11; }
.stripe.s-20 { background-color: #610404; }

/* Legende */
.stripes-legend {
  /* ... (wie zuvor) ... */
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  padding-top: 5px;
}

/* Responsive Anpassungen: Auf kleinen Bildschirmen mehr Zahlen anzeigen */
@media (min-width: 600px) {
  /* Zeigt zusätzlich die 5. und 10. Jahreszahl an */
  .stripe:nth-child(5)::after,
  .stripe:nth-child(10)::after,
  .stripe:nth-child(15)::after {
    opacity: 1;
  }
}

/* Beispiel, falls die Grafik in einer schmalen Spalte liegt (responsive Test) */
@media (max-width: 600px) {
  .warming-stripes-container {
    height: 100px; /* Etwas kleiner auf Mobilgeräten */
  }
}
