.page-template-template-history #masthead {
    position: relative;
    background: #031225;
    opacity: 1;
}
/* -- history template -- */
ul.events {
    height: 740px;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 0;
}

ul.events > li {
    display: inline-block;
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity ease 1s;
    background-size: contain;
    background-position: center;
    background-color: $blue;
    background-repeat: no-repeat;
}

ul.events > li.active {
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    opacity: 1;
    visibility: visible;
}

.event-carousel {
    height: 245px;
    width: 100%;
    overflow: hidden;
}

ul.carousel, ul.event-modules {
    width: 101%;
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}

ul.carousel > li {
    position: relative;
    height: 245px;
    width: 150px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: linear all 0.5s;
    display: inline-block;
    transform-origin: left top;
    cursor: pointer;
    border-right: 2px solid $white;
    border-bottom: 2px solid $white;
    vertical-align: top;
    overflow: hidden;
}

ul.carousel > li::after {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    content: "";
    background: rgba(3, 18, 37, 0.8);
    height: 100%;
    width: 100%;
}

ul.carousel > li:hover::after {
    background-color: $orange;
    opacity: 0.7;
}

ul.carousel > li.active {
    width: 520px !important;
}

ul.carousel > li.active::after {
    background-color: $orange;
    opacity: 0.7;
}

.year-vertical {
    position: relative;
    z-index: 3;
    margin: 10px;
}

.year-vertical span {
    display: block;
    font-size: 24px;
    color: $white;
    font-family: "RopaSoftSCPTT-Light";
    line-height: 1.15em;
}

ul.carousel > li.active .year-vertical {
    display: none;
}

.year-horizontal {
    display: none;
    position: absolute;
    z-index: 3;
    font-size: 67px;
    color: $white;
    letter-spacing: 5px;
    font-family: "RopaSoftSCPTT-Light";
    line-height: 1.15em;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
}

ul.carousel > li.active .year-horizontal {
    display: block;
}

ul.events > li > .inner {
    position: absolute;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    left: 0;
    right: 0;
    bottom: 20px;
}

.event-content,
.event-year {
    display: inline-block;
    font-size: 0;
    vertical-align: top;
}

.event-year {
    height: 145px;
    width: 20%;
    border-right: 2px solid $white;
}

.event-content {
    height: 200px;
    width: 80%;
    overflow: hidden;
}

.event-content > .inner {
    position: relative;
    height: 100%;
    width: 102%;
    padding: 20px 50px 40px 30px;
    overflow: auto;
}

.single-event::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100px;
    width: 100%;
    background-image: linear-gradient(to bottom, transparent, black);
}

.event-content > .inner p {
    font-family: $font-terciary;
    font-size: 22px;
    color: $white;
    line-height: 1.5em;
    margin-bottom: 20px;
}

.event-year {
    font-family: "RopaSoftSCPTT-Light";
    font-size: 75px;
    color: $white;
    letter-spacing: 10px;
}

.scroller {
    margin: 0;
    padding: 0;
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    z-index: 5;
    list-style-type: none;
}

.scroller > li {
    color: $white;
    font-size: 32px;
    cursor: pointer;
}

.scroller > li:first-of-type::after {
    content: "";
    height: 7px;
    width: 7px;
    border-radius: 50%;
    background-color: $orange;
    position: absolute;
    top: 50%;
    right: 30%;
    margin-top: 2px;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
}

.close-event-content-full-mobile {
    top: 26px;
    right: 30px;
    position: absolute;
    width: 30px;
    cursor: pointer;
}

.close-event-content-full-mobile::hover {
    opacity: 0.8;
}

.event-popup {
    position: absolute;
    top: -50px;
    max-width: 90%;
    width: 100%;
    padding: 50px;
    background-color: $dark-blue;
}
@media screen and (max-width: 1367px) {
    ul.events {
        height: 600px;
    }

    ul.events > li > .inner {
        max-width: 700px;
    }

    .event-year {
        font-size: 48px;
    }
}
@media screen and (max-width:991px) {
    ul.events {
        height: 650px;
    }

    ul.carousel > li.active {
        width: 300px !important;
    }

    .event-content-mobile p,
    .event-year-mobile p {
        color: $white;
        font-family: $font-terciary;
    }

    .event-year-mobile p {
        font-size: 28px !important;
    }

    .single-event:after {
        display: none;
    }

    ul.events > li > .inner {
        bottom: 35px;
    }

    .event-content-full-mobile .event-content-mobile {
        max-width: 600px;
        padding: 0 30px;
        height: 400px;
        overflow-y: auto;
        width: 100%;
        margin: 0 auto;
    }

    .event-content-full-mobile {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100%;
        width: 100%;
        background-color: rgba(6, 27, 47, 0.95);
        z-index: 99;
        visibility: hidden;
        opacity: 0;
        transition: opacity ease 0.25;
    }

    .event-content-full-mobile.active {
        visibility: visible;
        opacity: 1;
    }

    .event-content-full-mobile > .inner {
        margin-top: 30px;
    }

    .event-content-full-mobile .event-year-mobile p {
        margin-bottom: 50px;
        font-size: 32px;
    }
}
@media screen and (max-width:768px) {
    .page-template-template-history {
        background-color: #0e3454;
    }

    ul.events {
        height: 500px;
    }
}
@media screen and (max-width:600px) {
    ul.events {
        height: 475px;
    }

    .event-carousel {
        height: 175px;
    }

    ul.carousel > li {
        height: 175px;
        width: 125px;
    }

    ul.carousel > li.active {
        width: 125px !important;
    }

    .year-horizontal {
        font-size: 38px;
    }
}
