
:root {
    --white-color: #fff;
    --light-blue-color: #D4A017;
    --color-blue-color: #222538;
    --color-dark-grey-color: #222831;
}

/* Start Here */

.timeline-section {
    width: 50%;
    overflow: hidden;  /* creates block formatting context */
}

.timeline-section ul {
    background: #ececec;
    padding: 2rem 0; /* padding top and bottom 5rem */
}

/*styling the liSt*/
.timeline-section ul li {
    list-style: none;
    position: relative;
    width: 5px; /* set width to 5px then set background to lightblue for that width */
    margin: 0 auto; /* center text */
    padding-top: 1.8rem; /* separate each list with a padding-top of 5rem = 5 x 10px= 50px */
    background: var(--color-blue-color);
    margin-left: 1rem;
}

.timeline-section ul li::before {
    width: 35px;
    height: 100%;
    background: #ececec;
    border-radius: 3px;
    top: 0;
    overflow: hidden;
    animation: moving 4s linear infinite;
}

@keyframes moving {
    0% {
      left: -20px;
    }

    100% {
      left: 100%;
    }
  }
/*use pseudo elements to style*/
/*This section will help us make the node-like structure - The circle*/
.timeline-section ul li::after {
    content: "";/* The content attribute is required for pseudo-elements to render */
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: inherit; /* inherits this property from its parent element */
}

