header{

    position: relative;
    overflow: visible;

    &::after{
        content: '';
        position: absolute;
        display: block;
        width: 100%;
        height: 2rem;
        bottom: -1px;
        left: 0;
        background: var(--colore01scuro);
        pointer-events: none;
        z-index: -1;
    }
}


.chisiamo-timeline {

    position: relative;
    padding: 0;

    &:before {
        content: '';
        position: absolute;
        bottom: -15svh;
        left: -10svw;
        width: 120svw;
        height: 90svh;

        background-image: url('/css/images/bg01.png');
        background-repeat: no-repeat;
        background-size: auto 96%;
        background-position: center;

        opacity: 0.05;
        pointer-events: none;
        z-index: -1;
        filter: blur(6px);

        mix-blend-mode: lighten;
    }


    article{
        position: relative;
        margin: 0;
        padding: 0;
        height: 100svh;
        overflow: hidden;
    }    
}


.chisiamo-company{
    article{

        @media only screen and (max-width: 1260px) {
            grid-template-columns: 1fr !important;

            gap: 3rem !important;
        }
    }
}


.JS-timeline{
    position: relative;
    height: calc(100% - 10rem);
    /* il contenuto viene mosso via transform; nascondiamo overflow del contenitore genitore */
    overflow: visible;
    width: max-content;

    padding-right: 20svw;

    display: flex;
    flex-wrap: nowrap;

    gap: 2rem;

    

    &::before {
            content: '';
            position: absolute;
            top: 50%;
            left: calc(-50svw + 720px);
            //transform: translateY(-50%);
            width: calc(100svw);
            height: 4px;
            background-color: var(--grigio04);
            z-index: 0;

            @media only screen and (max-width: 1600px) {
                left: -5svw;
            }
        }

    


    .blocco{

        position: relative;
        display: block;
        width: 520px;
        max-width: 90svw;
        height: 100%;
        margin: 0;

        display: flex;
        flex-direction: column;

        gap: calc(36px);

        .testo{

            height: 100%;
            display: flex;
            flex-direction: column;



            >*{
                order: 0;
            }

            .data{
                color: var(--colore01base);
            }

            .desc{
                padding: 0;
                margin: 0;
                padding-left: 1rem;
                border-left: 4px solid var(--colore01base);
                margin-left: 16px;

                >*{
                    padding: 0;
                    margin: 0;
                }
            }
        }
        

        &:before{
            content: '';
            position: absolute;
            display: block;
            width: 36px;
            height: 36px;
            z-index: 2;
            border-radius: 50%;
            background-color: var(--colore01scuro);
            border: 4px solid var(--grigio04);

            top: calc(50% - 18px);
            left: 0;

            box-shadow: 0 6px 16px -4px rgba(0,0,0,0.3);
        }

        &:after{
            content: '';
            position: relative;
            display: block;
            width: 100%;
            height: 100%;
            z-index: 1;
        }


        &:nth-child(even){
            &:after{
                order: -999;
            }
            .testo {
                justify-content: flex-start;
                .data{
                    order: -99;
                }
            }
        }

        &:nth-child(odd){
            &:after{
                order: 999;
            }
            .testo {
                justify-content: flex-end;
                .data{
                    order: 99;
                }
            }
        }


        
    }
}


.box-org{

    @media only screen and (max-width: 850px) {
        display: flex;
        flex-direction: column;
            gap: 1rem;
        }

    .org-row{
        overflow: visible;
        display: flex;
        justify-content: center;
        gap: 2rem;

        &:not(:first-child){
            margin-top: -2rem;

            .org-blocco{
                padding-bottom: 2rem;
            }
        }

        @media only screen and (max-width: 850px) {
            flex-direction: column;
            align-items: center;
            margin-top: 0 !important;
            gap: 1rem;
        }

        .org-blocco{
            overflow: visible;
            background-color: var(--bianco);
            padding: 3rem 1rem 4rem;
            border-radius: 8px;
            box-shadow: 0 4px 30px -8px rgba(0,0,0,0.2);
            color: var(--nero);
            text-align: center;
            width: 340px;
            max-width: 90svw;
            min-height: 200px;

            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            gap: 1rem;

            @media only screen and (max-width: 850px){
                padding: 3rem 1rem;
            }

            .logo{
                width: 100%;
                max-width: 240px;
                height: auto;
                margin: 0 auto;

                img {
                    
                    width: 100%;
                    height: auto;
                    object-fit: contain;
                }
            }

            p{
                margin: 0;
            }

            .bottone{
                margin-top: auto;
            }

            &.due{
                background-color: var(--colore01);
            }
        }
    }
}


