aside  {
    position: relative;
    box-sizing: border-box;
    left: calc(0rem - var(--menu-width) - 2rem); top: 0;
    width: var(--menu-width); height: auto; max-height: calc(100% - 2rem - 8rem);
    margin: 2rem 0 0 2rem;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    border-radius: var(--border-radius);
    padding: 2rem 0 2rem 2rem;
    z-index: 1;
    pointer-events: all;
    display: flex;
    flex-direction: column;
    overflow: visible !important; /* John R - Allow hamburger button to extend beyond aside bounds */
}

.aside-transition {
    transition: left var(--transition-duration);
}

body.aside aside {
    left: 0;
}

aside > my-btn.close,
aside > my-btn.open {
    position: absolute;
    display: block;
    border: 0;
    border-radius: var(--border-radius);
    left: 100%; top: 0rem; width: 4rem; height: 4rem;
    transform: translateX(2rem);
    font-size: 4rem; line-height: 4rem;
    color: #ffffff;
    text-shadow: 0 0 4px rgba(0,0,0,0.7);
    background-color: rgba(0,0,0,0.0);
    cursor: pointer;
    margin-right: 1rem;
    transition: opacity var(--transition-duration), text-shadow 0.3s ease; /* Charles Gratiot Jr. - Added text-shadow transition */
    opacity: 0;
    pointer-events: none;
    z-index: 100;
}

body.aside aside > my-btn.close,
body:not(.aside) aside > my-btn.open {
    opacity: 1;
    pointer-events: all;
}

/* Charles Gratiot Jr. - Glow effect on hover for menu buttons */
/* C Gratiot - Only apply hover on devices that support it (not touch) */
@media (hover: hover) and (pointer: fine) {
    aside > my-btn.close:hover,
    aside > my-btn.open:hover {
        text-shadow:
            0 0 10px #ffffff,
            0 0 20px #ffffff,
            0 0 30px #ffffff,
            0 0 40px #ffffff;
    }
}

aside section[logo] {
    position: relative;
    width: 100%; height: var(--logo-height);
    margin-bottom: 2rem;
}

aside section[logo] img {
    width: calc(100% - 2rem); height: 100%;
    object-fit: contain;
    transform: scale(0.8);
}

/* Dev 2 - Smaller logo on mobile */
@media screen and (max-width: 500px) {
    aside section[logo] img {
        transform: scale(0.8);
    }
}

aside nav {
    display: flex;
    overflow: auto;
}

aside section[menu] {
    position: relative;
    display: block;
    width: 100%; 
    display: flex;
    overflow: auto;
}

aside section[menu] #sa_menu {
    position: relative;
    width: calc(100% - 2rem); height: auto; max-height: 100%;
    box-sizing: border-box;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255,255,255,0.2);
    overflow: auto;
    touch-action: pan-y; /* John R - Enable touch scrolling on mobile */
}

aside section[menu] #sa_menu * {
    touch-action: pan-y; /* John R - Also apply to all children so dragging on menu items works */
}

aside section[menu] scroll-bar {
    position: absolute;
    right: 0.5rem; top: 0rem; width: 1rem; height: 100%;
    background-color: rgba(0,0,0,0.0);
}



@media screen and (max-width: 500px) {

    aside {
        left: 100%;
        width: calc(100% - 2rem);
        max-height: calc(100% - 7rem);
        margin: 1rem 0 0 1rem;
        z-index: 100; /* John R - Ensure hamburger button appears above krpano on mobile */
        backdrop-filter: none !important; /* John R - Disable to allow fixed positioning of hamburger */
    }

    /* John R - Re-enable backdrop-filter when menu is open */
    body.aside aside {
        backdrop-filter: blur(5px) !important;
    }

    aside > my-btn.close {
        left: auto; top: auto;
        right: 1.5rem; top: 1rem;
    }

    /* John R - Fixed hamburger position on mobile to be top-right corner */
    aside > my-btn.open {
        position: fixed;
        left: auto;
        right: 1rem;
        top: 1rem;
        transform: none;
    }


}




