/* Denuwan 2026-07-08 */
@media (min-width: 769px) and (max-width: 1366px) {
    .cus-hd-nav .nav-header > ul > li > ul.cus-hd-submenu {
        width: min(860px, calc(100vw - 40px));
    }

    .navigation .nav-header > ul > li > ul.cus-hd-submenu {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cus-hd-nav .nav-header > ul > li > ul.cus-hd-submenu {
        width: min(760px, calc(100vw - 32px));
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) and (min-width: 769px) {
    .cus-hd-nav .nav-header > ul > li > ul.cus-hd-submenu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body.cus-hd-menu-open {
        /* allow scrolling of the page when mobile menu is open so long menus remain visible */
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mainmenu-area.cus-hd-menu-open {
        position: fixed;
        inset: 0;
        z-index: 99999;
        width: 100vw;
        height: 100vh;
        margin: 0;
        background: rgba(45, 51, 45, 0.88);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    .mainmenu-area.cus-hd-menu-open .container {
        width: 100%;
        max-width: 100%;
        height: 100%;
        padding: 0;
    }

    .mainmenu-area.cus-hd-menu-open .nav-footer {
        display: none;
    }

    .cus-hd-nav {
        position: absolute;
        left: 12px;
        top: 12px;
        width: calc(100vw - 24px);
        max-width: none;
        height: calc(100vh - 24px);
        background: #fff;
        box-shadow: 0 18px 70px rgba(0, 0, 0, 0.28);
        border-radius: 2px;
        overflow: auto;
        padding: 68px 22px 22px;
        box-sizing: border-box;
        display: none;
    }

    .cus-hd-nav.cus-hd-open {
        display: block !important;
    }

    .cus-hd-nav .cus-hd-close {
        position: absolute;
        top: 14px;
        right: 16px;
        width: 34px;
        height: 34px;
        border: none;
        outline: none;
        background: transparent;
        color: #2f3130;
        font-size: 28px;
        line-height: 34px;
        cursor: pointer;
        z-index: 10050;
        display: flex;
        align-items: center;
        justify-content: center;
        text-indent: -9999px;
    }

    /* visually replace the default × with a FontAwesome chevron and style it */
    .cus-hd-nav .cus-hd-close::before {
        font-family: FontAwesome;
        content: "\f107"; /* fa-angle-down */
        font-size: 16px;
        color: #00a652;
        text-indent: 0;
        display: inline-block;
    }
    .cus-hd-nav .cus-hd-close {
        
        border-radius: 8px;
        width: 36px;
        height: 36px;
        line-height: 36px;
        text-indent: -9999px; /* hide original text */
    }

    .cus-hd-nav > ul {
        margin: 0;
        padding: 0;
    }

    .cus-hd-nav > ul > li {
        display: block;
        margin-bottom: 14px;
    }

    .cus-hd-nav > ul > li > a,
    .cus-hd-nav > ul > li:first-child > a {
        display: block;
        padding: 16px 18px;
        border-radius: 12px;
        background: transparent !important;
        border: none;
        color: #ffffff !important;
        font-size: 17px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.2px;
        transition: all .25s ease;
    }

    .cus-hd-nav a#homem,
    .cus-hd-nav a#aboutm,
    .cus-hd-nav a#productsm,
    .cus-hd-nav a#contactm {
        color: #fff !important;
    }

    .cus-hd-nav > ul > li > a:hover,
    .cus-hd-nav > ul > li:hover > a {
        background: linear-gradient(180deg, #b7def7 0%, #73b7e3 100%);
        color: #121212;
    }

    .cus-hd-nav .dropdown > a {
        position: relative;
        padding-right: 58px !important;
    }

    .cus-hd-nav .dropdown > a button {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 26px;
        height: 26px;
        border: none;
        outline: none;
        border-radius: 50%;
        background: #fff;
        color: #00a652;
        border: 1px solid rgba(0, 166, 82, 0.12);
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        line-height: 1;
    }

    /* Make the Products anchor appear as a sticky green header inside the mobile menu */
    .cus-hd-nav.cus-hd-open > ul > li.dropdown > a {
        position: sticky;
        top: 12px;
        z-index: 10040;
        background: #00a652;
        color: #fff !important;
        padding: 14px 18px !important;
        border-radius: 8px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* ensure the dropdown toggle button sits visually as a white rounded box */
    .cus-hd-nav.cus-hd-open > ul > li.dropdown > a button {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        right: 12px;
        background: #fff;
        color: #00a652;
        border: none;
    }

    .cus-hd-nav > ul > li > ul {
        position: relative;
        display: none;
        opacity: 1;
        visibility: visible;
        width: 100%;
        margin-top: 10px;
        padding: 0 0 0 18px;
        background: transparent;
        border: none;
        box-shadow: none;
        max-height: none;
        overflow: visible;
    }

    .cus-hd-nav > ul > li > ul.cus-hd-submenu {
        display: none !important;
        max-height: calc(100vh - 300px);
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    /* Only show submenu when jQuery slideToggle sets an inline style that makes it visible */
    .cus-hd-nav > ul > li > ul.cus-hd-submenu[style*="display: block"] ,
    .cus-hd-nav > ul > li > ul.cus-hd-submenu[style*="display:block"] {
        display: block !important;
        grid-template-columns: none !important;
        grid-auto-flow: row !important;
    }

    .cus-hd-nav > ul > li > ul.cus-hd-submenu::-webkit-scrollbar {
        width: 0;
        height: 0;
    }

    .cus-hd-nav > ul > li > ul > li {
        margin-bottom: 10px;
        list-style: disc;
        color: #9aa0a6;
    }

    .cus-hd-nav > ul > li > ul > li > a {
        display: block;
        padding: 6px 0;
        border: none;
        background: transparent;
        color: #202020 !important;
        font-size: 14px;
        font-weight: 400;
        text-transform: none;
        border-radius: 0;
    }

    .cus-hd-nav > ul > li > ul > li:hover > a {
        background: transparent;
        color: #00a652;
    }

    .cus-hd-nav .cus-hd-close {
        font-size: 0 !important;
        text-indent: 0 !important;
        background: rgba(255, 255, 255, 0.96) !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12) !important;
    }

    .cus-hd-nav .cus-hd-close::before {
        font-family: FontAwesome;
        content: "\f00d" !important;
        font-size: 18px;
        line-height: 1;
        color: #00a652;
    }

    .cus-hd-nav .nav-footer {
        position: fixed;
        top: 18px;
        left: 18px;
        margin: 0;
        z-index: 3;
    }

    .cus-hd-nav .nav-footer button {
        width: 40px;
        height: 40px;
        border: none;
        outline: none;
        border-radius: 0;
        background: #00a652;
        color: #fff;
        box-shadow: none;
        margin: 0;
    }
}
