/* =========================
   固定ヘッダーにする
========================= */
:root{
  --header-height: 88px;
}
header{
  position: fixed;
  z-index: 9999;
}

.top-slider{
  position: relative;
  z-index: 1;
}

header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;

}
.head .logo{
  max-width: 100px;
}

header nav.nav{
  background-color:#fff;
}

header #nav_sp{
  left:auto!important;
  width:100%!important;
}

body{
  padding-top: var(--header-height);
}

html{
  scroll-padding-top: var(--header-height);
}

section[id]{
  scroll-margin-top: var(--header-height);
}

/* =========================
   スマホ用ドロワー
   ※PCデザインはほぼ触らない
========================= */
@media (max-width: 980px){

  :root{
    --header-height: 72px;
  }

  /* PCナビはスマホで非表示 */
  .nav{
    display: none;
  }

  /* ハンバーガー表示 */
  #nav-toggle{
    display: block;
    position: absolute;
    top: 24px;
    right: 16px;
    z-index: 10001;
    cursor: pointer;
  }

  #nav-toggle div{
    position: relative;
    width: 30px;
    height: 24px;
  }

  #nav-toggle span{
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #222;
    transition: .3s;
  }

  #nav-toggle span:nth-child(1){ top: 0; }
  #nav-toggle span:nth-child(2){ top: 11px; }
  #nav-toggle span:nth-child(3){ top: 22px; }

  body.open #nav-toggle span:nth-child(1){
    top: 11px;
    transform: rotate(45deg);
  }

  body.open #nav-toggle span:nth-child(2){
    opacity: 0;
  }

  body.open #nav-toggle span:nth-child(3){
    top: 11px;
    transform: rotate(-45deg);
  }

  /* ドロワー本体 */
  #nav_sp{
    display: block;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 10000;
    padding: 90px 20px 30px;
    overflow-y: auto;
    transition: right .3s ease;
  }

  body.open #nav_sp{
    right: 0;
  }

  #nav_sp ul{
    margin: 0;
    padding: 0;
    list-style: none;
  }

  #nav_sp li{
    margin: 0 0 16px;
  }

  #nav_sp a{
    display: block;
    color: inherit;
    text-decoration: none;
    line-height: 1.6;
  }

  #nav_sp a span{
    font-size: 12px;
  }

  /* 背景 */
  body::after{
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 9998;
    pointer-events: none;
  }

  body.open::after{
    opacity: 1;
    visibility: visible;
  }

  body.open{
    overflow: hidden;
  }
  header .head.clearfix{
    background-color:#fff;
  }
}

/* PCではSPメニューを隠す */
@media (min-width: 981px){
  #nav-toggle,
  #nav_sp{
    display: none !important;
  }
}
