/* 导航样式组件 */

/* 主导航样式 */
.nav-link {
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--apple-darkblue, #0071e3);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

/* 移动菜单动画 */
.animate-fade-in {
  animation: fadeIn 0.3s ease-in-out forwards;
}

.animate-fade-out {
  animation: fadeOut 0.3s ease-in-out forwards;
}

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

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

/* 面包屑导航样式 */
.breadcrumb-container {
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.breadcrumb-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* 搜索组件样式 */
.search-container {
  position: relative;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 400px;
  overflow-y: auto;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 50;
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 40;
}

/* 返回顶部按钮样式 */
#back-to-top {
  transition: opacity 0.3s, transform 0.3s, background-color 0.3s;
}

#back-to-top:hover {
  transform: translateY(-5px) !important;
}

/* 活动导航项 */
.nav-link.active {
  color: var(--apple-darkblue, #0071e3);
  font-weight: 500;
}

/* 下拉菜单 */
.dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--apple-black, #1d1d1f);
  transition: background-color 0.3s;
}

.dropdown-item:hover {
  background-color: rgba(0, 113, 227, 0.1);
}

.dropdown-divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 0.25rem 0;
}

/* 响应式导航 */
@media (max-width: 768px) {
  .dropdown-content {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: auto;
    padding-left: 1rem;
  }
  
  .dropdown-item {
    padding: 0.5rem 0;
  }
}
