/* Scrollspy — i2t3 component styles
 * Bootstrap provides scrollspy behaviour via data-bs-spy. Only minor styling.
 */

.i2t3-scrollspy-section { position: relative; }

.i2t3-scrollspy-section .scrollspy-nav {
    position: sticky;
    top: 1rem;
}
.i2t3-scrollspy-section .scrollspy-nav .nav-link {
    border-left: 2px solid transparent;
    color: var(--i2t3-text-muted, #6c757d);
    padding: 0.4rem 0.75rem;
}
.i2t3-scrollspy-section .scrollspy-nav .nav-link.active {
    border-left-color: var(--i2t3-primary, #0d6efd);
    color: var(--i2t3-primary, #0d6efd);
    font-weight: 600;
}

/* Mobile / tablet navigation (below md): the sidebar is hidden, so sections
 * are reached via a dropdown. Mirrors the original ns-scrollspy dropdown nav. */
.i2t3-scrollspy-section .scrollspy-nav-mobile {
    z-index: 2;
}
.i2t3-scrollspy-section .scrollspy-nav-mobile .dropdown-menu {
    max-height: 60vh;
    overflow-y: auto;
}
.i2t3-scrollspy-section .scrollspy-nav-mobile .dropdown-item.active {
    background-color: var(--i2t3-primary, #0d6efd);
    color: #fff;
}

/* Sections: scroll-margin keeps the heading clear of a sticky/fixed header
 * when jumped to (Bug 2 offset compensation, alongside script.js smooth scroll). */
.i2t3-scrollspy-section .scrollspy-content-section {
    padding: 2rem 0;
    scroll-margin-top: var(--i2t3-scrollspy-offset, 85px);
}
