/* ============================================
   Нижнее навигационное меню
   ============================================ */

/* Скрываем бренд в navbar */
.navbar-brand {
    display: none !important;
}

/* Нижнее меню */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #212529;
    border-top: 1px solid #343a40;
    z-index: 1030;
    padding: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.bottom-nav .navbar-nav {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    width: 80%;
    margin: 0;
    padding: 0;
    list-style: none;
    margin-left: 10%;
}

.bottom-nav .navbar-nav .nav-item {
    flex: 1;
    text-align: center;
    padding: 6px 0 8px 0;
    position: relative;
}

.bottom-nav .navbar-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #8a8a8a;
    font-size: 10px;
    text-decoration: none;
    transition: color 0.2s ease;
    border: none;
    background: none;
    width: 100%;
}

.bottom-nav .navbar-nav .nav-link:hover,
.bottom-nav .navbar-nav .nav-link:focus,
.bottom-nav .navbar-nav .nav-link.active {
    color: #ffffff;
    background: none;
}

/* Иконки в нижнем меню — монохромные */
.bottom-nav .navbar-nav .nav-link .nav-icon {
    font-size: 22px;
    line-height: 1.2;
    display: block;
    margin-bottom: 1px;
    /* Делаем монохромными с помощью grayscale + brightness */
    filter: grayscale(1) brightness(0.5);
    transition: filter 0.3s ease, transform 0.2s ease, color 0.3s ease;
}

.bottom-nav .navbar-nav .nav-link:hover .nav-icon,
.bottom-nav .navbar-nav .nav-link.active .nav-icon {
    filter: grayscale(0) brightness(1);
    transform: scale(1.1);
    color: #0d6efd !important;
}

.bottom-nav .navbar-nav .nav-link .nav-label {
    font-size: 9px;
    line-height: 1.2;
    display: block;
    color: #8a8a8a;
    transition: color 0.2s ease;
}

.bottom-nav .navbar-nav .nav-link:hover .nav-label,
.bottom-nav .navbar-nav .nav-link.active .nav-label {
    color: #ffffff;
}

.bottom-nav .navbar-nav .nav-link.active .nav-icon {
    color: #ffffff;
}

/* Индикатор активного пункта */
.bottom-nav .navbar-nav .nav-item.active .nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: #0d6efd;
    border-radius: 0 0 2px 2px;
}

/* Отступ для контента */
body {
    padding-bottom: 60px;
}

/* ============================================
   Адаптивность для мобильных устройств
   ============================================ */

@media (max-width: 768px) {
    .bottom-nav .navbar-nav .nav-link .nav-label {
        font-size: 8px;
    }
    
    .bottom-nav .navbar-nav .nav-link .nav-icon {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .bottom-nav .navbar-nav .nav-link .nav-label {
        font-size: 7px;
    }
    
    .bottom-nav .navbar-nav .nav-link .nav-icon {
        font-size: 18px;
    }
    
    .bottom-nav .navbar-nav .nav-item {
        padding: 4px 0 6px 0;
    }
}

/* ============================================
   Светлая тема для нижнего меню
   ============================================ */

[data-bs-theme="light"] .bottom-nav {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .bottom-nav .navbar-nav .nav-link {
    color: #6c757d;
}

[data-bs-theme="light"] .bottom-nav .navbar-nav .nav-link:hover,
[data-bs-theme="light"] .bottom-nav .navbar-nav .nav-link.active {
    color: #212529;
}

[data-bs-theme="light"] .bottom-nav .navbar-nav .nav-link .nav-label {
    color: #6c757d;
}

[data-bs-theme="light"] .bottom-nav .navbar-nav .nav-link:hover .nav-label,
[data-bs-theme="light"] .bottom-nav .navbar-nav .nav-link.active .nav-label {
    color: #212529;
}

[data-bs-theme="light"] .bottom-nav .navbar-nav .nav-link .nav-icon {
    filter: grayscale(1) brightness(0.4);
}

[data-bs-theme="light"] .bottom-nav .navbar-nav .nav-link:hover .nav-icon,
[data-bs-theme="light"] .bottom-nav .navbar-nav .nav-link.active .nav-icon {
    filter: grayscale(0) brightness(1);
    color: #0d6efd !important;
}

[data-bs-theme="light"] .bottom-nav .navbar-nav .nav-item.active .nav-link::after {
    background: #0d6efd;
}

/* Плавный переход при смене темы */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}