/* Shared burger navigation — theme via CSS variables */

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 60;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--nav-toggle-color, currentColor);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

@media (max-width: 767px) {
  .nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 55;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: var(--nav-overlay-bg, rgba(230, 228, 222, 0.97));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .nav a {
    font-size: 14px;
    padding: 8px 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .nav {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-open .menu-toggle span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  body.nav-open .menu-toggle span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }
}

/* Drennsport section navigation */
.drennsport-menu-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  left: auto;
  z-index: 30001;
  pointer-events: auto;
  --nav-toggle-color: #fff;
}

@media (max-width: 767px) {
  .drs-navbar-clean.nav {
    display: none;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 80px 24px 40px;
    justify-content: center;
    align-items: center;
    z-index: 30000;
    --nav-overlay-bg: rgba(0, 0, 0, 0.95);
  }

  body.nav-open .drs-navbar-clean.nav {
    display: flex;
  }

  .drs-navbar-clean .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .drs-navbar-clean .nav-item-pill {
    opacity: 1 !important;
    transform: none !important;
    width: 100%;
    max-width: 280px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    /* letter-spacing даёт зазор после последней буквы — компенсируем слева */
    letter-spacing: 0.2em;
    padding: 12px 24px 12px calc(24px + 0.2em);
  }

  .back-btn-pill {
    top: 16px;
    left: 16px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    z-index: 30001;
  }
}

@media (min-width: 768px) {
  .drennsport-menu-toggle {
    display: none;
  }
}
