@charset "UTF-8";

/* ============================================================
   header-new.css
   ============================================================ */

/* ============================================================
   l-header（ヘッダー全体）
   ============================================================ */
.l-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: 15.7rem; /* l-header__top:9.5rem + l-header__bottom:6.2rem */
}

/* メインコンテンツ: 新ヘッダー高さ分のオフセット */
.l-main {
  padding-top: 15.7rem;
}

/* ============================================================
   製品ページ（HR DX Suite / RocoTime）: header 追従解除
   body.is-product-page は header-new.php の is_page() で付与
   ============================================================ */
body.is-product-page .l-header {
  position: relative;
  top: auto;
}

body.is-product-page .l-main {
  padding-top: 0;
}


/* ============================================================
   l-header__top
   ============================================================ */
.l-header__top {
  height: 9.5rem;
  padding: 0 5rem;
  background-color: #eeeeee;
  display: flex;
  align-items: center;
  position: relative;
}

.l-header__top::before {
  display: none;
}

/* p-header__logo-group */
.p-header__logo-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0;
}

/* p-site-logo */
.p-site-logo {
  padding: 0;
  flex-shrink: 0;
}

.p-site-logo img {
  width: 30rem;
  min-width: auto;
  height: auto;
  display: block;
}

/* p-header__catch */
.p-header__catch {
  font-size: 1.6rem;
  font-weight: 500;
  color: #333333;
  padding: 0 0 0 1.5rem;
  margin-right: 2rem;
  white-space: nowrap;
}

/* p-header-contact */
.p-header-contact {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
  margin-bottom: 0;
  position: static;
  right: auto;
  top: auto;
  flex-wrap: nowrap;
}

.l-header .p-header-contact__item--inquiry,
.l-header .p-header-contact__item--download {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  overflow: visible;
}

/* お問い合わせボタン */
.p-header-contact__link--inquiry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-width: 17.7rem;
  padding: 1.3rem 1.8rem;
  background-color: #f96718;
  border-radius: 2.9rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  box-shadow: 0 5px 0px rgba(0, 0, 0, 0.16);
  transition: background-color 0.3s, border-color 0.3s;
}

.p-header-contact__link--inquiry::before {
  content: "";
  background-image: url("../img/hrdx-suite/mail-icon.svg");
  background-repeat: no-repeat;
  background-size: contain;
  height: 19px;
  width: 25px;
}

/* 資料ダウンロードボタン */
.p-header-contact__link--download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-width: 22rem;
  padding: 1.3rem 1.8rem;
  background-color: #13467E;
  border-radius: 2.9rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  box-shadow: 0 5px 0px rgba(0, 0, 0, 0.16);
  transition: background-color 0.3s, border-color 0.3s;
}

.p-header-contact__link--download::before {
  content: "";
  background-image: url("../img/hrdx-suite/file-icon.svg");
  background-repeat: no-repeat;
  background-size: contain;
  height: 24px;
  width: 20px;
}

@media (any-hover: hover) {
  .p-header-contact__link--inquiry:hover {
    background-color: #fc7e00;
  }
  .p-header-contact__link--download:hover {
    background-color: #005EC5;
  }
}

/* ハンバーガーボタン（PC非表示） */
.p-header__toggle {
  display: none;
}

/* メニュー開時のスクロール固定 */
html.open {
  overflow: hidden;
}

/* ============================================================
   p-drawer（モバイルドロワーメニュー）
   ============================================================ */
.p-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  transform: translateX(100%);
  transition: ease-out 0.3s;
  z-index: 50;
  pointer-events: none;
}

.p-drawer.open {
  transform: translateX(0);
}

.p-drawer__close,
.p-drawer__list {
  pointer-events: auto;
}

.p-drawer__close {
  padding: 16px 0;
  position: fixed;
  right: 2.8rem;
  top: 2rem;
  width: auto;
  z-index: 5;
}

.p-drawer__inner {
  height: 100%;
  position: relative;
  right: 0;
  top: 7rem;
  width: 100%;
  z-index: 5;
}

.p-drawer__list {
  background-color: #008785;
  height: auto;
  overflow-y: auto;
  padding: 0 1.7rem 8rem 1.7rem;
}

.p-drawer__item-title {
  background-color: #008785;
  cursor: pointer;
  padding: 1rem 1.5rem;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 500;
  border-top: solid 1px #5bb2b1;
  border-bottom: solid 1px #5bb2b1;
}

