/* From Uiverse.io by vk-uiux */
#checkbox {
    display: none;
  }
  
  .toggle {
    position: relative;
    width: 40px;
    cursor: pointer;
    margin: auto;
    display: block;
    height: calc(4px * 3 + 11px * 2);
  }
  
  .bar {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: calc(4px / 2);
    background: white;
    color: inherit;
    opacity: 1;
    transition: all 0.4s cubic-bezier(.5,-0.35,.35,1.5) 0s;
  }
  
  /***** Улучшенная анимация бургер-меню *****/
  
  .bar--top {
    bottom: calc(50% + 6px + 4px/ 2);
    width: 100%;
    transition-property: bottom, transform, width;
    transition-delay: calc(0s + 0.35s) * .6;
  }
  
  .bar--middle {
    top: calc(50% - 4px/ 2);
    transition-property: opacity, transform;
    transition-delay: calc(0s + 0.35s * .3);
  }
  
  .bar--bottom {
    top: calc(50% + 6px + 4px/ 2);
    width: 70%;
    right: 0;
    left: auto;
    transition-property: top, transform, width;
    transition-delay: 0s;
  }
  
  #checkbox:checked + .toggle .bar--top {
    transform: rotate(-45deg);
    transition-delay: 0s;
    bottom: calc(50% - 4px/ 2);
    width: 100%;
  }
  
  #checkbox:checked + .toggle .bar--middle {
    opacity: 0;
    transform: rotate(-45deg);
    transition-delay: calc(0s + 0.35s * .3);
  }
  
  #checkbox:checked + .toggle .bar--bottom {
    top: calc(50% - 4px/ 2);
    transform: rotate(45deg);
    transition-delay: calc(0s + 0.35s * .6);
    width: 100%;
    left: 0;
  }

/* Мобильное меню */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, var(--dark-background) 0%, #4050a0 100%);
  z-index: 10;
  padding-top: 10vh;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile-menu.visible {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 20px;
}

.mobile-menu-navigation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  width: 100%;
  max-width: 300px;
}

.mobile-menu-link {
  font-family: var(--secondary-font-family);
  font-size: 18px;
  font-weight: 600;
  color: white;
  text-decoration: none;
  padding: 15px 30px;
  border-radius: 50px;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  background-color: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(20px);
}

/* Анимация появления пунктов меню */
.mobile-menu.visible .mobile-menu-link:nth-child(1) {
  animation: fadeInUp 0.5s forwards 0.1s;
}

.mobile-menu.visible .mobile-menu-link:nth-child(2) {
  animation: fadeInUp 0.5s forwards 0.2s;
}

.mobile-menu.visible .mobile-menu-link:nth-child(3) {
  animation: fadeInUp 0.5s forwards 0.3s;
}

.mobile-menu.visible .mobile-menu-link:nth-child(4) {
  animation: fadeInUp 0.5s forwards 0.4s;
}

.mobile-menu.visible .mobile-menu-link:nth-child(5) {
  animation: fadeInUp 0.5s forwards 0.5s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu-link:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s ease;
}

.mobile-menu-link:hover {
  background-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.mobile-menu-link:hover:before {
  left: 100%;
}

.mobile-menu-link:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mobile-menu-logo {
  font-family: var(--primary-font-family);
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(-20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-logo img {
  height: 120px;
  width: auto;
  max-width: 350px;
}

.mobile-menu.visible .mobile-menu-logo {
  animation: fadeInDown 0.5s forwards;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 480px) {
  .mobile-menu-link {
    font-size: 16px;
    padding: 12px 25px;
  }
  
  .mobile-menu-logo {
    font-size: 28px;
    margin-bottom: 30px;
  }
  
  .mobile-menu-logo img {
    height: 100px;
    max-width: 280px;
  }
}