#menu-container {
    position: relative;
    display: block;
    align-items: center;
    z-index: 5;
    height: 100%;
    background-color: #28282B;
    transition: width 0.3s ease-in-out;
}

#menu-container-main {
    position: relative;
    display: block;
    align-items: center;
    z-index: 5;
    height: 100%;
    background-color: #28282B;
    transition: width 0.3s ease-in-out;
    width: 45px;
    padding-left: 5px;
    padding-right: 5px;
}

#menu-button-container {
    cursor: pointer;
    transition: transform 0.3s ease-in-out, left 0.3s ease-in-out;
    width: 36px;
    height: 36px;
    /*left: 36px;*/
    position: relative;
    align-content: center;
    /*z-index: 5;*/
}

#menu-button-img {
    /*height: 30px;*/
    /*width: 40px;*/
    opacity: 0;
}

#menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 200px;
    white-space: nowrap;
    position: relative;
    left: 0;
    top: 40%;
    transform: translateY(-50%);
    overflow: hidden; /* Default state without scrolling */
}

.menu-item {
    margin: 5px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.menu-item a {
    display: flex;
    align-items: center;
    text-decoration: none; /* Remove underline from links */
    color: inherit; /* Inherit text color */
    width: 100%; /* Ensure the link takes up full width */
}

.menu-icon-container {
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, border-radius 0.3s ease;
    border-radius: 50%; /* Make the background circular */
}

.menu-icon {
    width: 30px;
    height: 30px;
}

.menu-text {
    visibility: hidden; /* Completely hide the text */
    opacity: 0; /* Also make it invisible */
    pointer-events: none; /* Disable clicks on the text initially */
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; /* Ensure smooth transition */
    margin-left: 10px; /* Space between icon and text */
    font-size: medium;
    color: white;
    width: 0;
}

.menu-text.visible {
    visibility: visible; /* Make the text visible when expanded */
    opacity: 1; /* Ensure the text is fully visible */
    pointer-events: auto; /* Enable clicks on the text when expanded */
}

.menu-text-link {
    pointer-events: none; /* Disable clicks on the text initially */
}

.menu-text.visible {
    visibility: visible; /* Make text visible when expanded */
    pointer-events: auto; /* Enable clicks on the text when expanded */
}

.menu-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    transition: background 0.3s ease;
}

/* Change the background color of the icon container to light grey on hover */
.menu-item:hover .menu-icon-container {
    background-color: rgba(211, 211, 211, 0.5); /* Light grey with reduced opacity */
}

.always-active {
    background-color: rgba(211, 211, 211, 0.5); /* Light grey with reduced opacity */
}

.disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.4;  /* or any look that suggests it's disabled */
}

.mobile-nav-arrow {
    display: none;
}

/* Media query for mobile views and landscape up to 1000px */
@media (max-width: 767px), (max-width: 1000px) and (orientation: landscape) {
    .mobile-nav-arrow {
        display: flex;
        position: sticky;
        z-index: 10;
        background-color: #28282B;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
    .menu-scroll-up {
        bottom: 46px;
    }
    .menu-scroll-down {
        bottom: 0;
    }
    #menu-container #menu-list, #menu-container-main #menu-list {
        max-height: 70vh;
        overflow-y: auto;
        scrollbar-width: none; /* Hide scrollbar for cleaner look, still scrollable by touch */
    }
    #menu-container #menu-list::-webkit-scrollbar, #menu-container-main #menu-list::-webkit-scrollbar {
        display: none;
    }
}

/* Media query for larger screens (desktop) */
@media (min-width: 768px) {
    .menu-text {
        font-size: large; /* Increase font size for desktop */
    }
}

/* When the screen height is too small, enable scrolling */
@media (max-height: 650px) {
    #menu-list {
        max-height: 70vh; /* Set max height for the list */
        overflow-x: hidden;
        overflow-y: auto; /* Enable vertical scrolling */
    }
}

/* Container for hamburger lines */
.hamburger-lines {
    position: absolute;
    width: 36px; /* Same as the menu-button-container */
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: -1; /* Ensure it's behind the image */
}

/* Styling the hamburger bars */
.bar {
    width: 25px;
    height: 2px;
    background-color: white;
    position: absolute;
    transition: all 0.2s ease-in-out;
}

/* Positioning the bars */
.bar1 {
    top: 8px;
}

.bar2 {
    /*background-color: #345f8f;*/
    transition: opacity 0.0s ease-in-out; /* Make the middle bar disappear faster */
    top: 16px;
}

.bar3 {
    top: 24px;
}

/* When the menu is active, transform the bars into an "X" */
.menu-open .bar1 {
    transform: rotate(45deg);
    top: 16px; /* Move to the center */
}

.menu-open .bar2 {
    opacity: 0; /* Hide the middle bar */
}

.menu-open .bar3 {
    transform: rotate(-45deg);
    top: 16px; /* Move to the center */
}

/* UI Toggle Button for Mobile */
#mobile-ui-toggle-btn {
    position: fixed;
    top: 5px;
    left: 55px;
    z-index: 1000;
    cursor: pointer;
    display: block;
    transition: left 0.3s ease-in-out;
    margin-left: 5px
}

#mobile-ui-toggle-btn .menu-icon-container {
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
}

/* Mobile UI Toggle Eye Icon Styles */
#mobile-ui-toggle-btn .eye-svg {
    width: 24px;
    height: 24px;
    display: block;
}

#mobile-ui-toggle-btn .eye-outline,
#mobile-ui-toggle-btn .iris,
#mobile-ui-toggle-btn .pupil,
#mobile-ui-toggle-btn .eye-slash {
    fill: none;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-ui-toggle-btn .iris {
    stroke: white;
    transform-origin: 12px 12px;
    transform: scale(0.85);
}

/* Default State (Menus Visible): Slash Visible (Eye Closed) */
#mobile-ui-toggle-btn .eye-slash {
    opacity: 1;
    transform: scale(1);
}

/* Hidden State (Menus Hidden): Slash Hidden (Eye Open) */
#mobile-ui-toggle-btn.menus-hidden .eye-slash {
    opacity: 0;
    transform: scale(0.9);
}

#mobile-ui-toggle-btn.menus-hidden .iris {
    transform: scale(1.05);
}

/* Hide on desktop */
@media (min-width: 768px) {
    #mobile-ui-toggle-btn {
        display: none;
    }
}