body {
    background-color: #000;
    background-image: url(/ui/images/services/bg.jpg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

#services-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 62px 0px 0px;
    box-sizing: border-box;
}

.services-inner {
    display: flex;
    align-items: flex-end;
    width: 100%;
    position: relative;
    flex-wrap: wrap;
}

.main-hero {    
    position: absolute;
    width: 100%;
    height: 100%;
    top: calc(-100% - 82px);
    left: -50%;
}

.main-hero img {
    position: absolute;
    height: 200%;
    top: 0;
    right: 0;
}

#machine .input-item {
    position: absolute;
    width: 100%;
    height: 100%;
    top: -82px;
    left: 0;
    transform-origin: 50% 0;
    /*transition: all 0.8s;
    transform: translate(0, 0%) scale(1);
    transform: translate(0%, -45%) scale(0.2);*/
    /*z-index: 10;*/
}

#machine .input-item img {
    position: absolute;
    top: 0;
    left: calc(50% - 16px);
    width: 36px;
    z-index: 1;
}

.column-1, .column-3 {
    width: 36%;
    box-sizing: border-box;
    /*background: rgba(0, 0, 0, 0.5);*/
}

.column-2 {
    width: 28%;
    box-sizing: border-box;
}

#input {
    padding: 0px 50px 20px;
    position: relative;
}

.machine-to-services-pipe {
    position: absolute;
    border-right: 5px solid #657c2d;
    border-bottom: 5px solid #657c2d;
    border-bottom-right-radius: 20px;
    bottom: 164px;
    left: calc(36% - 78px);
    height: 50%;
    width: 80px;
    z-index: 1;
}

.machine-to-services-pipe:after {
    content: "";
    border-left: 5px solid #657c2d;
    border-top: 5px solid #657c2d;
    border-top-left-radius: 40px;
    position: absolute;
    left: 100%;
    bottom: 100%;
    height: 30px;
    width: 44px;
}

#machine .test-tubes {
    position: absolute;
    bottom: 100%;
    right: 12px;
    width: 85px;
}

#machine .gear {
    position: absolute;
    top: 10px;
    right: 36px;
    width: 34px;
    height: 34px;
    animation: 1s rortateLeft infinite linear;
}

@keyframes rortateLeft {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

#machine .input {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
}

#machine {
    background-color: rgba(0, 0, 0, 0.44);
    border: 1.2px solid #6f6f6f;
    border-radius: 5px;
    display: flex;
    align-items: flex-end;
    padding: 25px;
    box-sizing: border-box;
    flex-wrap: wrap;
    position: relative;
}

#machine .pipe-to-input-pipe {
    position: absolute;
    top: -48px;
    left: -46px;
    width: calc(50% + 44px);
    height: calc(100% + 55px);
    border-top: 6px solid #ff904d;
    border-left: 6px solid #ff904d;
    border-bottom: 6px solid #ff904d;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

#machine .machine-outputs {
    width: 100%;
    margin: 0 0px 5px;
    position: relative;
    display: flex;
}

#machine .machine-output-placeholder {
    position: relative;
    opacity: 0;
    z-index: -1;
    width: 25%;
    padding: 0 3%;
    box-sizing: border-box;
    transform-origin: bottom;
}

#machine .machine-output-placeholder img {
    width: 100%;
}

#machine .machine-output {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 25%;
    padding: 0 3%;
    box-sizing: border-box;
    transform-origin: bottom;
}

#machine .machine-output img {
    width: 100%;
}

#machine .pipe {
    position: relative;
    height: 20px;
    width: 100%;
    background-color: #252318;
    border: 1.2px solid #252525;
    border-radius: 10px;
    display: flex;
    overflow: hidden;
    z-index: 1;
}

