/* ========================================
   ヘッダー
======================================== */

.recruit-header,
.recruit-header *,
.recruit-header *::before,
.recruit-header *::after {
  box-sizing: border-box;
}


.recruit-header {
  --header-navy: #173b6c;
  --header-navy-dark: #102d50;
  --header-orange: #f76521;
  --header-text: #26364a;
  --header-border: #d7e3ef;
  --header-light: #f4f7fa;

  position: sticky;
  top: 0;
  z-index: 9999;

  width: 100%;
  max-width: 100%;

  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--header-border);

  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);

  font-family:
    "Noto Serif JP",
    "Yu Mincho",
    "YuMincho",
    "Hiragino Mincho ProN",
    "Hiragino Mincho Pro",
    serif;
}


/* ========================================
   ヘッダー下部の目盛り線
======================================== */

.recruit-header::after {
  content: "";

  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;

  height: 6px;

  pointer-events: none;

  background-image:
    linear-gradient(
      to bottom,
      transparent 0,
      transparent 4px,
      rgba(23, 59, 108, 0.22) 4px,
      rgba(23, 59, 108, 0.22) 5px,
      transparent 5px
    ),
    repeating-linear-gradient(
      to right,
      rgba(23, 59, 108, 0.28) 0,
      rgba(23, 59, 108, 0.28) 1px,
      transparent 1px,
      transparent 12px
    );

  background-size:
    100% 100%,
    100% 4px;

  background-position:
    center,
    left bottom;

  background-repeat:
    no-repeat,
    no-repeat;
}


/* ========================================
   WordPress管理バー
======================================== */

.admin-bar .recruit-header {
  top: 32px;
}


/* ========================================
   ヘッダー内側
======================================== */

.recruit-header__inner {
  position: relative;
  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;

  width: 100%;
  max-width: 1280px;
  min-height: 88px;

  margin: 0 auto;
  padding: 12px 28px 16px;
}


/* ========================================
   ロゴ・採用サイト名
======================================== */

.recruit-header__brand {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  gap: 16px;

  min-width: 0;
}


.recruit-header__logo {
  display: block;
  flex: 0 1 auto;

  min-width: 0;

  color: inherit;
  text-decoration: none;
  line-height: 1;
}


.recruit-header__logo img {
  display: block;

  width: auto;
  max-width: 180px;
  max-height: 42px;

  object-fit: contain;
}


.recruit-header__brand-line {
  flex: 0 0 auto;

  width: 1px;
  height: 34px;

  background: var(--header-border);
}


.recruit-header__site-name {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;

  color: var(--header-navy);
  text-decoration: none;

  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.16em;

  white-space: nowrap;
}


.recruit-header__site-name span:last-child {
  color: var(--header-orange);
}


/* ========================================
   ヘッダー右側
======================================== */

.recruit-header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 32px;

  min-width: 0;
}


/* ========================================
   ナビゲーション
======================================== */

.recruit-header__nav {
  display: block;
}


.recruit-menu {
  display: flex;
  align-items: center;
  gap: 34px;

  margin: 0;
  padding: 0;

  list-style: none;
}


.recruit-menu__item {
  position: relative;

  margin: 0;
  padding: 0;
}


/* ========================================
   親メニュー
======================================== */

.recruit-menu__parent {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;

  min-width: max-content;
  padding: 14px 18px 15px 0;

  color: var(--header-navy);
  text-decoration: none;

  transition: color 0.25s ease;
}


.recruit-menu__en {
  color: var(--header-orange);

  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.16em;
}


.recruit-menu__ja {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.05em;

  white-space: nowrap;
}


/* ドロップダウン矢印 */

.recruit-menu__parent::after {
  content: "";

  position: absolute;
  top: 50%;
  right: 1px;

  width: 6px;
  height: 6px;

  margin-top: -4px;

  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;

  transform: rotate(45deg);

  transition:
    transform 0.25s ease,
    border-color 0.25s ease;
}


/* 親メニュー下線 */

.recruit-menu__parent::before {
  content: "";

  position: absolute;
  right: 18px;
  bottom: 7px;
  left: 0;

  height: 2px;

  background: var(--header-orange);

  transform: scaleX(0);
  transform-origin: left center;

  transition: transform 0.25s ease;
}


.recruit-menu__parent:hover,
.recruit-menu__parent:focus-visible {
  color: var(--header-orange);
}


.recruit-menu__parent:hover::before,
.recruit-menu__parent:focus-visible::before,
.has-dropdown:hover > .recruit-menu__parent::before,
.has-dropdown:focus-within > .recruit-menu__parent::before {
  transform: scaleX(1);
}


