/* ============================================================
   header component (共通ヘッダー専用の切り出しCSS)

   元の header.css(Newsページ用の1ページ分まるごとの
   スタイル)から、実際にヘッダーの表示に使われている部分だけを
   抜き出したものです。html/body/a/li など、他ページの
   スタイルと衝突するグローバルなリセット指定は含んでいません。

   rem単位は元々「html { font-size: 62.5% }」を前提に
   1rem = 10px として書かれていたため、ページ全体のフォント
   サイズに影響を与えないよう、すべて px に変換しています。
   ============================================================ */

@media (max-width: 767px) {
  .cw {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (min-width: 768px) {
  .cw {
    padding-left: 50px;
    padding-right: 50px;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .cw {
    padding-left: 15px;
    padding-right: 15px;
  }
}

.navArea {
  position: fixed;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  top: 0;
  left: 0;
  z-index: 70;
}
.navArea a {
  color: #323232;
  font-size: 14px;
}

.navArea {
  height: 60px;
  transition: all ease 0.3s;
  background: #fff;
  box-shadow: 0px 5px 8px 0px rgba(10, 10, 10, 0.1);
}
.navArea .spNavBtn {
  display: none;
}
.navArea .spContact {
  display: none;
}
.navArea.hide {
  -moz-transform: translate(0, -100px);
  -o-transform: translate(0, -100px);
  -ms-transform: translate(0, -100px);
  -webkit-transform: translate(0, -100px);
  transform: translate(0, -100px);
}
.navArea .inner {
  max-width: 1820px;
  text-align: right;
  height: 100%;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  align-items: center;
}
.navArea .inner h1 {
  margin-right: auto;
  flex-shrink: 0;
}
/* ロゴリンク全体をflexで縦中央揃え */
.navArea .inner h1 .navLogo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.navArea .inner h1 svg,
.navArea .inner h1 img {
  width: 85px;
  margin-top: 0px;
  vertical-align: middle;
}
.navArea .inner h1 .siteTitle {
  color: #005CD9;
  margin-left: 10px;
  font-size: 20px;
  font-weight: 400;
  color: #003C8D;
  white-space: nowrap;
}
.navArea .navList {
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  height: 100%;
}
.navArea .navList > li {
  height: 100%;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  position: relative;
  align-items: center;
}
.navArea .navList > li > a {
  height: 100%;
  padding-left: 25px;
  padding-right: 25px;
  position: relative;
  transition: all ease 0.3s;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  align-items: center;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
@keyframes headerNavLine {
  0% {
    width: 0;
  }
  100% {
    width: calc(100% - 40px);
  }
}
.navArea .navList > li > a::before, .navArea .navList > li > a::after {
  content: "";
  display: block;
  height: 1px;
  width: 0;
  position: absolute;
  bottom: 15px;
  left: 20px;
  background: #EB3155;
}
.navArea .navList > li > a::before {
  background: #EB3155;
}
.navArea .navList > li > a:after {
  background: #005CD9;
  transition: all ease 0.2s;
}
.navArea .navList > li > a:hover::after {
  animation: headerNavLine 0.2s ease forwards normal;
}
.navArea .navList > li > a.current::before {
  width: calc(100% - 40px);
}
/* lang以外のcurrentの下線を非表示 */
.navArea .navList > li:not(.lang) > a.current::before {
  display: none;
}
.navArea .navList > li:last-child {
  margin-right: 0;
}
.navArea .navList > li.lang {
  padding-left: 15px;
}
.navArea .navList > li.lang a {
  padding-left: 5px;
  padding-right: 5px;
}
.navArea .navList > li.lang a::before, .navArea .navList > li.lang a::after {
  width: 0;
  left: 0;
}
@keyframes langNavLine {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}
.navArea .navList > li.lang a:hover::after {
  animation: langNavLine 0.2s ease forwards normal;
}
.navArea .navList > li.lang a.current::before {
  width: 100%;
}
.navArea .navList > li.lang::after {
  content: "";
  display: block;
  height: 60%;
  width: 1px;
  position: absolute;
  top: 20%;
  left: 0;
  background: #A5A5A5;
}
.navArea .navList > li.contact {
  padding: 0;
  margin-left: 20px;
}
.navArea .navList > li.contact a {
  display: flex;
  width: 200px;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: all ease 0.3s;
  background: #EB3155;
}
.navArea .navList > li.contact a {
  background: #EB3155;
  border: none;
  color: #fff;
  z-index: 11;
  font-size: 20px;
}
.navArea .navList > li.contact a::after {
  height: 100%;
  width: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
}
@media (min-width: 768px) {
  .navArea .navList > li.contact a:hover::after {
    width: 100%;
    animation: none;
  }
}
@media screen and (min-width: 1024px) and (max-width: 1300px) {
  .navArea .inner {
    padding-right: 0;
  }
  .navArea .inner h1 svg,
  .navArea .inner h1 img {
    width: 80px;
    margin-top: -5px;
  }
  .navArea .inner h1 .siteTitle {
    font-size: 18px;
  }
  .navArea .navList > li > a {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 12px;
  }
  .navArea .navList > li > a::before, .navArea .navList > li > a::after {
    left: 17.5px;
  }
  .navArea .navList > li.contact {
    padding: 0;
    margin-left: 20px;
  }
  .navArea .navList > li.contact a {
    display: flex;
    width: 150px;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all ease 0.3s;
    background: #EB3155;
  }
  .navArea .navList > li.contact a {
    background: #EB3155;
    border: none;
    color: #fff;
    z-index: 11;
    font-size: 18px;
  }
  .navArea .navList > li.contact a::after {
    height: 100%;
    width: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
  }
}
@media (max-width: 1023px) {
  .navArea {
    height: 48px;
    transition: all ease 0.3s;
    background: #fff;
    box-shadow: 0px 5px 8px 0px rgba(10, 10, 10, 0.1);
  }
  .navArea .inner {
    max-width: 1820px;
    text-align: right;
    height: 100%;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    align-items: center;
  }
  .navArea .inner h1 {
    margin-right: auto;
  }
  .navArea .inner h1 svg,
  .navArea .inner h1 img {
    width: 72px;
    margin-top: -3px;
  }
  .navArea .inner h1 .siteTitle {
    margin-left: 5px;
    font-size: 16px;
  }
  .navArea .spContact {
    background: #EB3155;
    border: none;
    color: #fff;
    z-index: 11;
    position: absolute;
    height: 100%;
    width: 109px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    right: 50px;
    font-size: 16px;
    letter-spacing: 0.02em;
  }
  .navArea .spContact::after {
    height: 100%;
    width: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
  }
  .navArea .spNavBtn {
    position: absolute;
    right: 3px;
    top: 3px;
    width: 45px;
    height: 45px;
    display: block;
    z-index: 51;
  }
  .navArea .spNavBtn span {
    position: absolute;
    display: inline-block;
    right: 12px;
    transition: all ease 0.5s;
    height: 2px;
    width: 20px;
    background: #000;
  }
  .navArea .spNavBtn span:nth-child(1) {
    top: 15px;
  }
  .navArea .spNavBtn span:nth-child(2) {
    top: 21px;
  }
  .navArea .spNavBtn span:nth-child(3) {
    top: 27px;
  }
  .navArea .spNavBtn.active span {
    background: #000;
  }
  .navArea .spNavBtn.active span:nth-child(1) {
    width: 20px;
    top: 22px;
    -moz-transform: rotate(-405deg);
    -o-transform: rotate(-405deg);
    -ms-transform: rotate(-405deg);
    -webkit-transform: rotate(-405deg);
    transform: rotate(-405deg);
  }
  .navArea .spNavBtn.active span:nth-child(2) {
    display: none;
    -moz-transform: translate(100px, 0);
    -o-transform: translate(100px, 0);
    -ms-transform: translate(100px, 0);
    -webkit-transform: translate(100px, 0);
    transform: translate(100px, 0);
  }
  .navArea .spNavBtn.active span:nth-child(3) {
    width: 20px;
    top: 22px;
    -moz-transform: rotate(405deg);
    -o-transform: rotate(405deg);
    -ms-transform: rotate(405deg);
    -webkit-transform: rotate(405deg);
    transform: rotate(405deg);
  }
  .navArea .navList {
    height: 0;
    width: 100%;
    overflow: hidden;
    position: fixed;
    top: 48px;
    left: 0;
    transition: all ease 0.5s;
    background: #fff;
    display: block;
  }
  .navArea .navList > li {
    position: relative;
    align-items: center;
    justify-content: flex-end;
    height: auto;
    opacity: 0;
    transition: all ease 0.2s;
  }
  .navArea .navList > li:first-child {
    margin-top: 20px;
  }
  .navArea .navList > li.visible {
    opacity: 1;
  }
  .navArea .navList > li > a {
    padding-left: 20px;
    padding-right: 20px;
    position: relative;
    padding-top: 15px;
    padding-bottom: 15px;
    transition: all ease 0.3s;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 14px;
    font-weight: 500;
    color: #323232;
  }
  @keyframes navLine {
    0% {
      width: 0;
    }
    100% {
      width: calc(100% - 40px);
    }
  }
  .navArea .navList > li > a::before, .navArea .navList > li > a::after {
    content: "";
    display: block;
    height: 1px;
    width: 0;
    position: absolute;
    bottom: 15px;
    left: 20px;
    background: #EB3155;
  }
  .navArea .navList > li > a::before {
    background: #EB3155;
  }
  .navArea .navList > li > a:after {
    background: #005CD9;
    transition: all ease 0.2s;
  }
  .navArea .navList > li > a.current::before {
    width: calc(100% - 40px);
  }
  .navArea .navList > li.lang {
    padding-left: 20px;
    padding-right: 20px;
  }
  .navArea .navList > li.lang::before {
    content: "";
    display: block;
    height: 1px;
    width: calc(100% - 40px);
    position: absolute;
    bottom: auto;
    top: 0;
    left: 20px;
    background: #A5A5A5;
  }
  .navArea .navList > li:last-child {
    margin-right: 0;
  }
  .navArea .navList > li.contact {
    display: none;
  }
  .navArea.active .inner .navList {
    height: 100%;
  }
}


/* ============================================================
   mega menu(ヘッダー内メガメニューの見た目)
   ============================================================ */

/* ============================================================
   Mega menu (common header)
   ============================================================ */

.navList li.hasMega {
  position: relative;
}

.navMegaTrigger {
  height: 100%;
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0 25px;
  margin: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  position: relative;
}

/* 既存のホバー下線アニメーションと同じ位置・挙動に揃える */
.navList li.hasMega > .navMegaTrigger::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: 15px;
  width: 0;
  height: 1px;
  background: #005CD9;
  transition: all ease 0.2s;
}
.navList li.hasMega > .navMegaTrigger:hover::after,
.navList li.hasMega.isOpen > .navMegaTrigger::after {
  width: calc(100% - 40px);
}
.navList li.hasMega.isOpen > .navMegaTrigger {
  color: #EB3155;
}

.megaMenu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #eee;
  box-shadow: 0px 8px 12px 0px rgba(10, 10, 10, 0.08);
  z-index: 60;
  text-align: left;
}
@media (max-width: 767px) {
  .megaMenu {
    top: 48px;
    position: absolute;
  }
}
.navList li.hasMega.isOpen > .megaMenu {
  display: block;
}

.megaMenu__inner {
  display: flex;
  align-items: flex-start;
  padding-top: 30px;
  padding-bottom: 30px;
  gap: 40px;
  justify-content: center;
}

.megaMenu__label {
  flex: 0 0 auto;
}
.megaMenu__title {
  font-size: 16px;
  font-weight: bold;
  color: #EB3155;
  display: inline-block;
  padding-bottom: 4px;
  margin: 0 0 8px;
  letter-spacing: 0.05em;
}
.megaMenu__sub {
  font-size: 13px;
  color: #323232;
  margin: 0;
  letter-spacing: 0.05em;
}

.megaMenu__cols {
  display: flex;
  gap: 60px;
  flex: 0 0 auto;
  align-items: flex-start;
}

.megaMenu__col {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid #696969;
  padding-left: 20px;
  height: 80px;
}
.megaMenu__col li {
  margin-bottom: 14px;
}
.megaMenu__col li:last-child {
  margin-bottom: 0;
}
.megaMenu__col a {
  font-size: 14px;
  color: #323232;
  text-decoration: none;
  transition: color 0.2s ease;
  letter-spacing: 0.05em;
}
.megaMenu__col a:hover {
  color: #005CD9;
}
.megaMenu__col .isDisabled {
  font-size: 15px;
  color: #bbb;
  cursor: default;
  letter-spacing: 0.05em;
}
.megaMenu__col .isDisabled small {
  display: block;
  font-size: 11px;
}

/* モバイル: メガメニューは縦積みのシンプルなレイアウトに */
@media (max-width: 767px) {
  .megaMenu__inner {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }
  .megaMenu__label {
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
    padding-right: 0;
    padding-bottom: 16px;
    flex: none;
  }
  .megaMenu__cols {
    flex-direction: column;
    gap: 20px;
  }
  .megaMenu__col + .megaMenu__col {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid #e5e5e5;
    padding-top: 20px;
  }
}

/* トリガーボタンの中で使う .megaMenu__title / .megaMenu__sub は、
   開閉パネル側(.megaMenu__label 内)の見出しスタイルとは見た目を分けたいため、
   ここで一旦リセットしておく。実際の見た目はSP用の@media内で指定する。 */
.navMegaTrigger .megaMenu__title {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  border-bottom: none;
  padding-bottom: 0;
  margin: 0;
}
.navMegaTrigger .megaMenu__sub {
  display: none;
}

/* 他スタイルとの兼ね合いで意図せず表示されてしまうケースに備えた保険 */
@media (min-width: 1024px) {
  .navMegaTrigger .megaMenu__sub {
    display: none !important;
  }
}

/* ============================================================
   SPハンバーガーメニュー内のアコーディオン
   (トリガー行にラベル・サブテキスト・シェブロンを横並び表示し、
    開いたときは箱組みをやめてフラットな縦並びリストにする)
   ============================================================ */
@media (max-width: 1023px) {
  /* SPでは開閉インジケーターがシェブロンになるため、
     下線ホバーアニメーションは不要 */
  .navList li.hasMega > .navMegaTrigger::after {
    display: none;
  }

  /* li自体はPC版では横並び(display:flex)のままだが、
     SPでは「見出しボタン」と「開閉パネル」を縦に積む必要があるため、
     ここだけ通常のブロック要素に戻す */
  .navArea .navList > li.hasMega {
    display: block;
    width: 100%;
    height: auto;
    align-items: normal;
    justify-content: normal;
  }

  /* トリガー行:ラベル + サブテキスト + シェブロンを横並びに */
  .navArea .navList > li.hasMega > .navMegaTrigger {
    width: 100%;
    height: auto;
    padding: 15px 20px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    text-align: left;
  }
  .navMegaTrigger .megaMenu__title {
    display: inline;
    font-size: 14px;
    font-weight: 500;
    color: #323232;
    white-space: nowrap;
  }
  .navMegaTrigger .megaMenu__sub {
    display: inline;
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid #c8c8c8;
    font-size: 13px;
    font-weight: 400;
    color: #323232;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* メニューを開いている間だけ、タイトル文字を赤くする */
  .navList li.hasMega.isOpen > .navMegaTrigger .megaMenu__title {
    color: #EB3155;
  }
  .navMegaTrigger__chevron {
    margin-left: auto;
    width: 9px;
    height: 9px;
    border-right: 1px solid #323232;
    border-bottom: 1px solid #323232;
    transform: rotate(45deg);
    transition: transform ease 0.3s;
    flex-shrink: 0;
  }
  .navList li.hasMega.isOpen > .navMegaTrigger .navMegaTrigger__chevron {
    transform: rotate(-135deg);
    margin-top: 4px;
  }

  /* パネル本体:PC用の箱組みメガメニューをやめて、
     ハンバーガーメニュー内で自然に下に伸びる縦並びリストにする */
  .navArea .navList .megaMenu {
    position: static;
    top: auto;
    background: transparent;
    border-top: none;
    box-shadow: none;
  }
  .navArea .navList .megaMenu__inner {
    padding: 0 20px 6px;
    gap: 0;
  }
  .navArea .navList .megaMenu__label {
    /* タイトル・サブテキストはトリガー行にすでに表示済みのため非表示 */
    display: none;
  }
  .navArea .navList .megaMenu__cols {
    flex-direction: column;
    gap: 0;
  }
  .navArea .navList .megaMenu__col {
    border-left: none;
    padding-left: 0;
    height: auto;
  }
  .navArea .navList .megaMenu__col li {
    margin-bottom: 0;
  }
  .navArea .navList .megaMenu__col a,
  .navArea .navList .megaMenu__col {
    display: block;
    padding: 12px 0 12px 14px;
    font-size: 14px;
    color: #323232;
  }
  .isDisabled {
    display: block;
    padding: 12px 0 12px 14px;
    font-size: 14px;
    font-weight: 400;
    color: #7c7c7c;
  }

  /* アコーディオン以外の項目(会社情報・JP/EN)も左寄せに統一 */
  .navArea .navList {
    text-align: left;
  }
  .navArea .navList > li {
    justify-content: flex-start;
  }
  .navArea .navList > li > a {
    justify-content: flex-start;
  }

  /* JP/ENの上の罫線 */
  .navArea .navList > li.lang {
    margin-top: 20px;
  }

  /* JP/ENの下にあるピンクの現在地インジケーター線 */
  .navArea .navList > li.lang a::before,
  .navArea .navList > li.lang a::after {
    bottom: 6px;
  }

  /* リスト内の横罫線は不要のため非表示(JP/ENの上の区切り線は残す) */
  .navArea .navList .megaMenu__col + .megaMenu__col {
    border-top: none;
    padding-top: 0;
  }

  /* アコーディオンで開いたときに縦に伸びる分、
     メニュー全体をスクロールできるようにしておく */
  .navArea .navList {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
