/* =========================================================
   Care Navigator — Enterprise Navigation & Breadcrumbs
   Version: 2.0
   Mega menu, breadcrumbs, enhanced nav styling
   ========================================================= */

/* ============================================
   ENTERPRISE BRAND
   ============================================ */

.enterprise-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.5rem;
  border-radius: 12px;
}

.enterprise-brand:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
  transform: translateY(-1px);
}

.enterprise-brand-icon {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border-radius: 12px;
  border: 2px solid rgba(14, 165, 233, 0.2);
  transition: all 0.3s ease;
}

.enterprise-brand:hover .enterprise-brand-icon {
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
  transform: scale(1.05);
}

.enterprise-brand-icon .brand-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(14, 165, 233, 0.2));
}

.enterprise-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.enterprise-brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.enterprise-brand-tagline {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .enterprise-brand-icon {
    width: 40px;
    height: 40px;
  }
  
  .enterprise-brand-icon .brand-icon {
    width: 28px;
    height: 28px;
  }
  
  .enterprise-brand-name {
    font-size: 1.125rem;
  }
  
  .enterprise-brand-tagline {
    font-size: 0.6875rem;
  }
}

/* ============================================
   BREADCRUMB NAVIGATION
   ============================================ */

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 0;
  font-size: 0.9375rem;
  color: var(--text-tertiary);
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-item:hover {
  color: var(--accent-primary);
}

.breadcrumb-item.is-active {
  color: var(--text-primary);
  font-weight: 500;
  pointer-events: none;
}

.breadcrumb-separator {
  color: var(--text-tertiary);
  opacity: 0.5;
  user-select: none;
}

.breadcrumb-icon {
  width: 16px;
  height: 16px;
}

/* ============================================
   ENTERPRISE HEADER ENHANCEMENTS
   ============================================ */

.site-header-modern {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.header-nav-modern {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0;
  position: relative;
}

.header-nav-modern::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(14, 165, 233, 0.2) 20%, 
    rgba(14, 165, 233, 0.2) 80%, 
    transparent 100%
  );
}

/* ============================================
   MEGA MENU NAVIGATION
   ============================================ */

.nav-link-modern {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  border: 2px solid transparent;
}

.nav-link-modern::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-link-modern svg {
  flex-shrink: 0;
  stroke: currentColor;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.nav-link-modern:hover {
  color: #0ea5e9;
  border-color: rgba(14, 165, 233, 0.2);
  transform: translateY(-1px);
}

.nav-link-modern:hover::before {
  opacity: 1;
}

.nav-link-modern:hover svg {
  opacity: 1;
  transform: scale(1.1);
}

.nav-link-modern.is-active {
  color: #0ea5e9;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  font-weight: 700;
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.nav-link-modern.is-active svg {
  opacity: 1;
  transform: scale(1.05);
}

.nav-link-modern.is-active::after {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: linear-gradient(90deg, #0ea5e9 0%, #06b6d4 100%);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 -2px 8px rgba(14, 165, 233, 0.4);
}

/* Nav badge for notifications */
.nav-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ============================================
   MEGA MENU DROPDOWN
   ============================================ */

.nav-mega-menu {
  position: relative;
}

.nav-mega-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-mega-menu-trigger:hover {
  color: var(--accent-primary);
  background: var(--bg-secondary);
}

.nav-mega-menu-trigger svg:last-child {
  transition: transform 0.3s ease;
}

.nav-mega-menu.is-open .nav-mega-menu-trigger svg:last-child {
  transform: rotate(180deg);
}

.nav-mega-menu-panel {
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 600px;
  max-width: 900px;
  background: var(--bg-primary);
  border: 2px solid var(--border-primary);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  padding: 2rem;
  display: none;
  z-index: 1000;
  animation: mega-menu-fade-in 0.3s ease;
}

[data-theme="dark"] .nav-mega-menu-panel {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.nav-mega-menu.is-open .nav-mega-menu-panel {
  display: block;
}

@keyframes mega-menu-fade-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.mega-menu-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mega-menu-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-primary);
}

.mega-menu-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.875rem;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  background: transparent;
}

.mega-menu-item:hover {
  background: var(--bg-secondary);
  transform: translateX(5px);
}

.mega-menu-item-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.mega-menu-item:hover .mega-menu-item-icon {
  transform: scale(1.1);
}

.mega-menu-item-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent-primary);
}

.mega-menu-item-content {
  flex: 1;
}

.mega-menu-item-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.mega-menu-item-description {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.5;
}

/* Featured section in mega menu */
.mega-menu-featured {
  grid-column: span 3;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.mega-menu-featured-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mega-menu-featured-icon svg {
  width: 30px;
  height: 30px;
  stroke: white;
}

.mega-menu-featured-content {
  flex: 1;
}

.mega-menu-featured-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.mega-menu-featured-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
  line-height: 1.6;
}

.mega-menu-featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.mega-menu-featured-cta:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* ============================================
   USER DROPDOWN MENU
   ============================================ */

.user-menu-dropdown {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-primary);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-menu-trigger:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-plan {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  line-height: 1.2;
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 260px;
  background: var(--bg-primary);
  border: 2px solid var(--border-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  padding: 0.75rem;
  display: none;
  z-index: 1000;
  animation: dropdown-fade-in 0.2s ease;
}

.user-menu-dropdown.is-open .user-menu-panel {
  display: block;
}

@keyframes dropdown-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.user-menu-item:hover {
  background: var(--bg-secondary);
  color: var(--accent-primary);
}

.user-menu-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  flex-shrink: 0;
}

.user-menu-divider {
  height: 1px;
  background: var(--border-primary);
  margin: 0.5rem 0;
}

.user-menu-item.danger {
  color: #ef4444;
}

.user-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

/* ============================================
   NOTIFICATION BADGE
   ============================================ */

.notification-bell {
  position: relative;
  padding: 0.625rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-primary);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.notification-bell:hover {
  border-color: var(--accent-primary);
  background: var(--bg-tertiary);
}

.notification-bell svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
}

.notification-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 968px) {
  .nav-mega-menu-panel {
    left: 0;
    right: 0;
    transform: none;
    min-width: auto;
    max-width: none;
    margin: 0 1rem;
  }
  
  .mega-menu-grid {
    grid-template-columns: 1fr;
  }
  
  .mega-menu-featured {
    grid-column: span 1;
    flex-direction: column;
    text-align: center;
  }
  
  .breadcrumb-nav {
    padding: 1rem 0;
    font-size: 0.875rem;
  }
}

@media (max-width: 640px) {
  .nav-link-modern {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }
  
  .user-info {
    display: none;
  }
  
  .user-menu-trigger {
    padding: 0.375rem;
  }
  
  .user-avatar {
    width: 32px;
    height: 32px;
  }
}
