/* ============================================
   ROBUST CYBER HEADER - REDESIGNED
   ============================================ */

:root {
  --header-height: 80px;
  --primary-blue: #0066ff;
  --cyber-teal: #00ffe0;
  --neon-green: #00ff9d;
  --dark-bg: #0a0a12;
  --text-light: #f0f5ff;
  --text-gray: #a0a0c0;
  --border-blue: rgba(0, 102, 255, 0.3);
  --glow-teal: rgba(0, 255, 224, 0.5);
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* HEADER BASE */
.cyber-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 10000;
  background: rgba(10, 10, 18, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--neon-blue);
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 243, 255, 0.15);
  transition: all var(--transition-medium);
}

.cyber-header.scrolled {
  background: rgba(5, 5, 8, 0.98);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 243, 255, 0.2);
}

.header-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

/* ============================================
   LOGO STYLES
   ============================================ */
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all var(--transition-fast);
  z-index: 10002;
}

.header-logo:hover {
  background: rgba(0, 217, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.logo-icon-cyber {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  border-radius: 10px;
  overflow: hidden;
}

.logo-icon-cyber::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--secondary), var(--accent), var(--success));
  border-radius: 12px;
  z-index: -1;
  animation: rotate 3s linear infinite;
}

.logo-icon-cyber::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--bg-dark);
  border-radius: 8px;
}

.logo-icon-cyber i {
  font-size: 24px;
  color: var(--secondary);
  z-index: 1;
  text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.logo-text-cyber {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 1.5px;
  background: linear-gradient(to right, var(--secondary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.logo-badge-cyber {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 10px;
  color: var(--success);
  background: rgba(0, 255, 157, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 157, 0.3);
  letter-spacing: 1px;
  margin-left: 4px;
}

/* ============================================
   MOBILE HEADER CONTENT
   ============================================ */
.mobile-header-content {
  display: none;
  align-items: center;
  gap: 15px;
}

.mobile-terminal-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-terminal {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--text-light);
  background: rgba(0, 20, 40, 0.8);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-blue);
  display: none;
}

.mobile-terminal span {
  color: var(--success);
  font-weight: 700;
}

.mobile-cta-btn {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: var(--primary);
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-medium);
}

.mobile-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 217, 255, 0.4);
}

/* ============================================
   MOBILE TOGGLE
   ============================================ */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 44px;
  height: 44px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 8px;
  padding: 12px 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 1002;
  position: relative;
  overflow: hidden;
}

