/* *************
   MEDIA QUERIES, ADJUSTMENTS
   ************* */

@media(min-width: @screen-sm){
  // MENU ON HOVER

  .navbar{
    .dropdown-menu{
      padding: 0;
      margin: 0;
      top: 80px;
      display: block;
      visibility: hidden;
      .transition-duration(0.4s);
      .transition-property(all);
      .opacity(0);
      overflow: visible;
      z-index: 9990;
      list-style: none;
      pointer-events: none;
      &:before{
        content: "";
        width: 100%;
        height: 7px;
        top: -6px;
        position: absolute;
        left: 0;
      }
      &:hover{
        visibility: visible;
        .opacity(1);
      }
    }
    li.dropdown:hover{
      > .dropdown-menu{
        pointer-events: auto;
        visibility: visible;
        .opacity(1);
        li.dropdown-submenu{
          position: relative;
          &:before{
            position: absolute;
            right: 10px;
            top: 50%;
            margin-top: -10px;
            content: "\f105";
            font-family: fontawesome;
          }
          > .dropdown-menu{
            padding: 10px 20px;
            top: 0;
            left: 100%;
            > li{
              min-width: 220px;
              &.active{
                a{
                  color: inherit;
                  &:hover, &:active, &:focus{
                    background-color: #f8f8f8;
                  }
                }
              }
            }
          }
          &:hover, &:active, &:focus{
            &:before{
              color: #ffffff;
            }
            > .dropdown-menu{
              pointer-events: auto;
              visibility: visible;
              .opacity(1);
            }
          }
          > .dropdown-menu:hover{
            pointer-events: auto;
            visibility: visible;
            top: 0px;
            .opacity(1);
          }
        }
      }
    }
    li.dropdown:last-child:hover{
      > .dropdown-menu{
        > li.dropdown-submenu{
          &:hover, &:active, &:focus{
            > .dropdown-menu{
              left: auto;
              right: 100%;
              margin: 0;
              margin-right: -9px;
            }
          }
          > .dropdown-menu:hover{
            left: auto;
            right: 100%;
            margin: 0;
            margin-right: -9px;
          }
        }
      }
    }
  }


  body.navbar-sidebar{
    padding: 0;
    #wrapper{
      padding: 0 0 0 30px;
    }
    .navbar-toggle{
      position: absolute;
      width: 50px;
      top: 10px;
      right: -50px;
      background-color: #262626;
      height: 50px;
      display: block;
      margin: 0;
      .icon-bar{
        background-color: #ffffff;
        .transition(0.2s, ease);
      }
    }
    .yamm .container{
      position: static;
      padding: 0;
    }
    .navbar{
      .box-shadow(5px 2px 2px rgba(0,0,0,0.2));
      right: auto;
      z-index: 9999;
      width: 260px;
      bottom: 0;
      left: -230px;
      .transition(0.4s left ease);
      &.open{
        left: 0;
      }
      .navbar-collapse{
        padding: 0;
      }
      .container, .navbar-header{
        width: 100%;
      }
      .navbar-header{
        text-align: center;
      }
      .navbar-brand{
        float: none;
      }
      .navbar-nav > li{
        width: 100%;
        position: relative;
        > a{
          padding: 14px 50px;
        }
        > .dropdown-menu{
          left: 100%;
          top: 0;
        }
        &.active{
          > a {
            background-color: #3c3c3c;
            color: #ffffff;
          }
        }
      }
      .navbar-nav > li.dropdown{
        i{
          position: absolute;
          right: 50px;
        }
        .dropdown-menu{
          i{
            position: static;
            right: auto;
          }
        }
      }
      .showHeaderSearch{
        position: absolute;
        width: 50px;
        top: 62px;
        right: -50px;
        background-color: #262626;
        height: 50px;
        display: block;
        padding: 0;
        margin-right: 0;
        text-align: center;
        padding-top: 14px;
        font-size: 20px;
      }
    }
  }
}

@media(max-width: 1700px){
  .home-full-width .galleryItem{
    width: 25%;
  }
}

@media(max-width: 1500px){
  .home-full-width .galleryItem{
    width: 33.333333%;
  }
}

