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

.site-navigation {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(118.19deg, #1a1a1a 4.27%, #3C3B3B 67.45%);
  box-shadow: 0 4px 30px rgba(255, 20, 0, 0.5), 0 0 40px rgba(255, 20, 0, 0.2);
  margin-bottom: 0;
  border-bottom: 3px solid rgba(255, 20, 0, 0.6);
}

.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.3s ease;
  filter: drop-shadow(0 2px 12px rgba(255, 20, 0, 0.8)) drop-shadow(0 0 20px rgba(255, 20, 0, 0.5));
  max-width: 350px;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.nav-logo:hover .nav-logo-img {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 18px rgba(255, 20, 0, 1)) drop-shadow(0 0 30px rgba(255, 20, 0, 0.7));
}

.nav-logo-text {
  font-size: 28px;
  font-weight: 700;
  color: #FF1400;
  font-family: "Druk Wide Cyr", sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(255, 20, 0, 0.3);
}

.nav-logo:hover .nav-logo-text {
  color: #fff;
  text-shadow: 0 2px 15px rgba(255, 20, 0, 0.6);
  transform: scale(1.05);
}

@media (max-width: 767px) {
  .nav-logo-img {
    height: 50px;
  }
  
  .nav-logo-text {
    font-size: 22px;
  }
}

.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: #FF1400;
  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(90deg, #AA002D 0%, #AD002B 3%, #D00918 31%, #EA0F0A 57%, #F91202 81%, #FF1400 100%);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 20, 0, 0.4);
}

.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(90deg, #AA002D 0%, #AD002B 3%, #D00918 31%, #EA0F0A 57%, #F91202 81%, #FF1400 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 20, 0, 0.4);
}

.nav-dropdown-toggle.active {
  color: #fff;
  background: linear-gradient(90deg, #AA002D 0%, #AD002B 3%, #D00918 31%, #EA0F0A 57%, #F91202 81%, #FF1400 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(118.19deg, #090909 4.27%, #2C2B2B 67.45%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  border-radius: 20px;
  border: 2px solid rgba(255, 20, 0, 0.3);
  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(90deg, rgba(170, 0, 45, 0.3) 0%, rgba(255, 20, 0, 0.3) 100%);
  color: #fff;
  text-decoration: none;
  transform: translateX(5px);
  box-shadow: 0 2px 10px rgba(255, 20, 0, 0.3);
}

.nav-dropdown-item.active {
  background: linear-gradient(90deg, rgba(170, 0, 45, 0.4) 0%, rgba(255, 20, 0, 0.4) 100%);
  color: #fff;
  border-left: 3px solid #FF1400;
}

.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: #FF1400;
  font-weight: 700;
  font-family: "Druk Wide Cyr", sans-serif;
  letter-spacing: 1px;
  text-shadow: 0 1px 5px rgba(255, 20, 0, 0.5);
}

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

/* 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(90deg, #AA002D 0%, #FF1400 100%);
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(255, 20, 0, 0.3);
}

.nav-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #CC0020 0%, #FF3D00 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(118.19deg, #090909 4.27%, #2C2B2B 67.45%);
    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, 20, 0, 0.3);
    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%;
  }
}