.has-dropdown:hover > .recruit-menu__parent::after,
.has-dropdown:focus-within > .recruit-menu__parent::after {
  transform: rotate(225deg);
}


/* ========================================
   ドロップダウン
======================================== */

.dropdown {
  counter-reset: recruit-dropdown;

  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  z-index: 20;

  min-width: 290px;

  margin: 0;
  padding: 12px 0;

  list-style: none;

  background: #ffffff;
  border: 1px solid var(--header-border);
  border-radius: 1px;

  box-shadow:
    0 18px 45px rgba(16, 45, 80, 0.13),
    0 5px 12px rgba(16, 45, 80, 0.06);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translate(-50%, -8px);

  transition:
    opacity 0.22s ease,
    visibility 0.22s ease,
    transform 0.22s ease;
}


/* hover時の隙間を埋める */

.dropdown::before {
  content: "";

  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;

  height: 16px;
}


/* ドロップダウン上部ライン */

.dropdown::after {
  content: "";

  position: absolute;
  top: -1px;
  left: 0;

  width: 100%;
  height: 3px;

  background:
    linear-gradient(
      to right,
      var(--header-orange) 0,
      var(--header-orange) 52px,
      var(--header-border) 52px,
      var(--header-border) 100%
    );
}


.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform: translate(-50%, 0);
}


/* ========================================
   ドロップダウン項目
======================================== */

.dropdown li {
  counter-increment: recruit-dropdown;

  position: relative;

  margin: 0;
  padding: 0;
}


.dropdown li a {
  position: relative;

  display: flex;
  align-items: center;

  min-height: 48px;
  padding: 10px 42px 10px 52px;

  color: var(--header-text);
  text-decoration: none;

  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.03em;

  white-space: nowrap;

  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    padding-left 0.2s ease;
}


/* 番号 */

.dropdown li::before {
  content: "0" counter(recruit-dropdown);

  position: absolute;
  top: 50%;
  left: 18px;
  z-index: 2;

  color: var(--header-orange);

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;

  transform: translateY(-50%);

  pointer-events: none;
}


/* 右矢印 */

.dropdown li a::after {
  content: "";

  position: absolute;
  top: 50%;
  right: 20px;

  width: 15px;
  height: 5px;

  border-right: 1px solid var(--header-navy);
  border-bottom: 1px solid var(--header-navy);

  transform: translateY(-65%) skewX(45deg);

  opacity: 0.45;

  transition:
    right 0.2s ease,
    opacity 0.2s ease;
}


.dropdown li a:hover,
.dropdown li a:focus-visible {
  padding-left: 57px;

  color: var(--header-navy);
  background: var(--header-light);
}


.dropdown li a:hover::after,
.dropdown li a:focus-visible::after {
  right: 16px;
  opacity: 1;
}


/* ========================================
   求人情報ボタン
======================================== */

.recruit-header__careers {
  flex: 0 0 auto;
}


.recruit-header__careers a {
  position: relative;
  overflow: hidden;

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 18px;

  width: 150px;
  min-height: 54px;

  padding: 9px 21px 9px 18px;

  color: #ffffff;
  background: var(--header-navy);
  border: 1px solid var(--header-navy);

  text-decoration: none;

  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}


/* 右側オレンジライン */

.recruit-header__careers a::before {
  content: "";

  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;

  width: 4px;

  background: var(--header-orange);
}


.recruit-header__careers-en {
  grid-column: 1;
  grid-row: 1;

  color: rgba(255, 255, 255, 0.68);

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  font-size: 8px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.16em;
}


.recruit-header__careers-ja {
  grid-column: 1;
  grid-row: 2;

  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
}


.recruit-header__careers-arrow {
  grid-column: 2;
  grid-row: 1 / 3;

  position: relative;

  width: 18px;
  height: 7px;

  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;

  transform: skewX(45deg);

  transition: transform 0.25s ease;
}


.recruit-header__careers a:hover,
.recruit-header__careers a:focus-visible {
  color: var(--header-navy);
  background: #ffffff;

  box-shadow: 0 7px 20px rgba(23, 59, 108, 0.17);

  transform: translateY(-2px);
}


.recruit-header__careers a:hover .recruit-header__careers-en,
.recruit-header__careers a:focus-visible .recruit-header__careers-en {
  color: var(--header-orange);
}


.recruit-header__careers a:hover .recruit-header__careers-arrow,
.recruit-header__careers a:focus-visible .recruit-header__careers-arrow {
  transform:
    translateX(3px)
    skewX(45deg);
}


/* ========================================
   スマホメニューボタン
======================================== */