@media(max-width: @screen-md-max){
  .text404{
    font-size: 260px;
  }
  .galleryContainer.withSpaces{
    .project-thumb .thumb-info{
      left: 20px;
      right: 20px;
    }
    .project-thumb:hover .thumb-info{
      bottom: 20px;
    }
  }
  .media-section[data-type="kenburns"]{
    .media-section-image-container{
      > img {
        margin-top: -300px;
      }
    }
  }
}

@media(max-width: @screen-md){
  .galleryItem{
    width: 50% !important;
  }
  .galleryContainer.col-1 .galleryItem{
    width: 100% !important;
  }

  .galleryContainer.withSpaces.col-3,
  .galleryContainer.withSpaces.col-2{
    .project-thumb .thumb-info h4, .project-thumb .thumb-info .thumb-cats{
      font-size: 12px ;
    }
    .project-thumb .thumb-info h4{
      margin-top: 15px;
    }
    .project-thumb:hover .thumb-info .thumb-links .thumb-link{
      margin-bottom: 20px;
    }
  }
}

@media (min-width: 768px){
  body.navbar-middle .navbar-left{
    margin-left: -15px;
  }
}

@media(max-width: @screen-sm-max){

  .nav > li > a{
    padding-left: 5px;
    padding-right: 5px;
  }

  /* **************
     CALL TO ACTION
     ************** */

  .call-box{
    .table-cell{
      display: block;
      &:first-child{
        padding-left: 15px;
      }
      &:last-child{
        padding-right: 15px;
      }
    }
    .col-md-7, .col-md-5,
    .col-md-8, .col-md-4{
      float: left;
      margin: 0;
      width: 100%;
    }
    .col-md-5{
      text-align: center;
    }
    .btn{
      margin-top: 20px;
    }
    .input-group-btn .btn{
      margin-top: 0;
    }
  }

  .feature-right-bottom, .feature-right-top, .feature-right, .feature-left, .feature-left-top, .feature-left-bottom{
    &:before{
      display: none;
    }
  }

  .media-section[data-type="kenburns"]{
    > img {
      width: auto;
    }
  }

  .media-section[data-type="video"]{
    background-size: cover;
    background-position: center;
    .video{
      display: none;
    }
  }


  /* *******
     TWITTER
     ******* */

  .twitter-logo{
    display: block;
    float: none;
    text-align: center;
  }
  .twitter{
    text-align: center;
  }
  .text404{
    font-size: 200px;
  }

  /* **************
     PROJECT SINGLE
  ***************** */
  .project-media-container{
    a{
      color: #ffffff;
    }
    .project-counting{
      position: relative;
      right: 0;
      margin-bottom: 20px;
    }
    .project-desc{
      padding: 15px;
      position: relative;
    }
  }

  .flexslider.paging-left{
    .flex-control-paging{
      bottom: 10px;
      padding: 0 10px;
    }
  }

  .project-media{
    margin-bottom: 40px;
  }
  .project-single-info{
    display: block;
    width: 33.33333333%;
    float: left;
  }

  .media-section[data-type="kenburns"]{
    .media-section-image-container{
      > img {
        margin-top: -250px;
      }
    }
  }

  .person-box, .graph + span, .person-image{
    margin-bottom: 40px;
    display: block;
  }

  .icon-counter{
    margin-bottom: 20px;
    margin-top: 30px;
  }


  .pre-footer{
    .flexslider{
      margin-bottom: 80px;
    }
  }
}

