@charset "UTF-8";
@import url("https://fonts.googleapis.com/css?family=Raleway");
@-webkit-keyframes loading {
  0% {
    left: -30px;
  }
  70% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}
@-moz-keyframes loading {
  0% {
    left: -30px;
  }
  70% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}
@-o-keyframes loading {
  0% {
    left: -30px;
  }
  70% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}
@keyframes loading {
  0% {
    left: -30px;
  }
  70% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}
.casename {
  position: relative;
  padding: 20px 10px;
  color: #333;
  text-align: center;
  box-sizing: border-box;
}

.work-wrap {
  position: relative;
  height: calc(100vh - 100px - 4px);
}

/*=====================================
 *							大圖設定
 *=====================================*/
.viewport {
  position: relative;
  height: 100%;
  overflow: hidden;
}
.viewport ul {
  position: relative;
  height: 100%;
  overflow: hidden;
}
.viewport li {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
}
.viewport li:first-child {
  display: block;
}
.viewport li img {
  position: relative;
  margin: auto;
  max-height: 100%;
  max-width: 100%;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
}

/*=====================================
 *							按鈕設定
 *=====================================*/
.bn {
  position: absolute;
  width: 40px;
  height: 40px;
  fill: #000;
  opacity: 0.4;
  cursor: pointer;
  z-index: 1;
}
.bn:hover {
  opacity: 1;
}
.bn-prev, .bn-next {
  top: 50%;
  margin-top: -20px;
}
.bn-next {
  right: 0;
}
.bn-auto {
  height: 32px;
  top: 0;
  right: 30px;
  background: url("../images/works/bn-auto.png") no-repeat 0 0;
  filter: invert(1);
}
.bn-close {
  position: absolute;
  top: 1px;
  right: 0;
  padding: 6px;
  opacity: 0.4;
}
.bn-close:hover {
  opacity: 1;
}
.bn-close svg {
  width: 18px;
  height: 18px;
  fill: #000;
}

/*=====================================
 *						頁碼設定
 *=====================================*/
.controlBar {
  position: relative;
  width: 100%;
  padding: 25px 0;
  z-index: 3;
  overflow: hidden;
}

.page {
  position: absolute;
  top: 10px;
  left: 50%;
  padding-right: 70px;
  -webkit-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  transform: translateX(-50%);
}
.page-num {
  overflow: hidden;
}
.page-num li {
  float: left;
  position: relative;
  width: 30px;
  height: 30px;
  cursor: pointer;
}
.page-num li:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #666;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  -webkit-transition: all 0.3s;
  -o-transition: all 0.3s;
  transition: all 0.3s;
}
.page-num li.on:before, .page-num li:hover:before {
  width: 10px;
  height: 10px;
  background: #333;
}

/*------------------------------------------
 *             tablet 、 Mobile
 *------------------------------------------*/
@media only screen and (max-width: 900px) {
  .bn,
  .page-num {
    display: none;
  }

  .bn-close {
    position: fixed;
    top: 10px;
    right: 10px;
  }

  .page {
    -webkit-transform: none;
    -ms-transform: none;
    transform: none;
  }

  .casename {
    position: fixed;
    top: 0;
    width: 100%;
    margin-top: 0;
    background: #fff;
    z-index: 2;
  }

  .work-wrap {
    height: auto;
  }

  .viewport {
    margin: 0;
    height: auto;
  }
  .viewport li {
    position: relative;
    margin-bottom: 4%;
    display: block;
  }
  .viewport li:last-child {
    margin-bottom: 0;
  }
  .viewport li img {
    top: 0;
    transform: none;
  }
}
