/* стили для плавающей Шапки. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.floating-nav {
    position: fixed; /* или sticky */
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #7457;
    backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: auto;
    width: fit-content;
    max-width: 90%;
    overflow: hidden; /* Обрезаем всё что выходит за границы */
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    margin: 0;
    padding: 0;
    opacity: 90%;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(248, 249, 250, 0.7);
    border-radius: 10px;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-item:hover {
    background: #4a6cf7;
    color: white;
    transform: translateY(-2px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .floating-nav {
        padding: 8px 15px;
        border-radius: 40px;
    }
    
    .nav-item {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .nav-item span {
        display: none; /* На мобильных скрываем текст */
    }
    
    .nav-item i {
        margin: 0;
        font-size: 1rem;
    }
}