/* ============================================
   导航栏样式 Nav
   ============================================ */

.nav {
  width: 100%;
  height: var(--nav-height);
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10;
  background-color: transparent;
  transition: all 0.3s ease;
}

.nav.is-scrolled {
  background-color: var(--color-bg-white);
  box-shadow: var(--shadow-nav);
}

.nav__inner {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  border-bottom: solid 1px rgba(255, 255, 255, 0.2);
  transition: border-color 0.3s ease;
}

.nav.is-scrolled .nav__inner {
  border-bottom-color: transparent;
}

/* 左侧 Logo + 导航 */
.nav__left {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
}

.nav__logo {
  width: 110px;
  height: 100%;
  display: flex;
  align-items: center;
  margin-right: 85px;
}

.nav__logo-img {
  height: 36px;
}

.nav__logo-img--white {
  display: block;
}

.nav__logo-img--dark {
  display: none;
}

.nav.is-scrolled .nav__logo-img--white {
  display: none;
}

.nav.is-scrolled .nav__logo-img--dark {
  display: block;
}

/* 导航列表 */
.nav__list {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
}

.nav__item {
  height: 100%;
  cursor: pointer;
  position: relative;
}

.nav__item::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  bottom: -1.5px;
  left: 50%;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav__item:hover::after,
.nav__item.is-active::after {
  width: 100%;
}

.nav__item-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 40px;
  height: 100%;
  color: var(--color-text-white);
  font-size: 15px;
  transition: color 0.3s ease;
}

.nav.is-scrolled .nav__item-link {
  color: var(--color-text-primary);
}

.nav__item:hover .nav__item-link,
.nav__item.is-active .nav__item-link {
  color: var(--color-primary);
}

/* 右侧搜索 */
.nav__right {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
}

.nav__search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 175px;
  height: 40px;
}

.nav__search-input {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 0;
  padding: 0;
  border: solid 1px rgba(0, 0, 0, 0.2);
  border-radius: 50px;
  opacity: 0;
  height: 30px;
  transition: width 0.3s ease, opacity 0.3s ease;
  color: var(--color-text-primary);
  font-size: 14px;
}

.nav__search.is-active .nav__search-input {
  width: 100%;
  padding: 1px 45px 1px 15px;
  opacity: 1;
}

.nav__search-icon {
  position: absolute;
  top: calc(50% - 1px);
  right: 10px;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.nav__search-icon svg {
  width: 18px;
  height: 18px;
  fill: #fff;
  transition: fill 0.3s ease;
}

.nav.is-scrolled .nav__search-icon svg {
  fill: var(--color-text-primary);
}

/* 移动端导航 */
.nav__mobile {
  display: none;
  max-width: var(--container-max-width);
  margin: 0 auto;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  border-bottom: solid 1px rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
}

.nav.is-mobile {
  background-color: var(--color-bg-white);
  box-shadow: var(--shadow-nav);
}

.nav.is-mobile .nav__mobile {
  border-bottom: solid 1px rgba(0, 0, 0, 0.1);
}

.nav__mobile-logo {
  height: 36px;
}

.nav__mobile-logo-img {
  height: 100%;
}

.nav__mobile-logo-img--white {
  display: block;
}

.nav__mobile-logo-img--dark {
  display: none;
}

.nav.is-mobile .nav__mobile-logo-img--white {
  display: none;
}

.nav.is-mobile .nav__mobile-logo-img--dark {
  display: block;
}

/* 汉堡按钮 */
.nav__hamburger {
  width: 100px;
  height: 100%;
  position: relative;
  cursor: pointer;
  right: -10px;
  z-index: 11;
  transition: all 0.4s ease;
  overflow: hidden;
}

.nav__hamburger span {
  position: absolute;
  left: calc((100% - 40px) / 2);
  top: calc((100% - 2px) / 2);
  width: 40px;
  height: 2px;
  background-color: #fff;
  transition: all 0.2s ease;
}

.nav.is-mobile .nav__hamburger span {
  background-color: var(--color-text-primary);
}

.nav__hamburger span:nth-of-type(1) {
  transform: translateY(10px) rotate(0deg);
}

.nav__hamburger span:nth-of-type(2) {
  transform: translateY(0) rotate(0deg);
}

.nav__hamburger span:nth-of-type(3) {
  transform: translateY(-10px) rotate(0deg);
}

.nav__hamburger.is-active span:nth-of-type(1) {
  transform: translateY(0) rotate(45deg);
}

.nav__hamburger.is-active span:nth-of-type(2) {
  transform: translateY(0) rotate(-45deg);
}

.nav__hamburger.is-active span:nth-of-type(3) {
  transform: translateY(0) rotate(-45deg);
}

/* 移动端抽屉 */
.nav__mobile-drawer {
  position: fixed;
  width: 100%;
  height: calc(100vh - var(--nav-height));
  left: 0;
  top: var(--nav-height);
  transition: all 0.3s ease;
  display: none;
  align-items: center;
}

.nav.is-mobile .nav__mobile-drawer {
  display: flex;
}

.nav__mobile-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  transition: width 0.3s ease;
}

