:root {
    --white: #fff;
    --light-blue: lightblue;
    --color-blue: blue;
    --color-dark-grey: #222831;
}

/*Timeline section*/

.timeline-section {
    width: 100%;
    overflow: hidden;  /* creates block formatting context */
}

.timeline-section ul {
    /* background: var(--light-blue); */
    padding: 0;
}

/*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: 5rem; */
    background: #0068B4;
}

/*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%;
    top: 1.5rem;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: inherit; /* inherits this property from its parent element */
}


/* Content box */
.timeline-section ul li > div {
    width: 550px;
    /* font-size: 1.2rem; */
    position: relative;
    bottom: 0;
    /* padding: 1.5rem; */
    /*glassmorphism effect*/
    background: #E1F2FF;
    /* background: rgba(255,255,255,.2); */
    /* -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    box-shadow: 20px 20px 50px rgba(0, 0, 0, 0.5);
    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;
    top: 25px;
    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(even) > 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(even) > div::before {
    left: -15px;
    border-width: 8px 16px 8px 0;
    border-color: transparent #0068B4 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(odd) > div {
    left: -590px;
}
  
/*this showcases the triangle*/
.timeline-section ul li:nth-child(odd) > div::before {
    right: -15px;
    border-width: 8px 0 8px 16px;
    border-color: transparent transparent transparent #0068B4; 
}

/*style the time tag*/
/* time {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 7px;
} */

.timeline-title {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
    color: #fff;
    font-size: 24px;
    background: #0068B4;
}

.timeline-content {
    padding: 15px 50px;
    position: relative;
    text-align: justify;
}

.timeline-content img {
    width: 100%;
    max-width: 465px;
    padding-top: 15px;
    display: block;
    margin: 0 auto;
}

.timeline-content::before {
    content: '';
    width: 100%;
    height: 100%;
    background: #008DDD;
    position: absolute;
    top: 10px;
    left: -10px;
    transform: rotate(-0.77deg);
    z-index: -1;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    visibility: hidden;
}

.timeline-content::after {
    content: '';
    width: 100%;
    height: 100%;
    background: #C6D3DD;
    position: absolute;
    top: 0;
    left: 10px;
    transform: rotate(0.98deg);
    z-index: -2;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    visibility: hidden;
}

.slide-in .timeline-content::before,
.slide-in .timeline-content::after {
    visibility: visible;
    opacity: 1;
    transition-delay: .8s;
}

.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);
    border: 3px solid #0068B4;
}

/* Hide event card initially */
.timeline-section ul li > div {
    visibility: hidden;
    opacity: 0;
    transition: all 0.8s ease-in-out;
}
  
.timeline-section ul li:nth-child(even) > div {
    transform: translateX(20rem);
}

.timeline-section ul li:nth-child(odd) > 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: 1250px) {
    .timeline-section ul li {
      margin-left: 2rem;
      padding-bottom: 50px;
    }
  
    .timeline-section ul li > div {
      width: calc(100vw - 150px);
    }
  
    .timeline-section ul li:nth-child(odd) > div {
      left: 45px;
    }
  
    .timeline-section ul li:nth-child(odd) > div::before {
      left: -15px;
      border-width: 8px 16px 8px 0;
      border-color: transparent #0068B4 transparent transparent;
    }

    .timeline-content {
        padding: 15px 20px;
        position: relative;
    }
}

@media screen and (min-width: 1250px) {
    /* .timeline-section ul li:not(:first-child) > div {
        top: -400px;
    }
    .timeline-section ul li:not(:first-child)::after {
        top: -400px;
    } */
    .timeline-section ul li:nth-child(2) {
        top: -450px;
    }
    .timeline-section ul li:nth-child(3) {
        top: -490px;
    }
    .timeline-section ul li:nth-child(4) {
        top: -880px;
    }
    .timeline-section ul li:nth-child(5) {
        top: -950px;
    }
    .timeline-section ul li:nth-child(6) {
        top: -1370px;
    }
    .timeline-section ul li:nth-child(7) {
        top: -1410px;
    }
    .timeline-section ul li:nth-child(8) {
        top: -1800px;
    }
    .timeline-section ul {
        height: 2940px;
    }

    .timeline-section.en ul li:nth-child(2) {
        top: -450px;
    }
    .timeline-section.en ul li:nth-child(3) {
        top: -640px;
    }
    .timeline-section.en ul li:nth-child(4) {
        top: -1000px;
    }
    .timeline-section.en ul li:nth-child(5) {
        top: -1190px;
    }
    .timeline-section.en ul li:nth-child(6) {
        top: -1610px;
    }
    .timeline-section.en ul li:nth-child(7) {
        top: -1750px;
    }
    .timeline-section.en ul li:nth-child(8) {
        top: -2100px;
    }
    .timeline-section.en ul {
        height: 3570px;
    }
}

@media screen and (max-width: 768px) {

    body.timeline .main-content .nav-path {
        padding: 0 20px;
    }

    body.timeline .main-content {
        padding: 0;
    }

    .timeline-section ul li > div {
        width: calc(100vw - 120px);
    }

    body.en .timeline-title {
        font-size: 18px;
    }
    
    body.en .timeline-content {
        font-size: 16px;
    }
    
}