/* It's supposed to look like a tree diagram */
.tree,
.tree ul,
.tree li {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.tree {
    margin: 0 0 1em;
    text-align: center;
}

.tree,
.tree ul {
    display: table;
}

.tree ul {
    width: 100%;
}

.tree li {
    display: table-cell;
    padding: 4.5em 0 0 0;
    vertical-align: top;
}

/* _________ */
.tree li:before {
    outline: 2px dashed #D2E4DBB5;
    content: "";
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.tree li:first-child:before {
    right: 50%;
}

.tree li:last-child:before {
    left: 50%;
}

.tree span {
    border-radius: 0em;
    display: inline-block;
    margin: 0 .2em 1.5em;
    padding: 0;
    position: relative;
    background: #fff;
    border: 1px solid #F6E0C0;
    min-width: 130px;
}

.tree code,
.tree img {
    text-align: center;
    background: #2E2E2E;
    width: 70%;
    height: 70%;
    border-radius: 80px;
}

.tree code,
.tree .details {
    /* width: calc(100% - 48px);
    padding-inline-start: 11px; */
}

.tree code,
.tree .details h3 {
    color: var(--secColor);
    font-size: 11px;
    font-weight: bolder;
    line-height: 24px;
    margin: 0;
}

.tree code,
.tree .details .job {
    color: var(--mainColor);
    font-size: 11px;
    line-height: 12px;
    display: block;
    font-weight: bold;
}

/* If the tree represents DOM structure */
.tree code {
    font-family: monaco, Consolas, 'Lucida Console', monospace;
}

/* | */
.tree ul:before,
.tree code:before,
.tree span:before {
    outline: 2px dashed #D2E4DBB5;
    content: "";
    height: 2.5em;
    left: 50%;
    position: absolute;
}

.tree ul:before {
    top: -0.5em;
}

.tree code:before,
.tree span:before {
    top: -4.5em;
}

/* The root node doesn't connect upwards */
.tree>li {
    margin-top: 0;
}

.tree>li:before,
.tree>li:after,
.tree>li>code:before,
.tree>li>span:before {
    outline: none;
}


ul.tree span .row {
    flex-direction: column;
}

ul.tree {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.tree span .col-lg-5 {
    background: var(--mainColor);
    height: 60px;
    position: relative;
    width: calc(100% - 24px);
    margin: 0 auto;
}

.tree span .col-lg-7 {
    width: 100%;
    padding: 12px 0;
    padding-top: 9px;
}

.col-lg-5 .img {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -39px;
    left: 50%;
    transform: translateX(-50%);
}

.tree ul:before {
    height: 1.4em;
    top: -1.4em;
}


@media (max-width: 991px) {
    .tree li {
        display: block;
    }

    .tree code:before,
    .tree span:before {
        top: -3.5em;
    }

    figure.chart-inner>.tree li {
        padding: 2em 0 0 0;
    }

    .tree ul:before {
        height: 1em;
        top: 1em;
    }

    figure.chart-inner {
        margin: 30px 0 60px 0;
    }

    .chart-inner .tree li ul li ul li ul li span {
        padding: 0;
        width: 16vw;
    }

    .chart-inner .tree li ul li ul li ul li span .col-lg-5 {
        padding: 0;
        width: 100%;
    }

    .chart-inner .tree li ul li ul li ul li span .img img {
        height: 30px;
        width: 30px;
        object-fit: contain;
    }

    .chart-inner .tree li ul li ul li ul li span .details h3 {
        font-size: 9px;
        line-height: 19px;
        margin: 0 0 2px;
    }

    .chart-inner .tree li ul li ul li ul li span .details .job {
        font-size: 8px;
    }

    .chart-inner .tree li ul li ul li ul li span .row {
        margin: 0;
    }

    .chart-inner .tree li ul li ul li span {
        width: 45vw;
    }


    .tree>li>span {
        width: 75vw;
    }

    .tree>ul span {
        width: 60vw;
    }

    .chart-inner .tree li ul li span {
        width: 64vw;
    }

    .chart-inner .tree li ul li ul li span ul li span {
        width: 30vw;
    }
}
