.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px; /* Set a fixed height for the header */
  padding: 0 20px; /* Adjust padding to control spacing on sides */
  position: relative; /* Ensure absolute positioning of Gas Safe logo works correctly */
  background-color: #333; /* Example background color */
}

#branding {
  display: flex;
  align-items: center; /* Align items to the center */
  justify-content: flex-start; /* Align items to the left */
  width: 100%;
}

#main-logo {
  height: 60px; /* Adjust the height as needed */
  width: auto;
  margin-right: 10px; /* Adjusted margin for better alignment */
}

#branding h1, #branding h2 {
  margin-left: 0; /* Ensure text starts at the left */
}

#branding h1 {
  font-size: 24px; /* Adjust font size to fit smaller screens */
  margin: 0;
  padding: 0;
  color: #1caade;
  padding-top: 5px; /* Move the text down */
}

#branding h2 {
  font-size: 12px; /* Adjust font size to fit smaller screens */
  margin: 0;
  padding: 0;
  padding-top: 3px; /* Adjust to reduce the gap */
  color: #1caade;
  line-height: 1; /* Remove extra line-height space */
}

nav {
  display: flex;
  align-items: center; /* Align items to the center */
}

nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  height: 60px; /* Set height to match the nav bar */
  align-items: center; /* Center align the items within the nav bar height */
}

nav ul li {
  margin-right: 15px; /* Adjust margin for tighter fit */
  position: relative;
}

nav ul li a {
  text-decoration: none;
  color: #1caade;
  padding: 0.5rem 0.5rem;
  font-size: 14px; /* Adjust font size to fit smaller screens */
  font-weight: 600;
  position: relative;
  transition: color 0.25s;
  z-index: 1;
}

nav ul li a::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: #1caade;
  z-index: -1;
  transition: transform 0.3s ease-in-out;
  transform: scaleY(0);
  transform-origin: center;
  border-radius: 8px; /* Adjust the border radius as needed */
}

nav ul li a:hover::before {
  transform: scaleY(1);
}

nav ul li a:hover {
  color: #f4cc24;
}

.nav-gas-safe-logo {
  position: absolute; /* Position absolutely */
  top: 10px; /* Align vertically with the header */
  right: 20px; /* Adjust to position correctly on the right */
  display: flex;
  align-items: center; /* Center align the Gas Safe logo */
  height: 60px; /* Match the height of the header */
  z-index: 10; /* Ensure it stays on top of other elements */
}

/* mybuilder area */
.find-on {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.mybuilder-logo {
  width: 75px;
  height: auto;
  margin-left: 5px;
  vertical-align: middle;
}

/* New CSS for Responsive Navigation */
#navbar {
    display: flex;
}

.menu-icon {
    display: none; /* Hide menu icon by default */
}

/* Styling for small screens */
@media (max-width: 420px) {
    #navbar {
        display: none; /* Hide the navbar on small screens */
        flex-direction: column;
        width: 100%;
        background-color: #333;
        max-height: 80vh; /* Limit the height to 80% of the viewport */
        overflow-y: auto; /* Make the dropdown scrollable if it exceeds the viewport height */
    }

    .menu-icon {
        display: block; /* Show the menu icon on small screens */
        width: 35px; /* Adjust size as necessary */
        height: auto;
        cursor: pointer;
        margin-left: auto; /* Push the menu icon to the right */
    }

    #branding {
        justify-content: flex-start; /* Keep branding elements on the left */
    }

    #navbar ul {
        flex-direction: column; /* Stack the menu items vertically */
    }

    #navbar ul li {
        margin: 5px 0; /* Reduce spacing between menu items */
    }

    #navbar ul li a {
        font-size: 14px; /* Smaller font size for dropdown items */
        padding: 10px 20px; /* Reduce padding to fit more items */
    }

    .nav-gas-safe-logo {
        position: static; /* Align with other elements */
        right: 0;
        margin-left: auto;
    }
}
