nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding-top: 2rem;
    padding-bottom: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    height: initial;
    max-width: 1366px;
    padding-left: 6rem;
    padding-right: 6rem;
    margin-left: auto;
    margin-right: auto;

    @media (max-width: 768px) {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }

    @media (max-width: 480px) {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    &.scrolled {
        background: rgba(51, 51, 51, 0.1);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(15px);
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    }

    .logo {
        img {
            object-fit: contain;
            width: 100%;

            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
    }

    &.scrolled .logo img {
        width: 70%;

    }

    .btn {
        font-size: .75rem;
        padding: .2em;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    a {
        color: #fff;
        font-weight: bold;
        font-size: .85em;

        &:hover {
            text-decoration: none;
        }
    }
}

/* Hamburger styles */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 11;
    margin-left: auto;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    margin: 3px 0;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger:hover span {
    background: #ddd;
}

/* Mobile drawer styles */
.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 30, 30, 0.97);
    backdrop-filter: blur(10px);
    z-index: 1100;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 2rem 1.5rem 2rem;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
    overflow-y: auto;
}

.mobile-drawer.open {
    display: flex;
    transform: translateX(0);
}

.mobile-drawer a {
    color: #fff;
    font-size: 1.2em;
    margin-bottom: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    transition: color 0.3s ease;
}

.mobile-drawer a:hover {
    color: #ddd;
}

.mobile-drawer .btn {
    margin-top: 1rem;
    background: #fff;
    color: #222;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    text-align: center;
    display: inline-block;
    width: auto;
    border-bottom: none;
}

.mobile-drawer .btn:hover {
    background: #f0f0f0;
    color: #222;
}

.close-drawer {
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    align-self: flex-end;
    margin-bottom: 2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-drawer:hover {
    color: #ddd;
}

/* Add top margin to body content to account for fixed nav */
@media (max-width: 768px) {
    nav {
        padding-top: 1.5rem;

        &.scrolled {
            padding-top: 1rem;
            padding-bottom: 1rem;
        }

        .logo img {
            max-height: 50px;
        }

        &.scrolled .logo img {
            max-height: 40px;
            width: 75%;
        }
    }
}

/* Responsive rules for mobile */
@media (max-width: 900px) {
    .nav-items {
        display: none !important;
    }

    .hamburger {
        display: flex !important;
    }

    .mobile-drawer {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        transform: translateX(-100%);
    }

    .mobile-drawer.open {
        transform: translateX(0);
    }
}

/* Ensure proper layout on smaller screens */
@media (max-width: 480px) {
    .mobile-drawer {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }

    .mobile-drawer a {
        font-size: 1.1em;
        margin-bottom: 1.2rem;
    }

    .close-drawer {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
}
