.navbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 1rem;
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: transform 0.3s ease-in-out;
}

.dropdown-menu {
    pointer-events: auto;
    cursor: pointer;
}

.navbar.hidden {
    transform: translateY(-100%);
}

.nav-links .mobile-login {
    display: none;
}
.nav-links {
    display: flex;
    margin-left: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.nav-links a {
    margin: 0 0.7rem;
    text-decoration: none;
    color: white;
    font-size: 16px;
    font-weight: 500;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    padding-right: 1.2rem;
    position: relative;
    white-space: nowrap;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #f1f1f1;
    min-width: 200px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 1.5rem;
    z-index: 1;
    border-radius: 5px;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}

.dropdown-menu a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    margin: 0;
    text-align: left;
}

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

.actions {
    display: flex;
    margin-left: auto;
    align-items: center;
}

a {
    text-decoration: none;
    margin-left: 1rem;
    font-size: 1rem;
    white-space: nowrap;
}

.line {
    width: 1px;
    height: 1.5rem;
    background-color: #fff;
    margin: 0 1rem;
}

.create-account {
    background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
    color: white;
    border-radius: .5rem;
    font-weight: bold;
    padding: 0.7rem 1.25rem;
    border: 1px solid;
    border-color: hsla(0, 0%, 100%, .3);
}

.whitebtn {
    background-color: white;
    color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
    border-radius: .5rem;
    font-weight: bold;
    padding: 0.7rem 1.25rem;
    border: 1px solid rgb(37 99 235 / var(--tw-bg-opacity, 1));
    border-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
}

.login {
    color: white;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: white;
    margin-left: auto;
}

/* Arrow styling */
.arrow {
    border: solid white;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.down {
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
}

.up {
    transform: rotate(-135deg);
    -webkit-transform: rotate(-135deg);
}

@media (max-width: 1024px) {
    .nav-links a {
        margin: 0 0.5rem;
    }
}

@media (max-width: 1015px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        margin-top: 1rem;
        justify-content: flex-start;
    }

    .nav-links a {
        margin: 0.5rem 0;
    }

    .actions {
        margin-top: 1rem;
        justify-content: flex-start;
    }



    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(15, 23, 42, 1);
        padding: 2rem 0;
        z-index: 1000;
        margin: 0;
        align-items: flex-start;
        /* Changed from center to flex-start */
    }

    .nav-links.active {
        display: flex;
        height: 100vh;
    }

    .nav-links a,
    .dropdown-toggle {
        margin: 0;
        padding: 0.5rem 1.5rem;
        /* Changed padding to be more specific */
        width: 100%;
        display: block;
        /* Added display block */
        text-align: left;
    }

    .dropdown-menu {
        width: 100%;
        left: 0;
        transform: none;
        box-shadow: none;
        background-color: rgba(25, 33, 52, 1);
        margin-top: 0;
        padding: 0;
        /* Added padding reset */
    }

    .dropdown-menu a {
        color: white;
        text-align: left;

    }

    /* .actions {
        display: none;
    } */

    .logo {
        margin: 0 !important;
    }

    .hamburger {
        display: block;
        top: 52%;
        right: 10%;
        position: absolute;
    }

    /* Additional fixes for nested items */
    .dropdown {
        width: 100%;
    }

    .dropdown-menu li {
        width: 100%;
        margin: 0;
        padding: 0;
    }
}

@media (max-width: 1015px) {

    /* Hide the regular actions container but keep create-account visible */
    .actions {
        display: flex;
        position: absolute;
        right: 20%;
        /* Position it to the left of hamburger */
        top: 50%;
        transform: translateY(-50%);
    }

    /* Hide the line and login button in the actions div */
    .actions .line,
    .actions .login {
        display: none;
    }

    /* Style for create account button in header */
    .actions .create-account {
        font-size: 14px;
        padding: 0.5rem 1rem;
        margin: 0;
    }

    /* Add login button to the mobile menu */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(15, 23, 42, 1);
        padding: 2rem 0;
        z-index: 1000;
        margin: 0;
        align-items: flex-start;
    }

    .nav-links.active {
        display: flex;
        height: 100vh;
    }

    /* Style for login button in mobile menu */
    .nav-links .mobile-login {
        display: block;
        width: 100%;
        text-decoration: none;
        text-align: left;
        background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
        color: white;
        border-radius: .5rem;
        font-weight: bold;
        padding: 0.7rem 1.25rem;
        border: 1px solid;
        border-color: hsla(0, 0%, 100%, .3);

    }

    .hamburger {
        display: block;
        top: 52%;
        right: 10%;
        position: absolute;
    }
}

.navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
}

@media only screen and (min-width: 1200px) {
    .navbar {
        justify-content: center;
    }

    .actions {
        margin-left: 9rem;
    }
}