/**
 * 2025 Navbar Modernization
 * Glassmorphism + micro-interactions
 */

/* ========== GLASSMORPHISM NAVBAR ========== */

/* Floating frosted glass navbar */
#header.u-header {
  background: linear-gradient(135deg,
    rgba(33, 50, 91, 0.85) 0%,
    rgba(33, 50, 107, 0.9) 100%
  ) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When scrolled, make it more opaque and refined */
#header.u-header.u-header--moved-up {
  background: linear-gradient(135deg,
    rgba(33, 50, 91, 0.95) 0%,
    rgba(33, 50, 107, 0.98) 100%
  ) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

/* ========== SMOOTH UNDERLINE ANIMATIONS ========== */

/* Desktop nav links with animated underline */
@media (min-width: 768px) {
  .navbar-nav .nav-link {
    position: relative;
    transition: color 0.3s ease;
  }

  .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4A90E2, #357ABD);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
  }

  .navbar-nav .nav-link:hover::after,
  .navbar-nav .nav-link.active::after {
    width: 80%;
  }

  /* Dropdown toggle chevron rotation */
  .dropdown-toggle::after {
    transition: transform 0.3s ease;
    display: inline-block;
  }

  .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
  }
}

/* ========== ENHANCED DROPDOWN MENUS ========== */

/* Dropdown menu glassmorphism */
.navbar-nav .dropdown-menu {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.95) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 0.5rem;
  animation: dropdownFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dropdown items with hover effect */
.navbar-nav .dropdown-item {
  border-radius: 8px;
  margin: 0.125rem 0;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.navbar-nav .dropdown-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(74, 144, 226, 0.1), rgba(53, 122, 189, 0.05));
  transition: width 0.3s ease;
  z-index: -1;
}

.navbar-nav .dropdown-item:hover::before {
  width: 100%;
}

.navbar-nav .dropdown-item:hover {
  background-color: rgba(74, 144, 226, 0.08);
  transform: translateX(4px);
  color: #21325b !important;
}

/* Dropdown headers styling */
.navbar-nav .dropdown-header {
  color: #6c757d;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 1rem 0.5rem;
  margin-top: 0.5rem;
}

.navbar-nav .dropdown-header:first-child {
  margin-top: 0;
}

/* ========== MEGA MENU ENHANCEMENTS ========== */

/* Mega menu with glassmorphism */
.hs-mega-menu.dropdown-menu {
  min-width: 35rem !important;
  padding: 1.5rem;
}

/* Banner section glassmorphism */
.navbar-dropdown-menu-banner {
  background: linear-gradient(135deg,
    rgba(33, 50, 91, 0.95) 0%,
    rgba(47, 73, 121, 0.9) 100%
  ) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.navbar-dropdown-menu-banner-content h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.navbar-dropdown-menu-banner-content p {
  color: rgba(255, 255, 255, 0.9);
}

/* CTA button in banner */
.navbar-dropdown-menu-banner .btn-primary {
  background: linear-gradient(135deg, #4A90E2, #357ABD);
  border: none;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
  transition: all 0.3s ease;
}

.navbar-dropdown-menu-banner .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

/* ========== VISUAL SERVICE ICONS ========== */

/* Icon containers for menu items */
.dropdown-item-with-icon {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dropdown-item-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(74, 144, 226, 0.05));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1px solid rgba(74, 144, 226, 0.2);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.dropdown-item:hover .dropdown-item-icon {
  background: linear-gradient(135deg, rgba(74, 144, 226, 0.2), rgba(74, 144, 226, 0.1));
  border-color: rgba(74, 144, 226, 0.3);
  transform: scale(1.05);
}

/* ========== MOBILE ENHANCEMENTS ========== */

@media (max-width: 767.98px) {
  /* Mobile navbar keeps glassmorphism but more opaque */
  #header.u-header .navbar-collapse {
    background: linear-gradient(135deg,
      rgba(33, 50, 91, 0.98) 0%,
      rgba(33, 50, 107, 0.95) 100%
    ) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  }

  /* Mobile menu items - larger touch targets */
  #header.u-header .navbar-collapse .nav-link,
  #header.u-header .navbar-collapse .dropdown-toggle {
    padding: 1rem 1.25rem !important;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  #header.u-header .navbar-collapse .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile dropdown menu glassmorphism */
  #header.u-header .navbar-collapse .dropdown-menu {
    background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.92) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
  }

  /* Mobile dropdown items */
  #header.u-header .navbar-collapse .dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
}

/* ========== BUTTON ENHANCEMENTS ========== */

/* Client Login button with modern styling */
.navbar-nav .btn-light {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.9) 100%
  ) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

.navbar-nav .btn-light:hover {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.95) 100%
  ) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ========== ACCESSIBILITY IMPROVEMENTS ========== */

/* Focus states for keyboard navigation */
.navbar-nav .nav-link:focus,
.navbar-nav .dropdown-item:focus {
  outline: 2px solid #4A90E2;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip to content link styling */
.skip-link {
  background: linear-gradient(135deg, #4A90E2, #357ABD) !important;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
  border-radius: 8px !important;
  font-weight: 500;
}

.skip-link:focus {
  outline: 3px solid white !important;
  outline-offset: 4px !important;
}
