/* nav.css - 导航+面包屑+分页（全局加载） */

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

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.logo a {
  color: var(--text-white);
}

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

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

.nav-list {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.nav-item {
  margin: 0 4px;
}

.nav-link {
  display: block;
  padding: 10px 14px;
  color: rgba(255,255,255,0.9);
  font-size: 15px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(230,57,70,0.9);
  color: var(--text-white);
}

/* ===== 移动端菜单按钮 ===== */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-white);
  margin: 5px auto;
  transition: all 0.3s ease;
  border-radius: 1px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== 移动端导航 ===== */
@media screen and (max-width: 1024px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--dark-bg);
    z-index: 999;
    -webkit-transform: translateX(100%);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  .nav.active {
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }

  .nav-list {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    padding: 20px;
  }

  .nav-item {
    margin: 2px 0;
    width: 100%;
  }

  .nav-link {
    padding: 14px 20px;
    font-size: 16px;
    border-radius: 6px;
  }

  .nav-link:hover,
  .nav-link.active {
    background-color: rgba(230,57,70,0.9);
  }
}

/* ===== 平板端导航适配 ===== */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .logo {
    font-size: 18px;
    max-width: 250px;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 15px;
  }
}

/* ===== 小屏幕手机端 ===== */
@media screen and (max-width: 375px) {
  .logo {
    font-size: 15px;
    max-width: 200px;
  }

  .header-inner {
    height: 60px;
  }

  .nav {
    top: 60px;
  }
}

/* ===== Footer ===== */
.footer {
  background-color: var(--dark-bg);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}

.footer-grid {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.footer-col {
  width: 33.333333%;
  padding: 0 15px;
  margin-bottom: 32px;
}

.footer-title {
  font-size: 18px;
  color: var(--text-white);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--secondary);
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  transition: color 0.3s ease;
}

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

.footer-contact p {
  margin-bottom: 10px;
  font-size: 14px;
}

.footer-contact svg {
  width: 16px;
  height: 16px;
  fill: var(--secondary);
  margin-right: 8px;
  vertical-align: middle;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
}

.footer-beian {
  color: rgba(255,255,255,0.5);
  margin-top: 8px;
}

.footer-beian a {
  color: rgba(255,255,255,0.5);
}

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

@media screen and (max-width: 767px) {
  .footer-col {
    width: 100%;
    margin-bottom: 24px;
  }

  .footer {
    padding: 32px 0 16px;
  }
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background-color: var(--secondary);
  color: var(--text-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: none;
  z-index: 999;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(230,57,70,0.4);
}

.back-to-top:hover {
  background-color: #c1121f;
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
}

.back-to-top.visible {
  display: block;
}

@media screen and (max-width: 767px) {
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
    font-size: 16px;
  }
}
