/* ============================================
   SITE NAVIGATION STYLES
   Оформлено в стиле сайта
   ============================================ */

.site-navigation {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #070c1d 0%, #0a0f29 45%, #150b2b 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 
    0 8px 40px rgba(3, 4, 12, 0.65),
    0 4px 25px rgba(146, 111, 255, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  margin-bottom: 0;
  border-bottom: 2px solid rgba(255, 0, 153, 0.25);
}

.nav-container {
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  min-height: 70px;
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-logo-img {
  height: 70px;
  width: auto;
  display: block;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 350px;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.nav-logo:hover .nav-logo-img {
  transform: scale(1.05);
}

.nav-logo-text {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #9b59b6 0%, #ec4899 50%, #9b59b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: "Playfair Display", serif;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 10px rgba(155, 89, 182, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-logo:hover .nav-logo-text {
  background: linear-gradient(135deg, #ec4899 0%, #e91e63 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(155, 89, 182, 0.6);
  transform: scale(1.05);
}

@media (max-width: 767px) {
  .nav-logo-img {
    height: 50px;
  }
  
  .nav-logo-text {
    font-size: 22px;
  }
  /* Снижаем интенсивность свечений/теней на мобилках */
  .site-navigation {
    box-shadow:
      0 6px 24px rgba(3, 4, 12, 0.5),
      0 3px 16px rgba(146, 111, 255, 0.12),
      0 0 0 1px rgba(255, 255, 255, 0.04),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 0, 153, 0.2);
  }
  .nav-link:hover,
  .nav-link.active {
    box-shadow: 0 3px 10px rgba(255, 31, 167, 0.28);
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: #ff1fa7;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  font-family: "Montserrat", sans-serif;
  transition: all 0.3s ease;
  padding: 10px 20px;
  position: relative;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #ff1fa7 0%, #d213ff 50%, #8210ff 100%);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 31, 167, 0.35);
}

.nav-link.active::after {
  display: none;
}

/* ============================================
   DROPDOWN MENU
   ============================================ */

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.nav-dropdown-toggle:hover {
  color: #fff;
  background: linear-gradient(135deg, #ff1fa7 0%, #d213ff 50%, #8210ff 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 31, 167, 0.35);
}

.nav-dropdown-toggle.active {
  color: #fff;
  background: linear-gradient(135deg, #ff1fa7 0%, #d213ff 50%, #8210ff 100%);
}

.nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  transition: transform 0.3s ease;
  vertical-align: middle;
  /* Safari fixes for SVG rendering */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.nav-arrow svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
  /* Safari fixes */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.nav-dropdown-toggle.active .nav-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-toggle.active .nav-arrow svg {
  transform: rotate(0deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: linear-gradient(145deg, #08091c 0%, #0f1534 60%, #1a0f33 100%);
  box-shadow: 0 8px 30px rgba(3, 5, 18, 0.65);
  border-radius: 20px;
  border: 2px solid rgba(255, 0, 153, 0.35);
  min-width: 320px;
  max-height: 500px;
  overflow-y: auto;
  display: none;
  margin-top: 10px;
  z-index: 1001;
  padding: 10px 0;
}

.nav-dropdown-menu.active {
  display: block;
  animation: slideDown 0.3s ease;
}

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

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0 10px;
  border-radius: 15px;
}

.nav-dropdown-item:last-child {
  border-bottom: none;
}

.nav-dropdown-item:hover {
  background: linear-gradient(135deg, rgba(255, 31, 167, 0.15) 0%, rgba(130, 16, 255, 0.2) 100%);
  color: #fff;
  text-decoration: none;
  transform: translateX(5px);
  box-shadow: 0 2px 12px rgba(255, 31, 167, 0.25);
}

.nav-dropdown-item.active {
  background: linear-gradient(135deg, rgba(255, 31, 167, 0.25) 0%, rgba(130, 16, 255, 0.25) 100%);
  color: #fff;
  border-left: 3px solid #ff1fa7;
}

.nav-flag {
  width: 32px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-right: 10px;
  /* Fix for Safari image rendering */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.nav-country-name {
  flex: 1;
  font-weight: 500;
}

.nav-country-code {
  font-size: 12px;
  color: #ff1fa7;
  font-weight: 700;
  font-family: "Druk Wide Cyr", sans-serif;
  letter-spacing: 1px;
  text-shadow: 0 1px 5px rgba(255, 31, 167, 0.45);
}

.nav-dropdown-item:hover .nav-country-code {
  color: #fff;
  text-shadow: 0 1px 8px rgba(255, 31, 167, 0.7);
}

/* Scrollbar for dropdown */
.nav-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.nav-dropdown-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.nav-dropdown-menu::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ff1fa7 0%, #8210ff 100%);
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(255, 31, 167, 0.3);
}

.nav-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #ff48bc 0%, #a640ff 100%);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
  .nav-toggle {
    display: flex;
  }
  
  .nav-right {
    gap: 15px;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: linear-gradient(145deg, #070914 0%, #0f1634 60%, #180f33 100%);
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    border-top: 2px solid rgba(255, 0, 153, 0.25);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

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

  .nav-link {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin-bottom: 10px;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin-bottom: 10px;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border-radius: 15px;
    margin-top: 10px;
    max-height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 20, 0, 0.2);
    padding: 10px;
  }
}

@media (max-width: 767px) {
  .nav-container {
    padding: 0 15px;
  }

  .nav-logo {
    font-size: 20px;
  }

  .nav-dropdown-menu {
    min-width: 100%;
  }
}

