:root {
  --bg: #f9f9f9;
  --text: #222;
  --primary: #4A90E2;
  --secondary: #f0f0f0;
  --hover: #e0e0e0;
  --green: #5DB075;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === 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;
}

/* === MAIN AREA === */
main {
  width: 100%;
  display: block;
}

svg#ecosocViz {
  width: 100%;
  height: 70vh;
  max-height: 700px;
  background: white;
}

/* === CONTROL PANEL === */
#controls {
  margin: 20px auto;
  padding: 10px 20px;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  z-index: 1;
}

#mainButtons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* === BUTTONS === */
button {
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 25px;
  border: 1px solid var(--primary);
  background-color: white;
  color: var(--primary);
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

button:hover,
button:focus {
  background-color: var(--primary);
  color: white;
}

button:active {
  background-color: #3a78c0;
  color: white;
}

button.reset-style {
  background-color: #f9f9f9;
  color: #029828;
  border: 1px solid #029828;
  margin-left: 20px;
}

button.reset-style:hover {
  background-color: #029828;
  color: white;
  border-color: #bbb;
}

/* === PLAY/PAUSE AKTIVMARKIERUNG === */
button.active-playpause {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* === YEAR BUTTONS === */
#yearButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

#yearButtons button {
  background-color: white;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  transition: all 0.2s ease;
}

#yearButtons button:hover {
  background-color: var(--primary);
  color: white;
}

#yearButtons button.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: bold;
}

/* === TOOLTIP === */
#tooltip {
  position: absolute;
  padding: 10px 12px;
  background: white;
  border: 1px solid #3a78c0;
  border-radius: 8px;
  pointer-events: none;
  font-family: 'Segoe UI', sans-serif;
  font-size: 12px;
  color: #222;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: opacity 0.2s;
  visibility: hidden;
  opacity: 0;
  max-width: 240px;
  line-height: 1.4;
}

.tooltip-title {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 4px;
  color: #000;
}

.tooltip-category {
  font-size: 12px;
  color: #3a78c0;
  margin-bottom: 2px;
}

.tooltip-year {
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 5px;
}

.tooltip-link a {
  font-size: 12px;
  color: #4A90E2;
  text-decoration: underline;
}


#tooltip a:hover {
  text-decoration: underline;
}


/* === SOCIAL SHARE === */
.social-share {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  margin: 40px auto 20px;
  padding: 10px 20px;
}

.social-share span {
  font-weight: 500;
  color: #444;
}

.social-share a {
  color: var(--text);
  font-size: 20px;
  transition: color 0.3s ease;
}

.social-share a:hover {
  color: var(--primary);
}

/* === 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;
}

/* === RESPONSIVE BREAKPOINTS === */
@media (max-width: 1000px) {
  .intro-flex {
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
  }

  .intro-image {
    width: 60%;
    margin-bottom: 16px;
  }

  .intro-text-block {
    text-align: left;
    width: 100%;
    padding: 0;
  }

  #controls {
    padding: 10px;
    gap: 10px;
  }

  #mainButtons {
    flex-direction: column;
    gap: 8px;
  }

  #yearButtons {
    justify-content: center;
    gap: 6px;
    row-gap: 8px;
  }

  #yearButtons button {
    padding: 5px 10px;
    font-size: 12px;
  }

  .social-share {
    flex-direction: column;
    gap: 10px;
    font-size: 15px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  h1.left-aligned {
    font-size: 20px;
    text-align: center;
  }

  .intro-image {
    width: 80%;
  }

  button {
    font-size: 13px;
    padding: 6px 14px;
  }

  button.reset-style {
    margin-left: 0;
    margin-top: 8px;
  }

  #tooltip {
    font-size: 12px;
    padding: 6px 10px;
  }
}
