:root {
  --nav-height: 72px;
  --nav-height-mobile: 64px;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: background 0.35s ease, box-shadow 0.35s ease, height 0.35s ease;
  background: rgba(255, 250, 245, 0.25);
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
}

.nav.on {
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: rgba(31, 41, 55, 0.12);
  box-shadow: 0 10px 40px rgba(31, 41, 55, 0.10);
}

.nav .nav-main {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav .nav-main .nav-left {
  display: block;
  width: 170px;
  height: 48px;
  background-image: url("../images/pic-asologo@2x.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
  transition: transform 0.25s ease;
  filter: brightness(1);
}

.nav .nav-main .nav-left:hover {
  transform: scale(1.03);
}

/* 汉堡按钮（仅移动端显示） */
.nav .nav-main .nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s ease;
}
.nav .nav-main .nav-burger:hover {
  background: rgba(31, 41, 55, 0.06);
}
.nav .nav-main .nav-burger span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--text, #1f2937);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav .nav-main .nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav .nav-main .nav-right li {
  display: inline-flex;
  align-items: center;
  height: auto;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.nav .nav-main .nav-right li .item,
.nav .nav-main .nav-right li a {
  font-size: 15px;
  font-weight: 500;
  color: rgba(31, 41, 55, 0.75);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav .nav-main .nav-right li a:hover {
  color: var(--primary, #1f2937);
  opacity: 1;
}

/* 导航 CTA */
.nav .nav-main .nav-right li.nav-cta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 30px;
  background: linear-gradient(135deg, #1f2937 0%, #9ca3af 100%);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(31, 41, 55, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav .nav-main .nav-right li.nav-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.45);
}

/* 下拉菜单（保留原结构） */
.nav .nav-main .nav-right li.apple {
  position: relative;
}

.nav .nav-main .nav-right li.apple .sub-nav-apple {
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 140px;
  padding: 8px 0;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(31, 41, 55, 0.15);
  border: 1px solid rgba(31, 41, 55, 0.10);
  display: none;
  overflow: hidden;
}

.nav .nav-main .nav-right li.apple .sub-nav-apple .sub-item {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: rgba(31, 41, 55, 0.9);
  text-decoration: none;
  transition: background 0.15s ease;
}

.nav .nav-main .nav-right li.apple .sub-nav-apple .sub-item:hover {
  background: rgba(31, 41, 55, 0.08);
  color: #1f2937;
}

.nav .nav-main .nav-right li.apple:hover .sub-nav-apple {
  display: block;
}

@media (max-width: 768px) {
  .nav {
    height: var(--nav-height-mobile);
  }
  .nav .nav-main .nav-left {
    width: 140px;
    height: 40px;
  }
  .nav .nav-main .nav-burger {
    display: flex;
  }
  /* 移动端菜单：默认收起，展开时下拉 */
  .nav .nav-main .nav-right {
    position: absolute;
    top: var(--nav-height-mobile);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #ffffff;
    padding: 8px 16px 16px;
    box-shadow: 0 16px 40px rgba(17, 24, 39, 0.12);
    border-bottom: 1px solid rgba(31, 41, 55, 0.08);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
  }
  .nav .nav-main .nav-right.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav .nav-main .nav-right li {
    display: flex;
  }
  .nav .nav-main .nav-right li a {
    display: block;
    width: 100%;
    padding: 14px 12px;
    font-size: 16px;
    color: var(--text, #1f2937);
    border-bottom: 1px solid rgba(31, 41, 55, 0.06);
  }
  .nav .nav-main .nav-right li:last-child a {
    border-bottom: none;
  }
  .nav .nav-main .nav-right li.nav-cta a {
    justify-content: center;
    margin-top: 10px;
    padding: 12px 16px;
    font-size: 15px;
    border-bottom: none;
  }
  .nav .nav-main .nav-right li:not(.nav-cta) {
    display: flex;
  }
  /* 汉堡展开动画 */
  .nav .nav-main.nav-open .nav-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav .nav-main.nav-open .nav-burger span:nth-child(2) {
    opacity: 0;
  }
  .nav .nav-main.nav-open .nav-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}
