.single-blog .blur-container-bottom {
  display: none;
}
.single-blog .hero {
  display: flex;
  padding: 1.5rem;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 1.5rem;
  flex: 1 0 0;
  align-self: stretch;
  border-radius: 0;
  background-size: cover;
  background-position: right;
}
.featured-blog {
  border-radius: 1rem;
}
.single-blog span {
  color: var(--Basic-White);
}
.blog-excerpt {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 36.06%,
    rgba(255, 255, 255, 0.04) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  padding: 10px;
}
.single-blog .hero-content .post-meta {
  padding-bottom: 2rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal !important;
}
.single-blog .hero-content {
  max-width: 47rem;
}
.single-blog.post-content,
.post-content.single-blog {
  max-width: 47rem;
}
.post-content.single-blog {
  gap: 1rem;
  padding: 0 1.5rem 1rem;
}
.back-link.single-blog {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--Primary-blue-400, #5c60e4);
  text-decoration: none;
}
.single-blog .post-content img {
  border-radius: var(--blog_hero-radius);
}
.back-link.single-blog .back-icon {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--Primary-blue-400, #5c60e4);
}
.post-meta_text {
  gap: 1.25rem;
}
.back-link {
  padding: 1.5rem;
}
.single-post-wrap {
  color: var(--Basic-White);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.single-blog-finby .wrapper.single-post-wrap h1,
.single-blog-finby .wrapper.single-post-wrap h2,
.single-blog-finby .wrapper.single-post-wrap h3,
.single-blog-finby .wrapper.single-post-wrap h4,
.single-blog-finby .wrapper.single-post-wrap h5,
.single-blog-finby .wrapper.single-post-wrap h6 {
  line-height: 30px;
}

@media (min-width: 767px) {
  .single-blog-finby__flex {
    gap: 2.5rem;
  }
  .back-link {
    padding: 1rem 2.5rem 1rem 4rem;
  }
  .single-blog .hero {
    border-radius: var(--blog_hero-radius);
    padding: 0;
  }
  .post-content.single-blog {
    gap: 2rem;
    padding: 0;
  }
  .single-blog-finby-layout {
    padding: 1.5rem 2rem 6.25rem 2rem;
  }
  .related-articles-single-blog {
    gap: 5rem;
    margin-top: 5rem;
  }
  .single-blog-finby .wrapper.single-post-wrap h1,
  .single-blog-finby .wrapper.single-post-wrap h2,
  .single-blog-finby .wrapper.single-post-wrap h3,
  .single-blog-finby .wrapper.single-post-wrap h4,
  .single-blog-finby .wrapper.single-post-wrap h5,
  .single-blog-finby .wrapper.single-post-wrap h6 {
    line-height: normal;
  }
  .single-blog .hero-content {
    padding: 0;
  }
  .single-blog .hero-content.section-divider {
    display: none;
  }
}
@media (min-width: 992px) {
  .single-blog-finby {
    max-width: 90rem;
    left: 50%;
    transform: translate(-50%);
  }
  .single-blog-finby-layout {
    padding: 1.5rem 4rem 6.25rem 4rem;
  }
}

/* ---------- "On this page" sidebar (desktop only) ---------- */
.blog-toc {
  display: none;
}

@media (min-width: 992px) {
  /* overflow-x: hidden on html/body/main makes them scroll containers, which breaks position: sticky.
     clip crops the same way without creating a scroll container. */
  html:has(body.single-blog),
  body.single-blog,
  body.single-blog main.main-wrapper {
    overflow-x: clip;
    overflow-y: visible;
  }
  body.single-blog main.main-wrapper {
    height: auto;
  }
  /* Grid layout only when the toc sidebar is actually rendered –
     posts with the "hide sidebar" checkbox (or no headings) keep the normal layout. */
  .single-blog-finby .single-blog-finby__flex:has(> .blog-toc) {
    display: grid;
    grid-template-columns: 15rem minmax(0, 47rem);
    grid-template-areas:
      ". hero"
      "toc content";
    column-gap: 3rem;
    align-items: start;
  }
  .single-blog-finby .single-blog-finby__flex > .hero {
    grid-area: hero;
    width: 100%;
  }
  .single-blog-finby .single-blog-finby__flex > .post-content {
    grid-area: content;
  }
  .blog-toc {
    grid-area: toc;
    display: block;
    position: sticky;
    top: calc(var(--navbar-height) + var(--wp-adminbar-h, 0px) + 1.5rem);
    max-height: calc(100vh - var(--navbar-height) - var(--wp-adminbar-h, 0px) - 3rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--Gray-800, #444452) transparent;
    padding-right: 0.75rem;
  }
  .blog-toc::-webkit-scrollbar {
    width: 0.25rem;
    background: transparent;
  }
  .blog-toc::-webkit-scrollbar-track {
    background: transparent;
  }
  .blog-toc::-webkit-scrollbar-thumb {
    border-radius: 0.5rem;
    background: var(--Gray-800, #444452);
  }
  .blog-toc::-webkit-scrollbar-thumb:hover {
    background: var(--Gray-700, #59596b);
  }
  .blog-toc__title {
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--white-transparent-16);
  }
  .blog-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  /* reset.css adds a bullet via ul li::before – not wanted here */
  .blog-toc__list li {
    padding-left: 0;
  }
  .blog-toc__list li::before {
    content: none;
  }
  .blog-toc__link {
    display: block;
    color: var(--Gray-300);
    text-decoration: none;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    transition: color 0.2s ease, border-color 0.2s ease;
  }
  .blog-toc__link:hover {
    color: var(--Basic-White);
  }
  .blog-toc__link.is-active {
    color: var(--Basic-White);
    font-weight: var(--font-weight-medium);
    border-left-color: var(--Primary-blue-400);
  }
  .single-blog-finby .post-content h2,
  .single-blog-finby .post-content h3,
  .single-blog-finby .post-content h4 {
    scroll-margin-top: calc(var(--navbar-height) + var(--wp-adminbar-h, 0px) + 1.5rem);
  }
}
