/* ============================================================
   Repairs for the legacy page template
   ------------------------------------------------------------
   These pages previously had no mobile menu: their only
   responsive rule stacked the whole header vertically, so the
   nav consumed the entire first screen on a phone.

   Loaded after each page's inline <style> so these rules win
   at equal specificity.
   ============================================================ */

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line, #e6e8ee);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  color: var(--ink, #1f2430);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--orange, #ea7704);
  outline-offset: 2px;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .22s ease, opacity .22s ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top:  6px; }

.site-header.is-open .nav-toggle__bars {
  background: transparent;
}

.site-header.is-open .nav-toggle__bars::before {
  transform: translateY(6px) rotate(45deg);
}

.site-header.is-open .nav-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after { transition: none; }
}

/* ---------- below the desktop breakpoint ---------- */

@media (max-width: 860px) {

  /* Undo the old "stack everything" rule from the page's own CSS. */
  .site-header__inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
  }

  .logo,
  .site-logo    { order: 1; }
  .lang-switch  { order: 2; margin-left: auto; }
  .nav-toggle   { order: 3; display: inline-flex; }

  .nav,
  .site-nav,
  .header-cta {
    order: 4;
    display: none;
  }

  .site-header.is-open .nav,
  .site-header.is-open .site-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding-top: 6px;
    border-top: 1px solid var(--line, #e6e8ee);
  }

  .site-header.is-open .nav a,
  .site-header.is-open .site-nav a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line, #e6e8ee);
    font-size: 16px;
  }

  .site-header.is-open .header-cta {
    display: inline-flex;
    width: 100%;
    margin-top: 14px;
  }

  .logo img,
  .site-logo img { width: 150px; }
}

@media (max-width: 420px) {
  .topbar__meta { display: none; }
  .logo img,
  .site-logo img { width: 132px; }
}


/* ============================================================
   Content gutters
   ------------------------------------------------------------
   The pages shipped with `calc(100% - 8px)` (and 4px above
   1200px), so body text ran flush against the viewport edge on
   every screen size. Restore real side padding.
   ============================================================ */

.container {
  width: min(var(--container, 1600px), calc(100% - 48px));
}

@media (min-width: 1200px) {
  .container { width: min(var(--container, 1600px), calc(100% - 64px)); }
}

@media (max-width: 720px) {
  .container { width: min(var(--container, 1600px), calc(100% - 32px)); }
}

/* ============================================================
   Long-word wrapping
   ------------------------------------------------------------
   German compounds ("Geschäftstransformation") are wider than a
   phone screen at hero heading sizes, which pushed the page into
   horizontal scrolling. Let them break instead.
   ============================================================ */

@media (max-width: 860px) {
  h1, h2, h3, h4,
  p, li,
  .kicker, .hero__eyebrow, .breadcrumb {
    overflow-wrap: break-word;
    hyphens: auto;
  }
}
