/* =====================
   HEADER（共通）
===================== */
.header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  padding: 5px 0;
  background: #fff;
  box-shadow: 0 1px 1px rgb(0 0 0 / 10%);
  transition: background-color .3s, box-shadow .3s;
  z-index: 1000;
}

#icon{
  margin-right: 5px;
  width: 65px;
  height: auto;
}

.header.is-transparent{
  background: transparent;
  box-shadow: none;
  color: #fff;
}

/* inner */
.header__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 1240px;
  max-width: calc(100vw - 30px);
  height: 100%;
  margin: 0 auto;
  font-size: 16px;
}

/* site title */
.header__siteTitle{ font-size: 25px; }
.header__siteTitle a{
  display: flex;
  align-items: center;
  height: 80px;
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}
.header__siteTitle a:hover{ color: rgb(87, 248, 181); }

/* nav 共通 */
.header__nav{ display: flex; align-items: center; }
.header__navListItem{ list-style: none; }

.header__navLink{
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}
.header__navLink::after{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 0;
  height: 5px;
  margin: auto;
  content: "";
  background:  rgb(76, 228, 180);
  transition: width .2s;
}
.header__navLink:hover{ color: rgb(76, 228, 180); }
.header__navLink:hover::after{ width: 100%; }


/* =====================
   PC（870px以上）
===================== */
@media (min-width: 870px){
  .header__navButton{ display: none; }

  .header__navList{
    margin: 0 50px 0 0;
    padding: 0;
    display: flex;
    height: 100%;
  }

  .header__navListItem:not(:last-child){
    margin-right: 40px;
  }

  .header__navListItem{
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* =====================
   SP（870px未満）
===================== */
@media (max-width: 870px){
  .header__siteTitle{ font-size: 24px; }

  /* 暗幕（headerに .menu-open を付ける） */
  .header::after{
    content:"";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 900;
  }
  .header.menu-open::after{
    opacity: 1;
    visibility: visible;
  }

  /* ハンバーガーボタン */
  .header__navButton{
    display: block;
    position: relative;
    width: 50px;
    height: 50px;
    background: #000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    margin-right: 10px;
  }

  .header__navButtonLineTop,
  .header__navButtonLineMiddle,
  .header__navButtonLineBottom{
    position: absolute;
    inset: 0;
    margin: auto;
    width: 26px;
    height: 2px;
    background: #fff;
    transition: transform .3s ease, opacity .3s ease;
  }
  .header__navButtonLineTop{ transform: translateY(-10px); }
  .header__navButtonLineBottom{ transform: translateY(10px); }

  .header__navButton.is-active .header__navButtonLineTop{ transform: rotate(45deg); }
  .header__navButton.is-active .header__navButtonLineMiddle{ opacity: 0; }
  .header__navButton.is-active .header__navButtonLineBottom{ transform: rotate(-45deg); }

  /* メニュー本体（右からスライド） */
  .header__navList{
    position: fixed;
    top: 80px;
    right: 0;
    width: 100%;
    height: calc(100dvh - 80px);
    margin: 0;
    padding: 22px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    background: rgb(75, 114, 155);
    color: #fff;

    opacity: 0;
    visibility: hidden;
    transform: translateX(110%);
    transition: transform .35s ease, opacity .25s ease, visibility .25s ease;
    z-index: 1001;
  }

  .header__navList.is-open{
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }

  .header__navListItem{
    margin: 10px 0;
    font-size: 16px;
  }

  .header__navLink{
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
  }
  .header__navLink:hover{
    background: rgba(255,255,255,.12);
  }
}