.recruit-header__toggle {
  display: none;

  width: 44px;
  height: 44px;

  margin: 0;
  padding: 11px 10px;

  color: var(--header-navy);
  background: transparent;
  border: 1px solid var(--header-border);
  border-radius: 0;

  -webkit-appearance: none;
  appearance: none;

  cursor: pointer;
}


.recruit-header__toggle span {
  display: block;

  width: 100%;
  height: 1px;

  margin: 5px 0;

  background: currentColor;

  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}


/* ========================================
   スマホメニュー背景
======================================== */

.recruit-header__overlay {
  position: fixed;
  top: 68px;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;

  display: none;

  width: 100%;
  height: auto;

  margin: 0;
  padding: 0;

  background: rgba(10, 29, 52, 0.48);
  border: 0;
  border-radius: 0;

  -webkit-appearance: none;
  appearance: none;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  cursor: pointer;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}


/* ========================================
   フォーカス
======================================== */

.recruit-header a:focus-visible,
.recruit-header button:focus-visible {
  outline: 2px solid var(--header-orange);
  outline-offset: 3px;
}


/* ========================================
   タブレット
======================================== */

@media (max-width: 1100px) {

  .recruit-header__inner {
    gap: 24px;
    padding-right: 20px;
    padding-left: 20px;
  }


  .recruit-header__right {
    gap: 22px;
  }


  .recruit-menu {
    gap: 22px;
  }


  .recruit-header__logo img {
    max-width: 155px;
  }


  .recruit-header__brand {
    gap: 12px;
  }


  .recruit-header__site-name {
    font-size: 9px;
  }


  .recruit-menu__ja {
    font-size: 13px;
  }


  .recruit-header__careers a {
    width: 132px;
  }

}


/* ========================================
   スマートフォン・Fold
======================================== */

@media (max-width: 900px) {

  body.recruit-menu-open {
    overflow: hidden;
    touch-action: none;
  }


  .recruit-header::after {
    height: 4px;

    background-image:
      linear-gradient(
        to bottom,
        transparent 0,
        transparent 2px,
        rgba(23, 59, 108, 0.22) 2px,
        rgba(23, 59, 108, 0.22) 3px,
        transparent 3px
      );
  }


  .recruit-header__inner {
    gap: 12px;

    min-height: 68px;

    padding: 9px 16px 12px;
  }


  .recruit-header__brand {
    gap: 10px;
  }


  .recruit-header__logo img {
    max-width: 140px;
    max-height: 38px;
  }


  .recruit-header__brand-line {
    height: 28px;
  }


  .recruit-header__site-name {
    font-size: 8px;
    letter-spacing: 0.12em;
  }


  .recruit-header__right {
    gap: 10px;
  }


  /* ========================================
     スマホナビゲーション
  ======================================== */

  .recruit-header__nav {
    position: fixed;
    top: 68px;
    right: 0;
    bottom: 0;
    z-index: 4;

    display: block;
    overflow-x: hidden;
    overflow-y: auto;

    width: min(88vw, 420px);
    max-width: 100vw;

    height: calc(100vh - 68px);
    height: calc(100dvh - 68px);

    padding: 28px 24px 50px;

    background: #ffffff;
    border-left: 1px solid var(--header-border);

    /*
      閉じた状態では影を出さない。
      Fold系で画面外に影だけ残る症状を防止。
    */
    box-shadow: none;

    /*
      画面外へ移動させるだけではなく、
      visibility / pointer-events も合わせて無効化。
    */
    transform: translate3d(100%, 0, 0);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
      transform 0.32s ease,
      opacity 0.18s ease,
      visibility 0.32s ease;

    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;

    will-change: transform;
  }


  .recruit-menu {
    display: block;

    width: 100%;
  }


  .recruit-menu__item {
    padding: 0 0 26px;
    margin: 0 0 26px;

    border-bottom: 1px solid var(--header-border);
  }


  .recruit-menu__parent {
    width: 100%;

    padding: 0 28px 13px 0;
  }


  .recruit-menu__en {
    font-size: 10px;
  }


  .recruit-menu__ja {
    font-size: 18px;
  }


  .recruit-menu__parent::before {
    right: auto;
    bottom: 4px;

    width: 44px;

    transform: scaleX(1);
  }


  .recruit-menu__parent::after {
    top: 50%;
    right: 4px;

    width: 9px;
    height: 9px;

    margin-top: -6px;

    transform: rotate(-45deg);
  }


  .has-dropdown:hover > .recruit-menu__parent::after,
  .has-dropdown:focus-within > .recruit-menu__parent::after {
    transform: rotate(-45deg);
  }


  /* ========================================
     スマホドロップダウン
  ======================================== */

  .dropdown {
    position: static;

    min-width: 0;

    margin: 14px 0 0;
    padding: 2px 0 0 16px;

    background: transparent;
    border: 0;
    border-left: 1px solid var(--header-border);
    border-radius: 0;
    box-shadow: none;

    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: none;

    transition: none;
  }


  .dropdown::before,
  .dropdown::after {
    display: none;
  }


  .has-dropdown:hover > .dropdown,
  .has-dropdown:focus-within > .dropdown {
    transform: none;
  }


  .dropdown li a {
    min-height: 44px;

    padding: 9px 34px 9px 42px;

    font-size: 14px;
    white-space: normal;
  }


  .dropdown li::before {
    left: 12px;
  }


  .dropdown li a::after {
    right: 8px;
  }


  .dropdown li a:hover,
  .dropdown li a:focus-visible {
    padding-left: 46px;
  }


  /* ========================================
     スマホ求人情報ボタン
  ======================================== */

  .recruit-header__careers a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;

    width: 112px;
    min-height: 42px;

    padding: 8px 15px;

    text-align: center;
  }


  .recruit-header__careers-en {
    display: none;
  }


  .recruit-header__careers-ja {
    font-size: 13px;
    letter-spacing: 0.05em;

    white-space: nowrap;
  }


  .recruit-header__careers-arrow {
    width: 14px;
    height: 5px;
  }


  /* ========================================
     スマホメニューボタン
  ======================================== */

  .recruit-header__toggle {
    position: relative;
    z-index: 5;

    display: block;
    flex: 0 0 auto;
  }


  .recruit-header__overlay {
    display: block;
  }


  /* ========================================
     メニュー表示時
  ======================================== */

  .recruit-header.is-menu-open .recruit-header__nav {
    transform: translate3d(0, 0, 0);

    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    box-shadow:
      -18px 0 45px rgba(16, 45, 80, 0.14);
  }


  .recruit-header.is-menu-open .recruit-header__overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }


  .recruit-header.is-menu-open
  .recruit-header__toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }


  .recruit-header.is-menu-open
  .recruit-header__toggle span:nth-child(2) {
    opacity: 0;
  }


  .recruit-header.is-menu-open
  .recruit-header__toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

}


