/* Sidebar styles */
.sidebar {
    height: 100%;
    width: 0;  /* Sidebar starts hidden */
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--base-color);
    overflow-x: hidden;
    transition: width 0.3s ease;  /* Smooth transition for sliding */
    padding-top: 60px;
    z-index: 1000;  /* Ensure it’s above content */
}

/* Ensure the content inside the sidebar doesn't collapse */
.sidebar ul {
    list-style-type: none;
    padding: 0;
}

/* Sidebar links */
.sidebar ul li a {
    text-decoration: none;
    padding: 8px 8px 8px 32px;
    font-size: 25px;
    color: var(--text-color);
    display: block;
}

.sidebar ul li a:hover {
    color: var(--accent-color);
}

/* When the sidebar is expanded */
.sidebar.open {
    width: 250px;  /* Set the width of the sidebar when opened */
}

/* Close button styles */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: var(--text-color);
    background-color: transparent;  /* Ensure background is transparent */
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
    transition: color 0.3s ease, background-color 0.3s ease;  /* Smooth color transition */
}

/* Close button hover effect - remove background and maintain transparency */
.close-btn:hover {
    background-color: transparent;  /* Remove background on hover */
    color: var(--hover-color);  /* Set hover color for text */
}

/* Sidebar toggle button (☰) specific styles */
.open-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 30px;
    background-color: transparent;
    color: var(--text-color);
    border: none;
    cursor: pointer;
    z-index: 1002;  /* Ensure it’s above the sidebar */
    padding: 0;
    transition: color 0.3s ease;
}

/* Remove hover effect from the open button */
.open-btn:hover {
    color: var(--text-color);
    background-color: transparent;
    border: none;
}

/* Close the focus outline */
.open-btn:focus {
    outline: none;
}

/* Make the ☰ button invisible when sidebar is open */
.sidebar.open + .open-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Make the ☰ button visible when sidebar is closed */
.open-btn {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.1s ease;
}

/* Sidebar state when closed */
.sidebar.close + .open-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0s, visibility 0s;
}

/* Content Styling */
.content {
    transition: transform 0.3s ease; /* Smooth transition for content movement */
    transform: none;  /* Default: no transformation applied */
}

/* When sidebar is open, content doesn’t shift, sidebar overlays */
.sidebar.open + .content {
    transform: translateX(250px);  /* Sidebar moves, but the content stays in place */
}