@media(max-width: (@screen-sm - 1)){
  #wrapper{
    position: relative;
  }

  body.navbar-fixed,
  body.navbar-fixed.with-topbar{
    padding-top: 0;
  }
  body.navbar-transparent{
    .navbar{
      z-index: auto;
      color: #313842;
    }
  }
  body.navbar-dark .navbar .dropdown-menu{
    color: #ffffff;
  }
  .navbar-nav{
    margin: 0;
    margin-top: 20px;
  }
  .navbar{
    position: static !important;
    min-height: 0;
    display: none;
  }
  .snapjs-left{
    .navbar{
      display: block;
    }
    .navbar-collapse{
      overflow-y: auto;
    }
  }

  .nav .open > a, .nav .open > a:hover, .nav .open > a:focus{
    background-color: #ffffff;
    color: #222222 !important;
  }
  .navbar-collapse{
    display: block;
    position: fixed;
    top: 0;
    left: 15px;
    width: 260px;
    height: 100%;
    margin: 0;
    overflow-y: hidden;
    overflow-x: hidden;
    max-height: 100%;
    background: #262626;
    border-top: none;
    color: #ffffff;
    &:before{
      content: "";
      position: absolute;
      right: 0;
      top: 0;
      bottom: 0;
      width: 20%;
      background: rgba(0,0,0,0, 0.3);
    }
    .open{
      .dropdown-menu{
        max-height: none;
      }
    }
    .dropdown-menu{
      background-color: #262626;
      margin: 0 -15px;
      display: block;
      position: initial;
      float: none;
      z-index: 0;
      position: relative;
      max-height: 0;
      overflow: hidden;
      .dropdown-menu{
        margin: 0;
      }
      a{
        color: #ffffff;
      }
    }
    .active > a{
      color: #262626;
    }
    .nav > li > a{
      padding: 10px 10px 10px 10px;
      color: #ffffff;
    }
    .nav-image, .nav-bottom{
      display: none;
    }
  }
  .yamm-dropdown .navbar-title, .yamm-fw .navbar-title{
    margin-top: 10px;
  }
  .yamm-dropdown .row, .yamm-fw .row{
    margin: 0;
  }
  .yamm-dropdown .list-unstyled, .yamm-fw .list-unstyled{
    margin-bottom: 0;
  }

  .showHeaderSearch{
    padding-right: 30px;
    padding-left: 0;
    margin-right: 0;
  }
  .headerSearchClose{
    padding-right: 0;
  }

  #wrapper{
    .navbar-header{
      position: relative;
      z-index: 9999;
      background-color: #ffffff;
    }
  }
}

