/* ==========================================================================
   T175 — current-page header-nav highlight (class: iv-current)
   --------------------------------------------------------------------------
   The class is emitted server-side by Models\HeaderNav.cs from the current
   controller/action (see Views\Shared\_Layout.cshtml, both nav copies).

   iv-current is DELIBERATELY distinct from the theme's th-active, which is the
   mobile accordion open/closed state written by thmobilemenu — never reuse it.
   Marking a parent iv-current is styling only; it does NOT open the accordion.

   The vendor assets\css\style.css is never edited; everything lives here.
   Colours come from the theme's own --theme-color / --title-color variables.
   ========================================================================== */

/* ---------- Desktop nav (.main-menu) ---------- */
.main-menu ul li.iv-current > a {
    color: var(--theme-color);
}

/* underline sits inside the existing padding — no width/weight change,
   so nav item widths (and therefore the header layout) are untouched. */
.main-menu > ul > li.iv-current > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 26px;
    height: 2px;
    background: var(--theme-color);
    border-radius: 2px;
    pointer-events: none;
}

/* the theme already uses ::after on a parent item for its +/- glyph —
   don't fight it: parents get colour only, no underline. */
.main-menu > ul > li.iv-current.menu-item-has-children > a::after {
    content: "\2b";
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    height: auto;
    background: none;
    border-radius: 0;
}

/* sub-menu entries */
.main-menu ul.sub-menu li.iv-current > a {
    color: var(--theme-color);
}

/* ---------- Mobile off-canvas nav (.th-mobile-menu) ---------- */
.th-mobile-menu ul li.iv-current > a {
    color: var(--theme-color);
    font-weight: inherit; /* never change weight — it would shift the row */
}

.th-mobile-menu ul li.iv-current > a::before {
    background-color: var(--theme-color);
}

@media (max-width: 400px) {
    .main-menu > ul > li.iv-current > a::after {
        bottom: 20px;
    }
}
