#search-results, #search-results2 {
    position: absolute;
    width: 100%; /* Full width for responsiveness */
    max-width: 43%; /* Limit max width for larger screens */
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.75);
    -webkit-box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.75);
    -moz-box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.75);
    padding: 20px;
    z-index: 999999;
    overflow-y: auto;
    display: none;
    top: 45px;
    max-height: 300px; /* Set a maximum height */
    }
    
    #search-results li, #search-results2 li {
    display: flex; /* Align image and text side by side */
    align-items: center; /* Vertically center the content */
    list-style: none;
    margin-top: 10px;
    font-weight: bold;
    color: #000;
    padding-bottom: 5px;
    border-bottom: 1px dotted #ccc;
    }
    
    #search-results img, #search-results2 img {
    padding-right: 10px;
    width: 100px; /* Set a fixed width for the images */
    height: auto; /* Maintain aspect ratio */
    margin-right: 10px; /* Add space between image and text */
    }
    
    #search-results li span, #search-results2 li span {
    display: inline-block; /* Allow name to be on the right side */
    }
    
    /* Responsive styles for mobile devices */
    @media (max-width: 1200px) {
    #search-results, #search-results2 {
        max-width: 50%; 
    padding: 15px;
    }
    }
    
    @media (max-width: 991px) {
    #search-results, #search-results2 {
    max-width: 100%;
    left: 10px;
    right: 10px;
    max-height: 250px;
    padding: 15px;
    }
    
    /* Make the image and name layout work for smaller screens */
    #search-results li, #search-results2 li {
    font-size: 14px;
    padding-bottom: 5px;
    }
    }
    
    @media (max-width: 768px) {
    #search-results, #search-results2 {
    max-width: 100%;
    left: 5px;
    right: 5px;
    max-height: 200px;
    padding: 10px;
    }
    
    /* Ensure image and name appear side by side on smaller screens */
    #search-results li, #search-results2 li {
    font-size: 14px;
    padding-bottom: 5px;
    }
    
    #search-results img, #search-results2 img {
    width: 90px; /* Smaller images for smaller screens */
    height: auto;
    }
    }
    
    
    @media (max-width: 480px) {
    #search-results, #search-results2 {
    max-width: 95%;
    left: 5px;
    right: 5px;
    /* max-height: 150px; */
    padding: 10px;
    }
    
    #search-results li, #search-results2 li {
    font-size: 12px;
    }
    
    #search-results img, #search-results2 img {
    width: 90px; /* Smallest size for images on mobile */
    height: auto;
    }
    
    /* Ensure search bar is not hidden behind other elements */
    #search-bar {
    position: relative; /* Ensure search bar stays visible */
    z-index: 1000000; /* Place search bar above all other elements */
    }
    }