/* ######################### HAMBURGER ######################### */
/* Hide checkboxes */
.menu-toggle,
.submenu-toggle {
    display: none;
}

@media only screen and (max-width: 600px) {
    /* Hamburger - Right Side */
    .hamburger {
        position: fixed;
        top: 20px;
        right: 20px;
        cursor: pointer;
        z-index: 1001;
        user-select: none;
    }

    .hamburger span {
        display: block;
        width: 30px;
        height: 3px;
        background-color: #333;
        margin: 5px 0;
        transition: 0.3s;
    }

    /* X Animation - Symmetrical */
    .menu-toggle:checked + .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle:checked + .hamburger span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle:checked + .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Menu - Right Side */
    .menu {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: #fff;
        margin: 0;
        padding: 80px 0 0;
        list-style: none;
        overflow-y: auto;
        transition: 0.3s;
        z-index: 1000;
    }

    .menu-toggle:checked ~ .menu {
        right: 0;
    }

    .menu a {
        display: block;
        padding: 15px 20px;
        color: #333;
        text-decoration: none;
    }

    .menu > li {
        border-bottom: 1px solid #eee;
    }

    /* Submenu */
    .submenu-label {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .submenu-label a {
        flex: 1;
    }

    .toggle-icon {
        padding: 15px 20px;
        font-size: 24px;
        user-select: none;
        transition: 0.3s;
    }

    .submenu-toggle:checked + .submenu-label .toggle-icon {
        transform: rotate(45deg);
    }

    .submenu {
        max-height: 0;
        overflow: hidden;
        margin: 0;
        padding: 0;
        list-style: none;
        background: #f9f9f9;
        transition: 0.3s;
    }

    .submenu-toggle:checked ~ .submenu {
        max-height: 500px;
    }

    .submenu a {
        padding-left: 40px;
        font-size: 14px;
    }

    /* Overlay */
    .menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
        z-index: 999;
    }

    .menu-toggle:checked ~ .menu-overlay {
        opacity: 1;
        visibility: visible;
    }
}
