/* Match the Blog header while letting navigation use the available row width. */
body header .main-head > .row {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
  flex-wrap: nowrap;
  gap: 0;
}

body header .col-logo-mobile {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  min-width: 0;
  padding-left: 15px;
  padding-right: 15px;
  gap: 8px;
}

body header #logo {
  flex: 0 0 auto;
  width: auto !important;
  max-width: none;
}

body header #logo img {
  width: 160px !important;
  max-width: 160px !important;
  height: auto !important;
  min-height: 36px;
  max-height: 50px;
  object-fit: contain;
}

body header .head-menu {
  flex: 1 1 auto;
  min-width: 0;
}

body header .head-menu .menu {
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  gap: 0;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

body header .head-menu .menu > li {
  flex: 0 0 auto;
  margin: 0 10px !important;
  list-style: none;
}

body header .head-menu .menu > li > a {
  padding: 0 16px !important;
  white-space: nowrap;
}

body header .header-actions {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  padding-left: 15px;
  padding-right: 15px;
  white-space: nowrap;
}

/* Keep Blog's desktop spacing until the available width needs a tighter row. */
@media (min-width: 992px) and (max-width: 1159px) {
  body header .main-head > .row {
    gap: 14px;
  }

  body header .col-logo-mobile,
  body header .header-actions {
    padding-left: 0;
    padding-right: 0;
  }

  body header .head-menu .menu > li {
    margin: 0 4px !important;
  }

  body header .head-menu .menu > li > a {
    padding: 0 10px !important;
  }
}

@media (max-width: 991px) {
  body header .main-head > .row {
    gap: 6px;
    padding-left: 12px;
    padding-right: 12px;
  }

  body header .col-menu-mobile {
    flex: 0 0 40px;
    width: 40px;
    max-width: 40px;
    padding-left: 0;
    padding-right: 0;
  }

  body header .col-logo-mobile {
    justify-content: center !important;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
  }

  body header .header-actions {
    padding-left: 0;
    padding-right: 0;
  }

  body header #logo {
    max-width: 100%;
  }

  body header #logo img {
    width: auto !important;
    max-width: min(128px, 42vw) !important;
    min-height: 28px;
    max-height: 36px;
  }

  body header .head-menu {
    display: none !important;
  }

  body header .lang-switcher {
    margin-left: 0;
  }

  body header .lang-toggle {
    padding: 5px 8px;
    gap: 4px;
    font-size: 13px;
  }

  body header .lang-toggle .arrow {
    display: none;
  }
}

@media (max-width: 420px) {
  body header #logo img {
    max-width: min(112px, 38vw) !important;
  }
}
