/* Basic Tree Styling */
.tree ul {
    padding-top: 20px; 
    position: relative;
    transition: all 0.5s;
    -webkit-transition: all 0.5s;
    -moz-transition: all 0.5s;
}

.tree li {
    display: inline-block;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 10px 5px 0 5px;
    transition: all 0.5s;
    -webkit-transition: all 0.5s;
    -moz-transition: all 0.5s;
}

/* Connecting Lines */
.tree li::before, .tree li::after{
    content: '';
    position: absolute; top: 0; right: 50%;
    border-top: 1px solid #ccc;
    width: 50%; height: 10px;
}
.tree li::after{
    right: auto; left: 50%;
    border-left: 1px solid #ccc;
}

/* Remove connecting lines from the first child */
.tree li:first-child::before, .tree li:last-child::after{
    border: none;
}

/* Add a connector to the top of the parent */
.tree li:only-child::after, .tree li:only-child::before {
    top: 0;
    left: 50%;
    width: 1px;
    height: 10px;
    border: none;
    border-left: 1px solid #ccc;
}
.tree li:only-child::after, .tree li:only-child::before { /* specific for the 'Me'/'Sibling' level */
    content: none;
}
.tree li:only-child{ 
    padding-top: 0;
}

/* Add a line connecting the parent to the children */
.tree ul::before{
    content: '';
    position: absolute; top: 0; left: 50%;
    border-left: 1px solid #ccc;
    width: 0; height: 20px;
}

/* Style the box for each person */
.tree li a{
    border: 1px solid #ccc;
    padding: 5px 10px;
    text-decoration: none;
    color: #666;
    background-color: #fafafa;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    display: inline-block;
    border-radius: 5px;
    transition: all 0.5s;
    -webkit-transition: all 0.5s;
    -moz-transition: all 0.5s;
}

/* Hover effects */
.tree li a:hover, .tree li a:hover+ul li a {
    background: #c8e4f1; 
    color: #000; 
    border: 1px solid #94a0b4;
}
.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;
}

