.mobile-toggle:hover {
  background: rgba(0, 217, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

.mobile-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: linear-gradient(to right, var(--secondary), var(--accent));
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ============================================
   NAVIGATION CONTAINER
   ============================================ */
.nav-container {
  display: flex;
  align-items: center;
  gap: 30px;
  height: 100%;
}

/* MAIN NAVIGATION */
.cyber-nav {
  display: flex;
  gap: 4px;
  height: 100%;
}

.nav-item-main {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link-main {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 18px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-light);
  text-decoration: none;
  letter-spacing: 1px;
  transition: all var(--transition-fast);
  position: relative;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.nav-link-main:hover {
  color: var(--secondary);
  background: rgba(0, 217, 255, 0.05);
  border-bottom-color: var(--secondary);
}

.nav-link-main.active {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
  text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.nav-indicator {
  color: var(--success);
  font-weight: 900;
  margin-right: 6px;
}

.nav-arrow {
  font-size: 10px;
  margin-left: 6px;
  transition: transform var(--transition-fast);
}

.nav-item-main:hover .nav-arrow {
  transform: rotate(180deg);
}

/* ============================================
   MEGA MENU
   ============================================ */
.mega-menu-cyber {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 900px;
  max-width: 95vw;
  background: rgba(10, 15, 30, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-top: 3px solid var(--secondary);
  border-radius: 0 0 16px 16px;
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  z-index: 999;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 50px rgba(0, 217, 255, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mega-menu-cyber.open,
.nav-item-main:hover .mega-menu-cyber {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-column-cyber h4 {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 217, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mega-column-cyber h4::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, var(--secondary), transparent);
}

.mega-links-cyber {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-links-cyber li {
  margin-bottom: 10px;
}

.mega-links-cyber a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 0;
  padding-left: 16px;
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
  position: relative;
}

.mega-links-cyber a:hover {
  color: var(--light);
  border-left-color: var(--secondary);
  padding-left: 20px;
  background: rgba(0, 217, 255, 0.05);
}

.mega-links-cyber a::before {
  content: '▸';
  position: absolute;
  left: 4px;
  color: var(--success);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.mega-links-cyber a:hover::before {
  opacity: 1;
}

/* ============================================
   HEADER TERMINAL & CTA
   ============================================ */
.header-terminal-cyber {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.terminal-line-cyber {
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  background: rgba(0, 20, 40, 0.8);
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid rgba(0, 217, 255, 0.3);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 217, 255, 0.1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-line-cyber::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.1), transparent);
  animation: scan 3s infinite;
}

@keyframes scan {
  0% { left: -100%; }
  100% { left: 100%; }
}

.terminal-prompt {
  color: var(--success);
  font-weight: 700;
}

.terminal-highlight {
  color: var(--success);
  font-weight: 700;
}

.terminal-cursor {
  animation: blink 1s infinite;
  color: var(--secondary);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.cyber-cta-btn {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

.cyber-cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.cyber-cta-btn:hover::before {
  left: 100%;
}

.cyber-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 217, 255, 0.4);
}

.cyber-cta-btn i {
  font-size: 14px;
}

/* ============================================
   MOBILE NAV OVERLAY
   ============================================ */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   MOBILE NAVIGATION CONTAINER
   ============================================ */
.mobile-nav-container {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: rgba(10, 10, 18, 0.98);
  backdrop-filter: blur(20px);
  z-index: 10001;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(0, 217, 255, 0.3);
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
}

.mobile-nav-container.active {
  right: 0;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(0, 217, 255, 0.2);
}

.mobile-nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.mobile-logo-text {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--light);
}

.mobile-nav-close {
  width: 40px;
  height: 40px;
  background: rgba(255, 58, 94, 0.1);
  border: 1px solid rgba(255, 58, 94, 0.3);
  border-radius: 8px;
  color: var(--danger);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.mobile-nav-close:hover {
  background: rgba(255, 58, 94, 0.2);
  transform: rotate(90deg);
}

.mobile-nav {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.mobile-nav-item {
  margin-bottom: 8px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-light);
  text-decoration: none;
  border-radius: 10px;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: rgba(0, 217, 255, 0.1);
  border-color: rgba(0, 217, 255, 0.3);
  color: var(--secondary);
}

.mobile-nav-link i {
  font-size: 16px;
  color: var(--secondary);
}

/* Mobile Mega Menu */
.mobile-mega-content {
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  margin-top: 10px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-mega-column {
  margin-bottom: 20px;
}

.mobile-mega-column:last-child {
  margin-bottom: 0;
}

.mobile-mega-column h4 {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-mega-links {
  list-style: none;
  padding-left: 20px;
}

.mobile-mega-links li {
  margin-bottom: 8px;
}

.mobile-mega-links a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 0;
  transition: all var(--transition-fast);
}

.mobile-mega-links a:hover {
  color: var(--light);
  padding-left: 8px;
}

/* Mobile Nav Footer */
.mobile-nav-footer {
  padding: 20px;
  border-top: 1px solid rgba(0, 217, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
}

.mobile-terminal-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: rgba(0, 217, 255, 0.05);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 8px;
  margin-bottom: 15px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--success);
}

.cyber-cta-btn.mobile-full {
  width: 100%;
  justify-content: center;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
  .nav-container {
    gap: 20px;
  }
  
  .nav-link-main {
    padding: 0 14px;
    font-size: 12px;
  }
  
  .terminal-line-cyber {
    font-size: 11px;
    padding: 6px 12px;
  }
  
  .cyber-cta-btn {
    padding: 10px 18px;
    font-size: 11px;
  }
}

@media (max-width: 992px) {
  .nav-container {
    display: none;
  }
  
  .mobile-header-content {
    display: flex;
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .header-logo {
    padding: 6px 10px;
  }
  
  .logo-text-cyber {
    font-size: 20px;
  }
  
  .logo-badge-cyber {
    display: none;
  }
}

@media (max-width: 576px) {
  .header-container {
    padding: 0 15px;
  }
  
  .logo-text-cyber {
    font-size: 18px;
  }
  
  .logo-icon-cyber {
    width: 40px;
    height: 40px;
  }
  
  .logo-icon-cyber i {
    font-size: 20px;
  }
  
  .mobile-terminal {
    display: none;
  }
  
  .mobile-cta-btn span {
    display: none;
  }
  
  .mobile-nav-container {
    max-width: 100%;
  }
}

/* Animation for header on load */
@keyframes headerSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cyber-header {
  animation: headerSlideDown 0.6s ease-out;
}