.nav__mobile-drawer.is-open .nav__mobile-mask {
  width: 35%;
}

.nav__mobile-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  background-color: var(--color-bg-white);
  transition: width 0.3s ease;
  overflow: hidden;
}

.nav__mobile-drawer.is-open .nav__mobile-content {
  width: 65%;
}

.nav__mobile-list {
  width: 100%;
  height: auto;
  padding: 30px 0 10px 0;
  box-sizing: border-box;
}

.nav__mobile-item a {
  display: block;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  color: rgba(0, 0, 0, 0.8);
  font-size: 4vw;
}

.nav__mobile-item.is-active a {
  color: var(--color-primary);
}

.nav__mobile-search {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: calc(100% - 40px);
  margin: 0 auto;
  height: 50px;
}

.nav__mobile-search-input {
  width: 100%;
  padding: 1px 45px 1px 15px;
  border: solid 1px rgba(0, 0, 0, 0.2);
  border-radius: 50px;
  height: 40px;
  box-sizing: border-box;
  color: var(--color-text-primary);
  font-size: 3.8vw;
}

.nav__mobile-search-icon {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  cursor: pointer;
  z-index: 10;
}

.nav__mobile-search-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--color-text-secondary);
}

/* ============================================
   页脚样式 Footer
   ============================================ */

.footer {
  background-color: var(--color-bg-dark);
  color: #fff;
  padding: 80px 0 0;
}

.footer__top {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__logo {
  flex-shrink: 0;
}

.footer__logo-img {
  height: 40px;
  margin-bottom: 20px;
}

.footer__contact {
  flex-shrink: 0;
}

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.footer__contact-item svg {
  width: 16px;
  height: 16px;
  fill: var(--color-primary);
  flex-shrink: 0;
}

.footer__qrcode {
  text-align: center;
  flex-shrink: 0;
}

.footer__qrcode-img {
  width: 100px;
  height: 100px;
  background-color: #fff;
  padding: 5px;
  margin-bottom: 10px;
}

.footer__qrcode-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* 页脚导航 */
.footer__nav {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 60px 0;
}

.footer__nav-col h4 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #fff;
}

.footer__nav-col li {
  margin-bottom: 12px;
}

.footer__nav-col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s ease;
}

.footer__nav-col a:hover {
  color: var(--color-primary);
}

/* 页脚底部 */
.footer__bottom {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer__bottom-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
}

.footer__bottom-text a {
  color: rgba(255, 255, 255, 0.5);
}

.footer__bottom-text a:hover {
  color: var(--color-primary);
}

/* 响应式 */
@media (max-width: 1800px) {
  .nav__inner,
  .nav__mobile,
  .footer__top,
  .footer__nav,
  .footer__bottom {
    width: 92%;
    box-sizing: border-box;
  }
}

@media (max-width: 1400px) {
  .nav__logo {
    margin-right: 40px;
  }

  .nav__item-link {
    padding: 0 24px;
  }

  .nav__search {
    min-width: 140px;
  }
}

@media (max-width: 1100px) {
  .nav__logo {
    margin-right: 30px;
  }

  .nav__item-link {
    padding: 0 20px;
  }
}

@media (max-width: 850px) {
  .nav__item-link {
    padding: 0 18px;
  }
}

@media (max-width: 800px) {
  .nav__inner {
    display: none;
  }

  .nav__mobile {
    display: flex;
  }

  .footer {
    padding: 50px 0 0;
  }

  .footer__top {
    flex-direction: column;
    gap: 30px;
    align-items: flex-start;
    padding-bottom: 40px;
  }

  .footer__nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 40px 0;
  }

  .footer__bottom {
    padding: 20px 0;
  }
}

@media (max-width: 600px) {
  .footer__nav {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer__nav-col h4 {
    margin-bottom: 12px;
  }
}
