.navbar {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    width: 100%;
    padding: 20px 0;
    position: fixed;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.navbar-over-hero {
    background-color: transparent;
    backdrop-filter: none;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-section a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo-section a:hover {
    opacity: 0.8;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
    align-items: center;
    position: relative;
}

.has-dropdown {
    position: relative;
}

.has-dropdown .dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    width: min(560px, calc(100vw - 40px));
    padding: 10px;
    background: rgba(7, 0, 22, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    z-index: 1002;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 4px 8px;
}

.has-dropdown:hover .dropdown {
    display: grid;
}

.has-dropdown .dropdown a {
    display: block;
    padding: 10px 12px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.has-dropdown .dropdown a:hover {
    background: rgba(167, 139, 250, 0.12);
    color: #c4b5fd;
    transform: translateX(4px);
}

.nav-menu li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.nav-menu li a:hover {
    color: #cccccc;
}

.nav-menu li a.active {
    color: #a78bfa;
    font-weight: 500;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger-line {
    width: 28px;
    height: 3px;
    background-color: #ffffff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Responsive Design */
@media (max-width: 968px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 90px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 90px);
        background-color: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 40px 20px;
        gap: 0;
        align-items: flex-start;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        overflow-y: auto;
    }
    
    /* On mobile, keep dropdown items inline under Services */
    .has-dropdown .dropdown {
        position: static;
        display: none;
        width: 100%;
        padding: 6px 0 0 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
    }
    .has-dropdown:hover .dropdown {
        display: block;
    }
    .has-dropdown .dropdown a {
        padding: 12px 20px;
        font-size: 15px;
        border-radius: 8px;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu li a {
        display: block;
        padding: 18px 20px;
        font-size: 16px;
        width: 100%;
        transition: all 0.3s ease;
    }
    
    .nav-menu li a:hover {
        background-color: rgba(167, 139, 250, 0.1);
        padding-left: 30px;
        color: #a78bfa;
    }
    
    .nav-menu li a.active {
        background-color: rgba(167, 139, 250, 0.15);
        border-left: 3px solid #a78bfa;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
    }
    
    .nav-menu {
        width: 100%;
        right: -100%;
    }
    
    .nav-menu.active {
        right: 0;
    }
}
