.mobile-menu {
  position: fixed;
  top: 0;
  right: -320px; /* Скрыто за пределами экрана */
  width: 300px;
  height: 100vh;
  background-color: #F2F1EE;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 20px;
  display: flex;
  flex-direction: column;

}

.burger-line{
    padding: 1.5px;
}

.navbar-toggler {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  width: 50px;
  height: 40px;
  position: relative;
}

/* Когда меню открыто */
.mobile-menu.active {
  right: 0;
}

/* Оверлей для фона */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Заголовок мобильного меню */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.mobile-menu-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #333;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.mobile-menu-close:hover {
  background-color: #f5f5f5;
}

/* Содержимое мобильного меню */
.mobile-menu-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-grow: 1;
  align-items: end;
}

.mobile-menu-link {
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: color 0.2s, padding-left 0.2s;
  display: block;
}

.mobile-menu-link:hover {
  color: #007bff;
  padding-left: 10px;
}

.mobile-menu-button {
  margin-top: 30px;
  cursor: pointer;
  width: 100%;
  transition: transform 0.2s, background-color 0.2s;
}

.mobile-menu-button:hover {
  transform: translateY(-2px);
  background-color: #28a745;
}

/* ИСПРАВЛЕННЫЕ МЕДИА-ЗАПРОСЫ */

/* Для телефонов (до 767px) И планшетов (до 991px) - показываем бургер-меню */
@media (max-width: 991.98px) {
  .navbar > a,
  .navbar > button.text {
    display: none !important;
  }
  
  .navbar-toggler {
    display: block;
  }
  
  .navbar {
    justify-content: flex-end;
    padding: 15px 20px;
  }
  
  /* Немного больше меню для планшетов */
  @media (min-width: 768px) {
    .mobile-menu {
      width: 350px;
      right: -370px;
    }
    
    .navbar {
      padding: 20px 30px;
    }
  }
}

/* Десктоп: показываем обычное меню, скрываем мобильное */
@media (min-width: 992px) {
  .mobile-menu,
  .mobile-menu-overlay,
  .navbar-toggler {
    display: none !important;
  }
  
  .navbar > a,
  .navbar > button.text {
    display: block !important;
  }
  
  .navbar {
    padding: 0;
  }
}