$color-grayLight: #f2f2f2;
$color-darker-gray: #515e69;
/* --------------------------------
Modules - reusable parts of our design
-------------------------------- */
.cd-container {
    /* this class is used to give a max-width to the element it is applied to, and center it horizontally when it reaches that max-width */
    width: 100%;
    max-width: 940px;
    margin: 0 auto;
}

.cd-container::after {
    /* clearfix */
    content: '';
    display: table;
    clear: both;
}

div#timeLineNavigationContainer {
    position: fixed;
    display: none;
    top: 30%;
    left: 10%;
    height: 390px;
    z-index: 9;

    &.active {
        display: block;
    }

    #scrollUp {
        top: 20px;
        left: 50%;
        border: solid transparent;
        content: " ";
        position: absolute;
        background-image: url(../Images/arrow.svg);
        background-repeat: no-repeat;
        background-size: 90px 90px;
        height: 37px;
        width: 58px;
        background-position: -22px -28px;
        margin-left: -25px;
        opacity: 0.5;
        display: block;
        cursor: pointer;
        z-index: 12;
    }

    #scrolltoTop {
        top: -24px;
        left: 50%;
        border: solid transparent;
        position: absolute;
        margin-left: -30px;
        opacity: 0;
        display: block;
        cursor: pointer;
        height: 47px;
        width: 58px;
        font-size: 52px;
        font-weight: 800;
        color: #515e69;
        z-index: 14;
        line-height: 66px;
        background-image: url(../Images/doublearrow.svg);
        background-repeat: no-repeat;
        background-size: 115px 91px;
        background-position: -29px -11px;
    }

    &.showBefore #scrolltoTop {
        opacity: 1;
    }

    &.showBefore #scrollUp {
        opacity: 1;
    }

    #scrollDown {
        bottom: -31px;
        left: -29px;
        border: solid transparent;
        position: absolute;
        background-image: url(../Images/arrow.svg);
        background-repeat: no-repeat;
        background-size: 90px 90px;
        height: 36px;
        width: 63px;
        background-position: -16px -23px;
        -webkit-transform: rotate(180deg);
        -ms-transform: rotate(180deg);
        transform: rotate(180deg);
        margin-left: 0px;
        opacity: 1;
        display: block;
        cursor: pointer;
    }

    &.hideAfter #scrollDown {
        opacity: 0.5;
    }

    #scrolltoBottom {
        bottom: -68px;
        left: 50%;
        border: solid transparent;
        position: absolute;
        margin-left: -30px;
        opacity: 1;
        display: block;
        cursor: pointer;
        height: 47px;
        width: 58px;
        font-size: 52px;
        font-weight: 800;
        color: #515e69;
        z-index: 14;
        line-height: 66px;
        -webkit-transform: rotate(180deg);
        -ms-transform: rotate(180deg);
        transform: rotate(180deg);
        background-image: url(../Images/doublearrow.svg);
        background-repeat: no-repeat;
        background-size: 115px 91px;
        background-position: 55% 24%;
    }

    &.hideAfter #scrolltoBottom {
        opacity: 0.5;
    }
}

#timeLineNavigation {
    height: 336px;
    overflow: hidden;
    z-index: 1000;
    position: absolute;
    left: -34px;
    top: 50px;

    a {
        display: block;
        color: #fff;
        background-color: #e5e7ec;
        padding: 4px;
        padding-left: 6px;
        padding-right: 6px;
        font-size: 28px;
        height: 48px;
        overflow: hidden;
        font-weight: bold;
        -webkit-transition: 200ms;
        -moz-transition: 200ms;
        -ms-transition: 200ms;
        -o-transition: 200ms;
        transition: 200ms;
        line-height: 46px;
        text-decoration: none;

        &.active {
            background: #243d51;
        }
    }
}

#timeLineNav {
    -webkit-transition: 200ms;
    -moz-transition: 200ms;
    -ms-transition: 200ms;
    -o-transition: 200ms;
    transition: 200ms;
}


/* --------------------------------
Main components
-------------------------------- */
#cd-timeline {
    position: relative;
    padding: 2em 0;
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 2em;

    &:before {
        /* this is the vertical line */
        content: '';
        position: absolute;
        top: 31px;
        left: 42px;
        height: 96%;
        width: 4px;
        background: #e2e2e2;

    }

    @media only screen and (min-width: 940px) {
        padding: 2em 0;
        &:before {
            top: 0;
            height: 100%;
            left: 50%;
            margin-left: -2px;
        }
    }

}

