body { padding-top: 56px; }
.left-aligned { margin-left: auto; }
.bg-dark { background-color: #343a40 !important; }
.bg-hero { background-color: #45b06cff; }

/* CALLOUT */
.bd-callout { 
  padding: 1.25rem; 
  margin-top: 1.25rem; 
  margin-bottom: 1.25rem; 
  border: 1px solid #e9ecef; 
  border-left-width: .25rem; 
  border-radius: .25rem; 
}
.bd-callout h4 { margin-bottom: 1.25rem; }
.bd-callout p:last-child { margin-bottom: 0; }
.bd-callout code { border-radius: .25rem; }
.bd-callout+.bd-callout { margin-top: -.25rem; }
.bd-callout-info { border-left-color: #5bc0de; }
.bd-callout-warning { border-left-color: #f0ad4e; }
.bd-callout-danger { border-left-color: #d9534f; }

/* footer */
footer a { color: white; font-weight: bold; text-decoration: none; }
footer a:hover { color: white; text-decoration: underline; }

/* Enable smooth scrolling across the page */
html {
  scroll-behavior: smooth;
  /* Adjust this offset number depending on how tall your top navbar is */
  scroll-padding-top: 80px; 
}

/* Smooth scrolling across the page */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; 
}

/* FIX: Keep the parent column standard flex, but make the inner container sticky.
   Using 'align-self: flex-start' on the parent grid cell ensures the column doesn't 
   force the inner container to stretch to the bottom of the main content.
*/
.row > .d-none.d-lg-block {
  align-self: flex-start;
}
 
 
/* Enable smooth scrolling and account for your 56px fixed navbar */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* Slight extra breathing room */
}

/* Force the parent grid cell to not stretch artificially with the main text column */
.sticky-wrapper {
  align-self: flex-start;
}

/* The actual floating Table of Contents container */
.toc-sidebar {
  position: -webkit-sticky; /* Full Safari Support */
  position: sticky;
  top: 90px; /* Keeps it neatly below the fixed top navigation */
  max-height: calc(100vh - 140px); /* Restricts inner window size so it doesn't bleed into footer */
  overflow-y: auto; /* Makes it independently scrollable if the sidebar is very long */
  padding: 1rem 0;
}

/* Add an explicit scroll safety pad to the bottom of the content column.
   This guarantees that clicking 'Anchor Three' gives the browser enough 
   scrolling room to pull the content up without bottoming out and kicking 
   the sidebar layout off-screen. */
main.col-lg-9 {
  padding-bottom: 12rem; 
} 