.timeline-section__title {
  font-weight: 400;
  font-size: 40px;
  color: var(--grey-800);
  margin-bottom: var(--spacing-4);
}

.timeline {
  position: relative;
  display: flex;
  height: 560px;
  gap: var(--spacing-6);
  padding: 0 var(--spacing-7);
  margin-top: var(--spacing-9);
}

.timeline__item {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: right;
  cursor: pointer;
}

.timeline__connector {
  height: var(--connector-height, 100px);
  border-right: 1px dashed var(--grey-300);
  transition: height 0.4s ease;
}

.timeline__card {
  padding-right: var(--spacing-5);
  border-right: 2px solid transparent;
  transition: border-color 0.3s ease;

  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.timeline__year {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--teal-500);
  margin-bottom: var(--spacing-3);
  transition: font-size 0.3s ease;
}

.timeline__badge {
  color: var(--teal-400);
  background: transparent;
  border: 2px solid var(--teal-400);

  font-size: 12px;
  font-weight: 600;

  margin-bottom: var(--spacing-4);
}

.timeline__text {
  font-size: 12px;
  font-weight: 500;
  color: var(--grey-700);
  max-width: 260px;
  text-align: right;
  transition: font-size 0.3s ease;
}

.timeline__image {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition:
    max-height 0.4s ease,
    opacity 0.4s ease,
    margin-top 0.4s ease;
}
.timeline__image img {
  display: block;
  max-width: 100%;
  object-fit: cover;
}

.timeline__underline {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--grey-300);
  border-radius: 2px;
  margin-top: var(--spacing-3);
  transition: background-color 0.3s ease;
}

/* --- Stan aktywny --- */
.timeline__item.is-active .timeline__connector {
  height: 0px;
}
.timeline__item.is-active .timeline__card {
  border-right-color: var(--teal-vibrant);
}
.timeline__item.is-active .timeline__year {
  font-size: 32px;
}
.timeline__item.is-active .timeline__text {
  font-size: 16px;
  color: var(--grey-800);
}
.timeline__item.is-active .timeline__image {
  max-height: 300px;
  opacity: 1;
  margin-top: var(--spacing-4);
}
.timeline__item.is-active .timeline__underline {
  background: var(--teal-vibrant);
  height: 4px;
}

@media (max-width: 900px) {
  .timeline {
    height: auto;
    flex-direction: column;
  }
  .timeline__item {
    justify-content: flex-start;
  }
  .timeline__connector {
    display: none;
  }
}
