@import "bourbon";

#home{
  display: block;
  margin: 0 auto;
  -webkit-perspective: 1000;
  @include backface-visibility(hidden);
  @include box-sizing(border-box);
  &.page{ max-width: 100% !important; }
  .home_content{ position: relative; }
  header{
    max-width: 100%;
  }
  .scaler{
    padding-top: 66%;
  }
  .content{
    text-align: center;
    width: 100%;
    z-index: 20;
    div{
      width: 100%;
      padding: 12px;
      @include box-sizing(border-box);
      border-bottom: 1px solid #ddd;
      text-align: left;
      a, a:hover, a:visited{ color: #000; display: block; }
      img, p, span{
        display: inline-block;
        vertical-align: top;
      }
      p{
        @include box-sizing(border-box);
        font-size: 1.125em;
        line-height: 1.125em;
        width: 58%;
      }
      span{
        overflow: hidden;
        position: relative;
        height: 64px;
        width: 116px;
        img{
          position: absolute;
          top: -5px;
          left: 0;
        }
      }
      &.news p, &.gene p{
        padding: 2px 0 0 8px;
      }
    }
  }
  .rslides {
    overflow: hidden;
    z-index: 0;
    position: relative;
    max-height: 1060px;
    li {
      @include backface-visibility(hidden);
      position: absolute;
      display: none;
      overflow: hidden;
      width: 100%;
      height: 100%;
      background-repeat: no-repeat;
      background-size: cover;
      left: 0;
      top: 0;
      img{
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
      }
      &:last-child{
        position: relative;
        display: block;
        float: left;
      }
    }
  }
} 

#home_video{
  opacity: 0;
  visibility: hidden;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
  background-color: rgba(0,0,0,0.5);
  -webkit-transition: all 400ms ease-in-out;
  -moz-transition: all 400ms ease-in-out;
  transition: all 400ms ease-in-out;
  text-align: center;
  @include box-sizing(border-box);
  padding: 10%;
  &:before {
    content: '';
    display: inline-block;
    vertical-align: middle;
    margin-right: -0.25em; /* Adjusts for spacing */
  }
  .video_holder{
    display: inline-block;
    vertical-align: middle;
    background-color: #000;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    z-index: 2002;
    -webkit-box-shadow:  0px 0px 20px 0px rgba(0, 0, 0, 0.4);
    box-shadow:  0px 0px 20px 0px rgba(0, 0, 0, 0.4);
    .video{
      width: 100%;
      position: relative;
      padding-bottom: 57%;
      height: 0;
      background-color: #000;
      iframe{
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
      }
    }
  }
  .close_btn{
    width: 24px;
    height: 24px;
    display: block;
    background: transparent asset_url("close_btn.png") top left no-repeat;
    @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
      background: transparent asset_url("close_btn@2x.png") top left no-repeat;
      -webkit-background-size: 24px 24px;
              background-size: 24px 24px;
    }
    float: right;
    margin-top: -28px;
    cursor: pointer;
  }
  .close_area{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2001;
    display: block;
  }
  &.active{
    opacity: 1;
    visibility: visible;
  }
}

@media screen and (min-width: 460px){
  #home{
    text-align: center;
    .content{
      margin-top: 32px;
      div{
        width: 340px;
        margin: 0 24px 32px;
        display: inline-block;
        vertical-align: bottom;
        -webkit-box-shadow: 0px 0px 12px 4px rgba(0,0,0,0.2);
        box-shadow: 0px 0px 12px 4px rgba(0,0,0,0.2);
        border: none;
        background-color: rgba(255,255,255,0.8);
        &.gene p{
          padding: 10px 0 0 8px;
        }
      }
    }
  }
}

@media screen and (min-width: 768px) {
  #home{
    .rslides {
      li {
        img{ top: -42px; }
      }
    }
  }
}

@media screen and (min-width: 900px) {
  #home{
    .scaler{
      padding-top: 50%;
    }
    .content{
      position: absolute;
      bottom: 12px;
      width: 100%;
      z-index: 20; 
    }
  }
}