/* Нижняя навигационная панель для мобильных устройств */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-top: 2px solid #28a745;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.mobile-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 12px;
    min-width: 60px;
    position: relative;
    overflow: hidden;
}

.mobile-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    z-index: -1;
}

.mobile-nav-item:hover::before,
.mobile-nav-item.active::before {
    opacity: 0.1;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: #28a745;
    transform: translateY(-2px);
}

.mobile-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.mobile-nav-item:hover i,
.mobile-nav-item.active i {
    transform: scale(1.1);
    color: #28a745;
}

.mobile-nav-item span {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.mobile-nav-item:hover span,
.mobile-nav-item.active span {
    color: #28a745;
    font-weight: 600;
}

/* Специальный стиль для кнопки калькулятора */
.mobile-nav-calculator {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    transform: translateY(-4px);
    border: 2px solid #ffffff;
}

.mobile-nav-calculator::before {
    display: none;
}

.mobile-nav-calculator:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.mobile-nav-calculator i {
    color: white !important;
    font-size: 22px;
}

.mobile-nav-calculator span {
    color: white !important;
    font-weight: 600;
}

/* Анимация пульсации для активной кнопки */
@keyframes mobileNavPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.mobile-nav-item.active {
    animation: mobileNavPulse 2s infinite;
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 360px) {
    .mobile-bottom-nav {
        padding: 6px 0;
    }
    
    .mobile-nav-item {
        padding: 4px 6px;
        min-width: 45px;
    }
    
    .mobile-nav-item i {
        font-size: 16px;
        margin-bottom: 2px;
    }
    
    .mobile-nav-item span {
        font-size: 9px;
    }
    
    .mobile-nav-calculator i {
        font-size: 18px;
    }
}

/* Дополнительная оптимизация для средних экранов */
@media (max-width: 480px) {
    .mobile-bottom-nav {
        padding: 6px 0;
    }
    
    .mobile-nav-item {
        padding: 5px 8px;
        min-width: 50px;
    }
    
    .mobile-nav-item i {
        font-size: 18px;
        margin-bottom: 3px;
    }
    
    .mobile-nav-item span {
        font-size: 10px;
    }
    
    .mobile-nav-calculator i {
        font-size: 20px;
    }
}

/* Анимация появления */
@keyframes slideUpIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mobile-bottom-nav {
    animation: slideUpIn 0.5s ease-out;
}

/* Эффект при нажатии */
.mobile-nav-item:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.mobile-nav-calculator:active {
    transform: translateY(-2px) scale(0.95);
}

/* Индикатор уведомлений (для будущего использования) */
.mobile-nav-item .notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
}

/* Темная тема (опционально) */
@media (prefers-color-scheme: dark) {
    .mobile-bottom-nav {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-top-color: #38a169;
    }
    
    .mobile-nav-item {
        color: #a0aec0;
    }
    
    .mobile-nav-item:hover,
    .mobile-nav-item.active {
        color: #38a169;
    }
}

/* Стили для мобильного футера */
@media (max-width: 991.98px) {
    .footer.d-lg-none {
        margin-bottom: 0; /* Убираем отступ футера */
        border-top: 2px solid #28a745;
    }
    
    .footer.d-lg-none .btn-outline-light {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        border-radius: 0.375rem;
        transition: all 0.3s ease;
    }
    
    .footer.d-lg-none .btn-outline-light:hover {
        background-color: #28a745;
        border-color: #28a745;
        color: white;
        transform: translateY(-1px);
    }
    
    .footer.d-lg-none .btn-outline-primary {
        border-radius: 50%;
        width: 32px;
        height: 32px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .footer.d-lg-none .btn-outline-primary:hover {
        background-color: #007bff;
        border-color: #007bff;
        transform: scale(1.1);
    }
    
    .footer.d-lg-none .text-primary {
        color: #28a745 !important;
    }
    
    .footer.d-lg-none .small {
        font-size: 0.75rem;
    }
    
    .footer.d-lg-none .gap-1 {
        gap: 0.25rem !important;
    }
}
