

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
body{
    height: 100vh;
    display: grid;
    align-items: center;
    background: #f5f5f5;
    font-family: sans-serif;    
}
.tree{
    padding-top: 10%;
    height: auto;
    text-align: center;
    display: grid;
}
.tree ul{
    padding-top: 20px;
    position: relative;
    transition: 0.5s;   
}
.tree li{
   
    display: inline-table;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 10px;
    transition: .5s;
    
}
.tree li::before, .tree li::after{
    content: "";
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 1px solid #ccc;
    width: 51%;
    height:10px;

}
.tree li::after {
    right: auto;
    left: 50%;
    border-left: 1px solid #ccc;
}
.tree li:only-child::after, .tree li:only-child::before{
    display: none;
}
.tree li:only-child{
    padding-top: 0;
}
.tree li:first-child::before, .tree li:last::after{
    border: 0 none;
}
.tree li:last-child::before{
    border-right: 1px solid #ccc;
    border-radius: 0px 5px 0px 0px;
}
.tree li:first-child::after{
    
    border-radius: 5px 0px 0px 0px;
}
.tree ul ul:before{
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 1px solid black;
    width: 0;
    height: 20px;
}
.tree li a{
    border: 1px solid black;
    padding: 5px 5px;
    display: inline-grid;
    border-radius: 5px;
    text-decoration-line: none;
    
    color: #666;
    font-size: 11px;
    transition: .5s;
}
.tree li a span{
    border: 1px solid black;
    border-radius: 5px;
    color: #666;
    padding: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}
.tree li a:hover, .tree li a:hover span, .tree li a:hover+ul li a{
    background: #c8e4f8;
    color: #000;
    border: 1px solid #94a0b6;
    box-shadow: 0px 0px 8px -5px #5f5f5f;
}
.tree li a:hover+ul li::after, .tree li a::hover+ul li:before, .tree li a::hover+ul:before, .tree li a::hover+ul ul::before{
   border-color: #94a0b4; 
}

@media all and(max-width:576px)
{
    .tree{
        flex-direction: column;
    }
}