/* Content box */
.timeline-section ul li div {
    width: 35vw;
    font-size: 1rem;
    position: relative;
    bottom: 0;
    padding: 1rem;
    /*glassmorphism effect*/
    background: rgba(255,255,255,.2);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border-top: 2px solid rgba(255, 255, 255, 0.5);
    border-left: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Triangle */
.timeline-section ul li div::before {
    content: "";
    position: absolute;
    bottom: 10px;
    width: 0;
    height: 0;
    border-style: solid;
}

/*This is to select the divs at odd position so we can separate the divs to the right part*/
.timeline-section ul li:nth-child(odd) div {
    left: 45px;  /* this style pushes the divs at odd number position to the right */
}

/*this showcases the triangle*/
.timeline-section ul li:nth-child(odd) div::before {
    left: -15px;
    border-width: 8px 16px 8px 0;
    border-color: transparent var(--light-blue-color) transparent transparent;
}

/*This is to select the divs at even number position so we can separate the divs to the left part*/
.timeline-section ul li:nth-child(even) div {
    left: 45px;
}

/*this showcases the triangle*/
.timeline-section ul li:nth-child(even) div::before {
    /* right: -15px;
    border-width: 8px 0 8px 16px;
    border-color: transparent transparent transparent var(--light-blue-color); */
    left: -15px;
    border-width: 8px 16px 8px 0;
    border-color: transparent var(--light-blue-color) transparent transparent;
}

/*style the time tag*/
.timeline-section ul li div time {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 7px;
}

.timeline-section ul li::after {
    transition: all 0.5s ease-in-out;
}


/*this changes the node content..giving it a background of white and making the border thicker*/
.timeline-section ul li.slide-in::after {
    background: var(--white-color);
    border: 3px solid var(--light-blue-color);
}

/* Hide event card initially */
.timeline-section ul li div {
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s ease-in-out;
}

.timeline-section ul li:nth-child(odd) div {
    transform: translateX(20rem);
}

.timeline-section ul li:nth-child(even) div {
    transform: translateX(-20rem);
}

/* display the event card */
.timeline-section ul li.slide-in div {
    transform: none;
    visibility: visible;
    opacity: 1;
}

/* Tablet Width
@media screen and (max-width: 900px) {
    .timeline-section ul li div {
      width: 25rem;
    }

    .timeline-section ul li:nth-child(even) div {
      left: -289px;
    }
}
*/
/* Mobile width
@media screen and (max-width: 600px) {
    .timeline-section ul li {
      
    }

    .timeline-section ul li div {
      
    }

    .timeline-section ul li:nth-child(even) div {
      left: 45px;
    }

    .timeline-section ul li:nth-child(even) div::before {
      left: -15px;
      border-width: 8px 16px 8px 0;
      border-color: transparent var(--light-blue-color) transparent transparent;
    }
} */

/* TIMELINE-SECTION-TWO */

.timeline-section-two {
    width: 50%;
    overflow: hidden;  /* creates block formatting context */
}

.timeline-section-two ul {
    background: #ececec;
    padding: 2rem 0; /* padding top and bottom 5rem */
}

/*styling the liSt*/
.timeline-section-two ul li {
    list-style: none;
    position: relative;
    width: 5px; /* set width to 5px then set background to lightblue for that width */
    margin: 0 auto; /* center text */
    padding-top: 1.8rem; /* separate each list with a padding-top of 5rem = 5 x 10px= 50px */
    background: var(--color-blue-color);
    margin-right: 1rem;
}

/*use pseudo elements to style*/
/*This section will help us make the node-like structure - The circle*/
.timeline-section-two ul li::after {
    content: "";/* The content attribute is required for pseudo-elements to render */
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: inherit; /* inherits this property from its parent element */
}


/* Content box */
.timeline-section-two ul li div {
    width: 35vw;
    font-size: 1rem;
    position: relative;
    bottom: 0;
    padding: 1rem;
    /*glassmorphism effect*/
    background: rgba(255,255,255,.2);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border-top: 2px solid rgba(255, 255, 255, 0.5);
    border-left: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Triangle */
.timeline-section-two ul li div::before {
    content: "";
    position: absolute;
    bottom: 10px;
    width: 0;
    height: 0;
    border-style: solid;
}

/*This is to select the divs at odd position so we can separate the divs to the right part*/
.timeline-section-two ul li:nth-child(odd) div {
    left: -38vw;  /* this style pushes the divs at odd number position to the right */
}

/*this showcases the triangle*/
.timeline-section-two ul li:nth-child(odd) div::before {
    right: -15px;
    border-width: 8px 0 8px 16px;
    border-color: transparent transparent transparent var(--light-blue-color); 
}

/*This is to select the divs at even number position so we can separate the divs to the left part*/
.timeline-section-two ul li:nth-child(even) div {
    left: -38vw;
}

/*this showcases the triangle*/
.timeline-section-two ul li:nth-child(even) div::before {
    right: -15px;
    border-width: 8px 0 8px 16px;
    border-color: transparent transparent transparent var(--light-blue-color); 
}

/*style the time tag*/
.timeline-section-two ul li div time {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 7px;
}

.timeline-section-two ul li::after {
    transition: all 0.5s ease-in-out;
}


/*this changes the node content..giving it a background of white and making the border thicker*/
.timeline-section-two ul li.slide-in::after {
    background: var(--white-color);
    border: 3px solid var(--light-blue-color);
}

/* Hide event card initially */
.timeline-section-two ul li div {
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s ease-in-out;
}

.timeline-section-two ul li:nth-child(odd) div {
    transform: translateX(20rem);
}

.timeline-section-two ul li:nth-child(even) div {
    transform: translateX(-20rem);
}

/* display the event card */
.timeline-section-two ul li.slide-in div {
    transform: none;
    visibility: visible;
    opacity: 1;
}

/* Tablet Width */
@media screen and (max-width: 992px) {
    .timeline-section ul li div {
        width: 25vw;
    }

    .timeline-section-two ul li div {
        width: 25vw;
    }
    .timeline-section-two ul li:nth-child(even) div {
        left: -29vw;
    }
    .timeline-section-two ul li:nth-child(odd) div {
        left: -29vw;
    }
}

@media screen and (max-width: 865px) {
    .timeline-section ul li div {
        width: 28vw;
    }

    .timeline-section-two ul li div {
        width: 28vw;
    }
    .timeline-section-two ul li:nth-child(even) div {
        left: -33vw;
    }
    .timeline-section-two ul li:nth-child(odd) div {
        left: -33vw;
    }
}

@media screen and (max-width: 765px) {
    .timeline-section {
        display: block;
        width: 100%;
    }
    .timeline-section ul li div {
        width: 55vw;
    }

    .timeline-section-two {
        display: block;
        width: 100%;
    }
    .timeline-section-two ul li div {
        width: 55vw;
    }
    .timeline-section-two ul li:nth-child(even) div {
        left: -60vw;
    }
    .timeline-section-two ul li:nth-child(odd) div {
        left: -60vw;
    }
}

@media screen and (max-width: 765px) {
    .timeline-section ul li div {
        width: 60vw;
    }
    .timeline-section-two ul li div {
        width: 60vw;
    }
    .timeline-section-two ul li:nth-child(even) div {
        left: -67vw;
    }
    .timeline-section-two ul li:nth-child(odd) div {
        left: -67vw;
    }
}


@media screen and (max-width: 600px) {
    .timeline-section ul li div {
      width: 68vw;
    }

    .timeline-section-two ul li div {
      width: 68vw;
    }

    .timeline-section-two ul li:nth-child(even) div {
      left: -75vw;
    }

    .timeline-section-two ul li:nth-child(odd) div {
      left: -75vw;
    }
} 