header {
	width: 100%;
    height: 78px;
	margin-inline: auto;
	padding-inline: 20px;
    position: fixed;
    top: 0;
    z-index: 200;
    background: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, .16);
	@media (max-width: 1279px) {
		height: 70px;
	}
}

.header-wrapper {
	max-width: 1280px;
	height: 100%;
	margin-inline: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
	width: 240px;
	display: flex;
	align-items: center;
}

.header-nav {
	display: flex;
	align-items: center;
	gap: 30px;
}

.header-nav-list {
	display: flex;
    align-items: center;
	gap: 24px;
	@media (max-width: 1279px) {
		display: none;
	}
}

.header-nav-item {
	position: relative;
	font-size: var(--font-m-text);
	font-weight: 600;
	cursor: default;
}

.header-nav-item:hover,
.mega-list a:hover {
	text-decoration: underline;
	color: var(--color-secondary);
}

.mega-list li:hover::before,
.mega-list li:hover::after {
	background-color: var(--color-secondary);
}

.btn.header-contact {
	width: 210px;
	height: 60px;
	background: var(--color-secondary);
	@media (max-width: 1279px) {
		height: 50px;
	}
	@media (max-width: 767px) {
		display: none;
	}
}

.btn.header-contact:hover {
	background: var(--color-hovered-secondary);
}

.hamburger {
  display: inline-flex;
  gap: 4px;
  flex-direction: column;
  justify-content: center;
	align-items: center;
  width: 50px;
  height: 50px;
  border: none;
	border-radius: 50%;
	background: var(--color-primary);
	z-index: 500;
  cursor: pointer;
}
.hamburger .bar {
  display: block;
  width: 25px;
  height: 3px;
  background: #fff;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform-origin: 50% 50%;
}
.hamburger.is-open {
	background: #fff;
}
.hamburger.is-open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
	background: var(--color-primary);
}
.hamburger.is-open .bar:nth-child(2) {
  opacity: 0;
}
.hamburger.is-open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
	background: var(--color-primary);
}

.hamburger-logo {
	width: 222px;
	position: absolute;
	top: 22px;
	left: 20px;
}

.hamburger-contact {
	margin-inline: auto;
	text-align: center;
}

.hamburger-contact-call {
	margin-bottom: 20px;
	display: inline-block;
	position: relative;
	font-size: var(--font-m-text);
	font-weight: 600;
	line-height: 1.765;
	color: #fff;
}

.hamburger-contact .btn {
	width: 275px;
	background: var(--color-secondary);
}

