.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    position: relative;
  }

  .manager {
    padding: 10px 20px;
    border-radius: 20px;
    background: #0b6f77;
    text-align: center;
    font-weight: bold;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    color: white;
  }

  /* Add connecting line and arrow */
  .manager::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: #0b6f77;
    border: dashed #fff 1px;
  }

  /* Arrowhead */
  .manager::before {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #8db6ba;
  }

  /* Remove the arrow for the last manager */
  .manager:last-of-type::before,
  .manager:last-of-type::after {
    display: none;
  }

  /* Departments container and the horizontal line */
  .departments {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    width: 100%;
    position: relative;
  }

  /* Container for lines */
  .lines-container {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 80px;  /* Default position for small screens */
    width: 100%;
  }

  /* Vertical line styles */
  .line {
    position: absolute;
    width: 2px;
    height: 40px;
    background-color: #0b6f77;
    border: dashed #fff 1px;
  }

  .line::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #8db6ba;
  }

  /* Horizontal line that connects to all vertical lines */
  .lines-container::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 120px;
    right: 118px;
    height: 2px;
    background-color: #0b6f77;
    border: dashed #fff 1px;
  }

  /* Department styling */
  .department {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    text-align: center;
    position: relative;
  }

  .units {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .units li {
    background: #fff;
    padding: 5px 10px;
    border: 1px solid #bad6d8;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    margin-top: 5px;
  }
  .unit-list{list-style: none;}

  /* Responsive Design */
  @media (max-width: 768px) {
    .departments {
      flex-direction: column;
      gap: 10px;
    }
    .department{max-width: 100%;}
    .lines-container {
      flex-direction: column;
      gap: 10px;
      align-items: center;
    }

    .lines-container::after {
      display: none;
    }
  }

  /* For large screens */
  @media (min-width: 1024px) {
    .lines-container {
      top: 300px;  /* Adjust the position for large screens */
    }

    .departments {
      margin-top: 95px;  /* Adjust the margin-top for departments on large screens */
    }

    /* Center the lines under the departments */
    .line {
      top: -10px;  /* Adjust the vertical position */
    }
    
    .line:nth-child(1) {
      left: 10%;
    }
    .line:nth-child(2) {
      left: 30%;
    }
    .line:nth-child(3) {
      left: 50%;
    }
    .line:nth-child(4) {
      left: 70%;
    }
    .line:nth-child(5) {
      left: 90%;
    }
  }