/* =================================================================== */
/* == STYLES FOR PROFESSIONAL OFF-CANVAS (HAMBURGER) MENU          == */
/* =================================================================== */

/* --- The Overlay --- */
.offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040; /* Below the menu, above the content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.offcanvas-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- The Menu Panel --- */
.offcanvas-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px; /* A good standard width */
    max-width: 85%;
    height: 100%;
    background-color: #ffffff;
    z-index: 1045;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.offcanvas-menu.active {
    transform: translateX(0);
}

/* --- Menu Header --- */
.offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.25rem; /* Remove top/bottom padding */
    height: 60px; /* Match main header height */
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.offcanvas-logo img {
    max-height: 30px;
    width: auto;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    color: #6c757d;
    cursor: pointer;
}

/* --- Menu Navigation --- */
.offcanvas-nav {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.offcanvas-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.offcanvas-nav li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.25rem;
    text-decoration: none;
    color: #343a40;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.offcanvas-nav li a:hover,
.offcanvas-nav li a.active {
    background-color: #f8f9fa;
    color: var(--theme-primary-color, #2874f0);
}

.offcanvas-nav li a i.fa-fw {
    width: 1.25em; /* From FontAwesome's .fa-fw */
    text-align: center;
    margin-right: 0.75rem;
    color: #868e96;
    transition: color 0.2s ease;
}

.offcanvas-nav li a:hover i.fa-fw,
.offcanvas-nav li a.active i.fa-fw {
    color: var(--theme-primary-color, #2874f0);
}


/* --- Section Headings --- */
.nav-heading {
    display: block;
    padding: 1rem 1.25rem 0.5rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.offcanvas-nav .nav-heading:first-of-type {
    padding-top: 0.5rem;
}

/* --- Improved Divider --- */
.nav-divider {
    margin: 0.75rem 1.25rem;
    border: 0;
    border-top: 1px solid #e9ecef;
}