/* Navbar Styles */

.my-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #ffffff, #f7f7f7);
    padding: 1rem 2rem;
    position: fixed; /* Change to fixed to keep the navbar at the top */
    top: 0; /* Position at the top of the viewport */
    width: 100%; /* Full width */
    z-index: 1000; /* Higher z-index to overlay other content */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
}

.my-navbar:hover {
    background: linear-gradient(to right, #ffffff, #e6e6ff);
}

.my-navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #7a1f91;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    transition: color 0.3s ease;
}

.my-navbar-toggler {
    display: none; /* Hidden by default, shown on mobile */
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #7a1f91;
}

.my-navbar-collapse {
    display: flex;
    align-items: center;
}

.my-navbar-nav {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.my-nav-item {
    margin: 0 15px; /* Equal margins for all items */
}

.my-nav-link {
    color: #7a1f91;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    transition: background 0.3s ease, transform 0.3s ease;
    line-height: 1.5; /* Ensure consistent height */
    display: flex; /* Flex for vertical alignment */
    align-items: center; /* Center align the icon and text */
}

.my-nav-link:hover {
    background: rgba(122, 31, 145, 0.1);
    transform: translateY(-3px);
}

.my-profile-link {
    font-weight: bold;
}

/* Profile Dropdown */
.my-profile-dropdown {
    display: none;
    position: absolute;
    background: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    top: 100%;
    left: 0;
    min-width: 150px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-10px);
    z-index: 100;
}

.my-profile-dropdown.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.my-profile-dropdown li {
    padding: 10px 15px;
    list-style-type: none;
}

.my-profile-dropdown li a {
    color: #7a1f91;
    text-decoration: none;
    display: block;
    transition: background 0.3s ease;
}

.my-profile-dropdown li a:hover {
    background: rgba(122, 31, 145, 0.1);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .my-navbar-toggler {
        display: block; /* Show on mobile */
    }

    .my-navbar-collapse {
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        display: none;
        z-index: 1000;
    }

    .my-navbar-collapse.active {
        display: flex;
        animation: slideDown 0.4s ease;
    }

    .my-nav-item {
        margin: 10px 0; /* Stack items vertically */
    }

    /* Slide down animation */
    @keyframes slideDown {
        0% {
            opacity: 0;
            transform: translateY(-20px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Dropdown for mobile */
    .my-profile-dropdown {
        position: static;
        min-width: 100%;
    }

    .my-profile-dropdown.active {
        animation: slideDown 0.4s ease;
    }
}
