.timeline {
  padding-top: 20px;
  position: relative;
  padding-bottom: 80px;
}
/* Linha central */
.timeline::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: linear-gradient(
    to bottom,
    transparent 0px,
    var(--color-timeline) 10px,
    var(--color-timeline) calc(100% - 10px),
    transparent 100%
  );
  transform: translateX(-50%);
}

/* Bolinha do ano */
.year-circle {
  position: relative;
  border-radius: 50%;
  margin: 10px auto;
  z-index: 2;
  width: 56px;
  height: 56px;
  color: var(--color-timeline);
  font-family: "Oswald";
  font-size: 1.3em;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  left: 39px;
}

/* Cada item */
.timeline__item {
  position: relative;
  max-width: 50%;
  width: fit-content;
  box-sizing: border-box;
  padding-top:20px;
  padding-bottom: 20px;
}

/* Alterna esquerda/direita */
.timeline__item.left {
  left: 0;
  text-align: right;
  padding-right: 20px;
}
.timeline__item.right {
  left: 50%;
  padding-left: 20px;
}
.timeline__item.left > .timeline__card {
  flex-direction: row-reverse !important;
}

/* Conecta com a linha */
.timeline__item::after {
  content: '';
  position: absolute;
  bottom: calc(50% - 8px);
  width: 16px;
  height: 16px;
  border: 4px solid var(--color-timeline);
  background-color: var(--color-bg-page);
  box-sizing: border-box;
  border-radius: 50%;
  z-index: 1;
}
.timeline__item.left::after {
  right: -8px;
}
.timeline__item.right::after {
  left: -8px;
}

/* Card */
.timeline__card {
  padding: 15px;
  position: relative;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  background-color: var(--color-bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

/* Imagem quadrada */
.timeline__card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
}

/* Conteúdo do card */
.timeline__card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  height: auto;
}

img + .timeline__card-content {
  min-height: 100px;
}

.timeline__card-content > h2 {
  padding-bottom: 10px;
}

.timeline__card-content > p {
  flex-grow: 1;
}

/* Data cinza */
.timeline__date {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-light);
  margin-top: 5px;
}

/* Responsivo - mobile */
@media (max-width: 1000px) {
  .timeline {
    width: fit-content;
  }

  .timeline::after {
    left: 8px;
  }

  .timeline-year {
    width: fit-content;
  }

  img + .timeline__card-content {
    min-height: 50px;
  }

  .timeline__item {
    width: fit-content;
    text-align: left !important;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .timeline__item.left,
  .timeline__item.right {
    left: 0;
    padding-left: 20px;
    padding-right: 0;
    max-width: 100%;
  }

  .timeline__item::after {
    left: 0 !important;
    right: auto !important;
  }

  .timeline__item.right > .timeline__card {
    flex-direction: row-reverse !important;
  }

  .timeline__card {
    align-items: flex-start;
    width: fit-content;
  }

  .timeline__card img {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 19px;
    height: 19px;
  }

  .year-circle {
    margin: 0;
    height: 50px;
    width: 50px;
    line-height: 50px;
    left: 20px;
  }
}