/* Burger Menu Navigation Styles */
.main-navigation {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
body {
  zoom: 0.85;
  overflow-x: hidden;             /* компенсируем уменьшение */
}

@media (min-width: 769px) {
  .main-navigation,
  .burger-menu-toggle,
  .mobile-menu {
    display: none !important;
  }
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.brand-link {
  text-decoration: none;
  color: #333;
  font-weight: 700;
  font-size: 24px;
  transition: color 0.3s ease;
}

.brand-link:hover {
  color: #007bff;
}

.brand-text {
  background: linear-gradient(135deg, #007bff, #0056b3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Desktop Navigation */
.desktop-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 16px;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #007bff;
  background: #f8f9fa;
}

.nav-link.active {
  color: #007bff;
  background: #e3f2fd;
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: #007bff;
  border-radius: 1px;
}

/* Mobile Burger Button */
.burger-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.burger-line {
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.burger-menu-toggle.active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu-toggle.active .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-menu-toggle.active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

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

.mobile-menu .nav-link {
  display: block;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px;
}

.mobile-menu .nav-link:last-child {
  border-bottom: none;
}

.mobile-menu .nav-link:hover {
  background: #f8f9fa;
  color: #007bff;
}

.mobile-menu .nav-link.active {
  background: #e3f2fd;
  color: #007bff;
  font-weight: 600;
}

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

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 15px;
    height: 60px;
  }
  
  .brand-link {
    font-size: 20px;
  }
  
  .desktop-menu {
    display: none;
  }
  
  .burger-menu-toggle {
    display: flex;
  }
  
  .mobile-menu {
    display: block;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 10px;
    height: 55px;
  }
  
  .brand-link {
    font-size: 18px;
  }
  
  .mobile-menu .nav-link {
    padding: 14px 15px;
    font-size: 15px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .main-navigation {
    background: #1a1a1a;
    border-bottom-color: #333;
  }
  
  .brand-link {
    color: #fff;
  }
  
  .nav-link {
    color: #e0e0e0;
  }
  
  .nav-link:hover {
    color: #66b3ff;
    background: #2a2a2a;
  }
  
  .nav-link.active {
    color: #66b3ff;
    background: #1a2332;
  }
  
  .burger-line {
    background: #e0e0e0;
  }
  
  .mobile-menu {
    background: #1a1a1a;
    border-top-color: #333;
  }
  
  .mobile-menu .nav-link {
    border-bottom-color: #333;
    color: #e0e0e0;
  }
  
  .mobile-menu .nav-link:hover {
    background: #2a2a2a;
    color: #66b3ff;
  }
  
  .mobile-menu .nav-link.active {
    background: #1a2332;
    color: #66b3ff;
  }
}

/* Animation for smooth transitions */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu.active {
  animation: slideDown 0.3s ease-out;
}

/* Focus styles for accessibility */
.burger-menu-toggle:focus,
.nav-link:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .nav-link {
    border: 1px solid transparent;
  }
  
  .nav-link:hover,
  .nav-link.active {
    border-color: #007bff;
  }
  
  .burger-line {
    height: 4px;
  }
}