.l-header__top .p-drawer__item-title {
  display: block;
}

/* 1番目・2番目アイテムを全幅に（リストのpadding 1.7rem分を打ち消す） */
.p-drawer__item:nth-child(1),
.p-drawer__item:nth-child(2) {
  margin-left: -1.7rem;
  margin-right: -1.7rem;
}
.p-drawer__item:nth-child(1) .p-drawer__item-title,
.p-drawer__item:nth-child(2) .p-drawer__item-title {
  padding-left: calc(1.5rem + 1.7rem);
  padding-right: calc(1.5rem + 1.7rem);
}

/* 矢印アイコンを元の位置に復元（li全幅拡張分を補正） */
.p-drawer__item:nth-child(1) .p-drawer__item-title.plus-icon::after,
.p-drawer__item:nth-child(2) .p-drawer__item-title.plus-icon::after {
  right: calc(1rem + 1.7rem);
}

/* サブリストを下のメニューと同じ幅感に（左右1.7remインセット） */
.p-drawer__item:nth-child(1) .p-drawer__item-list--sub,
.p-drawer__item:nth-child(2) .p-drawer__item-list--sub {
  padding-left: 1.7rem;
  padding-right: 1.7rem;
}

/* 奉行クラウドHR DX Suite（1番目） */
.p-drawer__item:nth-child(1) {
  background-color: #0074be;
}
.p-drawer__item:nth-child(1) .p-drawer__item-title {
  background-color: #0074be;
  border-top-color: #3399d6;
  border-bottom-color: #3399d6;
}
.p-drawer__item:nth-child(1) .p-drawer__item-list a {
  background-color: #0074be;
  border-bottom-color: #3399d6;
}
.p-drawer__item:nth-child(1) .p-drawer__item-list--sub li:last-child a {
  border-bottom-color: #3399d6;
}

/* 勤怠管理RocoTime（2番目） */
.p-drawer__item:nth-child(2) {
  background-color: #13467e;
}
.p-drawer__item:nth-child(2) .p-drawer__item-title {
  background-color: #13467e;
  border-top-color: #2d6099;
  border-bottom-color: #2d6099;
}
.p-drawer__item:nth-child(2) .p-drawer__item-list a {
  background-color: #13467e;
  border-bottom-color: #2d6099;
}
.p-drawer__item:nth-child(2) .p-drawer__item-list--sub li:last-child a {
  border-bottom-color: #2d6099;
}

.p-drawer__item-list {
  display: none;
}

.p-drawer__item-list li {
  border: none;
}

.p-drawer__item-list--sub a {
  border-bottom: 0;
  font-size: 1.4rem;
}

.p-drawer__item-list--sub li:last-child a {
  border-bottom: solid 1px #5bb2b1;
  font-size: 1.4rem;
}

.p-drawer__item-list a {
  background-color: #008785;
  border-bottom: solid 1px #5bb2b1;
  color: #fff;
  display: block;
  font-size: 1.6rem;
  font-weight: 500;
  padding: 1rem 1.5rem;
  position: relative;
}

.p-drawer__item-list a:hover {
  opacity: 0.6;
}

.p-drawer__item-list.accordion-body.stay {
  display: block;
}

.p-drawer__bg {
  display: none;
}

/* ============================================================
   l-header__bottom（PCグローバルナビ）
   ============================================================ */
.l-header__bottom {
  display: block;
  height: 6.2rem;
  padding: 0 5.0rem;
  position: relative;
  top: auto;
  left: auto;
  background-color: #008785;
  z-index: auto;
}

.l-header__bottom::before {
  display: none;
}

.p-gnav__list {
  display: flex;
  align-items: stretch;
  height: 6.2rem;
  gap: 0;
  list-style: none;
  padding: 0;
  position: static;
}

.p-gnav__item {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.p-gnav__item + .p-gnav__item {
  padding-left: 0;
}

.p-gnav__item + .p-gnav__item::before {
  display: none;
}

/* 1項目め：奉行クラウドHR DX Suite */
.p-gnav__item:nth-child(1) {
  background-color: #0074be;
  min-width: 14.6rem;
}

/* 2項目め：勤怠管理 RocoTime */
.p-gnav__item:nth-child(2) {
  background-color: #13467e;
  min-width: 14.6rem;
}

/* 3項目め以降 */
.p-gnav__item:nth-child(n+3) {
  padding: 0 2.4rem;
}

/* ナビリンク共通 */
.p-gnav__item > a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 6.2rem;
  padding: 0;
  font-size: 1.8rem;
  font-weight: 500;
  color: #ffffff;
  text-align: center;
  line-height: 1.4;
  white-space: nowrap;
}