.cd-timeline-block {
    position: relative;
    margin: 2em 0;

    &:after {
        content: "";
        display: table;
        clear: both;
    }

    &:first-child {
        margin-top: 0;
    }

    &:last-child {
        margin-bottom: 0;
    }

    @media only screen and (min-width: 940px) {
        margin: 4em 0;

        &:first-child {
            margin-top: 0;
        }
        &:last-child {
            margin-bottom: 0;
        }
    }
}

.cd-timeline-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    background: #d7d7d7;
    border-radius: 50%;
    box-shadow: 0 0 0 4px $color-grayLight, inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05);
    border: 3px solid #FFF;

    width: 30px;
    height: 30px;
    left: 50%;
    top: 49%;
    margin-left: -14px;
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    background: #c7348b;
    box-shadow: none;


    img, object {
        display: block;
        width: 24px;
        height: 24px;
        position: relative;
        left: 50%;
        top: 50%;
        margin-left: -12px;
        margin-top: -12px;
    }
}

@media only screen and (min-width: 940px) {
    .cd-timeline-img {
        width: 30px;
        height: 30px;
        left: 50%;
        top: 49%;
        margin-left: -15px;
        /* Force Hardware Acceleration in WebKit */
        -webkit-transform: translateZ(0);
        -webkit-backface-visibility: hidden;
    }
    .cd-timeline-img.is-hidden {
        visibility: hidden;
    }
    .cd-timeline-img.bounce-in {
        visibility: visible;
        -webkit-animation: cd-bounce-1 0.6s;
        -moz-animation: cd-bounce-1 0.6s;
        animation: cd-bounce-1 0.6s;
    }
}

@-webkit-keyframes cd-bounce-1 {
    0% {
        opacity: 0;
        -webkit-transform: scale(0.5);
    }

    60% {
        opacity: 1;
        -webkit-transform: scale(1.2);
    }

    100% {
        -webkit-transform: scale(1);
    }
}

@-moz-keyframes cd-bounce-1 {
    0% {
        opacity: 0;
        -moz-transform: scale(0.5);
    }

    60% {
        opacity: 1;
        -moz-transform: scale(1.2);
    }

    100% {
        -moz-transform: scale(1);
    }
}

@keyframes cd-bounce-1 {
    0% {
        opacity: 0;
        -webkit-transform: scale(0.5);
        -moz-transform: scale(0.5);
        -ms-transform: scale(0.5);
        -o-transform: scale(0.5);
        transform: scale(0.5);
    }

    60% {
        opacity: 1;
        -webkit-transform: scale(1.2);
        -moz-transform: scale(1.2);
        -ms-transform: scale(1.2);
        -o-transform: scale(1.2);
        transform: scale(1.2);
    }

    100% {
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
        transform: scale(1);
    }
}

.cd-timeline-content img {
    margin: 0;
    max-width: 100%;
}

.cd-timeline-content h2 {
    font-weight: bold;
}

.cd-timeline-content {
    position: relative;
    margin-left: 75px;
    max-width: 400px;
    //background: #e3e6e5;
}

.cd-timeline-content:after {
    content: "";
    display: table;
    clear: both;
}

.cd-timeline-text {
    padding: 15px;

    h4 {
        margin-bottom: 6px;
    }

}

.cd-timeline-content h2 {
    margin: 0;
}

.cd-timeline-content .cd-read-more, .cd-timeline-content .cd-date {
    display: inline-block;
}

.cd-timeline-content .cd-read-more {
    float: right;
    padding: .8em 1em;
    background: #acb7c0;
    color: white;
}

.no-touch .cd-timeline-content .cd-read-more:hover {
    background-color: #bac4cb;
}

.cd-timeline-content .cd-date {
    /*float: left;*/
    /*padding: .8em 0;*/


}