#machine .pipe .stripes {
    background-image: repeating-linear-gradient(
        90deg, 
        #252318,
        #252318 3px,
        #453f20 5px, 
        #453f20 8px
     );
    height: 100%;
    flex-grow: 1;
    margin: 0 47px 0 14px;
    transform: skew(-34deg, 0deg);
}

#machine #bars {
    margin: 2px 20px 12px 0;
    width: 100%;
}

#machine #bars .bar {
    height: 2px;
    background: #252525;
    margin: 16px 0;
}

#machine #last {
    display: flex;
    width: 100%;
    align-items: center;
}

#machine .light {
    width: 16px;
    height: 16px;
    background-color: #fff;
    border-radius: 50%;
    margin: 0 3px;
}

#machine .light.orange {
    background: #ec9845;
    box-shadow: 0px 0px 10px 0px #ec9845;
}

#machine .light.red {
    background: #fbb09c;
    box-shadow: 0px 0px 10px 0px #fbb09c;
}

#machine .light.blue {
    background: #7aedf4;
    box-shadow: 0px 0px 10px 0px #7aedf4;
}

#machine #last .bar {
    height: 12px;
    background: #191c1a;
    flex-grow: 1;
    border-radius: 8px; 
    margin-left: 12px;
}

#machine #fulcrum {
    position: relative;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #1d7a44;
    z-index: 1;
}

#machine #lever {
    position: absolute;
    top: 8.5px;
    left: 10px;
    height: 8px;
    width: 60px;
    background: #fff;
    border-radius: 10px;
    transform-origin: 3px 4px;
    transform: rotate(-35deg);
} 

#machine #knob {
    position: absolute;
    width: 20px;
    height: 20px;
    top: -5px;
    right: -10px;
    background: #fff;
    border-radius: 50%;
}

#services {
    padding: 0px 50px 60px;
    position: relative;
    min-height: 86vh;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
}

#services .meter {
    position: absolute;
    bottom: 16px;
    right: 18px;
    width: 30px;
    height: 30px;
}

.burner-pipe {
    height: 0;
    width: calc(50% + 50px);
    position: absolute;
    bottom: 34px;
    left: -50px;
    border-bottom: 3px solid #ec9845;
}

.burner {
    position: absolute;
    height: 10px;
    width: 95px;
    background: #ec9845;
    right: -42.5px;
    bottom: -6px;
    border-radius: 10px;
}

.burner .fire {
    position: absolute;
    width: 36px;
    bottom: 4px;
    left: 28px;
}

.service-box {
    background-color: rgba(3, 17, 34, 0.75);
    border: 1.2px solid #809aba;
    border-radius: 5px; 
    padding: 15px;
    margin-bottom: 10px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.service-box .gear {
    position: absolute;
    width: 46px;
    height: 46px;
    top: -24px;
    right: 2px;
    animation: rotateRight 1.5s infinite linear;
}

@keyframes rotateRight {
    from {
        transform: rotate(0deg);
    } 
    to {
        transform: rotate(360deg);
    }
} 

.service-box .light {
    position: absolute;
    left: 100%;
    bottom: 50%;
    transform: translateY(50%);
}

.service-box .light .holder {
    position: relative;
    height: 16px;
    z-index: 1;
}

.service-box .light .bulb {
    height: 16px;
    width: 16px;
    position: absolute;
    top: 0;
    left: 16px;
    background: #fff;
    border-radius: 50%;
}

.service-box .light .bulb.blue {
    background: #7aedf4;
    box-shadow: 0px 0px 10px #7aedf4;
}

.service-box .light .bulb.red {
    background: #fbb09c;
    box-shadow: 0px 0px 10px #fbb09c;
}

.service-box .light .bulb.green {
    background: #96d77c;
    box-shadow: 0px 0px 10px #96d77c;
}

.service-box .title {
    color: #a1423e;
    font-family: typewriter;
    text-transform: uppercase;
    margin: 10px 0;
    background-color: #010812;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 1.4em;
    cursor: pointer;
    display: block;
}

.service-box .list {
    padding: 0;
    list-style: none;
    margin: 0 0 10px;
}

.service-box .list li a {
    color: #535353;
    text-decoration: none;
    line-height: 1.1;
    font-size: 1.2em;
    font-weight: bold;
    transition: color 0.3s;
    display: block;
}

.service-box .list li a.active {
    color: #708c2c;
}

#output {
    align-self: baseline;
    position: relative;
}

