/* Sidebar Navigation - Redesigned Webapp */

/* Page Layout with Sidebar */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrapper {
    display: flex;
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Sidebar */
.programs-nav {
    width: 280px;
    background-color: var(--primary-dark);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    left: 0;
    top: 70px;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.programs-nav .fixed {
    padding: 20px;
}

/* Program Settings */
.program-setting {
    margin-bottom: 20px;
}

aside.programs-nav .program-setting a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 0px 8px 0px 8px !important;
    transition: all 0.3s ease;
    font-size: 15px;
    margin-bottom: 5px;
}

aside.programs-nav .program-setting a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-pink);
    border-radius: 8px 0px 8px 0px !important;
}

aside.programs-nav .program-setting a.active {
    background-color: var(--primary-pink);
    color: var(--text-light);
    box-shadow: 0 2px 8px rgba(247, 76, 153, 0.3);
    border-radius: 8px 0px 8px 0px !important;
}

.program-setting svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.program-setting span {
    flex: 1;
}

/* Program Select */
.program-select {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.program-title a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
}

.program-title svg {
    width: 20px;
    height: 20px;
    fill: var(--primary-pink);
}

.round-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    padding-left: 30px;
}

/* Sidebar Toggle Button */
.aside-button {
    position: fixed;
    left: 265px;
    bottom: 30px;
    width: 36px;
    height: 36px;
    background-color: var(--primary-pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow-dark);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 3px solid var(--bg-light);
}

.aside-button:hover {
    background-color: #e63a85;
    transform: scale(1.15);
    box-shadow: 0 6px 16px var(--shadow-dark);
}

.aside-button svg {
    width: 18px;
    height: 18px;
    fill: var(--text-light);
    transition: transform 0.3s ease;
}

/* Arrow icons - default state (sidebar open) */
.aside-button .arrow-left {
    display: block;
}

.aside-button .arrow-right {
    display: none;
}

/* When sidebar is hidden/collapsed */
.programs-nav.collapsed {
    transform: translateX(-280px);
}

.programs-nav.collapsed ~ .main-content-wrapper {
    margin-left: 0;
}

.programs-nav.collapsed ~ .aside-button {
    left: 15px;
}

/* When collapsed, show right arrow (to expand) */
.programs-nav.collapsed ~ .aside-button .arrow-left {
    display: none;
}

.programs-nav.collapsed ~ .aside-button .arrow-right {
    display: block;
}

/* Main Content Area */
.main-content-wrapper {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

.main-content {
    padding: 30px;
    max-width: 1200px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .programs-nav {
        transform: translateX(-280px);
    }
    
    .programs-nav:not(.collapsed) {
        transform: translateX(0);
    }
    
    .main-content-wrapper {
        margin-left: 0;
    }
    
    .aside-button {
        left: 15px !important;
        bottom: 30px;
    }
    
    .aside-button:hover {
        transform: scale(1.15);
    }
    
    .programs-nav:not(.collapsed) ~ .aside-button {
        left: 265px !important;
    }
}

@media (max-width: 768px) {
    .programs-nav {
        width: 260px;
    }
    
    .programs-nav.collapsed {
        transform: translateX(-260px);
    }
    
    .main-content {
        padding: 20px 15px;
    }
}

/* Scrollbar Styling for Sidebar */
.programs-nav::-webkit-scrollbar {
    width: 6px;
}

.programs-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.programs-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.programs-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
