.site-header {
  background: #ffffff;
}

.site-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid #dbe5f1;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.portal-brand-logo {
  display: block;
  width: 340px;
  height: auto;
  aspect-ratio: 340 / 86;
  flex-shrink: 0;
  object-fit: contain;
}

.header-search {
  flex: 1 1 12rem;
  max-width: 22rem;
  margin-left: auto;
  min-width: 0;
}

.header-search-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: 1px solid #cfdbea;
  border-radius: 6px;
  background: #ffffff;
  color: #123257;
  font-family: "Source_Sans_Pro_Regular";
  font-size: 0.92rem;
  line-height: 1.35;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.header-search-input::placeholder {
  color: #64748b;
}

.header-search-input:hover {
  border-color: #b8c9de;
}

.header-search-input:focus {
  outline: none;
  border-color: #9eb8d8;
  box-shadow: 0 0 0 2px rgba(0, 163, 173, 0.15);
}

/* Schmaler Viewport, Logo + Suche noch in einer Zeile */
@media (max-width: 1100px) and (min-width: 721px) {
  .portal-brand-logo {
    width: 300px;
  }
}

/* Mobil: Suche unter dem Logo – Logo darf volle Zeilenbreite nutzen */
@media (max-width: 720px) {
  .site-header-inner {
    align-items: flex-start;
  }

  .portal-brand {
    width: 100%;
    max-width: 100%;
  }

  .portal-brand-logo {
    width: min(100%, 320px);
    max-width: 320px;
    min-width: 260px;
  }

  .header-search {
    flex: 1 1 100%;
    max-width: none;
    margin-left: 0;
    order: 2;
    width: 100%;
  }

  .portal-brand {
    order: 1;
  }
}

@media (max-width: 400px) {
  .portal-brand-logo {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}
