/* Button für ToC-Toggle */
.toggle-button {
  position: fixed;
  right: 0px;
  top: 212px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 5px;
  cursor: pointer;
  z-index: 1001;
  transform: rotate(180deg);
  color: #622f6e;
  transition: 0.5s opacity ease;
  opacity: 0;
}

.toggle-button.open {
  transform: rotate(0deg) translateX(-5px);
}

.table-of-contents {
  position: fixed;
  right: -400px;
  top: 100px;
  width: 300px;
  background-color: #f9f9f9;
  padding: 10px;
  border: 2px solid #ffffff;
  border-radius: 10px 0px 0px 10px;
  transition: transform 0.3s ease;
  color: black;
  max-height: 300px; /* Max height limit */
  overflow-y: auto;  /* Scroll when content exceeds max height */
  position: relative;
  z-index: 3;
}

.table-of-contents.visible {
  transform: translateX(-400px); 
}

.table-of-contents.hidden {
  transform: translateX(400px);
}

.table-of-contents a.active {
  font-weight: bold;
  color: #a43ebe;
  position: relative;
}

.table-of-contents a.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: #a43ebe;
  border-radius: 4px;
}



.table-of-contents a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {

  .table-of-contents,
  .toggle-button {
    display: none;
  }
}

.margin-bottom-1 {
  margin-bottom: 2rem;
}