#output .pipe {
    border-top: 8px solid #aaa;
    border-right: 8px solid #aaa;
    border-left: 8px solid #aaa;
    border-top-right-radius: 20px;
    border-top-left-radius: 20px;
    height: 31px;
    width: calc(47.5% - 10px);
    position: relative;
}

#output .pipe:after {
    content: "";
    position: absolute;
    top: 30px;
    height: 30px;
    width: 50px;
    right: 100%;
    border-right: 8px solid #aaa;
    border-bottom: 8px solid #aaa;
    border-bottom-right-radius: 20px;
}

#output .output-holder {
    width: 70px;
    position: relative;
    left: calc(47.5% - 48px);
    top: -46px;
}

#output .hero {
    position: absolute;  
    width: 64%;
    left: 19%;
    z-index: 1;
    opacity: 0;
    transition: all 0.3s;
}

#output .hero.active {
    opacity: 1;
    z-index: 10;
}

#output .hero-base {
    position: relative;
}

#output .hero-base img {
    position: absolute;
    width: 81%;
    left: 19%;
    top: 0;
    z-index: 0;
    transform: translateY(-77%);
}

@media (max-width: 767px) {
    #input, #services, #output {
        width: 100%;
    }

    #services-wrapper {
        padding: 100vw 0px 0px;
    }

    /*.main-hero {
        top: -10%;
        left: 20vw;
        width: 140vw;
    }*/

    #services {
        padding-top: 50px;
    }

    .machine-to-services-pipe {
        display: none;
    }

    .machine-to-services-pipe:after {
        display: none;
    }

    .machine-to-services-pipe-for-small-screen {
        position: absolute;
        border-right: 5px solid #657c2d;
        border-bottom: 5px solid #657c2d;
        border-bottom-right-radius: 20px;
        bottom: -95px;
        left: calc(100% - 50px);
        height: 224px;
        width: 25px;
        z-index: 1;
    }

    .machine-to-services-pipe-for-small-screen:after {
        content: "";
        border-right: 5px solid #657c2d;
        border-top: 5px solid #657c2d;
        border-top-right-radius: 40px;
        position: absolute;
        right: -5px;
        bottom: calc(100% - 1px);
        height: 30px;
        width: 51px;
    }

    .burner-pipe {
        height: calc(100% + 15px);
        border-left: 3px solid #ec9845;
        width: calc(50% - 20px);
        left: 20px;
        border-bottom-left-radius: 20px;
    }

    .burner-pipe:after {
        content: "";
        width: 28px;
        height: 20px;
        border-left: 3px solid #ec9845;
        border-top: 3px solid #ec9845;
        border-top-left-radius: 20px;
        position: absolute;
        bottom: 100%;
        left: -3px;
    }

    #output .output-holder {
        width: 70px;
        position: relative;
        left: calc(50% - 22px);
        top: -46px;
        transform: rotateY(180deg);
    }

    #output .pipe {
        border-right: none;
        border-top-right-radius: 0;
        width: calc(50% - 55px);
        left: calc(50% - 4px);
    }

    #output .pipe:after {
        content: "";
        position: absolute;
        bottom: 100%;
        height: 100px;
        width: 20px;
        left: calc(100% - 0px);
        top: auto;
        border-right: 8px solid #aaa;
        border-bottom: 8px solid #aaa;
        border-top: 8px solid #aaa;
        border-bottom-right-radius: 20px;
        border-top-right-radius: 20px;
    }
}