@charset "utf-8";

/*========= ページトップのためのCSS ===============*/
/*リンクを右下に固定*/
#page-top {
  position: fixed;
  right: 20px;
  bottom:30px;
  z-index: 2;
  opacity: 0;
  transform: translateY(150px);
 }
.page-top{
  position: absolute;
  bottom:-110px;
  right:0;
  width:220px;
  height:200px;
}
/*　上に上がる動き　*/
#page-top.UpMovePageUp{
  animation: UpAnimePageUp 0.5s forwards;
}

@keyframes UpAnimePageUp{
  from {
    opacity: 0;
  transform: translateY(150px);
  }
  to {
    opacity: 1;
  transform: translateY(0);
  }
}

/*　下に下がる動き　*/
#page-top.DownMovePageUp{
  animation: DownAnimePageUp 0.5s forwards;
}

@keyframes DownAnimePageUp{
  from {
    opacity: 1;
  transform: translateY(0);
  }
  to {
    opacity: 1;
  transform: translateY(180px);
  }
}

/*画像の切り替えと動き*/
#page-top a {
    /*aタグの形状*/
  display: block;
  width: 120px;
  height: 150px;
  color: #333;
  text-align: center;
  text-transform: uppercase; 
  text-decoration: none;
  font-size:0.6rem;
    /*背景画像の指定*/
  background: url("../img/pagetop_1.png") no-repeat center;
  background-size: contain;
  filter: drop-shadow(3px 3px 2px #888);
}

#page-top.floatAnime a{
  width: 120px;
  height: 150px;
    /*背景画像の指定*/
  background: url("../img/pagetop_2.png") no-repeat center;
  background-size: contain;
  filter: drop-shadow(3px 3px 2px #888);
    /*アニメーションの指定*/
  animation: floatAnime 2s linear infinite;
  opacity: 0;
}

@keyframes floatAnime {
  0% { transform: translate(0); opacity: 0; }
  25% { transform: translate(-6px,-6vh);opacity: 1; }
  50% { transform: translate(0,-12vh);}
  100% { transform: translate(6px,-6vh);opacity: 1; }
}

/*Page Topと書かれたテキストの位置*/
#page-top span{
  font-family: sans-serif;
  position: absolute;
    bottom: -2.4rem;
    right: 20px;
    font-size:1.2rem;
  color: #333;
}

@media screen and (max-width: 767px){ /*sp:~767*/

  #page-top a {
  display: block;
  width: 120px;
  height: 120px;
}

#page-top.floatAnime a{
  width: 120px;
  height: 120px;
}

#page-top span{
  font-family: sans-serif;
  position: absolute;
  bottom:-20px;
  left: 0;
  font-size:1.2rem;
color: #5a5040;
}

}