/* Шапка */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 20px 40px;
    align-items: center;
    justify-content: center;
    display: flex;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    z-index: 1000;

    /* Изначально скрываем header без анимации */
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;

    /* Анимация будет добавляться только при изменении класса */
    transition: none;
}

/* Класс для показа header с анимацией */
header.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: padding 0.3s, box-shadow 0.3s, background 0.3s, transform 0.5s ease, opacity 0.5s ease, visibility 0.5s;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
}

header.scrolled {
    padding: 10px 40px;
    background: rgba(255,255,255,0.85);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}

.logo a:hover {
    background: linear-gradient(135deg, #D4AF37, #F4D03F);
}

.logo a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #D4AF37, #F4D03F);
    transition: width 0.3s;
}

.logo a:hover::after {
    width: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    position: relative;
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    transition: color 0.3s;
}

nav a:hover {
    color: #e67e22;
}

nav a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -4px;
    width: 0; height: 2px;
    background: linear-gradient(135deg, #D4AF37, #F4D03F);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

/* Шапка (мобильная версия) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    position: relative;
}

.menu-toggle__line {
    display: block;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

header.scrolled .menu-toggle__line {
    background: #333;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}