/* ==========================================================================
   Geschichte: Jahresleiste (per JS) + Text des gewählten Jahres
   ========================================================================== */
.history {
  background: url("../assets/img/poly-gruen.png") center / cover;
}
.history h2 {
  color: var(--white);
}
.history .container {
  max-width: 1180px;
}

.timeline__years {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 36px;
  padding: 0;
  list-style: none;
}
.timeline__years::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: 58px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
}
.timeline__years button {
  position: relative;
  min-width: 56px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 22px;
  color: rgba(255, 255, 255, 0.75);
  transition:
    color 0.2s,
    transform 0.2s;
}
.timeline__years button:hover {
  transform: translateY(-3px);
}
.timeline__years button.is-active {
  color: var(--white);
}
.timeline__years button::after {
  content: "";
  width: 22px;
  height: 20px;
  background: var(--white);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transition: background 0.2s;
}
.timeline__years button.is-active::after {
  background: var(--lime);
}

.timeline {
  display: grid;
  padding: 0;
  list-style: none;
}
.timeline__entry {
  grid-area: 1 / 1;
  min-height: 150px;
  padding: 36px 64px 40px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  align-items: baseline;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s ease,
    visibility 0.5s;
}
.timeline__entry.is-active {
  opacity: 1;
  visibility: visible;
}
html:not(.js) .timeline__entry {
  grid-area: auto;
  opacity: 1;
  visibility: visible;
  margin-bottom: 16px;
}
.timeline__entry h3 {
  flex: 0 0 auto;
  font-family: var(--font-head);
  font-weight: 300;
  font-size: 64px;
  line-height: 1;
  color: var(--green-700);
}
.timeline__entry p {
  flex: 1 1 420px;
  min-width: 0;
  line-height: 1.7;
  color: #3d423f;
}

@media (max-width: 820px) {
  .timeline__years::before {
    display: none;
  }
  .timeline__entry h3 {
    font-size: 44px;
  }
}
