/* ===== Sidebar ===== */
.sidebar {
    width: 200px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #1a252f;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 15px;
    background-color: #1a252f;
}

.sidebar-header h1 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-header h1 a {
    color: white;
    text-decoration: none;
}

/* ===== Navigation ===== */
#category-nav {
    flex: 1;
    overflow-y: auto;
    padding: 5px 0;
}

.nav-item {
    display: block;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
    border-left: 4px solid transparent;
    color: white;
    text-decoration: none;
}

.nav-item:hover {
    background-color: #34495e;
}

.nav-item.active {
    background-color: #2980b9;
    border-left-color: #3498db;
}

/* Category Header */
.nav-category-header {
    padding: 10px 15px;
    background-color: #2c3e50;
    font-weight: bold;
    border-bottom: 1px solid #34495e;
    color: #ecf0f1;
    font-size: 0.85rem;
}

/* Sub Items */
.nav-sub-item {
    display: block;
    padding: 8px 15px 8px 25px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #bdc3c7;
    transition: all 0.2s;
    border-left: 4px solid transparent;
    text-decoration: none;
}

.nav-sub-item:hover {
    background-color: #34495e;
    color: white;
}

.nav-sub-item.active {
    background-color: #2980b9;
    border-left-color: #3498db;
    color: white;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 10px 15px;
    background-color: #1a252f;
    border-top: 1px solid #34495e;
    text-align: center;
    font-size: 0.8rem;
    margin-top: auto;
}

.sidebar-footer a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.75rem;
}

.sidebar-footer a:hover {
    color: white;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .sidebar {
        width: 100%;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    
    #category-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3rem;
        padding: 10px;
    }
    
    .nav-category-header {
        display: none;
    }
    
    .nav-sub-item {
        padding: 0.4rem 0.8rem;
        border: 1px solid #34495e;
        border-radius: 4px;
    }
}
