.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: rgba(0, 0, 0, 0.2); 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
}


.nav-left, .nav-right {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex: 1; 
}

.nav-left {
    justify-content: flex-start; /* Align items to the left */
    margin-left: var(--navbar-margin);
}

.nav-right {
    justify-content: flex-end; /* Push items to the right */
    margin-right: var(--navbar-margin);
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1; /* This ensures the logo takes equal space and centers between nav-left and nav-right */
}

.logo img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-item {
    text-decoration: none;
    color: white;
    font-weight: 600;
    position: relative;
    transition: color 0.3s;
}

.nav-item:hover {
    color: #70c1ff;
}

.nav-item:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #70c1ff;
    transition: width 0.3s;
}

.nav-item.active {
    color: #70c1ff;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #70c1ff;
}


/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    position: absolute;
    right: 20px; /* Fixed position from the right edge */
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
}

/* Responsive Design for Desktops, Tablets and Phones */
@media (max-width: 1440px) {
    /* Desktop adjustments */
    .nav-left {
        margin-left: 30px;
    }
    
    .nav-right {
        margin-right: 30px;
    }
}


/* Tablet adjustments */
@media (max-width: 1024px) {

    .nav-item {
        font-size: 0.8rem;
    }
    .nav-left, .nav-right {
        gap: 1.5rem;
    }
    
    .nav-left {
        margin-left: 20px;
    }
    
    .nav-right {
        margin-right: 20px;
    }
    
    .logo img {
        height: 50px;
    }



}

@media (max-width: 600px) {
    /* Phone adjustments */
    .navbar {
        padding: 0.8rem 3%;
    }
    
    .nav-left, .nav-right {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
        width: 28px;
        height: 19px;
        right: 15px;
    }
    
    .menu-toggle span {
        height: 2.5px;
    }
    
    .logo {
        margin: 0 auto;
    }
    
    .logo img {
        height: 40px;
    }
    
    .mobile-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background-color: rgba(0, 0, 0, 0.95);
        padding: 20px 0;
        border-radius: 0 0 8px 8px;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
    }
    
    .mobile-nav.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }
    
    .mobile-nav .nav-item {
        padding: 18px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        text-align: center;
        display: block;
        color: white;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.95rem;
        transition: all 0.3s ease;
    }
    
    .mobile-nav .nav-item:last-child {
        border-bottom: none;
    }
    
    .mobile-nav .nav-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #70c1ff;
    }
    
    .mobile-nav .nav-item:hover::after {
        display: none;
    }
}

/* Slide down animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}