.header-nav-main .nav-pills .nav-link {
    position: relative;
    border-bottom: 3px solid transparent;
    transition: border-color 0.3s ease;
}

.header-nav-main .nav-pills .nav-link.active,
.header-nav-main .nav-pills .nav-link:hover {
    border-bottom-color: #324f7d; /* Change to your primary color */
}

/* Ensure the top thin header remains visible when the header becomes sticky/shrinks */
html.sticky-header-active #header .header-top {
    display: flex !important;
    height: auto !important;
    min-height: 40px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Prevent header-effect-shrink from collapsing the header-top */
html.sticky-header-active #header.header-effect-shrink .header-top {
    display: flex !important;
    height: auto !important;
}

/* Match background and border so it looks consistent with non-sticky state */
html.sticky-header-active #header .header-top.header-top-default {
    background: var(--grey-100) !important;
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
}

/* Small-screen tweak: maintain compact top header on mobile when sticky */
@media (max-width: 991px) {
    html.sticky-header-active #header .header-top {
        min-height: 40px !important;
    }
}