/* ========================================
   Fold・小型タブレット
======================================== */

@media (max-width: 700px) {

  .recruit-header__brand-line,
  .recruit-header__site-name {
    display: none;
  }


  .recruit-header__brand {
    flex: 1 1 auto;
    min-width: 0;
  }


  .recruit-header__logo {
    max-width: 100%;
  }


  .recruit-header__right {
    flex: 0 0 auto;
  }

}


/* ========================================
   WordPress管理バー
   スマートフォン
======================================== */

@media screen and (max-width: 782px) {

  .admin-bar .recruit-header {
    top: 46px;
  }


  .admin-bar .recruit-header__nav,
  .admin-bar .recruit-header__overlay {
    top: 114px;
  }


  .admin-bar .recruit-header__nav {
    height: calc(100vh - 114px);
    height: calc(100dvh - 114px);
  }

}


/* ========================================
   小さいスマートフォン
======================================== */

@media (max-width: 480px) {

  .recruit-header__inner {
    gap: 8px;

    padding-right: 10px;
    padding-left: 10px;
  }


  .recruit-header__logo img {
    max-width: 120px;
    max-height: 36px;
  }


  .recruit-header__careers a {
    width: 100px;

    padding-right: 12px;
    padding-left: 12px;
  }


  .recruit-header__careers-ja {
    font-size: 12px;
  }


  .recruit-header__toggle {
    width: 42px;
    height: 42px;
  }


  .recruit-header__nav {
    width: min(92vw, 420px);

    padding-right: 20px;
    padding-left: 20px;
  }

}


/* ========================================
   かなり狭い端末
======================================== */

@media (max-width: 370px) {

  .recruit-header__logo img {
    max-width: 108px;
  }


  .recruit-header__careers a {
    width: 90px;

    padding-right: 9px;
    padding-left: 9px;
  }


  .recruit-header__careers-ja {
    font-size: 11px;
  }


  .recruit-header__careers-arrow {
    width: 12px;
  }


  .recruit-header__toggle {
    width: 40px;
    height: 40px;

    padding-right: 9px;
    padding-left: 9px;
  }

}


/* ========================================
   動きを抑える設定
======================================== */

@media (prefers-reduced-motion: reduce) {

  .recruit-header *,
  .recruit-header *::before,
  .recruit-header *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

}
