/*=================================
  Navigation Bar
=================================*/
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(18, 18, 18, 0.9);
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background 0.3s ease, padding 0.3s ease;
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    background: rgba(18, 18, 18, 1);
    padding: 10px 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.navbar .logo {
    display: flex;
    align-items: center;
}

.navbar .logo img {
    width: 50px;
    height: 50px;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.navbar .logo img:hover {
    transform: rotate(360deg);
}

.navbar .logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #4CAF50;
    transition: color 0.3s ease;
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.navbar .nav-links a {
    color: #e0e0e0;
    font-size: 18px;
    transition: color 0.3s ease;
    position: relative;
}

.navbar .nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background-color: #4CAF50;
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

.navbar .nav-links a:hover::after {
    width: 100%;
}

.nav-links a:last-child {
    margin-left: 20px;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #e0e0e0;
    transition: all 0.3s ease;
}

.hamburger.open div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open div:nth-child(2) {
    opacity: 0;
}

.hamburger.open div:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/*=================================
  Media Queries
=================================*/
@media (max-width: 768px) {
    .navbar {
        padding: 10px 30px;
    }

    .navbar .logo img {
        width: 40px;
        height: 40px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background-color: rgba(18, 18, 18, 0.95);
        position: absolute;
        top: 70px;
        right: 0;
        width: 100%;
        border-radius: 0;
        padding: 20px;
        gap: 20px;
        align-items: flex-start;
    }

    .nav-links.active {
        display: flex;
        animation: fadeInMenu 0.3s ease-in-out;
    }

    @keyframes fadeInMenu {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .hamburger {
        display: flex;
    }

    .logo {
        flex-grow: 1;
        text-align: center;
    }

    .dark-mode-toggle {
        margin-left: 0;
    }

    .navbar .nav-links {
        align-items: flex-start;
    }

    .nav-links .dark-mode-toggle {
        margin-left: 0;
        margin-top: 10px;
    }

    .nav-links a:last-child {
        margin-left: 0;
    }
}