/* Basic layout */
.sidebar {
    position: fixed;
    width: 18.40% ;
    height: 100vh;
    background-color: #ffffff;
    z-index: 110;
    overflow-y: auto;
    left:0;
 }
 

.submenu-panel {
    width: 19%;
    background-color: #f9f9f9;
    height: 100vh;
    position: fixed;
    left: 18.40% ; /* Right next to main sidebar */
    top: 0;
    border-left: 1px solid #e0e0e0;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease;
    z-index: 101;
    padding-top: 10%;
    /*padding: 20px;*/
    pointer-events: none; /* prevent interaction when hidden */
}
.submenu-panel.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    z-index: 101;
}
/* Panel exits left */
.submenu-panel.slide-out-left {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Panel enters from right (already defaulted, no extra class needed unless you want finer control) */
.submenu-panel.slide-in-right {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.submenu-section {
   
    flex-direction: column;
}
.submenu-section.active {
    display: flex;
}
.submenu-section a {
    padding: 10px 0;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    display: block;
}

.submenu-section a:hover {
    color: #0c8442;
}

.submenu-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}

/* Overlay for background dimming */
.overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 100;
    display: none;
    transition: opacity 0.3s ease;
}
.overlay.active {
    display: block;
    opacity: 1;
}

#submenu-panel-who {
  z-index: 101;
}

#submenu-panel-who-leadership {
  z-index: 110; /* Higher than Level 1 */
}

/* Mobile overrides */
@media screen and (max-width: 768px) {
     .sidebar {
        position: fixed; 
        top: 60px;  
        left: -100%;  
        width: 100%;
        height: calc(100vh - 60px);
        z-index: 150;
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .mobile-header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background-color: #fff;
        z-index: 160;
        align-items: center;
        justify-content: space-between;
        padding: 0 10px;
        border-bottom: 1px solid #ccc;
    }

    .menu-toggle {
        display: block;
        font-size: 24px;
        background: none;
        border: none;
        cursor: pointer;
    }

     .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 60px; /* avoid content being hidden behind header */
    }
    .logo{
        display: none !important;
    }
   
    .sidebar {
        top: 60px; /* below the mobile header */
    }
   .submenu-panel {
        width: 100% !important;
        left: 0 !important;
        right: 0;
        top: 60px !important; /* below fixed mobile header */
        height: calc(100vh - 60px);
        transform: translateX(-100%);
        opacity: 0;
        transition: transform 0.6s ease, opacity 0.6s ease;
        pointer-events: none;
        position: fixed; /* ✅ Required */
        background-color: #fff; /* ✅ Optional: ensures visibility */
        z-index: 155; /* ✅ Must be above sidebar (z-index: 150) */
    }

    .submenu-panel.active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
        z-index: 156 !important;
    }

    .mobile-only {
        display: block;
    }

    .submenu-header {
        padding: 10px;
        border-bottom: 1px solid #ccc;
        background: #fff;
    }

    .back-button {
        font-size: 16px;
        cursor: pointer;
        background: #0C8442;
        margin: 20px;
        padding: 10px 20px;
        border: unset;
        border-radius: 10px;
        color: #ffffff;
        font-weight: 700;
    }
}

/* Highlight for current active item */
.menu-active {
  /*background-color: #007b3e;
  color: white;*/
}

/* Dim for parent items in the hierarchy */
.menu-previous {
 /* background-color: #f1f1f1; 
  color: #333 !important;*/
}