/* 1.14.0 – layout structures and usable space. Loaded after legacy themes. */

html body.mh-nav-custom.mh-nav-custom #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) {
    max-width: calc(100vw - 24px) !important; padding: var(--mh-nd-panel-padding,6px) !important;
}

html body.mh-nav-custom.mh-nav-custom #master-header#master-header .mh-menu-inline .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li > a {
    padding: var(--mh-nd-padding,10px) var(--mh-nd-link-padding-x,12px) !important; min-height: var(--mh-nd-row-height,40px) !important; font-size: var(--mh-nd-font-size,15px) !important;
}

html body.mh-nav-custom.mh-nav-custom #master-header#master-header .mh-menu-inline .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) .mh-nd-parent > a {
    padding-inline-end: calc(var(--mh-nd-link-padding-x,12px) + 30px) !important;
}

html body.mh-nav-custom.mh-nav-custom #master-header#master-header .mh-menu-inline .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) {
    padding: 0 0 0 var(--mh-nd-nested-indent,4px) !important; margin: 4px 0 !important; border: 0 !important; width: 100% !important; inline-size: 100% !important;
}

html body.mh-nav-custom.mh-nav-custom #master-header#master-header .mh-menu-inline .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) .mh-nav-toggle {
    top: max(2px,calc((var(--mh-nd-row-height,40px) - 28px)/2)) !important; height: 28px !important; min-height: 28px !important;
}

html body.mh-nav-custom.mh-nav-custom:is(.mh-nd-layout-columns,.mh-nd-layout-tiles) #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) {
    grid-template-columns: repeat(var(--mh-nd-columns,1),minmax(0,1fr)) !important;
}

html body.mh-nav-custom.mh-nav-custom .mh-nav-sidebar .mh-sidebar-content {
    padding: max(6px,var(--mh-nd-panel-padding,6px)) !important;
}

html body.mh-nav-custom.mh-nav-custom .mh-nav-sidebar .mh-sidebar-list li > a {
    padding: var(--mh-nd-padding,10px) var(--mh-nd-link-padding-x,12px) !important; min-height: var(--mh-nd-row-height,40px) !important; font-size: var(--mh-nd-font-size,15px) !important;
}

html body.mh-nav-custom.mh-nav-custom .mh-nav-sidebar .mh-sidebar-list li.mh-sb-parent > a {
    padding-inline-end: calc(var(--mh-nd-link-padding-x,12px) + 42px) !important;
}

html body.mh-nav-custom.mh-nav-custom .mh-nav-sidebar .mh-sidebar-list .sub-menu {
    margin: 4px 0 !important; padding: 0 0 0 var(--mh-nd-nested-indent,4px) !important; border: 0 !important; width: 100% !important; box-sizing: border-box !important;
}

html body.mh-nav-custom.mh-nav-custom .mh-nav-sidebar .mh-sidebar-toggle {
    width: 40px !important; height: max(40px,var(--mh-nd-row-height,40px)) !important; min-height: 40px !important; top: 0 !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-ribbon #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) {
    display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; gap: 8px !important; border-radius: 10px !important; align-items: flex-start !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-ribbon #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li {
    flex: 1 1 var(--mh-nd-item-width,110px) !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-ribbon #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li > a {
    text-align: center !important; border-radius: 6px !important; min-height: max(44px,var(--mh-nd-row-height)) !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-feature #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) {
    grid-template-columns: minmax(0,1fr) minmax(0,1.2fr) !important; gap: 8px !important; align-items: stretch !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-feature #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li:first-child {
    grid-column: 1 !important; grid-row: 1 / span var(--mh-nd-feature-rows,3) !important; display: flex !important; flex-direction: column !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-feature #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li:first-child > a {
    height: 100% !important; display: flex !important; flex-direction: column !important; justify-content: space-between !important; gap: 32px !important; padding: max(18px,var(--mh-nd-padding)) max(18px,var(--mh-nd-link-padding-x)) !important; font-size: max(22px,var(--mh-nd-font-size)) !important; font-weight: 700 !important; background: var(--mh-nd-sub-hover-bg) !important; color: var(--mh-nd-sub-hover-text) !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-feature #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li:first-child > a::before {
    content: attr(data-mh-index) !important; display: block !important; position: static !important; font: 400 42px/1 system-ui !important; opacity: .45 !important; background: none !important; border: 0 !important; transform: none !important; width: auto !important; height: auto !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-feature #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li:nth-child(n+2):nth-child(-n+4) {
    grid-column: 2 !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-feature #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)).mh-nd-narrow {
    grid-template-columns: minmax(0,1fr) !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-feature #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)).mh-nd-narrow > li {
    grid-column: auto !important; grid-row: auto !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-directory #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) {
    grid-template-columns: repeat(var(--mh-nd-columns,1),minmax(0,1fr)) !important; gap: 14px !important; align-items: start !important; padding: max(10px,var(--mh-nd-panel-padding)) !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-directory #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li {
    border-inline-start: 2px solid var(--mh-nd-sub-border) !important; padding-inline-start: 6px !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-directory #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li > a {
    font-weight: 750 !important; border-bottom: 1px solid var(--mh-nd-sub-border) !important; border-radius: 0 !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-directory #master-header#master-header .mh-menu-inline .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) {
    display: grid !important; opacity: 1 !important; visibility: inherit !important; pointer-events: inherit !important; transform: none !important; clip-path: none !important; filter: none !important; animation: none !important; transition: none !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-directory #master-header#master-header .mh-menu-inline .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) .mh-nav-toggle {
    display: none !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-directory #master-header#master-header .mh-menu-inline .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) .mh-nd-parent > a {
    padding-inline-end: var(--mh-nd-link-padding-x,12px) !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-index #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) {
    gap: 0 !important; border-radius: 0 !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-index #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li:not(:last-child) {
    border-bottom: 1px solid var(--mh-nd-sub-border) !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-index #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li > a {
    display: grid !important; grid-template-columns: 46px minmax(0,1fr) !important; align-items: center !important; gap: 10px !important; min-height: 66px !important; font-size: max(20px,var(--mh-nd-font-size)) !important; border-radius: 0 !important; font-weight: 600 !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-index #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li > a::before {
    content: attr(data-mh-index) !important; display: block !important; position: static !important; opacity: .5 !important; width: auto !important; height: auto !important; border: 0 !important; background: none !important; transform: none !important; font: 400 26px/1 system-ui !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-pills #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) {
    display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 9px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 0 !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-pills #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li {
    width: fit-content !important; max-width: 100% !important; flex: 0 0 auto !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-pills #master-header#master-header .mh-menu-inline > ul > li > .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li > a {
    background: var(--mh-nd-sub-bg) !important; border: 1px solid var(--mh-nd-sub-border) !important; border-radius: 999px !important; box-shadow: 0 3px 10px #0f172a14 !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-layout-pills #master-header#master-header .mh-menu-inline .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) {
    background: var(--mh-nd-sub-bg) !important; border-radius: var(--mh-nd-radius) !important; padding: 4px !important;
}

