body {
  background: #eef0f3;
  font-family: Arial, sans-serif;
  text-align: center;
  overflow-x: hidden;
}
.tree {
  display: flex;
  justify-content: center;
  padding: 40px 0;
  overflow-x: auto;
}
.tree ul {
  position: relative;
  margin: 0;
  list-style: none;
  width: 35%;
  display: block;
  padding-left: 0;
}
.tree ul ul {
  display: none;
  padding-left: 15px;
  border-left: 2px solid #007bff;
  margin: 5px 0;
  padding-top: 0;
}
.tree ul:has(> li:only-child)::before {
  height: 40px;
}
.tree li {
  text-align: center;
  position: relative;
  margin-bottom: 10px;
  width: 100%;
  padding: 0;
}
.tree li:last-child {
  margin: 0;
}
.tree li::before,
.tree li::after,
.tree ul::before {
  display: none;
}
.tree a {
  display: block;
  background-color: #f5faff;
  color: #007bff;
  padding: 10px 15px;
  border: 1px solid #007bff;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  position: relative;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  line-height: 1.4;
}
.tree a:hover {
  background: #007bff;
  color: white;
}
.tree li.has-children > a::after {
  content: "▾";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  transition: transform 0.3s ease;
}
.tree li.has-children.active > a::after {
  transform: translateY(-50%) rotate(180deg);
}
.tree li.active > ul {
  display: block;
  padding-top: 15px;
  margin-bottom: 25px;
  width: 85%;
}
.tree > ul > li.active > ul {
  display: block;
}
.tree li.active a {
  background-color: #cce9ff;
  color: #007bff;
  border-color: #007bff;
}
.tree li.active > a {
  background: #007bff;
  color: white;
  border-color: #007bff;
}
.tree li.has-children > a {
  padding-right: 35px;
}
.tree li > a:hover + ul a {
  background-color: #cce9ff;
  color: #007bff;
  border-color: #007bff;
}
@media (max-width:1399px){.tree ul {width: 50%}}
@media (max-width:991px){.tree ul {width: 75%}}
@media (max-width:767px){.tree ul {width: 90%}}