/* Sidebar container */
#cms-sidebar {
    position: fixed;
    top: 0;
    left: -100%; /* Hidden initially */
    background: #f5f5f5; /* Updated background color */
    z-index: 9999;
    transition: left 0.3s ease-in-out; /* Smooth slide-in effect */
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    height: 100vh; /* Full height */
    width: var(--sidebar-width, 300px); /* Adjustable width */
    padding-top: 25px; /* Space before content */
    display: flex;
    flex-direction: column;
}

#cms-sidebar.active {
    left: 0;
}

#cms-logo{
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding-left: 15px;
    margin-bottom: 25px;
}

#cms-logo-img{
    height: 100%;
    object-fit: contain;
}

/* Sidebar links */
#cms-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#cms-sidebar ul li {
    border-bottom: none; /* Subtle separation */
}

#cms-sidebar ul li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none; /* Remove underline */
    color: #111111; /* White text */
    font-size: 14px; /* Adjust font size */
    font-weight: 500; /* Medium weight */
    transition: background-color 0.3s ease;
}

#cms-sidebar ul li a:hover {
    background-color: #dddddd; /* Highlight on hover */
}

/* Close button */
#cms-sidebar-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    color: #111111; /* White close icon */
    cursor: pointer;
    transition: transform 0.3s ease;
}

#cms-sidebar-close:hover {
    transform: scale(1.1); /* Slightly enlarge on hover */
}

/* Overlay */
#cms-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f5f5f550;
    z-index: 9998;
    display: none;
}

#cms-sidebar-overlay.active {
    display: block;
}

/* Sidebar toggle button */
#custom-sidebar-toggle-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    background-color: #f5f5f5;
    color: #111;
    padding: 10px 15px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1100;
    transition: background-color 0.3s ease;
}

#custom-sidebar-toggle-btn:hover {
    background-color: #f5f5f5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #cms-sidebar {
        width: 250px; /* Smaller width for smaller screens */
    }

    #custom-sidebar-toggle-btn {
        font-size: 14px;
        padding: 8px 12px;
    }
}

/* Ensure submenus are hidden by default */
#cms-sidebar ul li ul {
    display: none;
    padding-left: 20px; /* Indentation for submenus */
}

/* Optional: style the parent menu item (e.g., "Our Services") to indicate it's expandable */
#cms-sidebar ul li.menu-item-has-children > a:after {
    content: " ▼"; /* Add a down arrow for visual indication */
    font-size: 12px;
    padding-left: 5px;
}

#cms-sidebar ul li.menu-item-has-children > a.expanded:after {
    content: " ▲"; /* Change to up arrow when expanded */
}
