/* Modern Navbar Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #2563eb, #3b82f6);
    padding: 1rem 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    z-index: 1001; /* Ensure button stays above menu */
}

.mobile-menu-btn i {
    transition: transform 0.3s ease;
}

.mobile-menu-btn i.fa-times {
    transform: rotate(180deg);
}

/* Brand/Logo Styles */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.nav-link i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
}

.nav-link:hover i {
    transform: scale(1.1);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: white;
    border-radius: 2px;
}

/* Profile Section */
.nav-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-info span {
    color: white;
    font-weight: 500;
}

.logout-btn {
    /* appearance: none; */
    border: 1px solid white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: rgba(220, 38, 38, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
}

.logout-btn:hover {
    background: rgba(220, 38, 38, 0.2);
    transform: translateY(-2px);
}

.logout-btn i {
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #2563eb;
        padding: 1rem;
        gap: 0.5rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }

    .nav-link {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .nav-profile {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: #2563eb;
        padding: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-profile.active {
        display: block;
        animation: slideDown 0.3s ease forwards;
    }

    .profile-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-name {
        font-size: 1.2rem;
    }
}

/* Hover Effects */
.nav-link, .logout-btn {
    position: relative;
    overflow: hidden;
}

.nav-link::before, .logout-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: inherit;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::before, .logout-btn:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

/* Animation for Active Link */
.nav-link.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Animation for mobile menu */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-links.active,
.nav-profile.active {
    animation: slideDown 0.3s ease forwards;
}
