/* public/css/menu.css */
/* === Верхнее стеклянное меню === */
.glass-menu {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(180, 180, 180, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(200, 200, 200, 0.3);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    position: fixed;
    top: 4px;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity, backdrop-filter, width, background-color, border-radius;
}

.glass-menu.expanded {
    background-color: rgba(180, 180, 180, 0.8);
    transform: translateY(-28px);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity, backdrop-filter, width, background-color, border-radius;
}

/* Кнопки внутри меню */
.glass-menu .btn {
    flex: 1;
    min-width: 120px;
    max-width: fit-content;
    padding: 0 16px;
    height: 50px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.55);
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    border-radius: 0;
}

/* Скругления для первой кнопки */
.glass-menu .btn:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

/* Скругления для последней кнопки */
.glass-menu .btn:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* При наведении */
.glass-menu .btn:hover {
    background: linear-gradient(135deg, 
        rgba(255, 204, 186, 0.4) 0%, 
        rgba(255, 204, 186, 0.3) 100%);
    transform: translateY(-1px);
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 12px rgba(255, 140, 100, 0.2);
}

/* Указываем явно, что у НЕ первой и НЕ последней кнопки при наведении не должно быть скруглений */
.glass-menu .btn:not(:first-child):not(:last-child):hover {
    border-radius: 0;
}

/* Явно задаем сохранение скруглений при наведении для первой кнопки */
.glass-menu .btn:first-child:hover {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Явно задаем сохранение скруглений при наведении для последней кнопки */
.glass-menu .btn:last-child:hover {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Стиль активной кнопки */
.glass-menu .btn.active {
    background: linear-gradient(135deg, 
        rgba(255, 204, 186, 0.75) 0%, 
        rgba(255, 204, 186, 0.95) 100%);
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Плавные переходы */
.glass-menu .btn {
    transition: 
        background-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        text-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Разделитель между кнопками */
.glass-menu .btn:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 1px;
    height: 40%;
    background: rgba(255, 255, 255, 0.4);
    transition: opacity 0.3s ease;
}

/* Скрываем разделитель у последней кнопки */
.glass-menu .btn:last-child::after {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
}

/* === Индикатор активной страницы рядом с гамбургером === */
.mobile-page-indicator {
    position: fixed;
    z-index: 5;
    top: 15px;
    right: 70px; /* Оставляем место для гамбургера */
    left: 15px;
    z-index: 10;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: flex-start;
    pointer-events: none; /* Чтобы не мешал кликам */
}

.active-page-badge {
    padding: 0 16px;
    z-index: 5;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: rgba(180, 180, 180, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(200, 200, 200, 0.3);
    border-radius: 10px;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 100px);
    animation: slideInBadge 1s ease forwards;
}

/* Анимация появления индикатора */
@keyframes slideInBadge {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Когда меню открыто, скрываем индикатор */
.mobile-menu.active ~ .mobile-page-indicator .active-page-badge {
    opacity: 0;
    z-index: 5;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* === Гамбургер-меню для мобильных === */
.hamburger {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 800;
    width: 44px;
    height: 44px;
    border: 2px solid rgba(200, 200, 200, 0.3);
    border-radius: 10px;
    background-color: rgba(180, 180, 180, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.hamburger:hover {
    background-color: rgba(180, 180, 180, 0.5);
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Анимация гамбургера при активном состоянии */
.hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Мобильное меню */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 5;
    padding: 80px 20px 20px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    display: flex;
    opacity: 1;
    
    transform: translateX(0);
}

.mobile-menu .btn {
    width: 100%;
    max-width: 300px;
    min-height: 60px;
    margin: 10px 0;
    border-radius: 12px !important;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(180, 180, 180, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(200, 200, 200, 0.3);
    text-decoration: none;
    color: #ffffff;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.55);
    transition: all 0.3s ease;
}

.mobile-menu .btn:hover {
    background-color: rgba(255, 204, 186, 0.4);
    transform: scale(1.02);
}

.mobile-menu .btn.active {
    background: linear-gradient(135deg, 
        rgba(255, 204, 186, 0.75) 0%, 
        rgba(255, 204, 186, 0.95) 100%);
}

/* Планшеты */
@media (max-width: 1366px) {
    .glass-menu {
        max-width: 100%;
    }
    
    .glass-menu .btn {
        min-width: clamp(70px, 8vw, 100px);
        font-size: clamp(12px, 1.3vw, 15px);
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    /* Скрываем обычное меню на мобильных */
    .glass-menu {
        display: none;
    }
    
    /* Показываем индикатор активной страницы */
    .mobile-page-indicator {
        display: flex;
    }
    
    /* Показываем гамбургер */
    .hamburger {
        display: flex;
    }
    
    /* Отключаем анимацию прокрутки для мобильных */
    .glass-menu.expanded {
        transform: none;
    }
}

/* Маленькие мобильные устройства */
@media (max-width: 480px) {
    .mobile-menu .btn {
        height: 55px;
        font-size: 16px;
        max-width: 280px;
    }
    
    .hamburger {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .mobile-page-indicator {
        top: 10px;
        right: 60px;
        left: 10px;
    }
    
    .active-page-badge {
        height: 40px;
        font-size: 14px;
        max-width: calc(100vw - 85px);
        padding: 0 12px;
    }
}