/* Shared responsive layout for the existing IPPRO header. */
header .topline {
  box-sizing: border-box;
  min-width: 0;
  gap: clamp(12px, 1.4vw, 24px);
}

header .brand {
  min-width: 0;
  flex: 0 1 280px;
}

header .brand > a {
  display: block;
  min-width: 0;
  width: 100%;
}

header .brand img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
}

header .cta,
header .lang-switch,
header .menu-toggle {
  flex-shrink: 0;
}

header .lang-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

header .topline > nav {
  align-items: center;
  min-width: 0;
  gap: clamp(10px, 1.05vw, 16px);
}

header .submenu {
  min-width: 260px;
  max-width: min(400px, calc(100vw - 32px));
}

header .submenu a {
  white-space: normal;
  overflow-wrap: anywhere;
}

.mobile-nav {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  top: var(--ippro-header-height, 82px);
  max-height: calc(100vh - var(--ippro-header-height, 82px));
  max-height: calc(100dvh - var(--ippro-header-height, 82px));
  overscroll-behavior: contain;
}

.mobile-nav-item,
.mobile-nav-item-wrapper,
.mobile-nav-link,
.mobile-submenu {
  min-width: 0;
}

.mobile-nav-link,
.mobile-submenu a {
  white-space: normal;
  overflow-wrap: anywhere;
}

.mobile-submenu-toggle {
  flex: 0 0 44px;
  min-width: 44px;
  min-height: 44px;
}

@media (min-width: 1101px) {
  header .topline > nav { display: flex; }
  header .menu-toggle { display: none; }
  .mobile-nav,
  .mobile-nav.active { display: none; }
}

@media (max-width: 1100px) {
  header .topline {
    width: min(1180px, calc(100% - 32px));
    padding-block: 14px;
  }

  header .topline > nav { display: none; }
  header .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
  }

  header .brand {
    flex-basis: 280px;
    max-width: 280px;
  }

  header .cta { gap: 10px; }
  header .lang-switch { gap: 6px; }
  .mobile-nav { padding: 16px; }
}

@media (max-width: 480px) {
  header .topline {
    width: calc(100% - 24px);
    gap: 8px;
    padding-block: 10px;
  }

  header .brand {
    flex: 1 1 180px;
    max-width: 220px;
  }

  header .cta { gap: 4px; }
  header .lang-switch { gap: 4px; }
  header .lang-button {
    min-width: 34px;
    min-height: 36px;
    padding: 6px 7px;
    font-size: 11px;
    letter-spacing: 0;
  }

  .mobile-nav { padding: 12px; }
  .mobile-nav-link { font-size: 17px; }
  .mobile-submenu { padding-left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  header .menu-toggle span,
  .mobile-submenu-toggle { transition: none; }
}
