/* ==========================================
   MAIN NAVIGATION STYLES
   ========================================== */

.main-nav-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;          
    padding: 0 20px 0 40px;        
    height: 60px;           
    align-items: center;    
    justify-content: space-between; 
} 



.main-nav-logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c5f41;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav-logo:hover {
    color: #5a67d8;
}

.main-nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
    
    margin-right: 80px;
}

.main-nav-item {
    position: relative;
}

.main-nav-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.main-nav-link:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #5a67d8;
    transform: translateY(-2px);
}

.main-nav-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 10px;
}

.main-nav-item:hover .main-nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav-dropdown-item {
    color: #4a5568;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    transition: all 0.3s ease;
}

.main-nav-dropdown-item:hover {
    background: #f8fafc;
    color: #5a67d8;
    padding-left: 25px;
}

/* ==========================================
   SIDEBAR NAVIGATION STYLES
   ========================================== */

.sidebar-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    /* padding-left: 20px; */
    
}

.sidebar-nav {
    width: 280px;
    background: #f8f9ff;
    min-height: calc(100vh - 60px);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    padding: 30px 0;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
   
}



.sidebar-header {
    padding: 0 25px 20px;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-header h2 {
    color: #5a67d8;
    font-size: 1.3em;
    margin-bottom: 5px;
}

.sidebar-progress-info {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.sidebar-progress-bar-container {
    background: #e0e0e0;
    height: 8px;
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
}

.sidebar-progress-bar {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.sidebar-lesson-list {
    list-style: none;
    padding: 20px 0;
    /* new */
    /* overflow: visible; */
}

.sidebar-lesson-item {
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    /* new */
 position: relative;
  z-index: 2;
  transform: translateZ(0);

    /* new ended */
}




.sidebar-lesson-item:hover {
    background: #e8f0ff;
}

.sidebar-lesson-item.active {

    background: #e8f0ff;
    border-left-color: #5a67d8;
}

.sidebar-lesson-number {
    background: #e0e0e0;
    color: #666;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    flex-shrink: 0;
}

.sidebar-lesson-item.active .sidebar-lesson-number {

    background: #5a67d8;
    color: white;
}



.sidebar-lesson-item.completed .sidebar-lesson-number {
    background: #48bb78;
    color: white;
}

.sidebar-lesson-item.completed .sidebar-lesson-number::before {
    content: '✓';
}

.sidebar-lesson-item.completed .sidebar-lesson-number span {
    display: none;
}

.sidebar-lesson-title {
    color: #333;
    font-size: 0.95em;
}



.sidebar-content-area {
    flex: 1;
    padding: 0px 40px;
    max-width: 900px;
}

/* Mobile Menu Toggle Button */
.sidebar-mobile-toggle {
    /* display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(90, 103, 216, 0.4);
    z-index: 999;
    transition: all 0.3s ease; */

    display: none;
    background: none;
    border: none;
    color: #4a5568;
    font-size: 1.8em;
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;

}

.sidebar-mobile-toggle:hover {
    /* transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(90, 103, 216, 0.5); */
     color: #5a67d8;
}

/* ==========================================
   MOBILE RESPONSIVE STYLES
   ========================================== */

@media (max-width: 968px) {
    /* Main Nav Mobile */
    .main-nav-content {
        padding: 15px 15px;
    }
    
    .main-nav-logo {
        font-size: 1.3em;
    }
    
    .main-nav-menu {
        margin-right: 10px;
    }
    
    .main-nav-dropdown {
        min-width: 240px;
    }
    
    /* Sidebar Mobile */
    .sidebar-nav {
        position: fixed;
        left: -280px;
        /* top: 0;
        height: 100vh; */
        z-index: 998;
        transition: left 0.3s ease;
        padding-top: 20px;
        top: 60px;              /* Change from 0 to 60px */
    height: calc(100vh - 60px);  /* Change from 100vh */
    }
    
    .sidebar-nav.open {
        left: 0;
    }
    
    .sidebar-mobile-toggle {
        display: block;
    }
    
    .sidebar-content-area {
        padding: 20px;
    }
    
    /* Overlay for sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 997;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 480px) {
    .main-nav-logo {
        font-size: 1.1em;
    }
    
    .main-nav-dropdown {
        min-width: 200px;
        left: 0;
        right: auto;
    }
}


/* ==========================================
   LESSON NAVIGATION BUTTONS
   ========================================== */

.lesson-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 30px 0;
    max-width: 900px;
    margin: 0 auto;
}

.lesson-nav-btn {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 500;
    margin: 0 20px 0 20px;
}

.prev-lesson-btn {
    /* background: #f0f0f0;
    color: #333; */
     background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(90, 103, 216, 0.3);

}

/* .prev-lesson-btn:hover {
    background: #e0e0e0;
} */

.prev-lesson-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(90, 103, 216, 0.4);
}

.next-lesson-btn {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(90, 103, 216, 0.3);
}

.next-lesson-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(90, 103, 216, 0.4);
}

.lesson-nav-btn:only-child {
    margin-left: auto;
}

.lesson-nav-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

/* --- Disable hamburger and sidebar on hub pages --- */
body.no-sidebar .sidebar-mobile-toggle {
  display: none !important;
}

body.no-sidebar .sidebar-nav,
body.no-sidebar .sidebar-overlay {
  display: none !important;
}

body.no-sidebar .main-content {
  margin-left: 0 !important;
}