/* 二级导航：非遗文创 */
.heritage-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.heritage-dropdown > a::after {
  content: "⌄";
  display: inline-block;
  margin-left: 5px;
  font-size: 11px;
  transition: transform .2s;
}

.heritage-dropdown:hover > a::after,
.heritage-dropdown:focus-within > a::after {
  transform: translateY(1px) rotate(180deg);
}

.heritage-dropdown-menu {
  display: block !important;
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  z-index: 120;
  width: 150px;
  padding: 8px 0;
  border: 1px solid #eee7df;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 10px 26px rgba(65, 45, 29, .12);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -7px);
  transition: opacity .2s, transform .2s, visibility .2s;
}

.heritage-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 0;
  left: 0;
  height: 8px;
}

.heritage-dropdown:hover .heritage-dropdown-menu,
.heritage-dropdown:focus-within .heritage-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.heritage-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  color: #706a64;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: .5px;
  white-space: normal;
}

.heritage-dropdown-menu a::after {
  display: none !important;
}

.heritage-dropdown-menu a:hover {
  color: #b8332a;
  background: #faf6f1;
}

/* Several page headers enable horizontal nav scrolling below 1450px.
   Disable that clipping where the desktop navigation still fits in one row. */
@media (min-width: 1200px) {
  .header .nav {
    overflow: visible !important;
  }
}

@media (min-width: 1001px) and (max-width: 1199px) {
  .header .brand .en,
  .header .brand-en {
    display: none !important;
  }
  .header .header-inner {
    gap: 12px !important;
    padding-right: 16px !important;
    padding-left: 16px !important;
  }
  .header .nav {
    gap: 10px !important;
    overflow: visible !important;
  }
  .header .nav a {
    font-size: 12px !important;
  }
  .header .donate {
    width: 105px !important;
    flex-basis: 105px !important;
  }
}

@media (max-width: 768px) {
  .heritage-dropdown-menu {
    top: calc(100% + 10px);
    left: 0;
    transform: translate(0, -7px);
  }

  .heritage-dropdown:hover .heritage-dropdown-menu,
  .heritage-dropdown:focus-within .heritage-dropdown-menu {
    transform: translate(0, 0);
  }
}