/* 最初の2項目はBold */
.p-gnav__item:nth-child(1) > a,
.p-gnav__item:nth-child(2) > a {
  font-size: 1.6rem;
  font-weight: 700;
}

/* ホバー下線アニメーション */
.p-gnav__item > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #ffffff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

@media (any-hover: hover) {
  .p-gnav__item > a:hover::after {
    transform: scaleX(1);
  }
}

/* 全幅ドロップダウン（l-header__bottom 直下） */
.p-gnav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  display: none;
  z-index: 9999;
}

/* ホバーで表示：CSS :has() を使用 */
/* TODO: 奉行クラウド下層ページ公開後に以下2行のコメントを解除
.l-header__bottom:has(.p-gnav__item[data-nav="hrdx"]:hover) .p-gnav-dropdown--hrdx,
.l-header__bottom:has(.p-gnav-dropdown--hrdx:hover) .p-gnav-dropdown--hrdx, */
.l-header__bottom:has(.p-gnav__item[data-nav="service"]:hover) .p-gnav-dropdown--service,
.l-header__bottom:has(.p-gnav-dropdown--service:hover) .p-gnav-dropdown--service {
  display: block;
}

/* HR DX Suiteページでは自社ドロップダウンを非表示 */
body.is-hrdx-page .l-header__bottom:has(.p-gnav__item[data-nav="hrdx"]:hover) .p-gnav-dropdown--hrdx {
  display: none;
}

/* RocoTimeページでは自社ドロップダウンを非表示 */
body.is-service-page .l-header__bottom:has(.p-gnav__item[data-nav="service"]:hover) .p-gnav-dropdown--service {
  display: none;
}

/* 奉行ページ: グロナビの奉行クラウドリンクはクリック無効 */
body.is-hrdx-page .p-gnav__item[data-nav="hrdx"] > a {
  pointer-events: none;
  cursor: default;
}

/* p-hrdx-localnavをドロップダウン内で使う際のsticky・top無効化 */
.p-gnav-dropdown.p-hrdx-localnav {
  position: absolute;
  top: 100%;
}

/* ============================================================
   レスポンシブ タブレット（1280px以下）
   ============================================================ */
@media (max-width: 1280px) {
  .l-header__top {
    padding: 0 3rem;
  }

  .p-header-contact__link--inquiry,
  .p-header-contact__link--download {
    font-size: 1.6rem;
    min-width: auto;
    padding: 1.2rem 2rem;
  }

  .p-gnav__item:nth-child(n+3) {
    padding: 0 1.6rem;
  }

  .p-gnav__item > a {
    font-size: 1.5rem;
  }
}

/* ============================================================
   レスポンシブ タブレット（1200px以下）
   ============================================================ */
@media (max-width: 1200px) {
  .l-header {
    height: 9rem;
  }

  .l-main {
    padding-top: calc(9rem + 6.2rem); /* ヘッダートップ + グロナビ分 */
  }

  /* 製品ページ: l-headerをautoにしてグロナビ（l-header__bottom）を内包 */
  body.is-product-page .l-header {
    height: auto;
  }

  .p-drawer__inner {
    top: 9rem;
  }

  .p-drawer__list {
    height: calc(100dvh - 9rem - 4rem);
    max-height: none;
  }

  .l-header__top {
    height: 9rem;
    padding: 0 2rem;
    justify-content: space-between;
  }

  .p-header__logo-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .p-header__catch {
    display: block;
    font-size: 1.1rem;
    padding: 0.2rem 0 0 0;
    margin: 0;
    white-space: nowrap;
  }

  .p-site-logo img {
    width: 22rem;
  }

  /* グロナビを1024〜1200px幅に収める */
  .l-header__bottom {
    padding: 0 2rem;
  }
  .p-gnav__item:nth-child(1),
  .p-gnav__item:nth-child(2) {
    min-width: 12rem;
  }
  .p-gnav__item:nth-child(n+3) {
    padding: 0 1.0rem;
  }
  .p-gnav__item > a {
    font-size: 1.3rem;
  }
  .p-gnav__item:nth-child(1) > a,
  .p-gnav__item:nth-child(2) > a {
    font-size: 1.4rem;
  }


}

