.nav-container {
    position: relative;
    width: 100%;
    background-color: var(--cyan-950);
    padding: 0.64em 0 0;
    display: flex;
    justify-content: center;
}

.nav-content {
    width: 100%;
    max-width: 81.575em;
    margin: 0 auto; /* Center the nav content */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 2.5em;
    position: relative;
    padding: 0.16em 2em 6px 2em;
    border-bottom: 1px solid transparent;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 8%,
        rgba(255, 255, 255, 0.1) 92%,
        rgba(255, 255, 255, 0) 100%
    ) bottom/100% 1px no-repeat;
}

.nav-logo {
    display: flex;
    align-items: center;
    height: 2.5em;
}

.logo-img {
    height: 1.4em;
    width: auto;
    display: block;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding-right: 0; /* Ensure proper alignment */
}

.nav-item {
    padding: 0.625em;
    color: white;
    font-size: 0.75em;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity var(--transition-speed) ease;
    position: relative;
    text-decoration: none;
}

a.nav-item {
    color: white;
    text-decoration: none;
}

.nav-button {
    padding: 0.75em 1.2em;
    border-radius: 0.625em;
    font-size: 0.75em;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6em;
}

.nav-button.orange {
    background-color: var(--orange-400);
    color: var(--cyan-950);
}

.nav-button.outlined {
    background-color: transparent;
    color: white;
    outline: 1px solid white;
}

.mobile-menu-button {
    display: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 10000;
    position: relative;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--cyan-950);
    padding: 5em 2em 2em 2em; /* Top padding to account for nav header */
    z-index: 9999;
    flex-direction: column;
    gap: 1em;
    align-items: stretch; /* Changed from center to stretch */
    justify-content: flex-start;
    transform: translateX(100%);
    transition: transform var(--transition-speed) ease;
    display: none;
    box-sizing: border-box;
}

.mobile-menu.active {
    display: flex;
    transform: translateX(0);
}

/* Hide hamburger button when menu is active */
.mobile-menu-button.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Nav items are now styled as buttons in mobile menu */

.mobile-menu .nav-button {
    display: flex !important; /* Override inline-flex */
    width: 100% !important; /* Full width within padded container */
    margin: 0.5em 0 0 0; /* Only top margin needed */
    font-size: 1.2em; /* Reduced by 20% from 1.5em */
    padding: 1.2em 1.92em; /* Reduced by 20% from 1.5em 2.4em */
    min-height: 2.8em; /* Reduced by 20% from 3.5em */
    box-sizing: border-box; /* Ensure padding is included in width */
    text-decoration: none;
    align-items: center;
    justify-content: center;
}

/* First button (How ebba works) - no outline */
.mobile-menu .nav-button:not(.orange):not(.outlined) {
    background-color: transparent;
    color: white;
    outline: none;
    border: none;
}

.mobile-menu-close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.5em 1em 4em 1em; /* Top reduced by 50%, bottom increased to 4em */
    font-size: 2.25em; /* Match hamburger menu size */
    color: white;
    cursor: pointer;
    width: auto;
    height: auto; /* Changed from fixed height to auto */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    background: transparent;
    border: none;
}

.mobile-menu-close:hover {
    opacity: 0.7;
}

@media (max-width: 1400px) {
    .nav-content {
        max-width: calc(81.575em * 0.9);
}
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-button {
        display: block;
        font-size: 2.25em; /* 50% larger from 1.5em */
    }

    .nav-content {
        padding: 0.24em 1em 9px 1em; /* 50% larger padding */
        height: 3.75em; /* 50% larger from 2.5em */
    }
    
    .nav-logo {
        height: 3.75em; /* 50% larger from 2.5em */
    }
    
    .logo-img {
        height: 2.1em; /* 50% larger from 1.4em */
    }
}

@media (max-width: 576px) {
    .nav-content {
        padding: 0.24em 0.75em 9px 0.75em; /* 50% larger padding */
    }
    
    .mobile-menu-close {
        padding: 0.5em 0.75em 4em 0.75em; /* Match nav-content side padding, with adjusted top/bottom */
    }
}
