/* ============================================
   太原市斯航网络科技有限公司 - 导航样式
   文件名：nav.css
   作用：导航 + 面包屑 + 分页
   ============================================ */

/* ====== 顶部导航 ====== */
.header {
  background-color: var(--primary);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  color: var(--white);
}

.logo a {
  color: var(--white);
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.logo a:hover {
  color: var(--secondary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background-color: var(--secondary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
}

/* 导航菜单 */
.nav-menu {
  display: flex;
  align-items: center;
}

.nav-menu li {
  position: relative;
  margin-left: 5px;
}

.nav-menu li a {
  display: block;
  padding: 10px 16px;
  color: rgba(255,255,255,0.9);
  font-size: 15px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: var(--secondary);
  background-color: rgba(255,255,255,0.05);
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--white);
  margin: 3px 0;
  transition: all 0.3s ease;
}

/* ====== 面包屑导航 ====== */
.breadcrumb {
  background-color: rgba(0,0,0,0.02);
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumb-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-muted);
}

.breadcrumb-item a:hover {
  color: var(--secondary);
}

.breadcrumb-separator {
  margin: 0 10px;
  color: var(--border);
}

.breadcrumb-item.active {
  color: var(--primary);
  font-weight: 500;
}

/* ====== 分页 ====== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  gap: 8px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background-color: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}

.pagination .current {
  background-color: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
  font-weight: 500;
}

.pagination .prev,
.pagination .next {
  padding: 0 16px;
}

/* ====== 返回顶部 ====== */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  background-color: var(--secondary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(255,107,53,0.3);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #e55a2b;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255,107,53,0.4);
}

/* ====== 响应式导航 ====== */
@media (max-width: 1024px) {
  .nav-menu li a {
    padding: 10px 12px;
    font-size: 14px;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--primary);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  
  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-menu li {
    margin: 0;
  }
  
  .nav-menu li a {
    padding: 14px 20px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  
  .nav-menu li:last-child a {
    border-bottom: none;
  }
  
  .menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}

@media (max-width: 767px) {
  .header-inner {
    height: 60px;
  }
  
  .nav-menu {
    top: 60px;
    max-height: calc(100vh - 60px);
  }
  
  .logo a {
    font-size: 16px;
  }
  
  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
    margin-right: 8px;
  }
  
  .breadcrumb {
    padding: 10px 0;
  }
  
  .breadcrumb-item {
    font-size: 13px;
  }
  
  .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 16px;
    bottom: 20px;
    right: 20px;
  }
}
