.tree {
    text-transform: capitalize;
}

.tree ul {
  	position: relative;
	padding: 1em 0; 
 	white-space: nowrap;
  	margin: 0 auto;
  	text-align: center;
}

.tree ul::after {
	content: '';
	display: table;
	clear: both;
}

.tree li {
  	display: inline-block;
  	vertical-align: top;
  	text-align: center;
	list-style-type: none;
	position: relative;
	padding: 1em .5em 0 .5em;
}

.tree ul ul::before{
	content: '';
	position: absolute; 
  	top: 0; 
  	left: 50%;
	border-left: 1px solid #ccc;
	width: 0; 
  	height: 1em;
}

.tree ul ul li::before, .tree ul ul li::after {
	content: '';
	position: absolute; 
	top: 0; 
	right: 50%;
	border-top: 1px solid #ccc;
	width: 51%;
	height: 1em;
}

.tree ul ul li::after {
	right: auto; 
    left: 50%;
  	border-left: 1px solid #ccc;
}

.tree ul ul li:only-child::after, .tree ul ul li:only-child::before {
	display: none;
}

.tree ul ul li:only-child {
	padding-top: 0;
}

.tree ul ul li:first-child::before, .tree ul ul li:last-child::after {
	border: 0 none;
}

.tree ul ul li:last-child::before {
	border-right: 1px solid #ccc;
	border-radius: 0 5px 0 0;
}

.tree ul ul li:first-child::after {
	border-radius: 5px 0 0 0;
}

.tree li a {
	border: 1px solid #ccc;
	padding: .5em .75em;
	text-decoration: none;
	display: inline-block;
	border-radius: 5px;
  	color: #333;
  	position: relative;
  	top: 1px;
}

.tree li a:hover,
.tree li a:hover+ul li a {
	background: #e9453f;
  	color: #fff;
  	border: 1px solid #e9453f;
}

.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:  #e9453f;
}