:root {
    --timeline-special-color: #428bca;
}

.timelinesection {
    display: flex;
    justify-content: center;
}

/* Timeline Container */
.timelinesection > .timeline {
    margin: 20px auto;
    padding: 20px;
}

/* Card container */
.timelinesection > .timeline .card {
    position: relative;
    max-width: 400px;
}

/* setting padding based on even or odd */
.timelinesection > .timeline .card:nth-child(odd) {
    padding: 30px 0 30px 30px;
}
.timelinesection > .timeline .card:nth-child(even) {
    padding: 30px 30px 30px 0;
}
/* Global ::before */
.timelinesection > .timeline .card::before {
  content: "";
  position: absolute;
  width: 50%;
  border: solid var(--timeline-special-color);
}

/* Setting the border of top, bottom, left */
.timelinesection > .timeline .card:nth-child(odd)::before {
  left: 0px;
  top: -4.5px;
  bottom: -4.5px;
  border-width: 5px 0 5px 5px;
  border-radius: 50px 0 0 50px;
}

/* Setting the top and bottom to "-5px" because earlier it was out of a pixel in mobile devices */
@media only screen and (max-width: 400px) {
  .timelinesection > .timeline .card:nth-child(odd)::before {
    top: -5px;
    bottom: -5px;
  }
}

/* Setting the border of top, bottom, right */
.timelinesection > .timeline .card:nth-child(even)::before {
  right: 0;
  top: 0;
  bottom: 0;
  border-width: 5px 5px 5px 0;
  border-radius: 0 50px 50px 0;
}

/* Removing the border if it is the first card */
.timelinesection > .timeline .card:first-child::before {
  border-top: 0;
  border-top-left-radius: 0;
}

/* Removing the border if it is the last card  and it's odd */
.timelinesection > .timeline .card:last-child:nth-child(odd)::before {
  border-bottom: 0;
  border-bottom-left-radius: 0;
}

/* Removing the border if it is the last card  and it's even */
.timelinesection > .timeline .card:last-child:nth-child(even)::before {
  border-bottom: 0;
  border-bottom-right-radius: 0;
}

/* Information about the timeline */
.timelinesection > .timeline .info {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  padding: 10px;
}

/* Title of the card */
.timelinesection > .timeline .title {
  color: var(--timeline-special-color);
  position: relative;
  width: auto !important;
  margin: 0 !important;
}

/* Timeline dot  */
.timelinesection > .timeline .title::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 999px;
  border: 3px solid var(--timeline-special-color);
}

/* text right if the card is even  */
.timelinesection > .timeline .card:nth-child(even) > .info > .title {
  text-align: right !important;
}

.timelinesection > .timeline .card:nth-child(odd) > .info > .title {
    text-align: left !important;
  }
  
  /* setting dot to the left if the card is odd */
.timelinesection > .timeline .card:nth-child(odd) > .info > .title::before {
  left: -42px;
}

/* setting dot to the right if the card is odd */
.timelinesection > .timeline .card:nth-child(even) > .info > .title::before {
  right: -42px;
}
