/* Основные стили для навигации */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.938);
    padding: 20px;
    height: 80px;
}

/* Стили для ссылок и кнопки */
.nav-links {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-grow: 1;
}

.navlink {
    font-family: 'Oswald', sans-serif;
    text-decoration: none;
    color: #fff;
    font-size: 22px;
    padding: 10px;
    position: relative;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
    background: none; /* Убираем фон для кнопок */
    border: none; /* Убираем границу для кнопок */
    cursor: pointer; /* Добавляем указатель для кнопок */
}

.navlink:hover {
    color: olivedrab;
}

/* Иконка меню-гамбургер */
.menu-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 3;
}

.menu-icon span {
    height: 3px;
    width: 30px;
    background-color: white;
    margin: 4px 0;
    transition: 0.4s;
}


@media screen and (max-width: 768px) {
    .video-section {
        position: relative;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        z-index: 1000;
    }

    .nav-links a {
        margin: 20px 0;
        font-size: 26px;
        color: #fff;
    }

    .menu-icon {
        display: flex;
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px; 
        height: 40px; 
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        z-index: 1001;
    }

    .greeting {
        margin-top: 20px;
    }

    .nav-active {
        transform: translateX(0);
    }

    /* Исправление для слогана, чтобы он не перекрывал меню */
    .greeting {
        z-index: 10; /* Задаем z-index, чтобы слоган располагался ниже меню */
        position: relative;
        color: #fff;
        text-align: center;
        font-size: 24px;
    }

    .slogan {
        z-index: 1; /* Оставляем слоган под навигацией */
        position: relative;
        color: #fff;
        text-align: center;
        font-size: 18px;
    }
}

/* Анимация иконки гамбургера */
.menu-icon.toggle span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

.menu-icon.toggle span:nth-child(2) {
    opacity: 0;
}

.menu-icon.toggle span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}
