/* Table of Contents Button */
.toc-button {
  position: fixed;
  left: -25px;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #0d6efd;
  border: 2px solid #fff;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.toc-button:hover {
  left: 0;
  background-color: #0b5ed7;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.toc-button i {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.toc-button:hover i {
  transform: scale(1.1);
}

/* Looping Ripple Effect */
.toc-button::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #0d6efd;
  animation: ripple 2s linear infinite;
  opacity: 0;
  pointer-events: none;
}

.toc-button::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #0d6efd;
  animation: ripple 2s linear infinite 0.5s;
  opacity: 0;
  pointer-events: none;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Table of Contents Modal */
.toc-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.toc-modal.show {
  opacity: 1;
}

.toc-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toc-modal.show .toc-modal-content {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.toc-header h3 {
  margin: 0;
  color: var(--primary-color);
}

.toc-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  transition: transform 0.3s ease;
}

.toc-close:hover {
  transform: rotate(90deg);
}

.toc-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-body li {
  margin: 10px 0;
}

.toc-body a {
  color: #333;
  text-decoration: none;
  display: block;
  padding: 5px 0;
  transition: all 0.3s ease;
  position: relative;
}

.toc-body a:hover {
  color: var(--primary-color);
  padding-left: 10px;
}

.toc-body a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0;
  background-color: var(--primary-color);
  transition: height 0.3s ease;
}

.toc-body a:hover::before {
  height: 100%;
}

.toc-body .dropdown-item {
  padding-left: 20px;
} 