/*
* WP View: Case Studies
* Description: Used for the Toolset Views layout
*
* @package Viamo
* @since Viamo 1.0
*/

/*----- Grid Layout -----*/

.js-wpv-view-layout .grid-container {
  display: grid;
  grid-gap: 15px;
  grid-auto-flow: dense;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 250px;
}

.js-wpv-view-layout .grid-container > .wpv-casestudy-item:nth-child(6n+1),
.js-wpv-view-layout .grid-container > .wpv-casestudy-item:nth-child(6n+6){
  grid-area: span 2/span 3; /* 2 Rows, 3 Cols */
}

.js-wpv-view-layout .grid-container > .wpv-casestudy-item:nth-child(6n+2),
.js-wpv-view-layout .grid-container > .wpv-casestudy-item:nth-child(6n+3),
.js-wpv-view-layout .grid-container > .wpv-casestudy-item:nth-child(6n+4){
  grid-column: span 2; /* 2 Cols */
}

.js-wpv-view-layout .grid-container > .wpv-casestudy-item:nth-child(6n+5){
  grid-column: 1/span 2; /* 2 Cols, start at Col 1 */
}

/*----- Case Items -----*/

.wpv-casestudy-item .inner {
  overflow: hidden;
  width: 100%;
  height: 100%;
  position: relative;
  top: 0;
  left: 0;
}

.wpv-casestudy-item .wpv-case-item-bg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  transition: opacity .45s cubic-bezier(.15,.75,.5,1) 0s,transform .45s cubic-bezier(.15,.75,.5,1) 0s;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.wpv-casestudy-item:hover .wpv-case-item-bg {
  transform: scale(1.1);
}

.wpv-casestudy-item .bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: .7;
  background-color: transparent;
  background: linear-gradient(to bottom, rgba(49,49,49,0) 0%, rgba(0,0,0,1) 100%);
}

.wpv-casestudy-item .bg-overlay:before {
  content: '';
  opacity: 0;
  position: absolute;
  z-index: 10;
  pointer-events: none;
  height: 100%;
  width: 100%;
  background: linear-gradient(to bottom, rgba(108,18,59,0) 0%, rgba(108,18,59,1) 100%);
  left: 0;
  top: 0;
  transition: opacity .45s cubic-bezier(.15,.75,.5,1) 0s;
}

.wpv-casestudy-item:hover .bg-overlay:before {
  opacity: .8;
}

.wpv-casestudy-item .content {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: flex-end;
  flex-direction: column;
  padding: 35px;
  z-index: 200;
  text-align: left;
}

.wpv-casestudy-item .content * {
  color: #fff;
}

.wpv-casestudy-item .wpv-case-categories a {
  margin: 0 10px 10px 0;
  line-height: 1.1em;
  display: inline-block;
}

.js-wpv-view-layout .grid-container > .wpv-casestudy-item:nth-child(6n+2) h3,
.js-wpv-view-layout .grid-container > .wpv-casestudy-item:nth-child(6n+3) h3,
.js-wpv-view-layout .grid-container > .wpv-casestudy-item:nth-child(6n+4) h3,
.js-wpv-view-layout .grid-container > .wpv-casestudy-item:nth-child(6n+5) h3 {
  font-size: 24px;
  line-height: 30px;
}

.wpv-casestudy-item .wpv-case-item-link {
  z-index: 10;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/*----- Filtering -----*/

.wpv-view-wrapper .wpv-custom-search-loading-overlay {
  background: rgba(241, 245, 249, 0.6) !important;
}

form.wpv-filter-form {
  display: flex;
  margin: 0 auto 50px auto;
}

form.wpv-filter-form > div {
  width: 100%;
  margin-right: 15px;
  text-align: left;
  font-weight: 700;
}

form.wpv-filter-form > div select {
  background-color: #FAFAFA;
  border: 1px solid #707070;
  border-radius: 0;
  font-size: 16px;
  padding: 15px 10px;
}

input.wpv-submit-trigger {
  height: 53px;
  align-self: flex-end;
}

@media only screen and (max-width: 999px) {
  form.wpv-filter-form {
    display: block;
  }
  form.wpv-filter-form div {
    margin-bottom: 25px;
  }
  .js-wpv-view-layout .grid-container {
    display: block;
  }
  .js-wpv-view-layout .grid-container > .wpv-casestudy-item {
    min-height: 0 !important;
    margin-bottom: 30px;
  }
  .wpv-casestudy-item .inner {
    min-height: 300px;
  }
  .wpv-casestudy-item h3 {
    font-size: 24px !important;
    line-height: 30px !important;
  }
  input.wpv-submit-trigger {
    width: 100%;
  }
}
