/*
 * Navigation: Desktop-Leiste ab 992px, darunter Menü-Schublade von rechts.
 *   Kein backdrop-filter am Header: der würde fest positionierte Elemente
 *   auf die Headerhöhe beschneiden.
 */

.ds-header {
  background: var(--ds-white);
  border-bottom: 1px solid var(--ds-line);
  transition: box-shadow 0.25s, border-color 0.25s;
}

body.scrolled .ds-header {
  border-bottom-color: transparent;
  box-shadow: 0 8px 24px -14px rgba(11, 42, 85, 0.35);
}

.ds-header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

.ds-brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  color: var(--ds-navy);
}

.ds-brand:hover {
  color: var(--ds-navy);
}

.ds-brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.ds-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ds-nav a {
  position: relative;
  display: block;
  padding: 10px 14px;
  border-radius: var(--ds-radius-sm);
  color: var(--ds-ink);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: color 0.2s, background 0.2s;
}

.ds-nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 3px;
  border-radius: 3px;
  background: var(--ds-line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}

.ds-nav a:hover {
  color: var(--ds-navy);
  background: var(--ds-bg-soft);
}

.ds-nav a:hover::after {
  transform: scaleX(1);
}

.ds-nav a[aria-current="page"] {
  color: var(--ds-navy);
}

.ds-nav a[aria-current="page"]::after {
  background: var(--ds-action);
  transform: scaleX(1);
}

.ds-nav a:focus-visible,
.ds-nav-toggle:focus-visible,
.ds-drawer-close:focus-visible,
.ds-drawer-nav a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ds-blue), transparent 50%);
  outline-offset: 2px;
}

.ds-header-cta {
  flex: none;
}

/* Menü-Knopf: drei Striche, die beim Öffnen nicht mehr gebraucht werden */
.ds-nav-toggle {
  display: none;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  background: var(--ds-white);
  color: var(--ds-navy);
  transition: background 0.2s, border-color 0.2s;
}

.ds-nav-toggle:hover {
  background: var(--ds-bg-soft);
  border-color: var(--ds-line-strong);
}

.ds-burger {
  display: grid;
  gap: 5px;
  width: 20px;
}

.ds-burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.ds-burger span:nth-child(2) {
  width: 70%;
  justify-self: end;
}

@media (max-width: 991px) {
  .ds-header-inner {
    gap: 12px;
    min-height: 64px;
  }
  .ds-nav {
    display: none;
  }
  .ds-nav-toggle {
    display: grid;
  }
  .ds-brand-name {
    font-size: 1.125rem;
  }
}

@media (max-width: 767px) {
  .ds-header .ds-header-cta {
    display: none;
  }
}

/* Menü-Schublade */
.ds-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(11, 42, 85, 0.55);
  opacity: 0;
  transition: opacity 0.3s;
}

.ds-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100001;
  display: flex;
  flex-direction: column;
  width: min(380px, 88vw);
  overflow-y: auto;
  background: var(--ds-white);
  box-shadow: -20px 0 60px -20px rgba(11, 42, 85, 0.45);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

body.ds-nav-open {
  overflow: hidden;
}

body.ds-nav-open .ds-drawer-backdrop {
  opacity: 1;
}

body.ds-nav-open .ds-drawer {
  transform: none;
}

.ds-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 0 16px 0 24px;
  border-bottom: 1px solid var(--ds-line);
}

.ds-drawer-close {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  background: var(--ds-white);
  color: var(--ds-navy);
  font-size: 1.125rem;
}

.ds-drawer-close:hover {
  background: var(--ds-bg-soft);
}

.ds-drawer-nav {
  margin: 0;
  padding: 12px 0;
  list-style: none;
}

.ds-drawer-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  color: var(--ds-navy);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: background 0.2s;
}

.ds-drawer-nav li + li a {
  border-top: 1px solid var(--ds-line);
}

.ds-drawer-nav a i {
  font-size: 1rem;
  color: var(--ds-muted);
  transition: transform 0.2s, color 0.2s;
}

.ds-drawer-nav a:hover {
  background: var(--ds-bg-soft);
  color: var(--ds-navy);
}

.ds-drawer-nav a:hover i {
  transform: translateX(3px);
  color: var(--ds-navy);
}

.ds-drawer-nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--ds-action);
}

.ds-drawer-contact {
  margin: 8px 24px 0;
  padding: 20px 0 8px;
  border-top: 1px solid var(--ds-line);
}

.ds-drawer-contact ul {
  display: grid;
  gap: 14px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.ds-drawer-contact li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ds-drawer-contact small {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ds-muted);
}

.ds-drawer-contact a {
  color: var(--ds-navy);
  font-weight: 700;
}

.ds-drawer-foot {
  position: relative;
  overflow: hidden;
  margin-top: auto;
  padding: 24px;
  background: var(--ds-bg-soft);
  --pattern-width: 100%;
  --pattern-fade: to top;
}

.ds-drawer-foot .ds-btn {
  position: relative;
  z-index: 1;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .ds-drawer,
  .ds-drawer-backdrop {
    transition: none;
  }
}
