.toc {
  position: fixed;
  top: 165px;
  right: 20px;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 70vh;
  overflow-y: auto;
  width: 280px;
  transition: all 0.3s ease;
}

.toc:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.toc h4, .toc h5 {
  margin: 0 0 15px;
  text-align: center;
  font-family: 'IRANSansXV';
  font-size: 16px;
  color: #1b6d85;
  border-bottom: 2px solid #27d0d5;
  padding-bottom: 10px;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: right;
  font-family: 'IRANSansXV';
  font-size: 14px;
  font-weight: bold;
  color: #0a675b;
}

.toc ul li {
  margin: 8px 0;
  padding: 5px 0;
  border-bottom: 1px dotted #e0e0e0;
}

.toc ul li:last-child {
  border-bottom: none;
}

.toc ul li a {
  text-decoration: none;
  color: #0f7788;
  transition: all 0.3s;
  display: block;
  padding: 5px 10px;
  border-radius: 5px;
}

.toc ul li a:hover {
  background-color: rgba(39, 208, 213, 0.1);
  padding-right: 15px;
  color: #27d0d5;
}

/* استایل‌های اضافی برای فیلتر */
.filter-container {
  max-height: 80vh;
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: #27d0d5 #f1f1f1;
}

.filter-container::-webkit-scrollbar {
  width: 6px;
}

.filter-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.filter-container::-webkit-scrollbar-thumb {
  background: #27d0d5;
  border-radius: 10px;
}

.filter-container::-webkit-scrollbar-thumb:hover {
  background: #1b6d85;
}

/* استایل‌های واکنش‌گرا */
@media (max-width: 992px) {
  .toc {
    width: 250px;
  }
}

@media (max-width: 768px) {
  .toc {
    position: static;
    width: 100%;
    max-height: none;
    margin-bottom: 20px;
  }
}