:root {
  --primary: #37b645;
  --accent: #ff7f0e;
  --bg: #ffffff;
  --text: #222;
  --light-border: #eaeaea;
  --font: 'Segoe UI', sans-serif;
}

/* === GLOBAL CONTAINER === */
.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 20px;
}

/* === HEADER === */
header {
  background-color: #fff;
  border-bottom: 1px solid #eee;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.site-name {
  font-size: 20px;
  font-weight: bold;
}

/* === NAVIGATION === */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-menu li a {
  text-decoration: none;
  color: #000;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: #d90c1a;
}

/* === INTRO === */
.intro-flex {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.intro-image {
  width: 200px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: 0.5em;
  flex-shrink: 0;
}

.intro-text-block {
  flex: 1;
  padding-left: 20px;
  max-width: 800px;
}

h1.left-aligned {
  font-size: 26px;
  margin-bottom: 20px;
  text-align: left;
}

#description {
  font-size: 15px;
  line-height: 1.5;
  color: #000;
  text-align: left;
}



body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
}

.container {
  max-width: 1000px;
  margin: auto;
  padding: 20px;
}

h1 {
  font-size: 24px;
  margin-bottom: 20px;
}

h2 {
  font-size: 24px;
  margin-bottom: 0; 
}

/* Abstand zur Heatmap */
h2 + #heatmap {
  margin-top: 8px;
}

.intro-text {
  font-size: 16px;
  line-height: 1.6;
  color: black;
  text-align: left;
  font-family: 'Segoe UI', sans-serif;
  margin-bottom: 40px;
}

.chart-wrapper {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1.1;
  background-color: #fafafa;
  border: 1px solid var(--light-border);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.bar {
  fill: var(--primary);
  transition: fill 0.2s;
}

.bar:hover {
  fill: var(--accent);
}

.bar-max {
  fill: #ff7f0e !important;
}

.bar.zero {
  display: none;
}

.sort-year-button {
  background-color: white; 
  color: black;
  border: 1px solid var(--primary);
  border-radius: 5px;
}

.sort-year-button.active {
  background-color: white; 
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 5px;
}


.tooltip {
  position: absolute;
  background: white;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.keyword-container {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px 12px;
  justify-items: start;
}

.keyword-button {
  width: 100%;
  text-align: left;
  background-color: #f0f0f0;
  border: 1px solid var(--light-border);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.keyword-button:hover {
  background-color: var(--accent);
  color: white;
}

.keyword-button.active {
  background-color: var(--accent);
  color: white;
  font-weight: 600;
  border-color: var(--accent);
}

.keyword-button.inactive {
  background-color: #ffffff;
  border: 1px solid #bbb;
  color: #999;
  font-style: italic;
}

.sort-controls {
  display: flex;
  justify-content: space-between;
  margin: 20px 0 10px;
  gap: 10px;
  flex-wrap: wrap;
}

.sort-left,
.sort-right {
  display: flex;
  gap: 10px;
}

.sort-button {
  background-color: white;
  border: 1px solid var(--light-border);
  border-radius: 6px;
  border-color: #ff7f0e;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.sort-button:hover {
  background-color: #f4f4f4;
}

.sort-button.active {
  background-color: white;
  color: var(--accent);
  border-color: var(--accent);
}

.toggle-zero {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-color: var(--accent);
  color: #444;
  transition: background 0.2s;
}

.toggle-zero:hover {
  color: white;
  background-color: var(--accent);
}

.cell {
  stroke: #ccc;
}

.axis text {
  font-size: 11px;
}

/* Heatmap-Container */
#heatmap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 1200px;
  padding: 0;
  margin-top: 8px;
}

#heatmap svg {
  width: 100%;
  height: auto;
  display: block;
}


/* Achsenbeschriftungen */
#heatmap .heatmap-axis-x text {
  font-size: 9px;
}

#heatmap .heatmap-axis-y text {
  font-size: 12px;
}

.heatmap-tooltip {
  position: absolute;
  background: white;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #aaa;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #333;
  z-index: 100;
}


/* FOOTER */

footer {
  background-color: #fff;
  color: #444;
  font-size: 13px;
  text-align: center;
  padding: 50px 0 10px 0;
  border-top: 1px solid #eee;
  margin-top: 40px;
}

footer a {
  color: #3a3aff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}