/* Navigation background adapted from Uiverse.io by kencode7. */
.service-header .topbar {
  isolation: isolate;
  background: linear-gradient(to bottom, #fff 0%, #fff 40%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(to right, #fff0f5, #f9dce7);
}

.service-header .topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background-image: linear-gradient(90deg, rgba(172, 93, 120, 0.1) 1px, transparent 1px);
  background-size: 50px 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}

/* Animation adapted from Uiverse.io by vinodjangid07.
   aria-expanded is the single state shared by the button and navigation. */
.topbar .menu-toggle {
  --menu-rim-angle: 315deg;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  display: grid;
  place-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 4px;
  border: 1px solid rgba(176, 92, 255, 0.38);
  border-radius: 50%;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.85);
  background: #fce0e9;
  cursor: pointer;
}

/* Language and privacy controls remain available from the same menu at every width. */
.topbar .mobile-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: auto;
  right: 0;
  display: grid;
  width: min(420px, calc(100vw - 36px));
  max-height: calc(100dvh - 130px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 28px;
  background: linear-gradient(135deg, #fffcf9, #f7e6e2);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 24px 64px rgba(79, 42, 39, .19), inset 0 1px 0 #fff;
  animation: menu-enter 0.25s ease;
  font-family: "Onest", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}
.topbar .mobile-menu > .menu-destination {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  min-height: 90px;
  padding: 17px 14px;
  border: 0;
  border-radius: 16px;
  color: #542d38;
  text-decoration: none;
  transition: background 220ms ease, box-shadow 220ms ease;
}
.topbar .mobile-menu > .menu-destination + .menu-destination { margin-top: 6px; }
.menu-destination__number {
  align-self: start;
  padding-top: 5px;
  color: #9b7c76;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}
.menu-destination__text { display: grid; gap: 5px; min-width: 0; }
.menu-destination__title { font-size: clamp(19px, 3.5vw, 23px); font-weight: 500; line-height: 1.35; }
.menu-destination__description { color: #896870; font-size: 12px; font-weight: 400; line-height: 1.5; }
.menu-destination__arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(122, 62, 69, .14);
  border-radius: 50%;
  color: #7b4656;
  font-size: 17px;
  transition: transform 220ms ease, background 220ms ease;
}
.topbar .mobile-menu > .menu-destination[aria-current="page"] {
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 4px 16px rgba(93, 48, 57, .045);
  font-weight: 500;
}
.menu-destination[aria-current="page"] .menu-destination__arrow { color: #fff8f4; background: #784356; border-color: #784356; }
@media (hover: hover) {
  .topbar .mobile-menu > .menu-destination:hover { background: rgba(255, 255, 255, .65); }
  .menu-destination:hover .menu-destination__arrow { transform: translate(2px, -2px); }
}
.menu-destination:focus-visible { outline: 2px solid #784356; outline-offset: -2px; border-radius: 16px; }
.topbar .mobile-menu > .menu-booking {
  width: 100%;
  max-width: none;
  min-height: 56px;
  margin: 18px 0 0;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}
.menu-utilities {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(122, 62, 69, .11);
}
.menu-utilities .locale-link,
.menu-utilities .privacy-reopen {
  display: flex;
  grid-column: auto;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(122, 62, 69, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .4);
  color: #795964;
  font: 400 12px/1.5 var(--sans);
  text-decoration: none;
  text-align: left;
}
.menu-utilities :is(a, button):hover { color: var(--wine); }
.menu-utilities :is(a, button):focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 4px;
  border-radius: 3px;
}

/* SpecularButton-inspired rim, with a plain border as the fallback. */
.topbar .menu-toggle::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--menu-rim-angle), transparent 0deg,
    rgba(255, 255, 255, 0.95) 24deg, rgba(176, 92, 255, 0.8) 48deg,
    transparent 90deg, transparent 200deg, rgba(255, 255, 255, 0.65) 230deg,
    transparent 260deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.25s ease;
}

.topbar .menu-toggle:hover::before,
.topbar .menu-toggle:focus-visible::before {
  opacity: 1;
}

.topbar .menu-toggle > .menu-glyph {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 0;
  background: transparent;
  transform: rotate(0deg);
  transition: transform 0.5s ease;
}

.topbar .menu-toggle .menu-glyph > .bars {
  position: absolute;
  left: 50%;
  width: 70%;
  height: 2px;
  border-radius: 4px;
  background-color: rgb(176, 92, 255);
  transform: translate(-50%, -50%);
  transition: top 0.5s ease, width 0.5s ease, transform 0.5s ease;
}

.topbar .menu-toggle .menu-glyph > .bar-top {
  top: 4px;
}

.topbar .menu-toggle .menu-glyph > .bar-middle {
  top: 12px;
  width: 100%;
  transition-duration: 0.8s;
}

.topbar .menu-toggle .menu-glyph > .bar-bottom {
  top: 20px;
}

.topbar .menu-toggle[aria-expanded="true"] > .menu-glyph {
  transform: rotate(180deg);
}

.topbar .menu-toggle[aria-expanded="true"] .menu-glyph > .bars {
  top: 12px;
  width: 100%;
  transition-duration: 0.5s;
}

.topbar .menu-toggle[aria-expanded="true"] .menu-glyph > .bar-middle {
  transform: translate(-50%, -50%) scaleX(0);
}

.topbar .menu-toggle[aria-expanded="true"] .menu-glyph > .bar-top {
  transform: translate(-50%, -50%) rotate(45deg);
}

.topbar .menu-toggle[aria-expanded="true"] .menu-glyph > .bar-bottom {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.topbar .menu-toggle:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 4px;
}

@media (max-width: 980px) {
  .topbar .mobile-menu { left: 0; right: 0; width: auto; }
  .topbar .menu-toggle {
    display: grid;
    place-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    padding: 4px;
    cursor: pointer;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar .mobile-menu { animation: none; }
  .topbar .menu-destination,
  .menu-destination__arrow,
  .topbar .menu-toggle > .menu-glyph,
  .topbar .menu-toggle .menu-glyph > .bars,
  .topbar .menu-toggle::before {
    transition: none;
  }
}
