/* Base styles for all screen sizes */
.tree {
  display: flex;
  flex-direction: column;
  margin-top: -7rem;
  width: 80%;
  margin-left: 10%;
  margin-bottom: 5rem;
}

.node {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 10px;
  border: 1px solid #ccc;
  padding: 10px;
  cursor: pointer;
  overflow: hidden; /* Adicione a propriedade overflow para esconder o conteúdo ao colapsar o nó */
  transition: all .3s ease; /* Adicione a propriedade transition para animar as alterações de altura */
}

.node.expanded {
  flex-direction: column;
}

.node.expanded .node {
  display: flex;
}

.node i {
  margin-right: 10px;
  font-size: 18px;
}

.node img {
  width: 50px;
  margin-right: 10px;
  border-radius: 50%;
}

.node h2 {
  font-size: 18px;
  flex: 1;
  margin: 0;
}

.node p {
  font-size: 16px;
  margin: 0;
  flex: 1;
  color: #000;
}

.node:hover {
  background-color: #f1f1f1;
}

/* Media Queries */
/* Smartphone View */
@media (max-width: 767px) {
  .tree {
    width: 90%;
    margin-left: 5%;
    margin-top: -3rem;
  }
  
  .node {
    flex-direction: column;
    padding: 5px;
  }
  
  .node img {
    width: 30px;
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  .node h2 {
    font-size: 16px;
  }
  
  .node p {
    font-size: 14px;
  }
}

/* Tablet and Desktop Views */
@media (min-width: 768px) {
  .tree {
    width: 70%;
    margin-left: 15%;
    margin-top: -5rem;
  }
  
  .node {
    padding: 10px;
  }
  
  .node img {
    width: 40px;
    margin-right: 10px;
  }
  
  .node h2 {
    font-size: 18px;
  }
  
  .node p {
    font-size: 16px;
  }
}

/* Big Desktop View */
@media (min-width: 1440px) {
  /* No changes needed, using base styles */
}
