﻿.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* ← важно! */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--color-bg-head);
    border-bottom: 1px solid #2a2a2a;
    z-index: 1000;
    box-sizing: border-box; /* ← чтобы padding не ломал ширину */
    user-select: none;
    /*отключение синего выделения при клике с телефона*/
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
}

.app-logo {
    font-weight: 600;
    font-size: clamp(1rem, 5vw, 2.5rem);
    color: var(--color-text-head);
    text-decoration: none;
}

/* ——— Навигация ——— */
.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--color-text-head-s);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    user-select: none;
    /*отключение синего выделения при клике с телефона*/
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
}

    .nav-link:hover {
        color: var(--color-text-head);
    }

/* ——— Гамбургер ——— */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
}

    .hamburger span {
        display: block;
        height: 2px;
        width: 100%;
        background-color: var(--color-text-head-s);
        border-radius: 2px;
        transition: transform 0.3s, opacity 0.3s;
    }

/* ——— АДАПТИВНОСТЬ ——— */
@media (max-width: 768px) {
    /* Скрываем обычное меню на десктопе */
    .nav-links {
        display: none !important;
    }

    /* Показываем гамбургер */
    .hamburger {
        display: flex !important;
    }

    /* Полноэкранное всплывающее меню */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: var(--color-bg-menu); /* тёмный полупрозрачный */
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 2000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

        .mobile-menu-overlay.show {
            opacity: 1;
            visibility: visible;
        }

    .mobile-menu-content {
        text-align: center;
    }

    .mobile-menu-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-menu-link {
        display: block;
        padding: 1.25rem 0;
        color: var(--color-text-menu);
        text-decoration: none;
        font-weight: 300;
        font-size: 1.5rem;
        transition: color 0.2s, transform 0.2s;
        opacity: 0;
        transform: translateY(15px);
        user-select: none;
        /*отключение синего выделения при клике с телефона*/
        -webkit-tap-highlight-color: transparent;
        -webkit-user-select: none;
    }

    /* Плавное появление пунктов */
    .mobile-menu-overlay.show .mobile-menu-link {
        animation: fadeInCenter 0.4s forwards;
    }

    .mobile-menu-link:nth-child(1) {
        animation-delay: 0.1s;
    }

    .mobile-menu-link:nth-child(2) {
        animation-delay: 0.2s;
    }

    .mobile-menu-link:nth-child(3) {
        animation-delay: 0.3s;
    }

    .mobile-menu-link:nth-child(4) {
        animation-delay: 0.4s;
    }

    @keyframes fadeInCenter {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
