@use "sass:map";
@use "global/acms-common" as acms;
@use "global/common" as global;

/* ------------------------------
　　ヘッダー
------------------------------ */
.header-wrap {
  position: relative;
  z-index: var(--zindex-header);
}

.header {
  box-sizing: border-box;
  width: 100%;
  background: var(--color-white);
}

.header-item-wrap {
  box-sizing: border-box;
  max-width: var(--container);
  padding-right: var(--header-height-fixed);
  padding-left: var(--gutter-sm);
  margin-right: auto;
  margin-left: auto;
}

.header-title {
  margin: 0;
  font-size: map.get(global.$font-scales, heading-s);
  font-weight: bold;
  line-height: 1;
}

.header-logo {
  max-height: var(--header-height-fixed);
}

// SP時レイアウト：ヘッダーを画面上部に固定、ロゴを中央に配置し、オフキャンバスボタンを右端に配置
@include acms.media-breakpoint-down(lg) {
  .header-wrap {
    height: var(--header-height);
  }

  .header {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    height: var(--header-height);
    box-shadow: var(--box-shadow);
  }

  .header-item-wrap {
    flex: 1;
  }
}

@include acms.media-breakpoint-up(sm) {
  .header-item-wrap {
    padding-left: var(--gutter-md);
  }
}

// PC時レイアウト：ロゴとグローバルナビを縦積みに左右中央揃え
@include acms.media-breakpoint-up(lg) {
  .header:has(.js-sticky-nav) {
    padding-bottom: var(--nav-height);
  }

  .header-item-wrap {
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr 240px 1fr;
    grid-gap: 0 var(--col-gutter);
    align-items: center;
    padding: 1.5rem var(--gutter-lg) 0;
    text-align: center;
  }

  .header-title {
    grid-area: 1 / 2 / 2 / 3;
    text-align: center;
  }
}