/* モバイルメニュー（上からスライド） */
.mobile-menu {
	width: calc(100% - 20px);
	max-width: 500px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 40;
  height: 0;
  overflow: hidden;
  background: var(--color-primary);
	border-radius: 0 0 0 30px;
	z-index: 0;
  transform: translateY(-8px);
  transition: height 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.mobile-menu.is-open {
	height: calc(100% - 32px);
  transform: translateY(0);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.mobile-menu nav {
  margin: 0 40px 40px 40px;
}
.mobile-menu li {
  border-bottom: 1px solid #6591D3;
	position: relative;
}
.mobile-menu li {
	padding: 15px 0 15px 35px;
  display: block;
	font-weight: 600;
  color: #fff;
}

.hamburger-body {
height: 75vh;
    margin-block: 80px 40px;
    overflow: scroll;
}

.mobile-menu li a,
.mobile-menu li span {
	position: relative;
}

.mobile-menu li a::before,
.mobile-menu li a::after,
.mobile-menu li span::before,
.mobile-menu li span::after {
	content: "";
	position: absolute;
	top: calc(50% - 1px);
	left: -22px;
	width: 7.7px;
	height: 3px;
	border-radius: 9999px;
	background-color: #fff;
	transform-origin: calc(100% - 1px) 50%;
}

.hamburger-nav-sub li {
	padding-block: 15px 0;
	border: none;
}

.mobile-menu li a::before,
.mobile-menu li span::before {
	transform: rotate(42deg);
}

.mobile-menu li a::after,
.mobile-menu li span::after {
	transform: rotate(-42deg);
}

/* 左端：左上→右下（＼） */
.hamburger-contact-call::before,
.hamburger-contact-call::after{
  content: "";
  position: absolute;
  bottom: 0;
  width: 3px;              /* 線の太さ */
  height: 32px;            /* 線の長さ */
  background: currentColor;
  transform-origin: 50% 50%;
  pointer-events: none;
}

.hamburger-contact-call::before{
  left: -12px;              /* 左端からの距離 */
  transform: rotate(-45deg); /* ＼ */
}

/* 右端：右上→左下（／） */
.hamburger-contact-call::after{
  right: -12px;             /* 右端からの距離 */
  transform: rotate(45deg);  /* ／ */
}


/* 背景の半透明ブロック（タップで閉じる） */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.backdrop[aria-hidden="false"] {
  opacity: 1;
}

/* デスクトップ（>=1280px）：PCナビ表示・ハンバーガー/モバイルメニュー無効化 */
@media (min-width: 1280px) {
  .nav-desktop {
    display: block;
  }
  .hamburger {
    display: none;
  }
  .mobile-menu {
    display: none !important;
  }
  .backdrop {
    display: none !important;
  }
}

/* 動きが苦手な環境配慮 */
@media (prefers-reduced-motion: reduce) {
  .hamburger .bar,
  .mobile-menu,
  .backdrop {
    transition: none !important;
  }
}

.has-mega .mega-panel {
	width: 185px;
  position: absolute; left: 0; right: 0; top: 50px;
  visibility: hidden; opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition:
    transform .28s cubic-bezier(.22,.61,.36,1),
    opacity   .28s cubic-bezier(.22,.61,.36,1),
    visibility 0s linear .28s; /* フェード完了後に不可視化 */
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid #eef0f3;
	border-radius: 0 0 10px 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

/* ↙ 追加：ホバーブリッジ（見えない帯。上の隙間を埋める） */
.has-mega .mega-panel::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -26px; height: 26px;
  /* 透明だが hover を拾う */
  background: transparent;
  display: block;
}

/* 表示条件：親に hover/focus-within、またはパネル自身が hover/focus-within */
.has-mega:hover .mega-panel,
.has-mega:focus-within .mega-panel,
.has-mega .mega-panel:hover,
.has-mega .mega-panel:focus-within {
  visibility: visible; opacity: 1; pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s; /* すぐ表示 */
}

/* 中身の幅・余白 */
.mega-inner { max-width: 1200px; margin: 0 auto; padding: 30px 0 30px 30px; }
.mega-list {
  margin: 0; padding: 0; list-style: none;
}
.mega-list a {
  display: block; padding: 12px 10px; border-radius: 8px;
  text-decoration: none; color: #111;
}
.mega-list li {
	padding-left: 15px;
	position: relative;
}
.mega-list a {
  display: block; border-radius: 8px;
  text-decoration: none; color: #111;
}

.mega-list li::before,
.mega-list li::after {
	content: "";
	position: absolute;
	top: calc(50% - 1px);
	left: 0;
	width: 7px;
	height: 2px;
	border-radius: 9999px;
	background-color: var(--color-black);
	transform-origin: calc(100% - .5px) 50%;
}

.mega-list li::before {
	transform: rotate(42deg);
}

.mega-list li::after {
	transform: rotate(-42deg);
}

/* ホバー/フォーカスで“ニュッと”表示 */
.has-mega:hover .mega-panel,
.has-mega:focus-within .mega-panel {
  visibility: visible; opacity: 1; pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;             /* すぐ表示 */
}

/* スマホ等での挙動（ここでは簡易に無効化。別途SP用ナビがある前提） */
@media (max-width: 1279.98px) {
  .header-nav-list { gap: 16px; }
  .has-mega .mega-panel { display: none; }
}

/* 動きが苦手な環境配慮 */
@media (prefers-reduced-motion: reduce) {
  .has-mega .mega-panel { transition: none; }
}