/* ==========================================================================
   HPU Mega Menu strip  (all selectors are prefixed with .hpu-mm / .hpu-mm__)
   Does not touch any site / Bootstrap class.  Works with Bootstrap 5.0.0-beta3.
   Edit the variables on .hpu-mm to change colours / height / width.
   ========================================================================== */

.hpu-mm {
    --hpu-mm-bg: #7b1d1d;
    --hpu-mm-bg-dark: #5c1212;
    --hpu-mm-accent: #e8b84a;
    --hpu-mm-text: #ffffff;
    --hpu-mm-panel-text: #2a2a2a;
    --hpu-mm-head: #a3361d;
    --hpu-mm-soft: #fdf3df;
    --hpu-mm-h: 52px;
    --hpu-mm-max: 1320px;

    position: relative;
    display: block;
    clear: both;
    width: 100%;
    min-height: var(--hpu-mm-h);
    z-index: 1030;
    font-family: 'DM Sans', Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.3;
}

.hpu-mm *,
.hpu-mm *::before,
.hpu-mm *::after {
    box-sizing: border-box;
}

.hpu-mm ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hpu-mm li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hpu-mm a {
    text-decoration: none;
}

/* ---------- bar ---------- */
.hpu-mm__bar {
    position: relative;
    width: 100%;
    background: linear-gradient(90deg, #003854, #4b8038, #006d95);
    z-index: 1030;
	border-bottom: solid 1px #a7bfad;
}

/* sticky state (added by JS when the strip reaches the top of the screen) */
.hpu-mm.is-stuck .hpu-mm__bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

.hpu-mm__inner {
    max-width: var(--hpu-mm-max);
    margin: 0 auto;
    padding: 0 15px;
}

/* ---------- top level link / button ---------- */
.hpu-mm .hpu-mm__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--hpu-mm-text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    transition: background-color .2s ease, color .2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.hpu-mm .hpu-mm__link:focus {
    outline: none;
}

.hpu-mm .hpu-mm__link:focus-visible {
    outline: 2px solid var(--hpu-mm-accent);
    outline-offset: -3px;
}

.hpu-mm__chev {
    display: none;
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-top: -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease, margin .2s ease;
}

/* ---------- panel (shared look) ---------- */
.hpu-mm__panel-title {
    padding: 12px 20px;
    border-bottom: 1px solid #ecd9a6;
    background: linear-gradient(90deg, #fdf1d6 0%, #fffaf0 100%);
    color: var(--hpu-mm-head);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.hpu-mm__cols {
    display: grid;
    grid-template-columns: repeat(var(--hpu-cols, 3), minmax(0, 1fr));
    padding: 4px 0 14px;
}

.hpu-mm__col {
    min-width: 0;
    padding: 14px 20px 0;
    border-left: 1px solid #ececec;
}

.hpu-mm__col:first-child {
    border-left: 0;
}

.hpu-mm__colhead {
    min-height: 1.3em;
    margin: 0 0 8px;
    color: var(--hpu-mm-head);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hpu-mm .hpu-mm__sublink {
    display: block;
    margin: 0 -10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--hpu-mm-panel-text);
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.35;
    transition: background-color .15s ease, color .15s ease;
}

.hpu-mm .hpu-mm__sublink:hover,
.hpu-mm .hpu-mm__sublink:focus {
    background: var(--hpu-mm-soft);
    color: var(--hpu-mm-head);
}

.hpu-mm .hpu-mm__sublink:focus-visible {
    outline: 2px solid var(--hpu-mm-head);
    outline-offset: -2px;
}

/* ==========================================================================
   DESKTOP  (>= 992px)  – hover / click dropdowns
   ========================================================================== */
@media (min-width: 992px) {

    .hpu-mm__toggle {
        display: none !important;
    }

    .hpu-mm__list {
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        height: var(--hpu-mm-h);
    }

    .hpu-mm__item {
        position: relative;
        display: flex;
    }

    .hpu-mm .hpu-mm__link::after {
        content: "";
        position: absolute;
        left: 10px;
        right: 10px;
        bottom: 0;
        height: 3px;
        background: #FF9800;
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform .25s ease;
    }

    .hpu-mm__item:hover > .hpu-mm__link,
    .hpu-mm__item.is-open > .hpu-mm__link,
    .hpu-mm__item.is-current > .hpu-mm__link {
        background: linear-gradient(135deg, #4b8039, #016b92);
    }

    .hpu-mm__item:hover > .hpu-mm__link::after,
    .hpu-mm__item.is-open > .hpu-mm__link::after {
        transform: scaleX(1);
    }

    /* hover bridge so the pointer can travel from the link to the panel */
    .hpu-mm__item.is-open::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 10px;
    }

    .hpu-mm__panel {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 5;
        width: calc(var(--hpu-cols, 3) * 240px);
        max-width: calc(100vw - 24px);
        margin-top: 8px;
        overflow: hidden;
        border: 1px solid rgba(0, 0, 0, .06);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 18px 45px rgba(0, 0, 0, .22);
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        pointer-events: none;
        transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
    }

    .hpu-mm__panel.is-right {
        left: auto;
        right: 0;
    }

    .hpu-mm__item.is-open > .hpu-mm__panel {
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        transition-delay: 0s;
    }
}

/* tighter spacing on small laptops */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hpu-mm .hpu-mm__link {
        padding: 0 9px;
        font-size: 14px;
    }

    .hpu-mm__panel {
        width: calc(var(--hpu-cols, 3) * 215px);
    }
}

/* ==========================================================================
   MOBILE / TABLET  (< 992px)  – click to open, accordion
   ========================================================================== */
@media (max-width: 991.98px) {

    .hpu-mm {
        --hpu-mm-h: 50px;
    }

    .hpu-mm__inner {
        padding: 0;
    }

    .hpu-mm .hpu-mm__toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: var(--hpu-mm-h);
        margin: 0;
        padding: 0 18px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--hpu-mm-text);
        font-family: inherit;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: .14em;
        text-transform: uppercase;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
    }

    .hpu-mm .hpu-mm__toggle:focus {
        outline: none;
    }

    .hpu-mm .hpu-mm__toggle:focus-visible {
        outline: 2px solid var(--hpu-mm-accent);
        outline-offset: -3px;
    }

    .hpu-mm__burger {
        position: relative;
        display: block;
        flex: 0 0 auto;
        width: 24px;
        height: 18px;
    }

    .hpu-mm__burger span {
        position: absolute;
        left: 0;
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform .25s ease, opacity .2s ease, top .25s ease;
    }

    .hpu-mm__burger span:nth-child(1) { top: 0; }
    .hpu-mm__burger span:nth-child(2) { top: 8px; }
    .hpu-mm__burger span:nth-child(3) { top: 16px; }

    .hpu-mm.is-menu-open .hpu-mm__burger span:nth-child(1) { top: 8px; transform: rotate(45deg); }
    .hpu-mm.is-menu-open .hpu-mm__burger span:nth-child(2) { opacity: 0; }
    .hpu-mm.is-menu-open .hpu-mm__burger span:nth-child(3) { top: 8px; transform: rotate(-45deg); }

    .hpu-mm__list {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        background: #fff;
        box-shadow: 0 14px 28px rgba(0, 0, 0, .22);
    }

    .hpu-mm.is-menu-open .hpu-mm__list {
        display: block;
    }

    .hpu-mm__item {
        display: block;
        border-bottom: 1px solid #eee;
    }

    .hpu-mm .hpu-mm__link {
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        padding: 12px 18px;
        color: var(--hpu-mm-panel-text);
        font-size: 15.5px;
        white-space: normal;
    }

    .hpu-mm__item.is-current > .hpu-mm__link,
    .hpu-mm__item.is-open > .hpu-mm__link {
        background: var(--hpu-mm-soft);
        color: var(--hpu-mm-head);
    }

    .hpu-mm__chev {
        display: block;
    }

    .hpu-mm__item.is-open > .hpu-mm__link .hpu-mm__chev {
        margin-top: 4px;
        transform: rotate(-135deg);
    }

    .hpu-mm__panel {
        display: none;
        background: #fffaf0;
    }

    .hpu-mm__item.is-open > .hpu-mm__panel {
        display: block;
    }

    .hpu-mm__panel-title {
        display: none;
    }

    .hpu-mm__cols {
        display: block;
        padding: 4px 0 10px;
    }

    .hpu-mm__col {
        padding: 10px 18px 0 30px;
        border-left: 0;
    }

    .hpu-mm__colhead:empty {
        display: none;
    }

    .hpu-mm .hpu-mm__sublink {
        margin: 0;
        padding: 10px 12px;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hpu-mm *,
    .hpu-mm *::before,
    .hpu-mm *::after {
        transition: none !important;
    }
}






/* ==========================================
   HPU MEGA MENU - PANEL ABOVE BANNER
   ========================================== */

header.main-header-two {
    z-index: 9;
    overflow: visible;
}

#hpuMegaMenu.hpu-mm { 
    overflow: visible;
}

