/*
#toc-sidebar {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  padding: 1rem;
  background: #f9f9f9;
  border-left: 4px solid #ccc;
  font-size: 0.9rem;
}

#toc-sidebar ul {
  list-style: none;
  padding-left: 0;
}

#toc-sidebar li {
  margin-bottom: 0.5rem;
}

#toc-sidebar a {
  text-decoration: none;
  color: #333;
}

#toc-sidebar a:hover {
  color: #007acc;
  text-decoration: underline;
}

@media (max-width: 768px) {
  #toc-sidebar {
    display: none;
  }
}
*/

#toc-sidebar {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  padding: 1.5rem 1rem;
  background: #ffffff;
  border-left: 4px solid #6f6f6f;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.05);
  font-family: "Helvetica Neue", sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

#toc-sidebar h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #3a3a3a;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.3rem;
}

#toc-sidebar ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#toc-sidebar li {
  margin: 0.3rem 0;
  transition: margin-left 0.2s ease;
}

#toc-sidebar li:hover {
  margin-left: 0.3rem;
}

#toc-sidebar a {
  color: #444;
  text-decoration: none;
  padding: 0.2rem 0;
  display: inline-block;
  transition: color 0.2s ease;
}

#toc-sidebar a:hover {
  color: #007acc;
  text-decoration: underline;
}

#toc-sidebar ul ul {
  margin-left: 1rem;
  border-left: 1px dashed #ddd;
  padding-left: 0.5rem;
}

@media (max-width: 768px) {
  #toc-sidebar {
    display: none;
  }
}
/*
.code-wrapper {
  background-color: #1e1e1e;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  box-shadow: 0 0 0 1px #333;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #2d2d2d;
  color: #ccc;
  font-family: sans-serif;
  font-weight: bold;
  padding: 0.5em 1em;
  border-bottom: 1px solid #444;
}
  */

.code-wrapper {
  background-color: #1e1e1e;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  box-shadow: 0 0 0 1px #333;
}

/* Header styling remains the same */
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #2d2d2d;
  color: #ccc;
  font-family: sans-serif;
  font-weight: bold;
  padding: 0.3em 0.8em;
  border-bottom: 1px solid #444;
  font-size: 0.85rem;
}

/* Code block spacing and line height */
.code-wrapper pre {
  margin: 0;
  padding: 0.4em 0.6em;
  line-height: 0.8;
  overflow-x: auto;
  font-family: 'Fira Code', 'Courier New', monospace;
  background: transparent;
}

.code-wrapper pre code {
  font-size: inherit;
  background: transparent;
  padding: 0;
  line-height: 1.3 !important;
}

.language-label {
  font-size: 1em;
  text-transform: lowercase;
}

.copy-button {
  background-color: #444;
  color: #eee;
  border: none;
  padding: 0.3em 0.6em;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85em;
  transition: background 0.2s;
}

.copy-button:hover {
  background-color: #666;
}

/* Scrollbar (as before) */
.code-wrapper pre::-webkit-scrollbar {
  height: 8px;
}
.code-wrapper pre::-webkit-scrollbar-thumb {
  background-color: #666;
  border-radius: 4px;
}
.code-wrapper pre::-webkit-scrollbar-thumb:hover {
  background-color: #999;
}
.code-wrapper pre {
  margin: 0;
  padding: 1em;
  overflow: auto;
  color: #ddd;
  background-color: #1e1e1e;
  font-family: "Fira Code", monospace;
  scrollbar-width: thin;
  scrollbar-color: #666 transparent;
}

/* gallery */
.lightbox-gallery-left {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: left;
  margin-top: 1rem;
}

.lightbox-gallery-center {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.lightbox-gallery-right {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: right;
  margin-top: 1rem;
}

.gallery-thumb {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.gallery-caption {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.5rem;
}

.gallery-item {
  text-align: center;
}

.gallery-collection {
  width: auto;
  height: 200px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-collection:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
  /* Disable Lightbox on small screens */
  .lightbox-link {
    pointer-events: none;
    cursor: default;
  }
}