/* ============================================================
   レスポンシブ タブレット（1023px以下）：ハンバーガー切り替え
   ============================================================ */
@media (max-width: 1023px) {
  /* グロナビ非表示なのでl-mainオフセットをヘッダートップ分のみに戻す */
  .l-main {
    padding-top: 9rem;
  }

  /* 製品ページ: ハンバーガーモードでheader追従ON（ローカルナビ非表示のため） */
  body.is-product-page .l-header {
    position: fixed;
    top: 0;
    height: 9rem;
  }
  body.is-product-page .l-main {
    padding-top: 9rem;
  }

  /* l-header__bottomを非表示（ドロワーに移動） */
  .l-header__bottom {
    display: none;
  }

  /* ハンバーガーボタン表示 */
  .p-header__toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 4.8rem;
    height: 14px;
    padding: 0;
    margin-left: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 200;
  }

  .p-header__toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #008785;
    border-radius: 10px;
    transition: all 0.3s;
    transform-origin: center;
  }

  .p-header__toggle.open span:nth-of-type(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .p-header__toggle.open span:nth-of-type(2) {
    opacity: 0;
  }

  .p-header__toggle.open span:nth-of-type(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
}

/* ============================================================
   レスポンシブ SP（768px以下）
   ============================================================ */
@media (max-width: 768px) {
  .l-header {
    height: 7rem;
  }

  .l-main {
    padding-top: 7rem;
  }

  body.is-product-page .l-main {
    padding-top: 7rem;
  }

  .l-header__top {
    height: 7rem;
  }

  .p-site-logo img {
    width: 18rem;
  }

  .p-header-contact__link--inquiry {
    font-size: 1.4rem;
    height: 4rem;
    min-width: auto;
    padding: 0 1.6rem;
  }

  .p-header-contact__link--inquiry::before {
    display: none;
  }

  .p-drawer__inner {
    top: 7rem;
  }

  .p-drawer__list {
    height: calc(100dvh - 7rem);
    max-height: none;
  }

  /* SPでは資料ダウンロードを非表示 */
  .p-header-contact {
    display: none;
  }
}

/* ============================================================
   p-hrdx-localnav（全HRDX下層ページ共通）
   header-new.cssに置くことで header-new.php を使う全ページに適用
   ============================================================ */
.p-hrdx-localnav {
  background-color: #0074be;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* RocoTime用カラー上書き */
.p-hrdx-localnav--service {
  background-color: #13467e;
}

.p-hrdx-localnav__list {
  display: flex;
  align-items: center;
  height: 5.4rem;
  padding-inline: 4.1rem;
  list-style: none;
}

.p-hrdx-localnav__item {
  display: flex;
  align-items: center;
}

/* セパレーター ｜ */
.p-hrdx-localnav__item:first-child::before {
  content: "｜";
  color: #ffffff;
  font-size: 1.4rem;
}

.p-hrdx-localnav__item::after {
  content: "｜";
  color: #ffffff;
  font-size: 1.4rem;
}

.p-hrdx-localnav__item a {
  position: relative;
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 500;
  padding: 0 1rem;
  line-height: 5.4rem;
  display: block;
}

/* ホバー下線：青帯のボトムに表示 */
.p-hrdx-localnav__item a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #ffffff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

/* カレントページ下線：文字の下に表示 */
/* .p-hrdx-localnav__item a[aria-current="page"] {
  font-weight: 700;
} */

.p-hrdx-localnav__item a[aria-current="page"] {
  pointer-events: none;
  cursor: default;
}

.p-hrdx-localnav__item a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0.8rem;
  left: 2rem;
  right: 2rem;
  height: 1.5px;
  background-color: #ffffff;
  border-radius: 1.5px;
}

@media (any-hover: hover) {
  .p-hrdx-localnav__item a:hover::before {
    transform: scaleX(1);
  }
}

@media (max-width: 1023px) {
  .p-hrdx-localnav {
    display: none;
  }
}

/* ============================================================
   #pagetop（トップへ戻るボタン）
   ============================================================ */
.js-pagetop {
  position: fixed;
  right: 50px;
  bottom: 15px;
  width: 55px;
  height: 55px;
  background-color: #fff;
  border: 2px solid #F96718;
  border-radius: 50%;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #F96718;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.js-pagetop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (any-hover: hover) {
  .js-pagetop:hover {
    opacity: 0.75;
  }
}

.footer__copyright {
  padding: 0 0 4rem;
}