#hpuMegaMenu .hpu-mm__bar,
#hpuMegaMenu .hpu-mm__inner,
#hpuMegaMenu .hpu-mm__list {
    overflow: visible;
}

#hpuMegaMenu .hpu-mm__item--has-panel {
    /*position: static !important;*/
}

/* Hide panels by default */
#hpuMegaMenu .hpu-mm__panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0 ;
    min-width: 100%;
    max-height: 75vh;
    overflow-y: auto;
    z-index: 100000;
    background: #fff;
    color: #17324d;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Open only the selected panel */
#hpuMegaMenu .hpu-mm__item--has-panel.is-open > .hpu-mm__panel {
    display: block;
}

/* Keep banner below the menu */
section.main-slider-two {
    position: relative;
    z-index: 0;
}

/* Mobile layout */
@media (max-width: 991px) {
    #hpuMegaMenu .hpu-mm__item--has-panel {
        position: relative ;
    }

    #hpuMegaMenu .hpu-mm__panel {
        position: static;
        width: 100% ;
        max-height: none;
        box-shadow: none;
    }

    #hpuMegaMenu .hpu-mm__item--has-panel.is-open > .hpu-mm__panel {
        display: block ;
    }
}
@media (min-width: 992px) {

    #hpuMegaMenu .hpu-mm__item--has-panel:nth-last-child(-n+3) .hpu-mm__panel {
        left: auto;
        right: 0;
        max-width: calc(100vw - 30px);
        box-sizing: border-box;
    }
}
