.sidebar {
    background-color: var(--lightGreen);
}

.sidebar .nav .nav-link, .mobile-header, .mobile-header:hover {
    color: var(--black);
}

a.mobile-header {
    background-color: #F39339;
    text-decoration: none;
    background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2219%22%20viewBox%3D%220%200%2024%2019%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cline%20y1%3D%220.5%22%20x2%3D%2224%22%20y2%3D%220.5%22%20stroke%3D%22black%22/%3E%3Cline%20y1%3D%229.5%22%20x2%3D%2224%22%20y2%3D%229.5%22%20stroke%3D%22black%22/%3E%3Cline%20y1%3D%2218.5%22%20x2%3D%2224%22%20y2%3D%2218.5%22%20stroke%3D%22black%22/%3E%3C/svg%3E');
    background-size: 24px 19px;
    background-repeat: no-repeat;
    background-position: 95% center;
}

.sidebar, .sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.sidebar.show, .sidebar-submenu.show {
    max-height: 500px; /* Adjust this value based on the content height */
}

.sidebar .nav .nav-link.active {
    font-weight: bold;
}

.sidebar .nav .nav-link {
    border-bottom: 1px solid var(--black);
    margin: 0 1rem;
}

.sidebar .nav .nav-link:last-child {
    margin-bottom: 2rem;
}

.sidebar .arrow {
    cursor: pointer;
    margin-left: 5px;
    position: relative; /* Necessary for positioning the pseudo-element */
    transition: transform 0.3s ease; /* For smooth rotation */
}

.sidebar .arrow::before {
    content: ''; /* Pseudo-element must have content */
    position: absolute;
    top: 50%;
    left: 90%;
    transform: translate(-50%, -50%); /* Center the pseudo-element */
    background-image: url('../img/arrow.png');
    background-size: 45px;
    background-repeat: no-repeat;
    background-position: center;
    width: 45px; /* Match the size of the background image */
    height: 45px;
    transition: transform 0.3s ease;
}

/* Rotate the pseudo-element's background when submenu is open */
.sidebar .arrow.open::before {
    transform: translate(-50%, -50%) rotate(180deg);
}

.sidebar .arrow.open {
    background-color: #0F34081C;
}

.sidebar .nav .sidebar-submenu .nav-link {
    border-bottom: none;
}

.sidebar .nav .sidebar-submenu .nav-link:last-child {
    margin-bottom: 0;
    border-bottom: 1px solid var(--black);
}

@media (min-width: 768px) {

    .sidebar {
        background-color: unset;
        max-height: unset;
    }

    a.mobile-header {
        display: none;
    }

    .sidebar .nav .nav-link {
        margin: unset;
    }

    .sidebar .nav .nav-link:first-child {
        border-top: 1px solid var(--black);
    }

    .sidebar .nav .nav-link.active {
        background-color: #F39339;
        font-weight: unset;
    }

    .sidebar .nav .sidebar-submenu .nav-link {
        border-bottom: 1px solid #7c7c7c;
    }

    .sidebar .nav .sidebar-submenu .nav-link:first-child {
        border-top: none;
    }

    .sidebar .nav .sidebar-submenu .nav-link {
        font-size: 18px;
    }

    .sidebar .arrow.open {
        background-color: unset;
    }
}
