@charset "utf-8";

/* =========================================================
  Header
========================================================= */
header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  text-align: center;
  background: #fff;
}

/* =========================================================
  Fixed Header
========================================================= */
.header-fixed {
  position: fixed;
  inset: 0 0 auto 0;
  width: 100%;
  z-index: 1001;
  transform: translate3d(0, -100%, 0);
  opacity: 0;
  visibility: hidden;
  background: #fff;
  transition: transform .3s ease, opacity .3s ease, visibility 0s linear .3s;
  will-change: transform, opacity;
  backface-visibility: hidden;
  contain: paint;
}

.header-fixed.is-visible {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  visibility: visible;
  transition-delay: 0s, 0s, 0s;
}

/* メガ表示中だけ contain を解除して見切れ対策 */
@supports selector(:has(*)) {
  .header-fixed:has(.has-mega:hover, .has-mega:focus-within) {
    contain: none;
    overflow: visible;
  }
}

#header.is-faded {
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

.header-fixed .inner {
  height: 80px;
  align-items: center;
  padding-bottom: 0;
}

.header-fixed .headerLogoBox {
  padding-bottom: 3px;
}

/* 旧IDの追従（残す場合） */
#headerFixed {
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .35s ease, opacity .35s ease, visibility .35s step-end;
}

#headerFixed.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform .35s ease, opacity .35s ease, visibility 0s step-start;
}

html.header-force-hide #headerFixed {
  transform: translateY(-100%) !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* =========================================================
  Header Inner
========================================================= */
header .inner {
  height: 80px;
  width: 87.8477306%;
  display: grid;
  grid-template-columns: 173px 1fr;
  align-items: center;
  justify-content: flex-start;
  gap: 85px;
}

@media (max-width: 899px) {
  header .inner {
    height: 65px !important;
    width: 100%;
    padding: 0 0.5% 0 5.5%;
    grid-template-columns: 150px 65px;
    justify-content: space-between;
  }
  .header-fixed .inner {
    height: 65px;
  }
}

/* =========================================================
  Menu Area
========================================================= */
header .menuarea {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 35px;
}

/* PC sub */
header .menuarea .sub a {
  font-weight: 500;
  font-size: 15px;
  height: 80px;
  display: inline-flex;
  align-items: center;
}

@media (min-width: 1200px) {
  header .menuarea .sub {
    display: flex !important;
    justify-content: flex-start;
    align-items: center;
    gap: 25px;
  }
}

@media (max-width: 1199px) {
  header .menuarea .sub {
    display: none !important;
  }
}

/* contact */
header .menuarea .contact a {
  font-weight: 500;
  font-size: 15px;
}

header .menuarea .contact a.nolink {
  pointer-events: none;
  height: 80px;
  display: table-cell;
  vertical-align: middle;
}

@media (min-width: 900px) {
  header .menuarea .contact {
    display: flex !important;
    justify-content: flex-start;
    align-items: center;
    gap: 25px;
  }
}

@media (max-width: 899px) {
  header .menuarea .contact {
    display: none !important;
  }
}

/* =========================================================
  Mega Menu
========================================================= */
.has-mega {
  position: relative;
}

.has-mega > .mega {
  position: absolute;
  top: calc(100% - 15px); /* 元: calc(100% + -15px) */
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(400px, 92vw);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 9999;
}

