@charset "UTF-8";
/* www.the-g.co.jp (新サイト) の #header を search.the-g.co.jp 用に移植したもの
   元: /Portals/0/Skins/skincommon.css + /Portals/0/css/contents.css (megamenu)
   - body.pcView 依存を除去、jQueryプラグイン依存を header2026.js (素のJS) に置換
   - 旧ページは固定ナビ44px分の余白込みで組まれているため、body の padding-top は「新ヘッダー高さ - 44px」
   - 1024px 以下は独自のSPレイアウト(ハンバーガー) */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap");

body { padding-top: 87px; }               /* 131px(ヘッダー) - 44px(旧ナビ分の既存余白) */
body.sp_menu_open { overflow: hidden; }

#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  height: auto;
  border-bottom: 1px solid #ccc;
  background-color: #fff;
  z-index: 9999;
  color: #505050;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  text-align: left;
  box-sizing: border-box;
}
#header *, #header *:before, #header *:after { box-sizing: border-box; }
#header a { color: #505050; text-decoration: none; }
#header img { border: none; vertical-align: bottom; max-width: 100%; height: auto; }
#header ul { list-style: none; margin: 0; padding: 0; }
#header li { margin: 0; padding: 0; }

/* ---------- PC: 上段 ---------- */
#header .head_inner {
  position: relative;
  display: flex;
  gap: 0 40px;
  align-items: stretch;
  justify-content: space-between;
  min-height: 130px;
  padding: 0 0 0 40px;
  z-index: 3;
  background: #fff;
}
#header .head_inner .left { display: flex; align-items: center; float: none; }
#header .head_inner .right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; float: none; }
#header .head_logo { width: 313px; margin: 0; padding: 0; font-size: 0; line-height: 0; }
#header .head_logo a { display: block; }
#header .head_top { display: flex; align-items: center; gap: 0 20px; }
#header .head_bottom { padding: 0 35px 25px 0; }


#header .head_lang a { display: flex; align-items: center; gap: 0 6px; line-height: 1.2; white-space: nowrap; }
#header .head_lang a:before {
  content: ""; display: block; width: 18px; height: 18px;
  background: url("/main-assets/img/header2026/ico_global.png") no-repeat center / contain;
}

#header .head_btn_area { display: flex; position: relative; }
#header .head_btn_area .head_search_btn {
  display: flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; background-color: #505050; cursor: pointer;
  transition: background-color .3s ease-in-out;
}
#header .head_btn_area .head_search_btn:before {
  content: ""; display: block; width: 20px; height: 20px;
  background: url("/main-assets/img/header2026/ico_search_open.png") no-repeat center / contain;
}
#header .head_btn_area .head_search_btn:hover { background-color: #8c8c8c; }
#header .head_btn_area .head_contact { border-left: 1px solid #ccc; }
#header .head_btn_area .head_contact a {
  display: flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; background-color: #505050; transition: background-color .3s ease-in-out;
}
#header .head_btn_area .head_contact a:hover { background-color: #8c8c8c; }
#header .head_btn_area .head_contact a:before {
  content: ""; display: block; width: 20px; height: 20px;
  background: url("/main-assets/img/header2026/ico_contact.png") no-repeat center / contain;
}
#header .head_btn_area .head_link { border-left: 1px solid #ccc; }
#header .head_btn_area .head_link a {
  display: flex; align-items: center; justify-content: center; gap: 0 10px;
  min-width: 60px; height: 60px; padding: 0 25px;
  background-color: #505050; color: #fff; line-height: 1.2; white-space: nowrap;
  transition: background-color .3s ease-in-out;
}
#header .head_btn_area .head_link a:hover { background-color: #8c8c8c; }
#header .head_btn_area .head_link a.residence:before {
  content: ""; display: block; width: 20px; height: 20px;
  background: url("/main-assets/img/header2026/ico_residence.png") no-repeat center / contain;
}

/* ---------- PC: グローバルナビ ---------- */
#header #gNav .token_menu > ul { display: flex; gap: 0 25px; }
#header #gNav .token_menu a { display: block; line-height: 1.2; padding: 4px 0; border-bottom: 2px solid transparent; }
#header #gNav .token_menu li.mega_active > a { border-bottom-color: #505050; }

