.sonnik-menu-wrapper {
   position: relative;
}

/* Десктопная навигация */
.desktop-nav {
   display: flex;
   gap: 2rem;
   align-items: center;
   justify-content: center;
}

.nav-item-dropdown {
   position: relative;
}

.nav-link {
   color: white;
   text-decoration: none;
   padding: 10px 20px;
   border-radius: 25px;
   background: rgba(255, 255, 255, 0.1);
   transition: all 0.3s ease;
   cursor: pointer;
   border: 1px solid rgba(255, 255, 255, 0.2);
   display: inline-block;
}

.nav-link:hover, .nav-link.active {
   background: rgba(255, 255, 255, 0.2);
   transform: translateY(-2px);
   box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Алфавитное выпадающее меню */
.alphabet-dropdown {
   position: absolute;
   top: 100%;
   left: 50%;
   transform: translateX(-50%) translateY(-10px);
   background: white;
   border-radius: 15px;
   box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
   padding: 20px;
   width: 400px;
   opacity: 0;
   visibility: hidden;
   transition: all 0.3s ease;
   z-index: 1000;
}

.alphabet-dropdown.show {
   opacity: 1;
   visibility: visible;
   transform: translateX(-50%) translateY(0);
}

.alphabet-grid {
   display: grid;
   grid-template-columns: repeat(6, 1fr);
   gap: 10px;
}

.alphabet-letter {
   display: flex;
   justify-content: center;
   align-items: center;
   width: 50px;
   height: 50px;
   border: 2px solid #e0e0e0;
   border-radius: 10px;
   color: #667eea;
   font-size: 1.2rem;
   font-weight: bold;
   text-decoration: none;
   transition: all 0.3s ease;
   background: linear-gradient(145deg, #f0f0f0, #ffffff);
}

.alphabet-letter:hover {
   background: #667eea;
   color: white;
   transform: scale(1.1);
   box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Выпадающее меню для Сны */
.sny-dropdown {
   position: absolute;
   top: 100%;
   left: 50%;
   transform: translateX(-50%) translateY(-10px);
   background: white;
   border-radius: 15px;
   box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
   padding: 15px 0;
   min-width: 280px;
   opacity: 0;
   visibility: hidden;
   transition: all 0.3s ease;
   z-index: 1000;
}

.sny-dropdown.show {
   opacity: 1;
   visibility: visible;
   transform: translateX(-50%) translateY(0);
}

.sny-dropdown-item {
   display: block;
   padding: 12px 25px;
   color: #333;
   text-decoration: none;
   transition: all 0.3s ease;
   font-size: 1rem;
}

.sny-dropdown-item:hover {
   background: rgba(102, 126, 234, 0.1);
   color: #667eea;
   padding-left: 35px;
}

.sny-dropdown-item:first-child {
   border-radius: 15px 15px 0 0;
}

.sny-dropdown-item:last-child {
   border-radius: 0 0 15px 15px;
}

/* Мобильное меню */
.mobile-menu-toggle {
   display: none;
   background: none;
   border: none;
   color: white;
   font-size: 1.5rem;
   cursor: pointer;
   padding: 5px;
}

.mobile-menu-overlay {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.8);
   backdrop-filter: blur(5px);
   z-index: 2000;
   opacity: 0;
   visibility: hidden;
   transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
   opacity: 1;
   visibility: visible;
}

.mobile-menu {
   position: absolute;
   top: 0;
   right: 0;
   width: 300px;
   height: 100%;
   background: white;
   transform: translateX(100%);
   transition: transform 0.3s ease;
   padding: 2rem;
   overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu {
   transform: translateX(0);
}

.mobile-menu-close {
   position: absolute;
   top: 1rem;
   right: 1rem;
   background: none;
   border: none;
   font-size: 1.5rem;
   cursor: pointer;
   color: #666;
}

.mobile-menu-items {
   margin-top: 3rem;
}

.mobile-menu-item {
   display: block;
   padding: 1rem 0;
   color: #333;
   text-decoration: none;
   border-bottom: 1px solid #eee;
   font-size: 1.1rem;
}

.mobile-sonnik-item {
   border-bottom: 1px solid #eee;
}

.mobile-sonnik-toggle {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 1rem 0;
   color: #333;
   font-size: 1.1rem;
   cursor: pointer;
   user-select: none;
}

.arrow {
   transition: transform 0.3s ease;
   font-size: 1.2rem;
}

.mobile-sonnik-toggle.active .arrow {
   transform: rotate(45deg);
}

.mobile-alphabet-menu {
   max-height: 0;
   overflow: hidden;
   transition: max-height 0.3s ease;
}

.mobile-alphabet-menu.active {
   max-height: 500px;
   padding-bottom: 1rem;
}

.mobile-alphabet-grid {
   display: grid;
   grid-template-columns: repeat(5, 1fr);
   gap: 6px;
   padding: 0 5px;
   width: 100%;
   box-sizing: border-box;
}

.mobile-alphabet-grid .alphabet-letter {
   width: 100%;
   max-width: 40px;
   height: 40px;
   font-size: 1rem;
   margin: 0 auto;
   box-sizing: border-box;
}

/* Стили для мобильного подменю Сны */
.mobile-sny-item {
   border-bottom: 1px solid #eee;
}

.mobile-sny-toggle {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 1rem 0;
   color: #333;
   font-size: 1.1rem;
   cursor: pointer;
   user-select: none;
}

.mobile-sny-toggle.active .arrow {
   transform: rotate(45deg);
}

.mobile-sny-menu {
   max-height: 0;
   overflow: hidden;
   transition: max-height 0.3s ease;
}

.mobile-sny-menu.active {
   max-height: 300px;
   padding-bottom: 1rem;
}

.mobile-sny-link {
   display: block;
   padding: 0.75rem 0 0.75rem 1rem;
   color: #666;
   text-decoration: none;
   border-bottom: 1px solid #f0f0f0;
   font-size: 1rem;
   transition: all 0.3s ease;
}

.mobile-sny-link:hover {
   color: #667eea;
   padding-left: 1.5rem;
   background: rgba(102, 126, 234, 0.05);
}

/* Адаптивность */
@media (max-width: 768px) {
   .desktop-nav {
       display: none;
   }

   .mobile-menu-toggle {
       display: block;
   }
}

@media (max-width: 480px) {
   .mobile-menu {
       width: 280px;
   }

   .mobile-alphabet-grid {
       grid-template-columns: repeat(4, 1fr);
       gap: 5px;
       padding: 0 3px;
   }

   .mobile-alphabet-grid .alphabet-letter {
       width: 100%;
       max-width: 35px;
       height: 35px;
       font-size: 0.9rem;
   }
}

@media (max-width: 360px) {
   .mobile-menu {
       width: 250px;
   }

   .mobile-alphabet-grid {
       grid-template-columns: repeat(4, 1fr);
       gap: 4px;
       padding: 0 2px;
   }

   .mobile-alphabet-grid .alphabet-letter {
       width: 100%;
       max-width: 30px;
       height: 30px;
       font-size: 0.8rem;
   }
}


#scrollToTopBtn {
   position: fixed;
   bottom: 30px;
   right: 30px;
   background-color: #667eea;
   color: white;
   padding: 15px 20px;
   border: none;
   border-radius: 50%;
   width: 50px;
   height: 50px;
   font-size: 24px;
   cursor: pointer;
   display: none;
   z-index: 999;
   transition: all 0.3s ease;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#scrollToTopBtn:hover {
   background-color: #5568d3;
   transform: translateY(-5px);
   box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#scrollToTopBtn.show {
   display: flex;
}