@media (max-width: @screen-xs-max) {

  .sidebar{
    padding: 20px 15px;
    margin-top: 20px;
    margin-bottom: -40px;
    background-color: #f4f5f5;
  }
  .sidebar-left{
    margin-top: -40px;
    margin-bottom: 20px;
  }

  .section{
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .section-top{
    padding-top: 40px;
  }

  .section-bottom{
    padding-bottom: 40px;
  }

  /* ****************
    PROCESS CIRCLES
    *************** */

  .ct-process{
    background: url("@{base-url}/lines-vertical.png") repeat-y center;
    font-size: 30px;
    margin-top: 50px;
    a:hover img{
      padding: 14px;
      border-width: 3px;
    }
    .table-cell{
      display: block;
      float: left;
      width: 100%;
      margin-bottom: 20px;
      padding-bottom: 20px;
      &:last-child{
        padding-bottom: 0;
      }
    }
    .ct-process-right, .ct-process-left{
      margin: auto;
      &:before{
        display: none;
      }
    }
    .ct-process-icon{
      text-align: center;
    }
  }

  /* ******
     INPUTS
     ****** */

  .form-group-float-label{
    margin-top: 20px;
  }

  /* ****
   TABS
   **** */
  .tabs-vertical > .nav-tabs > li > a, .tabs-vertical > .nav-tabs .active > a, .tabs-vertical > .nav-tabs .active > a:hover, .tabs-vertical > .nav-tabs .active > a:focus{
    border: 1px solid #eaebec;
  }

  .tabs-vertical > .nav-tabs {
    display: block;
    margin-bottom: 40px;
  }
  .tabs-vertical .tab-content{
    display: block;
  }
  .tabs-vertical .tab-content img{
    max-width: 100%;
  }

  /* ***********
   PRICING BOX
   *********** */

  .pricing{
    div[class^="col-"],section[class^="col-"]{
      padding: 15px;
    }
    h4.sep{
      margin-top: 0px;
    }
  }


  footer.main-footer{
    div[class^="col-"]{
      margin-bottom: 30px;
      margin-top: 30px;
      text-align: center;
    }
  }
  .post-footer{
    div[class^="col-"]{
      margin: 60px 0;
      text-align: center;
      ul, ol{
        li{
          margin-bottom: 15px;
        }
      }
    }
  }

  .text404{
    small{
      text-align: center;
    }
  }
  .project-single-info{
    width: 50%;
  }


  .media-section[data-type="kenburns"]{
    .media-section-image-container{
      > img {
        vertical-align: middle;
        top: 0;
        margin-top: 0;
        margin-left: 0;
        width: auto;
        height: 100%;
        min-width: 100%;
        .opacity(1);
      }
    }
  }

  .contact-office{
    text-align: center;
    margin-top: 40px;
    .hr-left:before {
      left: 50%;
      margin-left: -40px;
    }
  }
}


@media(max-width: 650px){
  .home-full-width .galleryItem{
    width: 100% !important;
  }
}


@media (max-width: @screen-xs) {
  .header-search input[type="text"]{
    width: 100%;
    font-size: 28px;
    padding: 5px 15px;
  }

  .navbar-brand{
    max-width: 166px;
    img{
      max-width: 100%;
    }
  }

  .headerSearchClose{
    top: 10px;
    right: 10px;
  }


  h1.huge{
    font-size: 120px;
  }

  /* **************
     CALL TO ACTION
     ************** */

  .call-box{
    .btn{
      width: 100%;
      margin-left: 0;
    }
  }

  .ct-ribbon{
    margin-left: 20px;
    margin-right: 10px;
  }

  /* **********
     BLOCKQUOTE
     ********** */

  blockquote figure{
    margin-left: -40px;
  }
  blockquote.type1 .underline{
    font-size: 12px;
  }

  /* *******
     ISOTOPE
     ******* */

  .galleryItem{
    width: 100% !important;
    padding-bottom: 20px !important;
  }

  .thumbnailScroller{
    height: 386px;
  }

  .project-thumb{
    &:before{
      display: none;
    }
    .thumb-counting{
      right: 15px;
      top: auto;
      bottom: 5px;
      .opacity(1);
      a{
        color: inherit;
      }
    }
    .thumb-links{
      display: none;
    }
    .thumb-info{
      position: relative;
      color: inherit;
      left: 15px;
      right: 15px;
      bottom: 5px;
      .opacity(1);
      a{
        color: inherit;
      }
      h4{
        margin-top: 15px;
      }
      .thumb-cats{
        margin-top: 0px;
      }
    }
    &:hover{
      .thumb-info{
        bottom: 5px;
        .thumb-cats{
          margin-top: 0;
        }
      }
    }
  }
  .galleryContainer.withSpaces.col-1,
  .galleryContainer.withSpaces.col-2,
  .galleryContainer.withSpaces.col-3,
  .galleryContainer.withSpaces.col-4,{
    .project-thumb .thumb-info h4, .project-thumb .thumb-info .thumb-cats{
      font-size: 18px;
    }
    .project-thumb .thumb-info{
      left: 15px;
      right: 15px;
      .opacity(1);
    }
    .project-thumb:hover .thumb-info{
      bottom: 0px;
    }
  }

  .project-single-info{
    width: 100%;
  }

  /* ***********
   SERVICE BOX
   *********** */

  .service-box{
    padding: 10px;
    i{
      margin-bottom: 10px;
    }
    .h4{
      font-size: 12px;
    }
  }

  .text404{
    font-size: 140px;
    margin-bottom: 40px;
    small{
      font-size: 20px;
    }
  }

  .commentList{
    .media > .pull-left{
      float: none !important;
      display: block;
      text-align: center;
      margin-bottom: 20px;
      margin-right: 0;
    }
    .media-heading, .comment-date, .reply-button{
      display: block;
      text-align: center;
      margin-bottom: 20px;
    }
  }

  .images-widget, .person-box, article.journal .media-object, article.journal .journalblock, .person-image, .galleryContainer.withSpaces, .galleryContainer.withMasonry{
    margin-left: -15px;
    margin-right: -15px;
  }
  .person-box .image-wrapper img{
    width: 100%;
  }
  .galleryContainer.withSpaces .galleryItem,
  .galleryContainer.withMasonry .galleryItem{
    padding: 0;
  }

  .aside-title, .big{
    font-size: 60px;
  }

  .media-section{
    &.no-padding{
      padding: 40px 0;
    }
    .table-cell{
      display: block;
      text-align: center;
    }
    .breadcrumb.pull-right{
      float: none !important;
    }
  }

  .home-full-width{
    .images-widget, .person-box, article.journal .media-object, article.journal .journalblock, .person-image, .galleryContainer.withSpaces, .galleryContainer.withMasonry{
      margin: 0;
    }
  }
}