html body.mh-nav-custom.mh-nav-custom:is(.mh-nd-layout-feature,.mh-nd-layout-pills) #master-header#master-header .mh-menu-inline .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li:is(.current-menu-item,.current_page_item) > a {
    color: var(--mh-nd-sub-active-text) !important; background: var(--mh-nd-sub-active-bg) !important;
}

html body.mh-nav-custom.mh-nav-custom:is(.mh-nd-layout-feature,.mh-nd-layout-pills) #master-header#master-header .mh-menu-inline .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li > a:is(:hover,:focus-visible) {
    color: var(--mh-nd-sub-hover-text) !important; background-color: var(--mh-nd-sub-hover-bg) !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-sidebar-style-fullscreen .mh-nav-sidebar.mh-nav-sidebar {
    --mh-sb-inset: 0px; left: 0 !important; right: 0 !important; width: 100% !important; border-radius: 0 !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-sidebar-style-fullscreen .mh-nav-sidebar .mh-sidebar-head {
    padding: 24px clamp(20px,5vw,80px) !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-sidebar-style-fullscreen .mh-nav-sidebar .mh-sidebar-content {
    padding: 24px clamp(16px,5vw,80px) !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-sidebar-style-fullscreen .mh-nav-sidebar .mh-sidebar-list {
    display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 16px 40px !important; counter-reset: mh-full-nav; max-width: 1200px !important; margin-inline: auto !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-sidebar-style-fullscreen .mh-nav-sidebar .mh-sidebar-list > li {
    counter-increment: mh-full-nav; border-bottom: 1px solid var(--mh-nd-sub-border) !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-sidebar-style-fullscreen .mh-nav-sidebar .mh-sidebar-list > li > a {
    font-size: clamp(24px,3vw,36px) !important; font-weight: 650 !important; padding-block: 18px !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-sidebar-style-fullscreen .mh-nav-sidebar .mh-sidebar-list > li > a::before {
    content: counter(mh-full-nav,decimal-leading-zero) !important; display: block !important; font: 500 11px/1.4 system-ui !important; letter-spacing: .1em !important; opacity: .55 !important; margin-bottom: 8px !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-sidebar-style-fullscreen .mh-nav-sidebar .mh-sidebar-foot {
    padding-inline: clamp(20px,5vw,80px) !important;
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-sidebar-style-dialog .mh-nav-sidebar.mh-nav-sidebar {
    --mh-sb-inset: 0px; left: 50% !important; right: auto !important; top: calc(50% + var(--mh-sb-top)/2) !important; bottom: auto !important; translate: -50% -50%; width: min(max(560px,calc(var(--mh-nd-sidebar-width,380px)*1.45)),calc(100vw - 24px)) !important; height: auto !important; max-height: min(680px,calc(100dvh - var(--mh-sb-top) - 24px)) !important; border-radius: max(16px,var(--mh-nd-radius)) !important;
}

@media (max-width: 640px) {
    html body.mh-nav-custom.mh-nav-custom.mh-nd-sidebar-style-fullscreen .mh-nav-sidebar .mh-sidebar-list { grid-template-columns: minmax(0,1fr) !important; gap: 4px !important; }
}

@media (pointer: coarse) {
    html body.mh-nav-custom.mh-nav-custom #master-header#master-header .mh-menu-inline .sub-menu:where(:not(.mh-mega *, .mega-menu *, .mh-mega-full *)) > li > a, html body.mh-nav-custom.mh-nav-custom .mh-nav-sidebar .mh-sidebar-list li > a { min-height: max(44px,var(--mh-nd-row-height,40px)) !important; }
    html body.mh-nav-custom.mh-nav-custom .mh-nav-sidebar .mh-sidebar-toggle { min-width: 44px !important; min-height: 44px !important; }
}

html body.mh-nav-custom.mh-nav-custom.mh-nd-sidebar-style-fullscreen .mh-nav-sidebar .mh-sidebar-list:empty { display: none !important; }
