.org-chart * {
    margin: 0;
    padding: 0;
}

.org-chart ul {
    padding-top: 20px;
    position: relative;
    -transition: all 0.5s;
    -webkit-transition: all 0.5s;
    -moz-transition: all 0.5s;
}

.org-chart li {
    float: left;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 5px 0 5px;
    -transition: all 0.5s;
    -webkit-transition: all 0.5s;
    -moz-transition: all 0.5s;
}

    /*We will use ::before and ::after to draw the connectors*/

    .org-chart li::before,
    .org-chart li::after {
        content: '';
        position: absolute;
        top: 0;
        right: 50%;
        border-top: 2px solid #696969;
        width: 50%;
        height: 20px;
    }

    .org-chart li::after {
        right: auto;
        left: 50%;
        border-left: 2px solid #696969;
    }

    /*We need to remove left-right connectors from elements without 
any siblings*/
    .org-chart li:only-child::after,
    .org-chart li:only-child::before {
        display: none;
    }

    /*Remove space from the top of single children*/
    .org-chart li:only-child {
        padding-top: 0;
    }

    /*Remove left connector from first child and 
right connector from last child*/
    .org-chart li:first-child::before,
    .org-chart li:last-child::after {
        border: 0 none;
    }

    /*Adding back the vertical connector to the last nodes*/
    .org-chart li:last-child::before {
        border-right: 2px solid #696969;
        border-radius: 0 5px 0 0;
        -webkit-border-radius: 0 5px 0 0;
        -moz-border-radius: 0 5px 0 0;
    }

    .org-chart li:first-child::after {
        border-radius: 5px 0 0 0;
        -webkit-border-radius: 5px 0 0 0;
        -moz-border-radius: 5px 0 0 0;
    }

/*Time to add downward connectors from parents*/
.org-chart ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid #696969;
    width: 0;
    height: 20px;
}

.org-chart li a {
    height: 100px;
    width: 200px;
    padding: 5px 10px;
    text-decoration: none;
    background-color: white;
    color: #8b8b8b;
    border: 2px solid #aa1f1f;
    font-family: arial, verdana, tahoma;
    font-size: 11px;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    -transition: all 0.5s;
    -webkit-transition: all 0.5s;
    -moz-transition: all 0.5s;
}

    /*Time for some hover effects*/
    /*We will apply the hover effect the the lineage of the element also*/
    .org-chart li a:hover,
    .org-chart li a:hover + ul li a {
        background: #cbcbcb;
        color: #000;
    }

        /*Connector styles on hover*/
        .org-chart li a:hover + ul li::after,
        .org-chart li a:hover + ul li::before,
        .org-chart li a:hover + ul::before,
        .org-chart li a:hover + ul ul::before {
            border-color: #94a0b4;
        }
