/* Sidebar Navigation Styles - Ministry of Culture */

/* Sidebar Container */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, var(--moc-primary-dark) 0%, #0a1f2a 100%);
    border-left: 2px solid rgba(235, 90, 60, 0.3);
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(235, 90, 60, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(235, 90, 60, 0.5);
}

/* Sidebar Header (Logo & Brand) */
.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 2px solid rgba(235, 90, 60, 0.2);
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 80px;
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-brand {
    flex: 1;
    min-width: 0;
}

.sidebar-brand-title {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-brand-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav .nav-item {
    margin: 0.25rem 0.5rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--moc-secondary) 0%, var(--moc-accent) 100%);
    border-radius: 4px 0 0 4px;
    transition: height 0.3s ease;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(-3px);
    padding-right: 1.25rem;
}

.sidebar-nav .nav-link:hover::before {
    height: 60%;
}

.sidebar-nav .nav-link.active {
    background: rgba(235, 90, 60, 0.25);
    color: #FFB89A;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(235, 90, 60, 0.2);
}

.sidebar-nav .nav-link.active::before {
    height: 80%;
    background: linear-gradient(180deg, var(--moc-secondary) 0%, var(--moc-accent) 100%);
}

.sidebar-nav .nav-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sidebar-nav .nav-link:hover i {
    transform: scale(1.1);
}

.sidebar-nav .nav-link.active i {
    color: var(--moc-secondary);
}

/* Sidebar Footer (User Section) */
.sidebar-footer {
    padding: 1rem;
    border-top: 2px solid rgba(235, 90, 60, 0.2);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-user:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.sidebar-user-avatar i {
    color: white;
    font-size: 1.3rem;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content Area */
.main-content {
    margin-right: 280px;
    min-height: 100vh;
    transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #F8F9FA;
}

/* Main Content Full Width (when sidebar is hidden) */
.main-content-full {
    margin-right: 0 !important;
}

/* Sidebar Toggle Button (Mobile) */
.sidebar-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1050;
    background: var(--moc-primary-dark);
    border: 2px solid rgba(235, 90, 60, 0.3);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: var(--moc-secondary);
    border-color: var(--moc-secondary);
    transform: scale(1.05);
}

.sidebar-toggle i {
    font-size: 1.3rem;
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1039;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

/* Sidebar Sections */
.sidebar-section {
    padding: 1rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

/* Dropdown in Sidebar */
.sidebar-nav .dropdown-toggle::after {
    margin-right: auto;
    margin-left: 0.5rem;
    border-width: 0.35em;
}

.sidebar-nav .dropdown-menu {
    position: static !important;
    transform: none !important;
    float: none;
    width: 100%;
    margin: 0.5rem 0;
    border: none;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: none;
    border-radius: 8px;
    padding: 0.5rem 0;
}

.sidebar-nav .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.75rem 1rem 0.75rem 3rem;
    font-size: 0.9rem;
}

.sidebar-nav .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Login Button in Sidebar */
.sidebar-login-btn {
    margin: 1rem 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--moc-secondary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.sidebar-login-btn:hover {
    background: #d84a2a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(235, 90, 60, 0.3);
}

