/**
 * Table of Contents Styles
 * Consistent styling for auto-generated TOCs across the site
 */

/* Container with purple-tinted background */
.toc-container {
  background: rgba(102, 126, 234, 0.08);
  border-radius: 12px;
  padding: 12px 20px 20px 20px;
  margin-bottom: 30px;
}

/* TOC Title - matches original H2 styling */
.toc-title {
  color: #667eea;
  margin: 0 0 20px 0; /* Increased bottom margin to prevent overlap */
  font-size: 1.5em; /* Standard H2 size */
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.2;
}

/* TOC List */
.toc-list {
  line-height: 1.2;
  margin: 0;
  padding-left: 25px;
  margin-block-start: 0;
  margin-top: 12px;
  padding-top: 0;
  list-style-type: decimal;
}

/* Three columns for wide screens */
@media (min-width: 1024px) {
  .toc-list {
    column-count: var(--toc-columns, 2);
    column-gap: 50px;
    margin-top: -16px;
  }
  
  .toc-item {
    break-inside: avoid;
  }
}

/* Two columns for medium screens */
@media (min-width: 768px) and (max-width: 1023px) {
  .toc-list {
    column-count: 2;
    column-gap: 50px;
    margin-top: -16px;
  }
  
  .toc-item {
    break-inside: avoid;
  }
}

/* Single column on mobile */
@media (max-width: 767px) {
  .toc-list {
    column-count: 1 !important;
  }
}

/* TOC Items */
.toc-item {
  margin-bottom: 2px;
}

/* TOC Links - match original styling */
.toc-link {
  font-size: 14px;
  /* No color specified - uses default link color */
  text-decoration: none;
  transition: color 0.2s;
}

.toc-link:hover {
  color: #551A8B; /* Standard visited link purple */
  /* No text-decoration to match original */

/* No visited state styling to match original */