/* ---------- PC: メガメニュー ---------- */
#header .megamenu_wrap { position: absolute; top: calc(100% + 1px); left: 0; width: 100%; z-index: 2; }
#header .megamenu_wrap .megamenu_item {
  display: none; max-height: calc(100vh - 131px); padding: 80px 0 100px;
  background-color: #fff; overflow-y: auto;
}
#header .megamenu_wrap .megamenu_item .inner {
  display: flex; gap: 0 90px; max-width: 1280px; margin: 0 auto; padding: 0 40px;
}
#header .megamenu_wrap .megamenu_item .inner .left { flex-shrink: 0; float: none; display: block; }
#header .megamenu_wrap .megamenu_item .inner .right { float: none; display: block; }
#header .megamenu_wrap .megamenu_head { line-height: 1.2; }
#header .megamenu_wrap .megamenu_head a { display: inline-flex; align-items: center; gap: 0 14px; font-size: 38px; }
#header .megamenu_wrap .megamenu_head a:after {
  content: ""; display: block; width: 32px; height: 16px; border-radius: 100vh; background-color: #505050;
  background-image: url("/main-assets/img/header2026/arrow_link_wt.png");
  background-position: center; background-size: 12px 3px; background-repeat: no-repeat;
}
#header .megamenu_wrap .megamenu_head .sub { margin: 16px 0 0; padding: 0; color: #8c8c8c; font-size: 16px; }
#header .megamenu_wrap .megamenu_links { margin: 40px 0 0; }
#header .megamenu_wrap .megamenu_links a { line-height: 1.2; }
#header .megamenu_wrap .megamenu_links a:hover { opacity: .7; }
#header .megamenu_wrap .megamenu_links > ul { display: flex; flex-wrap: wrap; gap: 60px; }
#header .megamenu_wrap .megamenu_links > ul > li > a { font-size: 20px; }
#header .mega_overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,.3); z-index: 1; }

/* ---------- SP用要素(PCでは非表示) ---------- */
#header .head_burger, #header .sp_menu { display: none; }

/* ---------- 1025〜1279px: PCレイアウトを詰める ---------- */
@media (max-width: 1279px) {
  #header .head_inner { gap: 0 20px; padding-left: 20px; }
  #header .head_logo { width: 240px; }
  #header .head_bottom { padding-right: 20px; }
  #header .head_btn_area .head_link a { padding: 0 15px; }
}

/* ---------- SP (〜1024px) ---------- */
@media (max-width: 1024px) {
  body { padding-top: 16px; }             /* 60px(ヘッダー) - 44px */
  #header .head_inner { min-height: 60px; height: 60px; padding: 0 0 0 15px; gap: 0; align-items: center; }
  #header .head_logo { width: 170px; }
  #header .head_inner .right { display: none; }
  #header .megamenu_wrap { display: none; }
  #header .head_burger {
    display: block; position: relative; width: 60px; height: 60px; margin: 0; padding: 0;
    border: none; border-left: 1px solid #ccc; background: #505050; cursor: pointer; -webkit-appearance: none; appearance: none;
  }
  #header .head_burger span {
    position: absolute; left: 19px; width: 22px; height: 2px; background: #fff; transition: transform .25s, opacity .25s, top .25s;
  }
  #header .head_burger span:nth-child(1) { top: 22px; }
  #header .head_burger span:nth-child(2) { top: 29px; }
  #header .head_burger span:nth-child(3) { top: 36px; }
  #header .head_burger.open span:nth-child(1) { top: 29px; transform: rotate(45deg); }
  #header .head_burger.open span:nth-child(2) { opacity: 0; }
  #header .head_burger.open span:nth-child(3) { top: 29px; transform: rotate(-45deg); }

  #header .sp_menu {
    display: none; position: fixed; top: 60px; left: 0; right: 0; bottom: 0;
    background: #fff; overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  #header .sp_menu.open { display: block; }
  #header .sp_nav > li { border-bottom: 1px solid #ddd; }
  #header .sp_nav > li > a { display: block; padding: 14px 20px; font-weight: 500; line-height: 1.4; }
  #header .sp_nav > li > ul { background: #f0f0f0; }
  #header .sp_nav > li > ul > li { border-top: 1px solid #e0e0e0; }
  #header .sp_nav > li > ul > li > a { display: block; padding: 11px 20px 11px 32px; font-size: 14px; line-height: 1.4; }
  #header .sp_btns { display: flex; gap: 10px; padding: 20px; }
  #header .sp_btns a {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 0 8px;
    padding: 14px 10px; background: #505050; color: #fff; font-size: 14px; line-height: 1.2;
  }
  #header .sp_btns a.residence:before {
    content: ""; display: block; width: 18px; height: 18px;
    background: url("/main-assets/img/header2026/ico_residence.png") no-repeat center / contain;
  }
  #header .sp_btns a.lang:before {
    content: ""; display: block; width: 16px; height: 16px;
    background: url("/main-assets/img/header2026/ico_global.png") no-repeat center / contain; filter: invert(1);
  }
            }
