@import "font-awesome.css";

@font-face {
    font-family: 'Univers';
    src: url('../fonts/Univers.eot');
    src: url('../fonts/Univers.eot?#iefix') format('embedded-opentype'), url('../fonts/Univers.woff') format('woff'), url('../fonts/Univers.ttf') format('truetype'), url('../fonts/Univers.svg#Univers') format('svg');
    font-weight: normal;
    font-style: normal;
}

:root {
    --white-shade: white;
    --bma-primary: #009fe3;
    --bma-box-shadow: 0px 2px 11px rgba(0, 0, 0, 0.5);


    touch-action: pan-x pan-y;
    height: 100%

}

html, body {
    font-family: Arial, Verdana, sans-serif;
    background-size: cover;
    background-position: center;
    background-image: linear-gradient(0deg, rgba(0, 159, 227, 0.8), rgba(0, 159, 227, 0.7)), url("../img/background.jpg");
    height: 100%;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Univers', Arial, Verdana, sans-serif;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: white;
    box-shadow: var(--bma-box-shadow);
    height: 100px;
    z-index: 1;
}

.home-button {
    color: var(--bma-primary);
    margin-top: 8px;
}

main {
    display: flex;

    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 100px;

    min-height: calc(100vh - 100px);
    overflow: hidden;
}

.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2vw;
    align-items: center;
    justify-content: center;
    padding: 2vw;
}

.main-link {
    color: inherit;
    text-decoration: none;
}


.box {
    width: 10vw;
    min-width: 250px;
    height: 20vh;
    min-height: 270px;
    box-shadow: var(--bma-box-shadow);
    background-color: var(--white-shade);

    opacity: 0;
    animation: fadeUp 0.2s ease-out forwards;
    animation-delay: calc(var(--i, 0) * 0.05s); /* fallback: 0 */

    display: flex;
    flex-direction: column;
    justify-content: stretch;
    position: relative;

    & .process {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        height: 25px;
        font-size: 1rem;
        overflow: hidden;
        background: var(--bma-primary);
        color: white;

        &::after {
            display: block;
            position: absolute;
            box-shadow: black 0 0 9px -3px;
            border-radius: 20rem;
            height: 32px;
            width: 50px;
        }

        &.extraction::after {
            left: 100%;
            transform: translateX(-50%) translateY(-40%);

            content: "";
            background: url("../img/processes/diff-inv.png") no-repeat;
            background-size: contain;

        }

        &.evaporation::after {

            left: 100%;
            transform: translateX(-50%) translateY(-30%);
            height: 50px;
            width: 32px;
            content: "";
            background: url("../img/processes/ffe-inv.png") no-repeat;
            background-size: contain;

        }

        &.crystallisation::after {

            left: 100%;
            transform: translateX(-50%) translateY(-30%);
            height: 50px;
            width: 32px;
            content: "";
            background: url("../img/processes/ovc-inv.png") no-repeat;
            background-size: contain;

        }

        &.centrifugation::after {

            left: 100%;
            transform: translateX(-50%) translateY(-30%);
            height: 50px;
            width: 32px;
            content: "";
            background: url("../img/processes/centrifugal-inv.png") no-repeat;
            background-size: contain;

        }

        &.sugardrying::after {

            left: 100%;
            transform: translateX(-50%) translateY(-40%);

            content: "";
            background: url("../img/processes/drum-inv.png") no-repeat;
            background-size: contain;

        }

        &.service::after {
            left: 100%;
            transform: translateX(-50%) translateY(-30%);
            height: 50px;
            width: 32px;

            content: "";
            background: url("../img/processes/service.png") no-repeat;
            background-size: contain;
        }

    }

    & .box-image {
        height: 140px;
        background-position: center center;
    }

    & .box-body {
        display:flex;
        flex-direction: column;
        padding: 1rem;
        height: 100%;

        & p {
            flex-grow: 1;
            font-size: .75rem;
        }


        & h2 {
            color: var(--bma-primary);
            font-size: 1.25rem;
        }
    }

    & .arrow {
        margin-left: auto;

        &:after {
            -moz-osx-font-smoothing: grayscale;
            #content: '\2B9E';
            content: "\f105";
            display: inline-block;
            font: 18px / 1 FontAwesome;
            #display: inline-block;
            padding: 3px 13px;
            font-size: 1.5rem;
            color: #fff;
            background: #009fe3;


        }
    }
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}



.box.video {



    & .arrow:after {
        content: '\f144';
        font-size: 2rem;
        padding: 10px 23px;
    }
}

#lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 9998;
}

#lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    width: 90%;
    height: 80%;
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    overflow: hidden;
}

.lightbox-content iframe,
.lightbox-content video {
    width: 100%;
    height: 100%;
    background: black;
    display: block;
}

.close-lightbox {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    line-height: 3rem;
    background: black;
    color: white;
    border: none;
    cursor: pointer;
    user-select: none;
    width: 65px;
    height: 65px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}


#flowchart-zoom::-webkit-slider-thumb {
    background: var(--bma-primary);
}

.flowchart-wrapper {
    height: calc(100vh - 100px);
    width: 100%;
    position: relative;

    background-color: white;
    text-align: center;

    & svg {

        height: 100%;

        & circle {
            transform: scale(0);
        }
    }

    & #popup {
        position: absolute;
        display: none;
        background: var(--bma-primary);
        color: white;
        padding: 6px 10px;
        box-shadow: var(--bma-box-shadow);
        font-size: 14px;
        z-index: 10;

        & .popup-link {
            color: white;
            text-decoration: none;
            display: block;
            margin: 1rem;

        }

    }


}