/**
 * WEADDER Modern Header Navigation
 * Glass-Morphism Design matching Site Theme
 * Mobile Responsive & Accessible
 */

/* ====================================
   HEADER BASE STYLES
   ==================================== */
.header-modern-nav {
  top: 0;
  left: 0;
  z-index: 1000;
  height: 80px;
  backdrop-filter: blur(20px);
  background: rgba(12, 20, 38, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  will-change: transform, background;
}

.header-modern-nav.scrolled {
  background: rgba(12, 20, 38, 0.95);
  backdrop-filter: blur(25px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Header Background Animations */
.header-bg-animated {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.header-gradient-mesh {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(66, 133, 244, 0.1) 0%,
    rgba(0, 212, 255, 0.05) 50%,
    rgba(147, 51, 234, 0.1) 100%
  );
  animation: headerGradientFlow 10s ease-in-out infinite;
}

@keyframes headerGradientFlow {
  0%, 100% {
    opacity: 1;
    transform: translateX(0);
  }
  50% {
    opacity: 0.7;
    transform: translateX(10px);
  }
}

.header-glass-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(1px);
}

/* ====================================
   HEADER CONTAINER
   ==================================== */
.header-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 20px;
  z-index: 10;
}

/* ====================================
   BRAND SECTION
   ==================================== */
.header-brand-section {
  display: flex;
  align-items: center;
  z-index: 10;
}

.brand-link-modern {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.brand-link-modern:hover {
  transform: translateY(-2px);
}

.brand-logo-wrapper {
  position: relative;
  margin-right: 15px;
}

.brand-logo-modern {
  height: 50px;
  width: auto;
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 12px rgba(66, 133, 244, 0.3));
}

.brand-glow {
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(45deg, rgba(66, 133, 244, 0.3), rgba(0, 212, 255, 0.3));
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.brand-link-modern:hover .brand-glow {
  opacity: 1;
}

.brand-text-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-name {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  margin: 0;
  background: linear-gradient(135deg, #4285F4, #00D4FF, #9333EA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-weight: 400;
}

/* ====================================
   DESKTOP NAVIGATION
   ==================================== */
.desktop-nav-modern {
  z-index: 10;
}

.nav-menu-modern {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 5px;
}

.nav-item-modern {
  position: relative;
}

.nav-link-modern {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 14px;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-link-modern:hover,
.nav-link-modern.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
  transform: translateY(-2px);
}

.nav-icon-wrapper {
  margin-right: 8px;
  font-size: 16px;
}

.nav-text {
  font-size: 14px;
}

.dropdown-arrow {
  margin-left: 8px;
  font-size: 10px;
  transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-link-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(66, 133, 244, 0.2), rgba(0, 212, 255, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
  z-index: -1;
}

.nav-link-modern:hover .nav-link-glow {
  opacity: 1;
}

/* ====================================
   DROPDOWN MENU
   ==================================== */
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 10px;
  min-width: 280px;
  background: rgba(12, 20, 38, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-header {
  margin-bottom: 15px;
  text-align: center;
}

.dropdown-title {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 5px 0;
}

.dropdown-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  margin: 0;
}

.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dropdown-item-modern {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 13px;
}

.dropdown-item-modern:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.dropdown-item-modern i {
  margin-right: 8px;
  font-size: 14px;
  color: #4285F4;
}

/* ====================================
   HEADER ACTIONS
   ==================================== */
.header-actions-section {
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 10;
}

.contact-btn-modern {
  position: relative;
  display: flex;
  align-items: center;
  padding: 12px 24px;
  background: linear-gradient(135deg, #4285F4, #00D4FF);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

.contact-btn-modern:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(66, 133, 244, 0.4);
  color: white;
}

.btn-content {
  display: flex;
  align-items: center;
  z-index: 2;
}

.btn-icon {
  margin-right: 8px;
  font-size: 14px;
}

.btn-text {
  font-size: 14px;
}

.btn-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 25px;
}

.contact-btn-modern:hover .btn-glow {
  opacity: 1;
}

/* ====================================
   MOBILE HAMBURGER
   ==================================== */
.mobile-hamburger-modern {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.mobile-hamburger-modern:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: white;
  margin: 2px 0;
  transition: all 0.3s ease;
  border-radius: 1px;
}

.mobile-hamburger-modern.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-hamburger-modern.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-hamburger-modern.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.hamburger-glow {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, rgba(66, 133, 244, 0.3), rgba(0, 212, 255, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 10px;
  z-index: -1;
}

.mobile-hamburger-modern:hover .hamburger-glow {
  opacity: 1;
}

/* ====================================
   MOBILE NAVIGATION
   ==================================== */
.mobile-nav-modern {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  z-index: 2000;
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.mobile-nav-modern.active {
  right: 0;
}

.mobile-nav-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.mobile-gradient-mesh {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(12, 20, 38, 0.98) 0%,
    rgba(26, 35, 50, 0.95) 50%,
    rgba(45, 64, 89, 0.98) 100%
  );
  backdrop-filter: blur(20px);
}

.mobile-glass-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(2px);
}

.mobile-nav-content {
  position: relative;
  height: 100%;
  padding: 20px;
  overflow-y: auto;
  z-index: 10;
}

/* Mobile Menu Header */
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 30px;
}

.mobile-brand-section {
  display: flex;
  align-items: center;
}

.mobile-brand-logo {
  position: relative;
  margin-right: 12px;
}

.mobile-logo {
  height: 40px;
  width: auto;
}

.mobile-brand-glow {
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(45deg, rgba(66, 133, 244, 0.3), rgba(0, 212, 255, 0.3));
  border-radius: 50%;
  opacity: 0.5;
  z-index: -1;
}

.mobile-brand-text {
  display: flex;
  flex-direction: column;
}

.mobile-brand-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  margin: 0;
  background: linear-gradient(135deg, #4285F4, #00D4FF, #9333EA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mobile-brand-tagline {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.mobile-close-btn-modern {
  position: relative;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.mobile-close-btn-modern:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.close-btn-glow {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, rgba(255, 0, 0, 0.3), rgba(255, 100, 100, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 10px;
  z-index: -1;
}

.mobile-close-btn-modern:hover .close-btn-glow {
  opacity: 1;
}

/* Mobile Navigation List */
.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-item {
  margin-bottom: 8px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.mobile-nav-icon {
  margin-right: 15px;
  font-size: 18px;
  color: #4285F4;
  min-width: 20px;
}

.mobile-nav-text {
  font-size: 16px;
  font-weight: 500;
}

.mobile-dropdown-arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.3s ease;
}

.mobile-nav-dropdown.active .mobile-dropdown-arrow {
  transform: rotate(180deg);
}

.mobile-nav-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(66, 133, 244, 0.1), rgba(0, 212, 255, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
  z-index: -1;
}

.mobile-nav-link:hover .mobile-nav-glow {
  opacity: 1;
}

/* Mobile Submenu */
.mobile-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-top: 5px;
}

.mobile-nav-dropdown.active .mobile-submenu {
  max-height: 300px;
  padding: 10px 0;
}

.mobile-submenu-link {
  display: block;
  padding: 10px 20px 10px 50px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.mobile-submenu-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  padding-left: 55px;
}

/* Mobile Contact Section */
.mobile-contact-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-contact-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(135deg, #4285F4, #00D4FF);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.mobile-contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(66, 133, 244, 0.4);
  color: white;
}

.mobile-contact-content {
  display: flex;
  align-items: center;
  z-index: 2;
}

.mobile-contact-icon {
  margin-right: 10px;
  font-size: 16px;
}

.mobile-contact-text {
  font-size: 16px;
}

.mobile-contact-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
}

.mobile-contact-btn:hover .mobile-contact-glow {
  opacity: 1;
}

/* Mobile Menu Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ====================================
   RESPONSIVE DESIGN - ENHANCED MOBILE
   ==================================== */
@media (max-width: 1199.98px) {
  .brand-text-wrapper {
    display: none !important;
  }
  
  .nav-menu-modern {
    gap: 2px;
  }
  
  .nav-link-modern {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .nav-icon-wrapper {
    font-size: 14px;
  }
}

@media (max-width: 991.98px) {
  .header-nav-container {
    padding: 0 15px;
  }
  
  .contact-btn-modern {
    padding: 10px 20px;
    font-size: 13px;
  }
  
  .btn-text {
    display: none;
  }
  
  .btn-icon {
    margin-right: 0;
  }
  
  /* Mobile Navigation Improvements */
  .mobile-nav-modern {
    max-width: 350px;
  }
  
  .mobile-nav-content {
    padding: 16px;
  }
  
  .mobile-nav-link {
    padding: 12px 16px;
  }
  
  .mobile-nav-text {
    font-size: 15px;
  }
}

@media (max-width: 767.98px) {
  .header-modern-nav {
    height: 65px;
  }
  
  .header-nav-container {
    height: 65px;
    padding: 0 12px;
  }
  
  .brand-logo-modern {
    height: 36px;
  }
  
  .contact-btn-modern {
    padding: 8px 14px;
    font-size: 12px;
  }
  
  .mobile-hamburger-modern {
    width: 36px;
    height: 36px;
  }
  
  .hamburger-line {
    width: 18px;
  }
  
  /* Enhanced Mobile Menu */
  .mobile-nav-modern {
    max-width: 100%;
    width: 100%;
  }
  
  .mobile-nav-content {
    padding: 12px;
  }
  
  .mobile-menu-header {
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
  
  .mobile-brand-name {
    font-size: 16px;
  }
  
  .mobile-brand-tagline {
    font-size: 9px;
  }
  
  .mobile-logo {
    height: 32px;
  }
  
  .mobile-nav-link {
    padding: 14px 12px;
  }
  
  .mobile-nav-text {
    font-size: 14px;
  }
  
  .mobile-nav-icon {
    font-size: 16px;
    margin-right: 12px;
  }
  
  .mobile-contact-btn {
    padding: 12px 16px;
    font-size: 14px;
  }
}

@media (max-width: 575.98px) {
  .header-modern-nav {
    height: 60px;
  }
  
  .header-nav-container {
    height: 60px;
    padding: 0 10px;
  }
  
  .brand-logo-modern {
    height: 32px;
  }
  
  .contact-btn-modern {
    padding: 6px 12px;
    min-width: 40px;
  }
  
  .mobile-hamburger-modern {
    width: 32px;
    height: 32px;
  }
  
  .hamburger-line {
    width: 16px;
    margin: 1.5px 0;
  }
  
  .mobile-nav-content {
    padding: 10px;
  }
  
  .mobile-menu-header {
    padding-bottom: 16px;
    margin-bottom: 16px;
  }
  
  .mobile-brand-name {
    font-size: 14px;
  }
  
  .mobile-brand-tagline {
    font-size: 8px;
  }
  
  .mobile-logo {
    height: 28px;
  }
  
  .mobile-nav-link {
    padding: 12px 10px;
  }
  
  .mobile-nav-text {
    font-size: 13px;
  }
  
  .mobile-nav-icon {
    font-size: 14px;
    margin-right: 10px;
  }
  
  .mobile-contact-btn {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .mobile-contact-icon {
    margin-right: 8px;
  }
  
  .mobile-close-btn-modern {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

/* Extra Small Devices */
@media (max-width: 374.98px) {
  .header-nav-container {
    padding: 0 8px;
  }
  
  .brand-logo-modern {
    height: 28px;
  }
  
  .contact-btn-modern {
    padding: 5px 10px;
    min-width: 36px;
  }
  
  .mobile-hamburger-modern {
    width: 28px;
    height: 28px;
  }
  
  .hamburger-line {
    width: 14px;
  }
  
  .mobile-logo {
    height: 24px;
  }
  
  .mobile-brand-name {
    font-size: 12px;
  }
  
  .mobile-brand-tagline {
    font-size: 7px;
  }
  
  .mobile-nav-text {
    font-size: 12px;
  }
  
  .mobile-nav-icon {
    font-size: 12px;
    margin-right: 8px;
  }
}

/* ====================================
   PERFORMANCE OPTIMIZATIONS
   ==================================== */
/* Reduce motion for performance */
@media (prefers-reduced-motion: reduce) {
  .header-modern-nav,
  .mobile-nav-modern,
  .nav-link-modern,
  .mobile-nav-link {
    transition: none !important;
    animation: none !important;
  }
}

/* Print Styles */
@media print {
  .header-modern-nav {
    display: none;
  }
}

/* ====================================
   DARK MODE SUPPORT
   ==================================== */
@media (prefers-color-scheme: dark) {
  .header-modern-nav {
    background: rgba(8, 12, 20, 0.95);
  }
  
  .mobile-gradient-mesh {
    background: linear-gradient(
      135deg,
      rgba(8, 12, 20, 0.98) 0%,
      rgba(16, 20, 30, 0.95) 50%,
      rgba(24, 32, 45, 0.98) 100%
    );
  }
}