@media only screen and (min-width: 940px) {
    .cd-timeline-content {
        margin-left: 0;
        width: 45%;
    }
    .cd-timeline-content::before {
        top: 24px;
        left: 100%;
        border-color: transparent;
        border-left-color: white;
    }
    .cd-timeline-content .cd-read-more {
        float: left;
    }
    .cd-timeline-content .cd-date {
        font-size: 32px;
        font-weight: 700;
        color: $color-darker-gray;
        position: absolute;
        width: 100%;
        left: 135%;
        top: 50%;
    }
    .cd-timeline-block:nth-child(even) .cd-timeline-content {
        float: right;
    }
    .cd-timeline-block:nth-child(even) .cd-timeline-content::before {
        top: 24px;
        left: auto;
        right: 100%;
        border-color: transparent;
        border-right-color: white;
    }
    .cd-timeline-block:nth-child(even) .cd-timeline-content .cd-read-more {
        float: right;
    }
    .cd-timeline-block:nth-child(even) .cd-timeline-content .cd-date {
        left: auto;
        right: 135%;
        text-align: right;
    }

    .cd-timeline-content .cd-date:after {
        content: normal;
    }

    .cd-timeline-content.is-hidden {
        visibility: hidden;
    }
    .cd-timeline-content.bounce-in {
        visibility: visible;
        opacity: 1;
        -webkit-animation: cd-bounce-2 0.6s;
        -moz-animation: cd-bounce-2 0.6s;
        animation: cd-bounce-2 0.6s;
    }
}

@media only screen and (min-width: 940px) {
    /* inverse bounce effect on even content blocks */
    .cd-timeline-block:nth-child(even) .cd-timeline-content.bounce-in {
        -webkit-animation: cd-bounce-2-inverse 0.6s;
        -moz-animation: cd-bounce-2-inverse 0.6s;
        animation: cd-bounce-2-inverse 0.6s;
    }
}

@-webkit-keyframes cd-bounce-2 {
    0% {
        opacity: 0;
        -webkit-transform: translateX(-100px);
    }

    60% {
        opacity: 1;
        -webkit-transform: translateX(20px);
    }

    100% {
        -webkit-transform: translateX(0);
    }
}

@-moz-keyframes cd-bounce-2 {
    0% {
        opacity: 0;
        -moz-transform: translateX(-100px);
    }

    60% {
        opacity: 1;
        -moz-transform: translateX(20px);
    }

    100% {
        -moz-transform: translateX(0);
    }
}

@keyframes cd-bounce-2 {
    0% {
        opacity: 0;
        -webkit-transform: translateX(-100px);
        -moz-transform: translateX(-100px);
        -ms-transform: translateX(-100px);
        -o-transform: translateX(-100px);
        transform: translateX(-100px);
    }

    60% {
        opacity: 1;
        -webkit-transform: translateX(20px);
        -moz-transform: translateX(20px);
        -ms-transform: translateX(20px);
        -o-transform: translateX(20px);
        transform: translateX(20px);
    }

    100% {
        -webkit-transform: translateX(0);
        -moz-transform: translateX(0);
        -ms-transform: translateX(0);
        -o-transform: translateX(0);
        transform: translateX(0);
    }
}

@-webkit-keyframes cd-bounce-2-inverse {
    0% {
        opacity: 0;
        -webkit-transform: translateX(100px);
    }

    60% {
        opacity: 1;
        -webkit-transform: translateX(-20px);
    }

    100% {
        -webkit-transform: translateX(0);
    }
}

@-moz-keyframes cd-bounce-2-inverse {
    0% {
        opacity: 0;
        -moz-transform: translateX(100px);
    }

    60% {
        opacity: 1;
        -moz-transform: translateX(-20px);
    }

    100% {
        -moz-transform: translateX(0);
    }
}

@keyframes cd-bounce-2-inverse {
    0% {
        opacity: 0;
        -webkit-transform: translateX(100px);
        -moz-transform: translateX(100px);
        -ms-transform: translateX(100px);
        -o-transform: translateX(100px);
        transform: translateX(100px);
    }

    60% {
        opacity: 1;
        -webkit-transform: translateX(-20px);
        -moz-transform: translateX(-20px);
        -ms-transform: translateX(-20px);
        -o-transform: translateX(-20px);
        transform: translateX(-20px);
    }

    100% {
        -webkit-transform: translateX(0);
        -moz-transform: translateX(0);
        -ms-transform: translateX(0);
        -o-transform: translateX(0);
        transform: translateX(0);
    }
}

@media (max-width: 940px) {
    .cd-timeline-img {
        left: auto;
        margin-left: 14px;
    }
    .cd-timeline-text h4 {
        font-size: 20px;
        font-weight: bold;
        text-align: center;
    }
    .cd-timeline-text h3 {
        font-size: 16px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #cd-timeline {
        width: 65%;
    }
}

@media only screen and (min-width: 650px) and (max-width: 736px) {
    #cd-timeline {
        padding-left: 140px;
    }
    #cd-timeline:before {
        left: 166px;
    }
}
