.hero {
  position: relative;
}

.brand-jd {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.jd-trigger {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.jd-trigger img {
  width: 30px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.jd-qrcode {
  position: absolute;
  z-index: 20;
  top: calc(100% + 12px);
  left: 50%;
  width: 170px;
  padding: 12px;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.jd-qrcode::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid #ddd;
  border-top: 1px solid #ddd;
  transform: translateX(-50%) rotate(45deg);
}

.jd-qrcode img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-jd:hover .jd-qrcode,
.brand-jd:focus-within .jd-qrcode {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.footer-brand img {
  filter: none;
}

.main-nav {
  position: relative;
  z-index: 12;
}

.nav-inner {
  overflow: visible;
}

.nav-item {
  position: relative;
  height: 100%;
  min-width: 0;
}

.nav-inner .nav-link {
  position: relative;
  height: 100%;
  display: grid;
  place-items: center;
}

.nav-inner .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #47aeb8;
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-item:hover .nav-link,
.nav-item:focus-within .nav-link {
  background: #173066;
}

.nav-item:hover .nav-link::after,
.nav-item:focus-within .nav-link::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-submenu {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  min-width: 160px;
  padding: 8px 0;
  background: rgba(14, 30, 73, 0.96);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-item:hover .nav-submenu,
.nav-item:focus-within .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-inner .nav-submenu a {
  height: auto;
  min-height: 38px;
  padding: 9px 18px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
}

.nav-inner .nav-submenu a:hover,
.nav-inner .nav-submenu a:focus-visible {
  background: #4d8c91;
  outline: 0;
}

.hero-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero .hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease;
}

.hero .hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  translate: 0 -50%;
  width: 42px;
  height: 60px;
  border: 0;
  background: rgba(5, 20, 54, 0.42);
  color: #fff;
  font: 300 42px/1 Arial, sans-serif;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.hero:hover .hero-arrow,
.hero-arrow:focus-visible {
  opacity: 1;
}

.hero-prev { left: 0; }
.hero-next { right: 0; }

.hero-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 14px;
  translate: -50% 0;
  display: flex;
  gap: 9px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #fff;
}

@media (max-width: 900px) {
  .brand-jd {
    display: none;
  }

  .nav-inner {
    overflow-x: auto;
    overflow-y: visible;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .nav-submenu {
    display: none;
  }

  .hero {
    height: auto;
    aspect-ratio: 3.2 / 1;
  }
}

@media (max-width: 620px) {
  .hero {
    aspect-ratio: 2.1 / 1;
  }

  .hero .hero-slide {
    object-position: center;
  }

  .hero-arrow {
    opacity: 0.85;
    width: 34px;
    height: 50px;
  }
}
