.toc-header {
  background: linear-gradient(0deg, rgba(217, 217, 217, 0) 0%, rgba(111, 153, 213, 0.57) 35.58%, rgba(45, 94, 163, 0.7) 78.85%);
  color: #575757;
  position: fixed;
  z-index:999;
  width: 100%;
  height: 88px;
  align-items: center;
}
.header-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 620px;
  height: auto;
  z-index: -1;
}
.toc-header__inner {
  margin: 0 auto;
  display: flex;
  align-items: center;
  z-index: 2;
  height: 100%;
  padding-left: 73px;
}
.toc-header__brand { flex: 0 0 auto; }
.toc-header__nav { margin-left: auto; }
.toc-header__cta { margin-left: 16px; }

.toc-header__brand {
  display: flex;
  align-items: center;
  gap: 28px;
  text-decoration: none;
}
.toc-header__logo { width: 36px; }
.toc-header__name { font-size: 20px; color: #575757; }
.toc-header__name span{
  font-size: 0.95em;
}
.toc-header__menu {
  display: flex;
  gap: clamp(20px, 3vw, 56px);
  list-style: none;
  margin: 0;
  padding: 0;
  margin-right: clamp(20px, 3vw, 56px);
}
.toc-header__menu a {
  color: rgba(255,255,255,1);
  text-decoration: none;
  font-weight: 600;
}
.toc-header__menu a:hover {
  color: #fff;
  border-bottom: 2px solid #fff;
}

.toc-header__cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 151px;
  height: 87px;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  z-index: 10;
}

.toc-header__cta-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.toc-header__cta-content {
  display: flex;
  flex-direction: column; /* アイコン→テキスト 縦並び */
  align-items: center;
  gap: 4px; /* アイコンと文字の間隔 */
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 100;
}

.nav-toggle .hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #fff;
  margin: 6px auto;
  transition: 0.3s;
}

.toc-header__cta-icon {
  width: 20px; /* アイコンサイズ調整 */
  height: 20px;
}

@media (max-width: 1080px) {
  .toc-header__nav {
    display: none;
  }
  .toc-header__cta {
    display: none;
  }

  .toc-header__inner{
    padding-left: 16px;
  }

  /* ハンバーガーボタンを表示 */
  .nav-toggle{
    display:block !important;
    margin-left:auto;
  }

  .nav-toggle::before{
    content:"";
    position:absolute;
    left:10px; right:10px;        /* 線の長さ */
    top:50%;
    height:2px;
    background:#fff;
    transform:translateY(-50%);
    box-shadow:
      0 -7px 0 0 #fff,            /* 上の線 */
      0  7px 0 0 #fff;            /* 下の線 */
    transition:.25s;
  }
  .toc-header {
    height: 60px;
  }
  .header-wave {
    width: 420px;
  }
  .toc-header__logo { width: 24px; }
  .toc-header__name { font-size: 16px;}
}

/* アクセシビリティ用 */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ===== モバイルメニュー（初期は非表示） ===== */
.primary-nav{
  position: fixed;
  inset: 0;
  z-index: 999;               /* ヘッダーより上 */
  pointer-events: none;       /* 閉時はクリック不可 */
}
.primary-nav__sheet{
  position: absolute;
  top: 0; right: 0; bottom: 0;
   width: min(86vw, 380px);
  background: #3E8FB3;
  color: #fff;
  transform: translateX(100%);
  transition: transform .28s ease;
  padding: 20px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 三本線をスパンで描画（既に .hamburger-line はHTMLにある） */
.nav-toggle{
  position: relative;
  display: none; /* PC非表示は既存通り */
}
.nav-toggle .hamburger-line{
  position: absolute;
  left: 50%;
  width: 24px; height: 2px; background: #fff;
  transform: translateX(-50%);
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle .hamburger-line:nth-child(1){ top: 14px; }
.nav-toggle .hamburger-line:nth-child(2){ top: 21px; }
.nav-toggle .hamburger-line:nth-child(3){ top: 28px; }

body.menu-open .nav-toggle .hamburger-line:nth-child(1){
  transform: translateX(-50%) rotate(45deg);
  top: 21px;
}
body.menu-open .nav-toggle .hamburger-line:nth-child(2){
  opacity: 0;
}
body.menu-open .nav-toggle .hamburger-line:nth-child(3){
  transform: translateX(-50%) rotate(-45deg);
  top: 21px;
}

/* レスポンシブ：モバイルのみ表示 */
@media (max-width:1080px){
  .primary-nav{ display:block; }      /* モバイルで機能 */
  .menu-backdrop{ display:block; }    /* 初期は透明 */
  .toc-header__nav{ display:none; }   /* PCナビは隠す（既存） */
  .toc-header__cta{ display:none; }   /* PC CTAも隠す（既存） */
  .nav-toggle{ display:block !important; margin-left:auto; }
}

/* デスクトップではモバイルメニューは使わない */
@media (min-width:1081px){
  .primary-nav, .menu-backdrop{ display:none; }
}

/* 背景の半透明幕 */
.menu-backdrop{
  position: fixed; inset: 0;
  z-index: 998;
  background: rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

/* 開いたときの状態（JSが body.menu-open を付与） */
body.menu-open .primary-nav{ pointer-events: auto; }
body.menu-open .primary-nav__sheet{ transform: translateX(0); }
body.menu-open .menu-backdrop{ opacity: 1; pointer-events: auto; }
body.menu-open .menu-backdrop[hidden]{ display: block; } /* hiddenでも表示させる */

/* メニューの中身 */
.primary-menu{
  list-style: none;
  padding: 12px 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.primary-menu li a{
  display: block;
  padding: 14px 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  border-radius: 10px;
}
.primary-menu li a:focus,
.primary-menu li a:hover{
  background: rgba(255,255,255,.12);
}

/* CTAボタン（下部に固定風） */
.primary-cta{
  margin-top: auto;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  background: #2D5EA3;
  color: #fff; text-decoration: none; font-weight: 800;
  border-radius: 12px;
}
.primary-cta img{ width: 18px; height: 18px; }


/* まず、以前の ::before 疑似要素で描いていた三本線は無効化 */
@media (max-width:1080px){
  .nav-toggle::before{ content:none !important; }
}

.menu-close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000;
}
.menu-close span{
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: #fff;
  top: 50%;
  transform-origin: center;
  transition: .2s;
}
.menu-close span:first-child{
  transform: translateY(-50%) rotate(45deg);
}
.menu-close span:last-child{
  transform: translateY(-50%) rotate(-45deg);
}