@media (hover:hover) and (pointer:fine) {
  .has-mega:hover > .mega,
  .has-mega:focus-within > .mega {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}

/* mega inner */
.mega__inner {
  padding: 25px;
}

.mega__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega__list a {
  display: block !important;
  padding: 15px;
  border-radius: 6px;
  text-decoration: none;
  height: auto !important;
}

@media (hover:hover) and (pointer:fine) {
  .mega__list a:hover {
    background: #0870A4 !important;
    color: #fff;
  }
}

/* SP: contact mega is toggled by JS */
@media (max-width: 767px) {
  ul.contact > li.has-mega > .mega {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
    visibility: visible;
  }

  ul.contact > li.has-mega.is-open > .mega {
    display: block;
  }
}

/* =========================================================
  SP Menu / Hamburger
========================================================= */
header .menu {
  text-align: center;
}

@media (max-width: 899px) {
  header .menu {
    display: block !important;
  }
}

header .menulist {
  position: fixed;
  top: 0;
  right: -50%;
  width: 50%;
  height: 100vh;
  padding-top: 50px;
  z-index: 2;
  background: #fff;
  transition: right .6s;
  text-align: left;
}

/* hamburger sub */
header .sub-gnav li:not(:last-child) { padding-right: 32px; }
header .sub-gnav a { color: #333; font-weight: 700; font-size: 14px; }
header .sub-gnav a.oswald { font-weight: 500; letter-spacing: .05em; }

header .sub-gnav a .arrow {
  position: relative;
  display: inline-block;
  width: 6.2px;
  height: 10.5px;
  margin-right: 8px;
}

header .sub-gnav a .arrow::before,
header .sub-gnav a .arrow::after {
  content: "";
  position: absolute;
  top: calc(50% - 1px);
  right: 0;
  width: 8px;
  height: 2px;
  border-radius: 9999px;
  background: #000;
  transform-origin: calc(100% - 1px) 50%;
}

header .sub-gnav a .arrow::before { transform: rotate(45deg); }
header .sub-gnav a .arrow::after  { transform: rotate(-45deg); }

/* hamburger */
.hamburger {
  position: relative;
  width: 65px;
  height: 65px;
  cursor: pointer;
  z-index: 99;
}

.hamburger span {
  position: absolute;
  left: 14.5px;
  width: 36px;
  height: 2.5px;
  background: #000;
  z-index: 99;
  transition: transform .6s, width .6s, left .6s, background .6s, top .6s;
}

.hamburger_linetop    { top: 16px; }
.hamburger_linecenter { top: 30px; width: 5px !important; }
.hamburger_linebottom { top: 30px; width: 27px !important; left: 23.5px !important; }

.hamburger_text {
  position: absolute;
  left: 0 !important;
  right: 0;
  bottom: 13px;
  margin: 0 auto;
  width: auto !important;
  height: auto !important;
  background: none !important;
  font-size: 10px;
  font-weight: 600;
  color: #333;
  letter-spacing: 0;
}

.home .hamburger_text { color: #333; }

/* nav open */
.nav_open header .menulist { right: 0; }
.nav_open .hamburger span { background: #000; }

.nav_open header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
}
.nav_open .header-fixed,
.nav_open #headerFixed{
  transform: translateY(-100%) !important;
  opacity: 0 !important;
  visibility: hidden !important;
}


.nav_open .hamburger_linetop {
  top: 26px;
  transform: rotate(45deg);
}

.nav_open .hamburger_linecenter {
  left: 50%;
  width: 0 !important;
}

.nav_open .hamburger_linebottom {
  top: 26px;
  left: 14.5px !important;
  width: 36px !important;
  transform: rotate(-45deg);
}

.nav_open .hamburger_text { color: #333; }

/* overlay */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: #000;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s, visibility .6s;
}

.nav_open .overlay {
  opacity: .8;
  visibility: visible;
}

@media (max-width: 899px) {
  header .menulist { right: -100%; width: 100%; }
  header .menulist nav ul li { padding: 16px 40px; }
  header .headerLogoBox img { width: 150px; height: auto; }
}

/* =========================================================
  Menu Common
========================================================= */
header .menulist nav ul li {
  padding: 1px 40px;
  text-align: left;
}

header .menulist nav ul.main-gnav {
  margin-top: 65px;
  display: inline-block;
}

header .menulist nav ul.main-gnav li { padding: 10px 40px; }

header .menulist nav ul.sub-gnav { margin-top: 60px; }
header .menulist nav ul.sub-gnav li { padding: 16px 40px; }
header .menulist nav ul.sub-gnav li a { font-size: 15px; }

.menulist ul li a {
  position: relative;
  font-weight: 700;
  font-size: 22px;
  opacity: 1;
  transition: opacity .28s ease;
}

.menulist ul a {
  position: relative;
  opacity: 1;
  transition: opacity .2s ease;
}

.menulist ul a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: #000;
  transform: scale(0, 1);
  transform-origin: right top;
  transition: transform .4s;
}

@media (hover:hover) {
  .menulist ul:hover a { opacity: .2; }
  .menulist li:hover a { opacity: 1; }
  .menulist li:hover a::after {
    transform: scale(1, 1);
    transform-origin: left top;
  }
}

.menulist ul a:focus-visible { opacity: 1; }

@supports selector(.x:has(:focus-visible)) {
  .menulist ul:has(a:focus-visible) a { opacity: .2; }
  .menulist ul a:focus-visible { opacity: 1; }
}

@media (max-width: 899px) {
  .menulist ul li a::before { display: none; }
  header .menulist nav ul li { padding: 3px 40px; }
}
