/* Bars (Hamburger lines) */
.bar {
    display: block;
    width: 40px;
    height: 3px;
    margin: 5px;
    background-color: #fff;
    border-radius: 5px;
    transition: background-color 0.4s ease-in, transform 0.4s ease-in, width 0.4s ease-in;
}

.aside-section h2.menutitle {
    display: flex;
    color: #fff !important;
    padding: 1rem 0 .25rem .5rem;
    margin-bottom: 0 !important;
    font-weight: bold;
    letter-spacing: 1px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-size: 2rem;
    margin-top: 0;
}

.menutitle .toggleSpan.closeMenuBtn:hover {
    background: #cc0000;
}

.menutitle .toggleSpan.closeMenuBtn .menuToggleBtn {
    position: relative;
    width: 100%;
    height: 100%;
    padding: .75rem .5rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

    /* visible focus ring */
    .menutitle .toggleSpan.closeMenuBtn .menuToggleBtn:focus,
    .menutitle .toggleSpan.closeMenuBtn .menuToggleBtn:focus-visible {
        outline: 3px solid #D7A31A;
        outline-offset: 2px;
    }

/* ALWAYS render as X */
.menutitle .toggleSpan.closeMenuBtn .bar.top {
    transform: translateY(8px) rotate(45deg);
}

.menutitle .toggleSpan.closeMenuBtn .bar.middle {
    opacity: 0;
    width: 0;
}

.menutitle .toggleSpan.closeMenuBtn .bar.bottom {
    transform: translateY(-8px) rotate(-45deg);
}

/* Panel wrapper */
#slidingNav {
    position: fixed;
    inset: 0;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
}

    #slidingNav.open {
        opacity: 1;
        visibility: visible;
        display: flex;
    }

/* Overlay */
.aside-left {
    position: absolute;
    inset: 0;
    background: rgba(20, 35, 55, 0.9);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s ease;
}

#slidingNav.open .aside-left {
    transform: translateY(0);
    opacity: 1;
}

/* MAIN PANEL */
.aside-right {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 45rem;
    width: 45%;
    height: 100%;
    background: linear-gradient(to bottom, #24364b, #121b27);
    color: #fff;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s ease;
    padding-bottom: 3.5rem;
}

#slidingNav.open .aside-right {
    transform: translateX(0);
    opacity: 1;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0px 0px 5rem rgba(0, 0, 0, 0.5);
}

.aside-right::after {
    font-family: 'ccicons';
    content: '\f004';
    position: absolute;
    bottom: .25rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

#slidingNav.open .aside-right .rightContent {
    overflow-y: auto;
    padding-bottom: 2rem;
    flex: 1 1 auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid rgba(255,255,255,0.18);
}

    #slidingNav.open .aside-right .rightContent::-webkit-scrollbar {
        display: none;
    }

/* Headers */
.aside-right h3 {
    font-size: 1.4rem;
    margin: 1.25rem 0 0.5rem;
    padding-left: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-family: 'Vazirmatn';
}

/* Lists */
.aside-right ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0 .25rem 2rem .25rem;
    padding: 0 0 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    justify-content: space-evenly;
    gap: .2rem;
}

.aside-right li.menuTsLink {
    flex: 0 0 30%;
    margin: .2rem .25rem;
}

/* LINKS */
.aside-right a,
.aside-right a:visited {
    display: block;
    padding: 0.65em 0.75em;
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,0.12);
    border-radius: 0.35rem;
    transition: all 0.1s ease;
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
    letter-spacing: .05rem;
}

    .aside-right a:hover,
    .aside-right a:focus {
        border: 1px solid #fff;
        background: rgb(209 232 255 / 75%);
        color: #333;
        font-weight: bold;
    }

/* Top buttons */
.aside-right .topRowMenu {
    display: flex;
    flex-wrap: wrap;
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    justify-content: center;
    gap: .2rem 1rem;
}

    .aside-right .topRowMenu a {
        flex: 0 1 31%;
        text-align: center;
        font-size: 0.95rem;
        padding: 0.5rem;
        background: rgba(255,255,255,0.12);
        border: 1px solid rgba(255,255,255,0.18);
        border-radius: 0.35rem;
        margin: .25rem;
    }

        .aside-right .topRowMenu a:hover {
            border: 1px solid #fff;
            background: rgb(209 232 255 / 75%);
            color: #333;
            font-weight: bold;
        }

/* Events section */
a.menuEvLink {
    display: flex;
    flex-direction: row;
    gap: .5rem;
    margin: .25rem 0;
}

.menuCalDate {
    width: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

    .menuCalDate > span {
        font-size: 1.25rem;
    }


@media (max-width: 768px) {
    .aside-right {
        width: 100%;
        min-width: 0;
    }

        .aside-right ul {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-evenly;
            margin: 0;
            padding: 0;
        }
        .aside-right .topRowMenu a {
            flex: 1 1 31%;
        }

/* Mobile */
@media (max-width: 576px) {
    .aside-right {
        width: 100%;
    }

        .aside-right li.menuTsLink {
            flex: 0 0 45%;
            margin: .2rem 0;
        }
}
