
/* Гамбургер */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}




.site-header {
    background: #0f1724;
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: fixed; /* Меняем с sticky на fixed */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.site-header.hide {
    transform: translateY(-100%);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: 40px;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: rotate(-10deg) scale(1.1);
}

.logo-text {
    font-weight: 700;
    font-size: 22px;
    color: #fff;
    font-family: 'Arial', sans-serif;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: #3399ff;
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: #3399ff;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Анимация появления шапки */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}





/* Мобильное меню и гамбургер */
@media (max-width: 768px) {
    .site-header {
        position: relative
    }

    .header-inner {
        position: relative;
        justify-content: space-evenly;
    }

    /* Гамбургер справа */
    .hamburger {
        display: flex;          /* показываем */
    }

    /* Навигация скрыта по умолчанию */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        flex-direction: column;
        background: #0f1724;
        padding: 12px 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 1000;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 12px;

    }
    
    .li-humburger {
        padding-left: 10px;
    }

    .logo-img {
        height: 32px;
        width: 32px;
    }

    .logo-text {
        font-size: 18px;
        font-weight: 700;
    }
}