/* BBS: helles Vollbildmenü mit der ursprünglichen Navigation. */
.mobile-menu-contact,
.mobile-menu-tools,
.nav .mobile-menu-overview {
  display: none;
}

.mobile-menu-layer,
.mobile-menu-links {
  display: contents;
}

.mobile-menu-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

@media (max-width: 980px) {
  .site-header {
    --mobile-menu-header-height: 78px;
    --mobile-menu-content-top: calc(var(--top-notice-height) + var(--mobile-menu-header-height));
  }

  body.has-top-notice .site-header,
  body.no-top-notice .site-header {
    z-index: 7000;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body.no-top-notice .site-header {
    --mobile-menu-content-top: var(--mobile-menu-header-height);
  }

  /* Eine dauerhafte SVG-Kreisfläche; kein CSS-Maskenwechsel am Animationsende. */
  .mobile-menu-layer {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: none;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    padding-top: var(--mobile-menu-content-top);
    overflow: hidden;
    clip-path: var(--mobile-menu-clip);
    background:
      radial-gradient(ellipse at 100% 0%, #eee1eb 0%, transparent 62%),
      radial-gradient(ellipse at 0% 100%, #f1e2c5 0%, transparent 58%),
      linear-gradient(155deg, #fffdf8 0%, #faf4ee 55%, #f7f0e8 100%);
  }

  .mobile-menu-layer.is-open {
    display: flex;
  }

  /* Das echte Logo und derselbe Button bleiben über der hellen Fläche. */
  .header-inner > .brand,
  .nav-toggle {
    position: relative;
    z-index: 2;
  }

  .nav-toggle {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    gap: 0;
    transition: none;
  }

  .nav-toggle-icon span {
    transition: none;
  }

  .nav-toggle-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .nav-toggle[aria-expanded="true"] {
    color: var(--bb-lilac-900);
    background: var(--bb-ivory-2);
    border-color: rgba(75, 47, 85, .24);
    box-shadow: none;
  }

  .nav-toggle:hover {
    transform: none;
  }

  .site-header .nav,
  body.has-top-notice .site-header .nav.is-open {
    position: relative;
    inset: auto;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    min-height: 0;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 0 0 max(18px, env(safe-area-inset-bottom));
    color: var(--bb-lilac-900);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  /* Nur die Menüpunkte scrollen; die Kontaktmöglichkeiten bleiben erreichbar. */
  .mobile-menu-links {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    margin: 0 18px;
    padding: 8px 0 16px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(97, 64, 106, .35) transparent;
  }

  .mobile-menu-links > a,
  .mobile-menu-links > details {
    flex-shrink: 0;
  }

  .mobile-menu-links > a:not(.header-cta),
  .mobile-menu-links > details > summary {
    min-height: 44px;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: .94rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
  }

  .nav .header-cta {
    display: none !important;
  }

  .nav .nav-dropdown[open] > summary {
    background: var(--bb-white);
  }

  /* Unterseiten, Beschreibungen und Gruppen verwenden wieder die alten Regeln. */
  .nav .nav-panel,
  .nav .nav-panel a {
    animation: none;
    transition: none;
  }

  .nav .nav-panel a {
    min-height: 44px;
  }

  .nav .nav-group-title {
    color: #80603c;
  }

  .nav .nav-panel .mobile-menu-overview {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    color: var(--bb-lilac-700);
    font-size: .86rem;
  }

  .nav .mobile-menu-overview span {
    color: inherit;
    font-size: 1rem;
  }

  .mobile-menu-contact {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 18px;
    padding-top: 16px;
    border-top: 1px solid var(--bb-line);
  }

  .nav .mobile-menu-contact a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 10px 12px;
    color: var(--bb-white);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    font-size: .95rem;
    font-weight: 750;
    line-height: 1.3;
    white-space: normal;
  }

  .nav .mobile-menu-contact .mobile-menu-booking {
    grid-column: 1 / -1;
    min-height: 54px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .2), transparent 44%),
      linear-gradient(135deg, #b68448, #956331);
    border-color: #b68448;
    font-size: 1rem;
  }

  .nav .mobile-menu-contact .mobile-menu-whatsapp {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .18), transparent 42%),
      linear-gradient(135deg, #25D366, #128C7E);
    border-color: #128C7E;
  }

  .nav .mobile-menu-contact .mobile-menu-call {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .15), transparent 44%),
      linear-gradient(135deg, var(--bb-lilac-900), var(--bb-lilac-700));
    border-color: var(--bb-lilac-700);
  }

  .mobile-menu-call svg {
    color: var(--bb-champagne-2);
  }

  .nav .mobile-menu-contact a:hover {
    color: var(--bb-white);
    box-shadow: inset 0 0 0 999px rgba(255, 255, 255, .075);
  }

  .mobile-menu-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    margin: 14px 18px 0;
    padding-top: 14px;
    border-top: 1px solid var(--bb-line);
  }

  .nav .mobile-menu-tools a,
  .mobile-menu-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    padding: 10px;
    color: var(--bb-lilac-800);
    background: rgba(255, 253, 248, .5);
    border: 1px solid rgba(75, 47, 85, .25);
    border-radius: 999px;
    font: inherit;
    cursor: pointer;
  }

  .mobile-menu-search {
    gap: 8px;
    width: auto;
    margin-right: auto;
    padding-inline: 14px;
    font-size: .9rem;
    font-weight: 700;
  }

  .nav .mobile-menu-tools a:hover,
  .mobile-menu-search:hover {
    background: var(--bb-ivory-2);
    border-color: var(--bb-lilac-700);
  }

  .mobile-menu-contact svg,
  .mobile-menu-tools svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body.nav-open .site-header :focus-visible {
    outline: 2px solid var(--bb-lilac-700);
    outline-offset: -2px;
  }
}

@media (max-width: 640px) {
  .site-header {
    --mobile-menu-header-height: 72px;
  }
}

@media (max-width: 980px) and (max-height: 480px) {
  .site-header .nav { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .mobile-menu-contact { padding-top: 8px; gap: 8px; }
  .nav .mobile-menu-contact .mobile-menu-booking { min-height: 44px; }
  .nav .mobile-menu-contact a { min-height: 40px; padding-block: 8px; }
  .mobile-menu-tools { margin-top: 8px; padding-top: 8px; }
}
