/* Desktop Layout Fix */
.gh-header-row {
    float: left;
    width: 480px;
    margin: 0;
    padding: 30px 0 0 0;
}
#gh-content .gh-jmsca-logo {
    float: right;
    display: block;
}
#gh-content .gh-nav-wrapper {
    clear: both;
    width: 100%;
}

/* Hamburger Menu Base (Hidden on Desktop) */
.hamburger-menu {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 25px;
    position: relative;
    z-index: 10001;
}
.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    position: absolute;
    left: 0;
    transition: all 0.3s;
}
.hamburger-menu.active span {
    background-color: #fff;
}
.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 11px; }
.hamburger-menu span:nth-child(3) { bottom: 0; }

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 11px;
}
.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 11px;
}

/* Mobile Menu Base (Hidden on Desktop) */
#mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 999;
    overflow-y: auto;
    padding-top: 60px;
    text-align: center;
}
#mobile-menu.open {
    display: block;
}
.mm-content {
    padding: 20px;
}
.mm-user, .mm-nav {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}
.mm-user li, .mm-nav li {
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.mm-user li a, .mm-nav li a {
    color: #333;
    text-decoration: none;
    display: block;
    width: 100%;
}
.mm-logo img {
    max-width: 200px;
    height: auto;
}

@media screen and (max-width: 768px) {
    /* Global Header */
    #globalheader {
        background-color: #fff;
        position: relative;
        z-index: 9999;
    }
    #gh-content {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }
    .gh-header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        float: none;
        padding: 0;
    }
    #gh-content .gh-logo {
        width: auto;
        height: 50px;
        display: flex;
        align-items: center;
        margin: 0;
    }
    #gh-content .gh-logo .gh-logo-image {
        height: 33px;
        width: auto;
    }

    /* Hide desktop elements */
    #gh-user-wrapper,
    .gh-nav-wrapper,
    #gh-content > .gh-jmsca-logo {
        display: none !important;
    }

    /* Show hamburger */
    .hamburger-menu {
        display: block;
    }

    /* Mobile Menu Redesign */
    #mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #404040;
        z-index: 10000;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out, visibility 0s linear 0.3s;
        overflow-y: auto;
        display: block;
        visibility: hidden;
        padding-top: 0;
        text-align: left;
    }
    #mobile-menu.open {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.3s ease-in-out, visibility 0s linear 0s;
    }
    .mm-content {
        padding: 30px 20px 30px;
        max-width: 600px;
        margin: 0 auto;
    }
    .mm-section {
        margin-bottom: 35px;
    }
    .mm-heading {
        font-size: 13px;
        color: #aaa;
        letter-spacing: 0.08em;
        border-bottom: 2px solid #aaa;
        padding-bottom: 8px;
        margin-bottom: 0;
        font-weight: bold;
        display: inline-block;
    }
    .mm-list {
        list-style: none;
        padding: 0;
        margin: 0;
        margin-top: 10px;
    }
    .mm-list li {
        margin-bottom: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }
    .mm-list li:last-child {
        border-bottom: none;
    }
    .mm-list li a,
    .mm-list li.login span {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 10px;
        color: #fff;
        text-decoration: none;
        font-size: 15px;
        font-weight: 500;
        transition: background-color 0.2s;
    }
    .mm-list li a::after {
        content: ">";
        color: rgba(255, 255, 255, 0.4);
        font-size: 14px;
    }
    .mm-list li a:active {
        background-color: rgba(255, 255, 255, 0.1);
    }
    .mm-logo {
        text-align: center;
        margin-top: 40px;
        padding: 20px;
        background-color: #fff;
        border-radius: 6px;
        margin-bottom: 40px;
    }
    .mm-logo img {
        height: auto;
        width: 45%;
    }

    /* Global Footer */
    #gf-sponsors, #gf-suppliers, #gf-links {
        width: 100%;
    }
    #gf-sponsors .gf-sponsors-header,
    #gf-suppliers .gf-suppliers-header {
        background-size: auto 60px;
        height: 130px;
        width: 100%;
    }
    #gf-sponsors .gf-sponsors-banner,
    #gf-suppliers .gf-suppliers-banner {
        width: 100%;
        padding: 0 10px 20px;
        box-sizing: border-box;
        text-align: center;
    }
    #gf-sponsors .sb-items,
    #gf-suppliers .sb-items {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
        width: 100%;
        list-style: none;
    }
    #gf-sponsors .sb-item,
    #gf-suppliers .sb-item {
        margin: 10px;
        display: block;
        max-width: 100%;
        background-size: contain;
    }
    #gf-sponsors .sb-item-anchor,
    #gf-suppliers .sb-item-anchor {
        width: 100%;
        height: 100%;
        display: block;
    }
    #gf-links .links-header {
        width: 100%;
        background-size: auto 60px;
        height: 130px;
    }
    #gf-links .lb-items {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 10px;
        box-sizing: border-box;
    }
    #gf-links .lb-item {
        margin: 10px;
    }

    /* Copyright */
    #gf-copyright {
        width: 100%;
        padding: 40px 10px;
        box-sizing: border-box;
    }
    #gf-copyright .gf-copyright-logo {
        float: none;
        text-align: center;
        margin-bottom: 20px;
    }
    #gf-copyright .gf-copyright-text {
        text-align: center;
    }
    #gf-copyright .gf-docs-link {
        width: 100%;
        margin-left: 0;
        text-align: center;
    }
}
