
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
:root {
--primary-color: #073b4c;
--secondary-color: #ef476f;
--enfasis-color2: #DD5A79;
--max-width: 1100px
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font: normal 1rem/1.5 'Roboto', sans-serif;
    background: var(--primary-color);
    color: #fff;
    overflow-x: hidden ;
    padding-bottom: 50px ;
}

#main-header {
    background: linear-gradient(to right,var(--secondary-color), var(--enfasis-color2));
    padding: 4rem 0;
    box-shadow: 10px 10px 10px #073442;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

h1 {
    font-size: 2.3rem;
}

#timeline  ul {
    background: var(--primary-color);
    padding: 50px 0;
}

/* Create line */
#timeline ul li {
    list-style: none;
    position: relative;
    width: 6px;
    margin: 0 auto;
    padding-top: 50px;
    background-color: #fff;
}

/* Boxes */
#timeline ul li div {
    position: relative;
    bottom: 0;
    width: 400px;
    padding: 1rem;
    background: linear-gradient(to right,var(--secondary-color), var(--enfasis-color2));
    border-radius: 1rem 1rem 1rem 0 ;
    transition: all 0.5s ease-in-out;
    box-shadow: 10px 10px 10px #073442;
    visibility: hidden;
    opacity: 0; 
}

#timeline ul li div p {
    padding: 0 0 0 1rem;
}

/* right side */ 

#timeline ul li:nth-child(odd) div {
    left: 40px;
    transform: translate(200px, 0);
}

#timeline ul li:nth-child(even) div {
    left: -434px;
    border-radius:  1rem 1rem  0 1rem ;
    transform: translate(-200px, 0);
}

/* Dots */

#timeline ul li:after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 25px;
    height: 25px;
    background: inherit;
    transform: translateX(-50%);
    border-radius: 50%;
    transition: background 0.5s ease-in-out;

}

/* Arrow base*/
#timeline div:before {
    content:'';
    position: absolute;
    bottom: 5px;
    width: 0;
    height: 0;
    border-style: solid ;
}

/* Arrow base - right side */

#timeline ul li:nth-child(odd) div:before {
    left: -15px;
    border-width: 8px 16px 8px 0;
    border-color: transparent var(--secondary-color) transparent transparent;
}

/* Arrow base - left side */

#timeline ul li:nth-child(even) div:before {
    right: -15px;
    border-width: 8px 0 8px 16px;
    border-color: transparent transparent transparent var(--enfasis-color2); 
}

/* Show boxes */

#timeline ul li.show div {
    transform: none;
    visibility: visible;
    opacity: 1;
}

#timeline ul li.show:after {
    background: linear-gradient(to right,var(--secondary-color), var(--enfasis-color2));
}


@media (max-width: 900px) {
    #timeline ul li div {
        width: 250px;
    }
    #timeline ul li:nth-child(even) div {
        left: -284px

    }

}

@media (max-width: 600px) {
    #timeline ul li  {
        margin-left: 20px;
    }

    #timeline ul li div {
        width: calc(100vw - 90px);
    }

    #timeline ul li:nth-child(even) div {
        left: 40px;
        border-radius: 0 1rem   1rem  0;
    }

    #timeline ul li:nth-child(even) div:before {
        left: -15px;
        border-width: 8px 16px 8px 0;
        border-color: transparent var(--secondary-color) transparent transparent;
        
    }

}