﻿.nav-item {
    position: relative;
    display: inline-block;
}

.nav-link {
    text-decoration: none;
    padding: 8px;
    display: block;
    color: black;
    border-radius: 10px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border-radius: 10px;
    min-width: 120px; /* Мінімальна ширина випадаючого списку */
    z-index: 1;
    right: 0;
    margin-left: 0px;
    transform: translateX(0); /* Початкове положення */
    border: 1px;
    padding: 16px;
}

.nav-item:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    padding: 8px 16px;
    display: block;
    text-decoration: none;
    color: black;
}

    .dropdown-item:hover {
        background-color: #f1f1f1;
        cursor: pointer;
        border-radius: 10px;
    }

/*Ensuring links in dropdown menu are black */
.menu-link {
    color: black;
}

    .menu-link:hover {
        color: black; /* Ensuring the color remains black on hover */
    }

/*Вирівнювання випадаючого меню для маленьких екранів*/
@media (max-width: 768px) {
    .dropdown-content {
        right: auto;
        left: 0;
        transform: translateX(-50%);
    }

    .nav-item {
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 640.98px) {
    .dropdown-content {
        right: auto;
        left: 0;
        transform: translateX(-15%);
    }

    .nav-item {
        display: flex;
        justify-content: center;
    }
}

.button-Logout {
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    padding: 8px 16px;
    color: black;
    cursor: pointer;
}

    /*Ensuring the button-Logout has the same hover effect */
    .button-Logout:hover {
        background-color: #f1f1f1;
    }
