.sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 99999999;
    top: 0;
    left: 0;
    background-color: #8ab933;
    background-image: url(../images/overlay_menu_background.jpg);
    overflow-x: hidden;
    transition: 0.5s;
}

.sidenav a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    color: #fff;
    display: block;
    transition: 0.5s;
}

.sidenav a:hover {
    color: #f1f1f1;
}

.sidenav .closebtn {
    position: absolute;
    top: 0;
    font-size: 36px;
}

@media screen and (max-height: 450px) {
  .sidenav {padding-top: 15px;}
  .sidenav a {font-size: 18px;}
}

@media only screen and (min-width: 992px){
    .mobile_menu_hamburger{
        width: 70px !important;
    }
}
#header #topNav #topMain>li>a {
        text-align: center;
    }
@media only screen and (max-width: 992px){
    #header #topNav #topMain>li>a {
        text-align: center;
    }
    
    #topMain>li {
        border-bottom: none;
    }
}

/* Mobile menu language selection styling */
.sidenav .language-selection-horizontal {
    padding: 20px;
    margin: 20px 0 20px 0;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
}

.sidenav .language-selection {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.sidenav .language-selection li {
    flex: 1;
    min-width: 0;
    margin: 0;
}

/* Responsive widths based on number of languages */
.sidenav .language-selection li:nth-child(1):nth-last-child(1) {
    flex: 0 0 100%;
    max-width: 100%;
}

.sidenav .language-selection li:nth-child(1):nth-last-child(2),
.sidenav .language-selection li:nth-child(2):nth-last-child(1) {
    flex: 0 0 calc(50% - 5px);
    max-width: calc(50% - 5px);
}

.sidenav .language-selection li:nth-child(1):nth-last-child(3),
.sidenav .language-selection li:nth-child(2):nth-last-child(2),
.sidenav .language-selection li:nth-child(3):nth-last-child(1) {
    flex: 0 0 calc(33.333% - 7px);
    max-width: calc(33.333% - 7px);
}

.sidenav .language-selection a {
    transition: all 0.3s ease;
    text-align: center;
    padding: 15px 12px !important;
    font-size: 16px;
    font-weight: 500;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidenav .language-selection a:hover {
    background-color: rgba(255,255,255,0.15) !important;
    transform: translateY(-2px);
}

.sidenav .language-selection .active {
    background-color: rgba(255,255,255,0.2) !important;
    border-left: 3px solid #fff !important;
}

.sidenav .language-selection img {
    margin-right: 8px !important;
    width: 20px !important;
    height: 14px !important;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .sidenav .language-selection-horizontal {
        padding: 0 15px;
    }
    
    .sidenav .language-selection a {
        padding: 12px 8px !important;
        font-size: 15px;
        min-height: 45px;
    }
    
    .sidenav .language-selection img {
        width: 18px !important;
        height: 12px !important;
        margin-right: 6px !important;
    }
}
