header {
    background-color: var(--color-header-background);
    color: var(--color-primary);
    padding: 15px 0 5px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Make sure header stays on top */
}

.header-banner {
    height: auto;
    width: 100%;
    max-width: 250px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Ensures space between logo and menu items */
    width: 100%;
    padding: 0 20px; /* Padding for spacing */
    box-sizing: border-box; /* Include padding in width calculation */
}

.menu-toggle {
    display: none; /* Hide by default */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
    z-index: 1001;
}

.menu-icon {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    margin: 5px 0;
}

nav {
    display: flex;
    align-items: center;
    margin-left: auto; /* Push the nav to the right */
    background-color: var(--color-header-background); /* Use header background color */
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px; /* Space between menu items */
    align-items: center;
}

nav ul li {
    display: inline;
}

nav ul li a {
    font-family: 'Roboto', sans-serif; /* Apply Roboto font */
    color: var(--color-primary);
    text-decoration: none;
    font-weight: normal; /* Default font weight for all tabs */
    font-size: var(--font-size-link);
    display: flex;
    align-items: center; /* Align text with icons */
    gap: 5px; /* Space between icon and text */
    transition: color 0.3s, text-shadow 0.3s;
}

nav ul li a i {
    font-size: 1em; /* Adjust icon size */
}

nav ul li a:hover {
    color: var(--color-accent);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

nav ul li a.active {
    position: relative; /* Position relative to allow absolute positioning of the pseudo-element */
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -20px; /* Adjust this value to align with the bottom of the header */
    height: 2px;
    background-color: var(--color-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Show hamburger menu on mobile */
    }

    nav {
        display: none; /* Hide navigation by default on mobile */
        width: 100%;
        background-color: var(--color-header-background); /* Use header background color */
        position: absolute;
        top: 70px; /* Below header */
        left: 0;
        z-index: 1000;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Shadow for depth */
    }

    nav.active {
        display: block; /* Show navigation when active */
    }

    nav ul {
        display: flex;
        flex-direction: column;
        padding: 20px;
        margin: 0;
        gap: 10px;
    }

    nav ul li {
        display: block;
        text-align: center;
    }

    nav ul li a {
        font-size: var(--font-size-link); /* Consistent font size */
    }

    .theme-toggle-desktop {
        display: none; /* Hide theme toggle on mobile */
    }

    .theme-toggle-mobile {
        display: block; /* Show theme toggle in the menu on mobile */
    }

    .three-columns {
        flex-direction: column; /* Stack columns vertically on mobile */
    }

    .column {
        width: 100%;
        margin: 0 0 20px; /* Margin at bottom for spacing */
    }

    .column:last-child {
        margin-bottom: 0; /* Remove bottom margin for the last item */
    }

    nav ul li a.active::after {
        content: none; /* Remove the underscore on mobile */
    }
}