/* ===============================================
   NAVIGATION ENHANCEMENTS
   Breadcrumbs, active states, and consistent styling
   =============================================== */

/* ================ Skip to Content Link ================ */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #2563eb;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.3s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.skip-to-content:focus {
  top: 10px;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* ================ Breadcrumbs ================ */
.breadcrumbs {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 0;
  font-size: 0.9rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  color: white;
}

.breadcrumb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 0.9rem;
}

.breadcrumb-item a {
  color: #2563eb;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  background: transparent;
}

.breadcrumb-item a:hover {
  background: #e0f2fe;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.breadcrumb-item a:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.breadcrumb-separator {
  color: #cbd5e1;
  user-select: none;
  margin: 0 2px;
  font-weight: 300;
}

.breadcrumb-item.active {
  color: #1f2937;
  font-weight: 600;
}

.breadcrumb-item.active span {
  padding: 6px 12px;
  border-radius: 6px;
}

/* ================ Enhanced Navigation Active States ================ */
.nav-link {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
}

.nav-link.active {
  color: #2563eb;
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  border-radius: 2px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* Mobile menu active state */
.mobile-menu .nav-link.active {
  background: #e0f2fe;
  color: #1d4ed8;
  font-weight: 600;
}

.mobile-menu .nav-link.active::after {
  display: none;
}

.mobile-menu .nav-link.active::before {
  content: '▸';
  margin-left: 8px;
  color: #2563eb;
  font-weight: bold;
}

/* ================ Navigation Hover Effects ================ */
.nav-link:hover {
  color: #2563eb;
  transform: translateY(-2px);
}


/* ================ Consistent Menu Styling ================ */
.nav,
.mobile-menu {
  display: flex;
  align-items: center;
}

.nav {
  gap: 0rem;
}

.mobile-menu {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1rem;
}

/* ================ Navigation Icons ================ */
.nav-link i {
  margin-left: 6px;
  font-size: 0.9em;
}

/* ================ Dropdown Support (if needed) ================ */
.nav-item {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 10px 16px;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-dropdown a:hover {
  background: #f3f4f6;
  color: #2563eb;
}

/* ================ Mobile Navigation Enhancements ================ */
@media (max-width: 767px) {
  .breadcrumbs {
    padding: 8px 0;
    font-size: 0.85rem;
  }

  .breadcrumb-list {
    gap: 4px;
  }

  .breadcrumb-item a,
  .breadcrumb-item.active span {
    padding: 2px 6px;
  }

  .breadcrumb-separator {
    margin: 0 2px;
  }

  /* Ensure mobile menu links are touch-friendly */
  .mobile-menu .nav-link {
    width: 100%;
    padding: 14px 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: 8px;
  }

  .mobile-menu .nav-link:active {
    background: #e0f2fe;
    transform: scale(0.98);
  }

  /* Hide breadcrumbs on very small screens */
  @media (max-width: 480px) {
    .breadcrumbs {
      font-size: 0.8rem;
    }
    
    .breadcrumb-item {
      font-size: 0.8rem;
    }
  }
}

/* ================ Tablet Navigation ================ */
@media (min-width: 768px) and (max-width: 1023px) {
  .nav {
    gap: 1.5rem;
  }

  .nav-link {
    font-size: 0.95rem;
  }
}

/* ================ Print Styles ================ */
@media print {
  .breadcrumbs,
  .skip-to-content {
    display: none;
  }
}

/* ================ High Contrast Mode ================ */
@media (prefers-contrast: high) {
  .nav-link.active::after {
    height: 4px;
  }

  .breadcrumb-item a {
    text-decoration: underline;
  }

  .skip-to-content {
    border: 2px solid white;
  }
}

/* ================ Reduced Motion ================ */
@media (prefers-reduced-motion: reduce) {
  .nav-link,
  .breadcrumb-item a,
  .nav-dropdown,
  .skip-to-content {
    transition: none;
  }

  .nav-link.active::after {
    animation: none;
  }

  .nav-link:hover {
    transform: none;
  }
}

/* ================ Dark Mode Support (Optional) ================ */
@media (prefers-color-scheme: dark) {
  .breadcrumbs {
    background: #1f2937;
    border-bottom-color: #374151;
  }

  .breadcrumb-item {
    color: #9ca3af;
  }

  .breadcrumb-item a {
    color: #60a5fa;
  }

  .breadcrumb-item a:hover {
    background: #374151;
    color: #93c5fd;
  }

  .breadcrumb-item.active {
    color: #f3f4f6;
  }

  .nav-dropdown {
    background: #1f2937;
    border-color: #374151;
  }

  .nav-dropdown a {
    color: #d1d5db;
  }

  .nav-dropdown a:hover {
    background: #374151;
    color: #60a5fa;
  }
}
