.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition), transform var(--transition);
}

.site-header.is-sticky {
  box-shadow: var(--shadow-md);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  min-height: var(--header-h);
  flex-wrap: nowrap;
  position: relative;
}

.header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-dark);
  text-decoration: none;
  flex-shrink: 0;
  z-index: 2;
}

.header__logo:hover {
  text-decoration: none;
  color: var(--color-primary);
}

.logo__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-white);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-family: var(--font-heading);
}

/* Drawer: Nav + Schnellsuche + CTA — auf schmalen Viewports im Burger */
.header__drawer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  min-width: 0;
}

.header__nav {
  flex-shrink: 1;
  min-width: 0;
}

.nav__list {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav__link {
  display: block;
  padding: 0.55rem 0.45rem;
  color: var(--color-medium);
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
  text-decoration: none;
}

.nav__link--highlight {
  color: var(--color-primary);
}

.nav__link--active {
  color: var(--color-primary);
  font-weight: 700;
}

.header__toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.quick-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  flex: 1 1 auto;
  min-width: 140px;
  max-width: 360px;
}

.quick-search__input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
}

.quick-search__geo-btn,
.quick-search__change-btn {
  flex-shrink: 0;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  cursor: pointer;
  font-size: 0.75rem;
}

.quick-search__geo-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.quick-search__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 50;
}

.quick-search__dropdown.is-visible {
  display: block;
}

.quick-search__dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.875rem;
}

.quick-search__dropdown button:hover {
  background: var(--color-light);
}

.header__cta {
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.header__cta:hover {
  background: var(--color-primary-dark);
}

.header__burger {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--color-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  margin-left: auto;
  z-index: 2;
}

.header__burger span {
  width: 22px;
  height: 2px;
  background: var(--color-dark);
  transition: var(--transition);
}

.header__burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__burger.is-open span:nth-child(2) {
  opacity: 0;
}

.header__burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Schmale / mittlere Breiten: alles ausser Logo + Burger in ausklappbarem Drawer */
@media (max-width: 1243px) {
  .header__burger {
    display: flex;
  }

  .header__drawer {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    flex: none;
    width: 100%;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.38s ease, opacity 0.25s ease;
    padding: 0 var(--container-pad);
    z-index: 1001;
  }

  .header__drawer.is-open {
    max-height: min(85vh, 720px);
    overflow-y: auto;
    opacity: 1;
    padding-top: 0.75rem;
    padding-bottom: 1rem;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0.75rem;
  }

  .nav__link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.65rem 0.75rem;
    white-space: normal;
    box-sizing: border-box;
  }

  .header__toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .quick-search {
    max-width: none;
    flex-wrap: wrap;
  }

  .quick-search__input {
    min-width: 120px;
  }

  .header__cta {
    width: 100%;
    justify-content: center;
  }

  /* Nur Navigation im Drawer (Rechtstext-Seiten): kein extra Strich unten */
  .header__drawer > .header__nav:last-child .nav__list {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0.35rem;
  }
}

@media (min-width: 1244px) {
  .header__burger {
    display: none !important;
  }

  .header__drawer {
    position: static;
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }

  .quick-search {
    max-width: 420px;
  }
}
