/* Navigation Styles for GNEXT Technologies */

/* Prevent live-server script injection in SVG elements */
svg {
  pointer-events: none;
}

svg * {
  pointer-events: none;
}

/* Base Navigation Styles */
.nav-links {
  display: flex !important;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  color: #1d1d1f !important;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem !important;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link:hover {
  background: rgba(255, 51, 51, 0.1);
  color: #ff3333;
  transform: translateY(-2px);
}

.nav-link svg {
  width: 20px;
  height: 20px;
  color: #ff3333;
}

/* Ensure Contact Us link is visible */
.nav-link[href="contact-us.html"] {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Glass effect for navigation */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

/* Products Dropdown Menu */
.products-dropdown {
  position: relative;
  display: inline-block;
  z-index: 10001;
}

.products-link {
  color: #ff3333;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.products-link:hover {
  background-color: rgba(255, 51, 51, 0.1);
  color: #ff3333;
}

.dropdown-arrow {
  transition: transform 0.3s ease;
  width: 16px;
  height: 16px;
  position: relative;
  z-index: 1;
}

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

.products-menu {
  display: none;
  position: absolute;
  background-color: #ffffff;
  min-width: 450px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  z-index: 10001;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 1.5rem;
  margin-top: 0.5rem;
  isolation: isolate;
}

.products-dropdown.active .products-menu {
  display: block;
  animation: fadeIn 0.3s ease;
}

.products-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #ffffff;
}

.products-grid {
  display: flex;
  gap: 2rem;
  max-width: 400px;
  margin: 0 auto;
}

.product-category {
  min-width: 200px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f0f0f0;
}

.category-icon {
  width: 20px;
  height: 20px;
  color: #ff3333;
}

.product-category h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0;
}

.product-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-category li {
  margin-bottom: 0; /* Remove spacing for clean list */
}

.product-category a {
  color: #1d1d1f;
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.product-category a:hover {
  color: #ff3333;
  background-color: #fff5f5;
  transform: translateX(3px);
}

.new-badge {
  background: #ff3333;
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-weight: 500;
  margin-left: 0.5rem;
}

/* Mobile Menu Toggle Button */
.mobile-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: 10002;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: #1d1d1f;
  transition: all 0.3s ease;
  border-radius: 2px;
}

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

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

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

/* Alternative close icon for mobile menu */
.mobile-menu-toggle.close-icon {
  position: relative;
}

.mobile-menu-toggle.close-icon .hamburger-line {
  display: none;
}

.mobile-menu-toggle.close-icon::before,
.mobile-menu-toggle.close-icon::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 3px;
  background-color: #1d1d1f;
  border-radius: 2px;
  transition: all 0.3s ease;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mobile-menu-toggle.close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-menu-toggle.close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Body scroll lock when mobile menu is open - applies to all screen sizes */
body.menu-open {
  overflow: hidden !important;
  height: 100vh !important;
  position: fixed !important;
  width: 100% !important;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

/* Simple Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100vh;
  background: #ffffff;
  z-index: 10001;
  transition: right 0.3s ease;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
}

.mobile-menu-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1d1d1f;
}

.mobile-menu-content {
  padding: 0;
}

.mobile-menu-section {
  border-bottom: 1px solid #f0f0f0;
}

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

.mobile-menu-section-header {
  width: 100%;
  background: none;
  border: none;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  color: #1d1d1f;
}

.mobile-menu-section-header:hover {
  background-color: #f8f9fa;
}

.mobile-menu-section-header svg {
  width: 20px;
  height: 20px;
  color: #ff3333;
}

.section-arrow {
  margin-left: auto;
  width: 16px;
  height: 16px;
  color: #666;
  transition: transform 0.3s ease;
}

.mobile-menu-section.active .section-arrow {
  transform: rotate(180deg);
}

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

.mobile-menu-section.active .mobile-menu-section-content {
  max-height: 500px;
}

.mobile-menu-subsection {
  padding: 0 1.5rem 1rem;
}

.mobile-menu-subsection h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-menu-subsection ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-subsection li {
  margin: 0;
}

.mobile-menu-subsection a {
  display: block;
  padding: 0.75rem 0;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0f0f0;
  transition: color 0.2s ease;
}

.mobile-menu-subsection a:hover {
  color: #ff3333;
}

.mobile-menu-subsection a:last-child {
  border-bottom: none;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  color: #1d1d1f;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.mobile-menu-item:hover {
  background-color: #f8f9fa;
  color: #ff3333;
}

.mobile-menu-item svg {
  width: 20px;
  height: 20px;
  color: #ff3333;
}

.mobile-menu-item:hover svg {
  color: #ff3333;
}

/* Mobile responsive dropdown */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  /* Hide all desktop navigation on mobile */
  .nav-links {
    display: none !important;
  }

  .products-dropdown {
    display: none !important;
    z-index: 10001 !important;
  }

  .products-link {
    display: none !important;
  }

  .products-menu {
    display: none !important;
    z-index: 10001 !important;
  }

  /* Hide desktop nav links */
  .nav-link {
    display: none !important;
  }
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
