/* Frontend main menu styling adapted from Website_Template_Resource main-menu */

/* Add padding to body to account for fixed header on public pages */
body:has(#header.fixed-top) {
    padding-top: 90px;
}

/* Fallback for browsers without :has() support */
.has-fixed-header {
    padding-top: 90px;
}

#header {
    transition: all 0.5s;
    z-index: 997;
    background: rgba(0, 0, 0, 0.9);
    height: 80px;
}

#header.header-transparent {
    background: transparent;
}

#header.header-scrolled {
    background: rgba(0, 0, 0, 0.9);
    height: 60px;
}

#header .wrapper .logo {
    font-size: 34px;
    margin: 0;
    padding: 0;
    font-weight: 700;
    letter-spacing: 3px;
    padding-left: 10px;
}

#header .wrapper .logo a {
    color: #fff;
    text-decoration: none;
}

nav {
    padding: 0;
}

nav .wrapper {
    position: relative;
    max-width: 1300px;
    padding: 0 30px;
    height: 50px;
    line-height: 70px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wrapper .menu-nav-links {
    display: inline-flex;
}

.menu-nav-links li {
    list-style: none;
}

.menu-nav-links li a {
    color: #f2f2f2;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 9px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.menu-nav-links li a:hover {
    background: #3A3B3C;
}

.menu-nav-links .mobile-item {
    display: none;
}

.menu-nav-links .drop-menu {
    position: absolute;
    background: #242526;
    width: 180px;
    line-height: 45px;
    top: 85px;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    z-index: 98;
}

.menu-nav-links li:hover .drop-menu,
.menu-nav-links li:hover .mega-box {
    transition: all 0.3s ease;
    top: 50px;
    opacity: 1;
    visibility: visible;
}

.drop-menu li a {
    width: 100%;
    display: block;
    padding: 0 0 0 15px;
    font-weight: 400;
    border-radius: 0;
}

.mega-box {
    position: absolute;
    left: 0;
    width: 100%;
    padding: 0 30px;
    top: 85px;
    opacity: 0;
    visibility: hidden;
    z-index: 98;
}

.mega-box .content {
    background: #242526;
    padding: 25px 20px;
    display: flex;
    width: 100%;
    justify-content: space-between;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.mega-box .content .row {
    width: calc(25% - 30px);
    line-height: 45px;
}

.content .row header {
    color: #f2f2f2;
    font-size: 20px;
    font-weight: 500;
}

.content .row .mega-links {
    margin-left: -40px;
    border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.row .mega-links li {
    padding: 0 20px;
}

.row .mega-links li a {
    padding: 0 20px;
    color: #d9d9d9;
    font-size: 17px;
    display: block;
}

.row .mega-links li a:hover {
    color: #18d26e;
}

/* Menu toggle buttons - use specific selector to avoid hiding Bootstrap .btn classes */
#header nav .wrapper > .btn {
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: none;
}

#header nav .wrapper > .btn.close-btn {
    position: absolute;
    right: 30px;
    top: 10px;
}

@media screen and (max-width: 970px) {
    #header nav .wrapper > .btn {
        display: block;
    }

    #header nav .wrapper .menu-nav-links {
        position: fixed;
        height: 100vh;
        width: 100%;
        max-width: 350px;
        top: 0;
        left: -100%;
        background: #242526;
        display: block;
        padding: 50px 10px;
        line-height: 50px;
        overflow-y: auto;
        box-shadow: 0 15px 15px rgba(0, 0, 0, 0.18);
        transition: all 0.3s ease;
    }

    #menu-btn:checked ~ .menu-nav-links {
        left: 0;
    }

    #menu-btn:checked ~ .btn.menu-btn {
        display: none;
    }

    #close-btn:checked ~ .btn.menu-btn {
        display: block;
    }

    .menu-nav-links li {
        margin: 15px 10px;
    }

    .menu-nav-links li a {
        padding: 0 20px;
        display: block;
        font-size: 20px;
    }

    .menu-nav-links .drop-menu {
        position: static;
        opacity: 1;
        top: 65px;
        visibility: visible;
        box-shadow: none;
        display: none;
    }

    .menu-nav-links .mega-box {
        position: static;
        top: 65px;
        opacity: 1;
        visibility: visible;
        display: none;
    }

    .menu-nav-links .mobile-item {
        display: block;
        color: #f2f2f2;
        font-size: 20px;
        font-weight: 500;
        padding-left: 20px;
        cursor: pointer;
    }

    .menu-nav-links .showDrop:checked ~ .drop-menu,
    .menu-nav-links .showMega:checked ~ .mega-box {
        display: block;
    }
}
