// Site header
.canvi-s-main-header {

  align-items: flex-start;
  flex-wrap: wrap;
  row-gap: var(--global--spacing-vertical); // Add space in case the menu wraps below the site branding.
  padding: 10px calc(var(--responsive--spacing-horizontal) / 2) 10px calc(var(--responsive--spacing-horizontal) / 2);
  position: relative;
  background-color: var(--global--color-surface);
  margin-bottom: var(--responsive--spacing-horizontal);

  @include media(mobile) {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .site-title,
  &.__title {
    color: var(--branding--color-link);
    font-family: var(--branding--title--font-family);
    font-size: var(--branding--title--font-size-mobile);
    letter-spacing: normal;
    text-transform: var(--branding--title--text-transform);
    line-height: var(--global--line-height-heading);
    margin-right: 30px;

    @include media(mobile) {
      margin: var(--branding--title--margin-vertical) 0 var(--branding--title--margin-vertical) 30px;
    }


    a {
      color: currentColor;
      font-weight: var(--branding--title--font-weight);

      &:link,
      &:visited,
      &:active {
        color: currentColor;
      }

      &:hover,
      &:focus {
        color: var(--branding--color-link-hover);
      }

    }

    @include media(mobile) {
      font-size: var(--branding--title--font-size);
    }
  }

  // Site description
  .site-description,
  &__description {
    color: currentColor;
    font-family: var(--branding--description--font-family);
    font-size: var(--branding--description--font-size);
    line-height: 30px;

    @include media(mobile) {
      margin: var(--branding--title--margin-vertical) 0 var(--branding--title--margin-vertical) 30px;
    }

  }

  a.custom-logo-link {
    text-decoration: none;

    &:focus {
      // Change colors when the body background is white.
      .has-background-white &,
      .is-dark-theme & {
        background: none;
      }
    }
  }

  .site-title > a {
    text-decoration-color: var(--global--color-secondary);
  }

  @include media(mobile) {
    margin-bottom: 60px;
    padding-left: 0;
    padding-right: 0;
    max-width: var(--responsive--aligndefault-width);
    margin-left: auto;
    margin-right: auto;

  }

  &.-full {

    @include media(mobile) {

      max-width: 100%;
      padding-left: 40px;
      padding-right: 40px;

    }

  }


  &__logo {

    max-width: 140px;
    top: 40px;


    @include media(mobile) {


    }

    a {
      display: block;
      &:focus-visible {

        outline: var(--primary-nav--focus-outline);
        outline-offset: 3px;

      }

    }

    img {
      display: block;
      max-width: 100%;
      height: auto;
    }
  }

  &__navigation {

    position: relative;

    &__overlay {

      position: absolute;
      top: 0;
      left: 0;
      display: none;

    }

  }

  &__social_menu {


    margin-top: var(--global--spacing-horizontal);

    @include media(mobile) {

      margin-top: 0;

    }

  }

  &__hamburger {

    position: absolute;
    width: 50px;
    top: 40px;
    right: calc(var(--responsive--spacing-horizontal) / 2);
    height: 50px;
    display: flex;
    justify-content: flex-end;

    @include media(mobile) {
      display: none;
    }

  }

  &__branding {

  }

  &__title {

  }

  &__search-bar {

    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    padding: 20px 50px;
    height: 90px;
    background: var(--global--color-background);

  }

  .page-template-template-no-title &{
    margin-bottom: 0;
  }


}


@include media(mobile-only) {

  .site-header {

    &.has-logo {


    }

    &:not(.has-logo) {

      &.has-title-and-tagline {

        .site-branding {
          margin-right: 0;
          max-width: calc(100% - 160px);
        }
      }
    }

    &:not(.has-menu) {
      justify-content: center;
    }
  }
}
