.custom-header {
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0px;
    padding: 10px;
    position: fixed;
    top: 0; /* Adjusted from 30px for better alignment */
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    overflow: visible !important;
}

.header-logo {
    display: flex;
    flex-direction: row; /* Aligns the logo and tagline vertically */
    align-items: center; /* Left-aligns the tagline */
    background-color: transparent !important;
}

.header-logo img {
    max-height: 50px;
    background-color: transparent !important;
}

.header-tagline {
    font-size: 14px;
    color: #555; /* Subtle color for differentiation */
    font-style: italic; /* Optional: Gives a softer look */
    margin-top: 5px; /* Spacing between the logo and tagline */
    margin-left: 10px;
}

.header-nav .custom-menu {
    list-style: none;
    display: flex;
    gap: 20px; /* Adds space between the menu items */
    padding: 0;
    margin: 0;
}

.header-nav .custom-menu li {
    display: inline-block;
}

.header-nav .custom-menu a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: color 0.3s;
}

.header-nav .custom-menu a:hover {
    color: #007bff; /* Change to your brand color on hover */
}

/* Menu is visible by default on larger screens */
.custom-menu {
    list-style: none;
    display: flex; /* Display as a row for larger screens */
    flex-direction: row;
    gap: 20px;
    padding: 0;
    margin: 0;
    transition: max-height 0.3s ease-in-out;
    overflow: hidden;
}



/* Hide the mobile-menu class by default */
.mobile-menu {
    display: none;
}

.header-nav .custom-menu li.mobile-menu {
    display: none;
}


.menu-toggle {
    display: none; /* Show the button */
    color: #007bff !important; /* Ensure the color is set */
    font-size: 24px; /* Icon size */
    cursor: pointer;
    z-index: 1001;
    background: none !important;
    border: none !important; /* Remove border */
    outline: none !important; /* Remove outline */
    opacity: 1 !important; /* Ensure full opacity */
}

.user-menu {
    position: relative; /* Set relative positioning for the dropdown anchor */
    display: inline-block; /* Ensure it aligns with Astra's flex menu layout */
}

.user-menu > a {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
}

.user-menu > a i {
    margin-left: 5px;
    font-size: 0.8em;
    vertical-align: middle;
}

/* Style for the dropdown menu */
.dropdown-menu {
    display: none; /* Hide dropdown by default */
    position: fixed; /* Position absolutely */
    top: 50px; /* Position dropdown below the user name */
    right: 0px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    list-style: none;
    min-width: 120px;
    z-index: 9999; /* High z-index to display above Astra's header */
    border: 1px solid #ddd;
    flex-direction: column; /* Ensure items are displayed vertically */
}

/* Show the dropdown when .show class is added */
.dropdown-menu.show {
    display: flex; /* Use flex to align items vertically */
}

.dropdown-menu li {
    width: 100%; /* Ensure each item takes full width */
}

.dropdown-menu li a {
    color: #333;
    padding: 10px 20px;
    display: block;
    width: 100%; /* Ensure the link takes full width */
}

.dropdown-menu li a:hover {
    background-color: #f0f0f0;
}

/* Remove default link styles */
.custom-menu a {
    text-decoration: none;
    color: inherit;
}

.custom-menu a:hover {
    color: #0073aa; /* Optional: set a custom hover color */
}

.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu > a {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
}

.user-menu > a i {
    margin-left: 5px;
    font-size: 0.8em;
    vertical-align: middle;
}


/* Hide the menu and show the button on smaller screens */
@media (max-width: 768px) {
    .custom-menu {
        display: none !important; /* Hide the menu by default */
        flex-direction: column; /* Stack menu items vertically for mobile */
        background-color: #fff; /* Optional: Background color */
        box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1); /* Optional shadow */
        position: absolute;
        top: 60px; /* Adjust as needed */
        right: 0px;
        width: 20%; /* Full width on small screens */
        z-index: 1000; /* Ensure it appears on top */
    }

    .custom-menu.show {
        display: flex !important; /* Show the menu when the 'show' class is added */
    }

    .menu-toggle {
        display: block !important; /* Show the toggle button */
        position: absolute;
        right: 0px;
        color: #007bff !important;
        font-size: 24px; /* Icon size */
        cursor: pointer;
        z-index: 1001;
        background: none !important;
        border: none !important;  /*Remove border */
        outline: none !important; /* Remove outline */
    }
    
    .mobile-menu {
        display: block;
    }
    
    .header-nav .custom-menu li.mobile-menu {
        display: block !important;
    }

    .user-menu {
        display: none !important;
    }
    .user-menu .dropdown-menu {
        display: none !important;
    }
}

#preloader {
  position: fixed;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8); /* Semi-transparent background */
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
#preloader img {
  width: 500px; /* Adjust as needed */
  height: auto;
}
.hidden {
  display: none !important;
}
