/* ============================================
   COSMIC FANTASY SECONDARY NAV MOBILE
   Красивые мобильные стили для вторичной навигации
   ============================================ */

/* Мобильная вторичная навигация */
@media (max-width: 768px) {
    /* Контейнер навигации */
    .frozyai-secondary-nav {
        position: sticky;
        top: 64px;
        z-index: 998;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px) saturate(180%);
        border-bottom: 1px solid rgba(139, 92, 246, 0.3);
        box-shadow: 
            0 4px 20px rgba(0, 0, 0, 0.3),
            0 0 40px rgba(139, 92, 246, 0.1);
    }
    
    /* Контейнер с прокруткой */
    .secondary-nav-container {
        padding: 0 12px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-behavior: smooth;
    }
    
    .secondary-nav-container::-webkit-scrollbar {
        display: none;
    }
    
    /* Обертка для навигационных ссылок */
    .nav-scroll-wrapper {
        display: flex;
        gap: 6px;
        padding: 12px 0;
        align-items: center;
        min-width: max-content;
        justify-content: flex-start;
    }
    
    /* Навигационные ссылки */
    .nav-link {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px 14px;
        border-radius: 12px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        font-family: 'Rajdhani', sans-serif;
        letter-spacing: 0.2px;
        background: rgba(139, 92, 246, 0.05);
        border: 1px solid transparent;
        flex-shrink: 0;
        min-width: fit-content;
    }
    
    /* Иконки в ссылках */
    .nav-link i {
        font-size: 14px;
        width: 16px;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    /* Текст в ссылках */
    .nav-link span {
        font-size: 13px;
        line-height: 1;
    }
    
    /* Убираем нижнюю линию на мобильных */
    .nav-link::before {
        display: none;
    }
    
    /* Активная ссылка */
    .nav-link.active {
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(236, 72, 153, 0.25) 100%);
        color: var(--text-cosmic);
        border: 1px solid rgba(139, 92, 246, 0.4);
        box-shadow: 
            0 2px 8px rgba(139, 92, 246, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
        transform: scale(1.02);
    }
    
    .nav-link.active i {
        color: var(--cosmic-purple);
        filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.6));
    }
    
    /* Hover эффект для мобильных (touch) */
    .nav-link:active {
        transform: scale(0.96);
        background: rgba(139, 92, 246, 0.2);
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    /* Плавный переход при наведении (для устройств с поддержкой hover) */
    @media (hover: hover) {
        .nav-link:hover {
            background: rgba(139, 92, 246, 0.12);
            color: var(--text-cosmic);
            transform: translateY(-1px);
            border-color: rgba(139, 92, 246, 0.2);
        }
        
        .nav-link:hover i {
            transform: scale(1.1);
        }
    }
    
    /* Плавная анимация при появлении */
    .nav-scroll-wrapper {
        animation: slideInNav 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    @keyframes slideInNav {
        from {
            opacity: 0;
            transform: translateY(-15px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Анимация для ссылок при появлении */
    .nav-link {
        animation: fadeInLink 0.6s ease-out backwards;
    }
    
    .nav-link:nth-child(1) { animation-delay: 0.1s; }
    .nav-link:nth-child(2) { animation-delay: 0.15s; }
    .nav-link:nth-child(3) { animation-delay: 0.2s; }
    .nav-link:nth-child(4) { animation-delay: 0.25s; }
    .nav-link:nth-child(5) { animation-delay: 0.3s; }
    .nav-link:nth-child(6) { animation-delay: 0.35s; }
    
    @keyframes fadeInLink {
        from {
            opacity: 0;
            transform: translateX(-10px) scale(0.9);
        }
        to {
            opacity: 1;
            transform: translateX(0) scale(1);
        }
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .frozyai-secondary-nav {
        top: 60px;
    }
    
    .secondary-nav-container {
        padding: 0 8px;
    }
    
    .nav-scroll-wrapper {
        gap: 4px;
        padding: 10px 0;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 10px;
        gap: 5px;
    }
    
    .nav-link i {
        font-size: 13px;
        width: 14px;
    }
    
    .nav-link span {
        font-size: 12px;
    }
    
    /* На очень маленьких экранах можно скрыть текст, оставить только иконки */
    @media (max-width: 360px) {
        .nav-link span {
            display: none;
        }
        
        .nav-link {
            padding: 10px;
            min-width: 40px;
            justify-content: center;
        }
        
        .nav-link i {
            margin: 0;
        }
    }
}

/* Планшеты - средний размер */
@media (min-width: 769px) and (max-width: 1024px) {
    .secondary-nav-container {
        padding: 0 20px;
    }
    
    .nav-scroll-wrapper {
        gap: 8px;
        padding: 14px 0;
        justify-content: center;
    }
    
    .nav-link {
        padding: 11px 18px;
        font-size: 13px;
    }
}

/* Улучшенная прокрутка с индикаторами */
@media (max-width: 768px) {
    .secondary-nav-container {
        position: relative;
    }
    
    /* Градиентные индикаторы прокрутки */
    .secondary-nav-container::before,
    .secondary-nav-container::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 30px;
        pointer-events: none;
        z-index: 1;
        transition: opacity 0.3s ease;
    }
    
    .secondary-nav-container::before {
        left: 0;
        background: linear-gradient(to right, rgba(10, 10, 15, 0.95), transparent);
    }
    
    .secondary-nav-container::after {
        right: 0;
        background: linear-gradient(to left, rgba(10, 10, 15, 0.95), transparent);
    }
    
    /* Скрываем индикаторы, если контент не прокручивается */
    .secondary-nav-container.scroll-start::before {
        opacity: 0;
    }
    
    .secondary-nav-container.scroll-end::after {
        opacity: 0;
    }
}
