/**
 * Eigenes Mobil-Menü (unter 768px)
 * Desktop nutzt unverändert .site-nav--desktop / mxd-nav (siehe menu-loader.css, header.css)
 */

@media (max-width: 767.98px) {
  .site-nav--desktop {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .site-nav--mobile {
    display: none !important;
  }
}

/* Toggle: gleiche Einordnung wie Desktop-Hamburger */
.site-nav--mobile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.mobile-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.mobile-nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.8rem;
  height: 4.8rem;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav__burger {
  position: relative;
  display: block;
  width: 2.6rem;
  height: 2rem;
}

.mobile-nav__burger-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background-color: #000000;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.mobile-nav__burger-line:nth-child(1) {
  top: 0.4rem;
}

.mobile-nav__burger-line:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.mobile-nav__burger-line:nth-child(3) {
  bottom: 0.4rem;
}

.mobile-nav--open .mobile-nav__burger-line:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.mobile-nav--open .mobile-nav__burger-line:nth-child(2) {
  opacity: 0;
}

.mobile-nav--open .mobile-nav__burger-line:nth-child(3) {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* Panel */
.mobile-nav__panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.mobile-nav--open .mobile-nav__panel {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.mobile-nav__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 22, 22, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.mobile-nav__sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 36rem);
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(255, 255, 255, 0.96);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-nav--open .mobile-nav__sheet {
  transform: translateX(0);
}

.mobile-nav__sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 1.6rem 1.6rem 1.2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-nav__sheet-title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--t-bright, #161616);
}

.mobile-nav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 4.4rem;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0.8rem;
  background: transparent;
  color: #161616;
  font-size: 2.4rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.no-touch .mobile-nav__close:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.mobile-nav__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.8rem 0 2rem;
}

.mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav__list li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-nav__list li:last-child {
  border-bottom: none;
}

.mobile-nav__link {
  display: block;
  padding: 1.35rem 1.6rem;
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 500;
  color: #161616;
  text-decoration: none;
  transition: background-color 0.18s ease;
}

.no-touch .mobile-nav__link:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.mobile-nav__link:active {
  background-color: rgba(0, 0, 0, 0.08);
}

body.mobile-nav-lock {
  overflow: hidden;
  touch-action: none;
}
