.dianamik-wrapper {
  width: 100%;
  max-width: 1200px; 
  margin: 0 auto;
  padding: 40px 10px;
  background: #ffffff;
  overflow-x: auto; 
}

.dianamik-tree, .dianamik-tree ul {
  display: flex;
  justify-content: center;
  list-style-type: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.dianamik-tree ul { padding-top: 20px; }


.dianamik-tree li {
  text-align: center;
  position: relative;
  padding: 20px 2px 0 2px; 
}

.dianamik-tree li::before, .dianamik-tree li::after {
  content: '';
  position: absolute;
  top: 0; right: 50%;
  border-top: 2px solid #2c3e50;
  width: 50%; height: 20px;
}
.dianamik-tree li::after {
  right: auto; left: 50%;
  border-left: 2px solid #2c3e50;
}

.dianamik-tree li:only-child::after, .dianamik-tree li:only-child::before { display: none; }
.dianamik-tree li:only-child { padding-top: 0; }
.dianamik-tree li:first-child::before, .dianamik-tree li:last-child::after { border: 0 none; }
.dianamik-tree li:last-child::before { border-right: 2px solid #2c3e50; border-radius: 0 5px 0 0; }
.dianamik-tree li:first-child::after { border-radius: 5px 0 0 0; }
.dianamik-tree ul::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  border-left: 2px solid #2c3e50;
  width: 0; height: 20px;
}


.node {
  border: 1px solid #2c3e50;
  padding: 8px 4px;
  display: inline-block;
  border-radius: 4px;
  background-color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 11px; 
  min-width: 85px;  
  max-width: 120px; 
  line-height: 1.2;
  transition: all 0.3s;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
  word-wrap: break-word;
}

.node.head {
  background-color: #2c3e50;
  color: white;
  font-size: 13px;
  padding: 12px 10px;
  max-width: 200px;
}

.node.branch {
  background-color: #ecf0f1;
  font-weight: 600;
}


@media screen and (max-width: 1024px) {
  .dianamik-tree, .dianamik-tree ul {
    flex-direction: column;
    align-items: center;
  }
  .dianamik-tree li {
    padding: 15px 0 0 0;
    width: 100%;
  }
  .dianamik-tree li::before, .dianamik-tree li::after, .dianamik-tree ul::before {
    display: none;
  }
  .dianamik-tree ul {
    border-left: 2px solid #2c3e50;
    margin-left: 20px; 
    padding-top: 0;
    margin-top: 10px;
  }
  .node {
    width: 90%;
    max-width: 250px;
    font-size: 12px;
  }
}