/* ==========================================
   1. 基本設定・レイアウト
   ========================================== */

body.fixed {
  overflow-y: hidden;
  height: 100%;
}

/* アンカーリンク余白設定 */
[id] {
  scroll-margin-top: 11.5rem;
}
@media (width < 1024px) {
  [id] {
    scroll-margin-top: 5rem;
  }
}

/* ヘッダー基本構造 */
header.page-header {
  position: fixed;
  top: -115px;
  z-index: 101;
  width: 100%;
  height: 115px;
  background: rgba(255, 255, 255, 0.66);
  display: grid;
  grid-template-columns: 430px 1fr;
  grid-template-areas: "h-logo nav-menu";
  padding-inline: var(--content-padding-width);
  opacity: 0;
  transition:
    top 1.5s ease,
    opacity 1.5s ease;
}

header.page-header.is-visible {
  top: 0;
  opacity: 1;
}

/* 採用ページ専用ヘッダー初期値 */
#recruit header.page-header {
  grid-template-columns: 327px 1fr;
  top: 0;
  opacity: 1;
}

/* ==========================================
   2. 各コンポーネント (ロゴ・メニュー)
   ========================================== */

/* ロゴエリア */
.header-logo {
  grid-area: h-logo;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 110;
}

.header-logo h1 {
  height: 31px;
  width: auto;
  margin-left: 10px;
}

.header-logo h1 img {
  height: 100%;
  width: auto;
  mix-blend-mode: multiply;
}

.header-logo h1 {
  mix-blend-mode: multiply;
}

/* 採用ページロゴ */
#recruit .header-logo {
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;
}

#recruit .header-logo h1 {
  height: auto;
  width: 100%;
  max-width: 327px;
  margin-left: 0;
}

#recruit .header-logo h1 img {
  height: auto;
  width: 100%;
}

#recruit .header-logo p {
  background: var(--color-sub1);
  max-width: 327px;
  width: 100%;
  text-align: center;
  line-height: 1.65;
  font-size: 14px;
  font-weight: bold;
  margin-top: 7px;
}

/* ==========================================
   3. ナビゲーション・メニュー (PC)
   ========================================== */

#hamburger-menu-button,
.hamburger-menu-menu,
.hamburger-menu-close {
  display: none;
}
.hamburger-menu-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
ul.drawer-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  column-gap: 3rem;
  background: var(--color-sub3);
  height: auto;
  width: auto;
  margin-inline: auto;
  transition: 1s all ease 0s;
}

ul.drawer-menu li {
  font-weight: 500;
  letter-spacing: 0.06em;
}

.current_page_item {
  position: relative;
}

.current_page_item a {
  color: var(--color-main);
}

/* 特殊ボタン設定 */
ul.drawer-menu li#menu-contact {
  height: 4rem;
  width: 15.5rem;
  margin-right: 1rem;
}

ul.drawer-menu li#menu-recruit-entry {
  width: 118.5px;
  height: 43px;
  border-radius: 5px;
  background: var(--color-black);
  color: var(--color-white);
}

ul.drawer-menu li#menu-contact a,
ul.drawer-menu li#menu-recruit-entry a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--color-black);
  color: var(--color-white);
  letter-spacing: 0.15em;
}

ul.drawer-menu li#menu-contact a::before {
  content: "";
  display: block;
  background: url("../img/common/icon_menu-contact.png") no-repeat center center;
  background-size: contain;
  width: 1em;
  height: 1em;
  margin-right: 0.5em;
}

ul.drawer-menu li#menu-recruit-entry a::after {
  content: "";
  display: block;
  background: url("../img/common/icon_menu-recruit-entry.png") no-repeat center
    center;
  background-size: contain;
  width: 1em;
  height: 1em;
  margin-left: 0.5em;
}

/* ==========================================
   4. レスポンシブ設定
   ========================================== */

/* --- タブレット/スモールPC (1440px未満) --- */
@media (width < 1440px) {
  .header-logo h1 {
    margin-left: 0;
  }

  ul.drawer-menu {
    column-gap: 2rem;
    row-gap: 1rem;
  }

  ul.drawer-menu li#menu-contact {
    margin-right: 0;
  }

  #recruit ul.drawer-menu {
    column-gap: 2rem;
    row-gap: 20px;
    font-size: 0.9em;
  }
}

/* --- モバイル (1024px未満) --- */
@media (width < 1024px) {
  header.page-header,
  #recruit header.page-header {
    grid-template-columns: 1fr 50px;
    grid-template-areas: "h-logo hum-menu";
    height: 50px;
    padding-right: 0;
  }

  #recruit .header-logo {
    align-items: flex-start;
  }

  #recruit .header-logo p {
    margin-top: 0;
  }

  /* ハンバーガーメニュー全体 */
  .hamburger-menu-wrapper {
    grid-area: hum-menu;
    position: relative;
    z-index: 105;
  }

  .menu-open .page-header {
    background: rgba(255, 255, 255, 0.9);
  }

  #hamburger-menu-label {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    position: relative;
    z-index: 106;
  }

  #hamburger-menu-button {
    appearance: none;
    border: none;
    display: block;
    width: 100%;
    height: 100%;
    padding: 5px;
    position: relative;
    background: var(--color-white);
    cursor: pointer;
    margin-right: 0;
  }

  /* メニューアイコン設定 */
  #hamburger-menu-button::after {
    content: "";
    display: block;
    width: 25px;
    height: 25px;
    background: url(../img/common/icon-menu.png) no-repeat center center;
    background-size: contain;
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    margin: auto;
  }

  .menu-open #hamburger-menu-button::after {
    background: url(../img/common/icon-menu-close.png) no-repeat center center;
    background-size: contain;
  }

  /* テキスト部分 (MENU/CLOSE) */
  .hamburger-menu-close,
  .hamburger-menu-menu {
    display: none;
    color: var(--color-main);
    pointer-events: none;
    z-index: 105;
    font-size: 9px;
    text-align: center;
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    margin-inline: auto;
  }

  .hamburger-menu-menu,
  .menu-open .hamburger-menu-close {
    display: block;
  }

  .menu-open .hamburger-menu-menu,
  .hamburger-menu-close {
    display: none;
  }

  /* ドロワーコンテンツ */
  .hamburger-menu-content {
    position: fixed;
    left: 0;
    top: 50px;
    width: 100%;
    height: calc(100% - 50px);
    transition: 0.3s ease;
    transform: translate3d(100%, 0, 0);
    overflow: auto;
    z-index: 5;
  }

  .menu-open .hamburger-menu-content {
    transform: translate3d(0, 0, 0);
  }

  .drawer-nav {
    background: rgba(255, 255, 255, 0.9);
    padding-top: 50px;
    padding-bottom: 25px;
    scrollbar-width: none;
    overflow-y: auto;
    width: 100%;
    height: 100%;
  }

  ul.drawer-menu {
    width: 100%;
    max-width: 100%;
    padding: 0;
    row-gap: 1rem;
  }

  li.menu-item {
    display: block;
    width: 100%;
    text-align: center;
    color: var(--color-black);
    font-size: 1.8rem;
    font-weight: 600;
  }

  li.menu-item a {
    font-weight: 600;
    font-size: 16px;
  }

  ul.drawer-menu li#menu-contact,
  li.menu-item:last-of-type {
    margin-inline: auto;
  }
}

/* --- スマホ (500px未満) --- */
@media (width < 500px) {
  .header-logo h1 {
    height: 20px;
  }

  #recruit .header-logo h1,
  #recruit .header-logo p {
    max-width: 280px;
  }
}
