/* static/css/blog.css */
.toc-sidebar {
  top: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.toc-container {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.375rem;
  padding: 1.5rem;
}

.toc-container h5 {
  color: #495057;
  margin-bottom: 1rem;
  font-weight: 600;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-item {
  text-decoration: none;
  color: #6c757d;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease-in-out;
  border-left: 3px solid transparent;
}

.toc-item:hover {
  color: #495057;
  background-color: #e9ecef;
  text-decoration: none;
}

.toc-item.toc-active {
  color: #007bff;
  background-color: #e7f1ff;
  border-left-color: #007bff;
  font-weight: 500;
}

.toc-level-2 {
  font-weight: 600;
  padding-left: 0.75rem;
}

.toc-level-3 {
  font-weight: 500;
  padding-left: 1.5rem;
  font-size: 0.9em;
}

.toc-level-4 {
  font-weight: 400;
  padding-left: 2.25rem;
  font-size: 0.85em;
  color: #868e96;
}

/* Highlight active TOC item */
.toc-highlight {
  background-color: #fff3cd;
  padding: 2px 4px;
  border-radius: 2px;
}

.blog-index,
.blog-post {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: auto;
  /* margin: 2rem auto;  */
  padding: 2rem;
  max-width: 1200px;
}

.blog-post-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  border: 1px solid #e9ecef;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.blog-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blog-post-card .card-img-top {
  overflow: hidden;
}

.blog-post-card .card-img-top img {
  transition: transform 0.3s ease;
}

.blog-post-card:hover .card-img-top img {
  transform: scale(1.05);
}

.blog-post-item {
  transition: background-color 0.2s ease;
  padding: 1rem;
  border-radius: 0.375rem;
}

.blog-post-item:hover {
  background-color: #f8f9fa;
}


/* --- Code Snippet Block --- */
.code-snippet-wrapper {
  position: relative;
  margin: 5px 0;
  border-radius: 8px;
  overflow: hidden;
}
.code-snippet-wrapper.theme-dark {
  background-color: #272822;
}
.code-snippet-wrapper.theme-light pre,
.code-snippet-wrapper.theme-light code {
  /* You'll need a light Prism theme for this to work well */
  background: #f5f2f0 !important;
  color: #333 !important;
}

.code-snippet-wrapper .toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 15px;
  background-color: rgba(0, 0, 0, 0.2);
}
.code-snippet-wrapper .language-label {
  color: #ccc;
  font-family: monospace;
  font-size: 0.9em;
}
.code-snippet-wrapper .copy-button {
  background-color: #5cb85c;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8em;
  transition: background-color 0.2s;
}
.code-snippet-wrapper .copy-button:hover {
  background-color: #4cae4c;
}
.code-snippet-wrapper .copy-button.copied {
  background-color: #337ab7;
}

/* Ensure pre tag doesn't have extra margin */
.code-snippet-wrapper pre {
  margin: 0 !important;
} 
/* --- Social Share Buttons --- */
.social-share {
  align-items: center;
}

.social-share h4 {
  margin-bottom: 1rem;
  color: #333;
  font-size: 1.1rem;
}

.social-share-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.social-share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.social-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-share-btn.facebook {
  background-color: #1877f2;
}

.social-share-btn.twitter {
  background-color: #000;
}

.social-share-btn.linkedin {
  background-color: #0077b5;
}

.social-share-btn.copy-link {
  background-color: #6c757d;
}

.social-share-btn svg {
  width: 18px;
  height: 18px;
}

.copy-message {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background-color: #d4edda;
  color: #155724;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .social-share-buttons {
    flex-direction: column;
  }

  .social-share-btn {
    justify-content: center;
  }
}

/* Force Bootstrap table styles globally */
.post-content table {
    width: 100% !important;
    margin-bottom: 1rem !important;
    background-color: transparent !important;
}

.post-content .table {
    border-collapse: collapse !important;
}

.post-content .table-bordered {
    border: 1px solid #000 !important;
}

.post-content .table-bordered th,
.post-content .table-bordered td {
    border: 1px solid #000 !important;
    padding: 0.75rem !important;
}

.post-content .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.post-content .table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075) !important;
}

.post-content ul li{
padding: 5px;
}
.post-content .table-responsive {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}


/* Blog Post Styling */
.blog-post .featured-image {
  width: 100%;
  height: auto;
}
.blog-post h2 {
  font-size: 2.5em;
  margin-bottom: 0.5rem;
}
.post-meta {
  color: #555;
  font-style: italic;
}
.post-body {
  font-size: 1.1em;
}
.post-body p {
  margin-bottom: 1rem;
}

/* Rich Text Block */
.rich-text-block a {
  color: #007bff;
  text-decoration: none;
}
.rich-text-block a:hover {
  text-decoration: underline;
}