/******************************* LIST */
.staff3-heading {
  text-align: center;
}

#staff3-results {
  position: relative;
}

.staff3-items.staff3-row {
  display: -webkit-box;
  display: flex;
  flex-wrap: wrap;
  -webkit-box-pack: left;
          justify-content: left;
  margin-bottom: 2em;
}

@media (min-width: 768px) {
  .staff3-items.staff3-row {
    -webkit-box-pack: start;
            justify-content: flex-start;
  }
}

/* "Normal" list items */
.staff3-items.staff3-row.normal-list article {
  padding: 0;
  width: 100%;
  margin-bottom: 2em;
  text-align: center;
}

@media (min-width: 768px) {
  .staff3-items.staff3-row.normal-list article {
    text-align: center;
    margin: 0 2.666667% 1.5em 0;
    -webkit-box-flex: 0;
            flex: 0 0 31.55%;
  }
  .staff3-items.staff3-row.normal-list article:nth-child(3n) {
    margin: 0 0 1.5em 0;
  }
}

@media (min-width: 992px) {
  .staff3-items.staff3-row.normal-list article,
  .staff3-items.staff3-row.normal-list article:nth-child(3n) {
    text-align: center;
    padding: 0;
    margin: 0 2.666667% 1.5em 0;
    -webkit-box-flex: 0;
            flex: 0 0 23%;
  }
  .staff3-items.staff3-row.normal-list article:nth-child(4n) {
    margin: 0 0 1.5em 0;
  }
}

/* Pastor Items */
.staff3-items.staff3-row.pastors {
  -webkit-box-pack: center;
          justify-content: center;
}

.staff3-items.staff3-row.pastors article {
  text-align: center;
  width: 100%;
  padding: 0;
  margin-bottom: 2em;
}

@media (min-width: 768px) {
  .staff3-items.staff3-row.pastors article {
    -webkit-box-flex: 0;
            flex: 0 0 40%;
    margin: 0 1.33333% 2em;
  }
}

@media (min-width: 992px) {
  .staff3-items.staff3-row.pastors article {
    -webkit-box-flex: 0;
            flex: 0 0 27%;
    margin: 0 1.33333% 2em;
  }
}

/* Featured Items */
.staff3-items.staff3-row.featured {
  -webkit-box-pack: left;
          justify-content: left;
}

.staff3-items.staff3-row.featured article {
  text-align: center;
  width: 100%;
  padding: 0;
  margin-bottom: 2em;
}

@media (min-width: 768px) {
  .staff3-items.staff3-row.featured article {
    margin: 0 2.666667% 1.5em 0;
    -webkit-box-flex: 0;
            flex: 0 0 31.55%;
  }
  .staff3-items.staff3-row.featured article:nth-child(3n) {
    margin: 0 0 1.5em 0;
  }
}

@media (min-width: 992px) {
  .staff3-items.staff3-row.featured article,
  .staff3-items.staff3-row.featured article:nth-child(3n) {
    margin: 0 2.666667% 1.5em 0;
    -webkit-box-flex: 0;
            flex: 0 0 23%;
    padding: 0;
  }
  .staff3-items.staff3-row.featured article:nth-child(4n) {
    margin: 0 0 1.5em 0;
  }
}

.staff3-items article .staff3-image {
  position: relative;
  margin-bottom: 1em;
  overflow: hidden;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.staff3-items article .staff3-image img {
  display: block;
  width: 100%;
  height: auto;
}

.staff3-items article .staff3-image:hover .staff3-rollover {
  opacity: 1;
}

.staff3-items article .staff3-rollover {
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  opacity: 0;
  transition: 0.4s;
}

.staff3-items article .staff3-rollover .staff3-rollover-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 75%;
  height: calc(100% - 58px);
  /*buffer matches ul (li height + ul top calc + 10)*/
  overflow-x: hidden;
  overflow-y: auto;
}

.staff3-items article .staff3-rollover .staff3-rollover-inner a {
  position: relative;
  display: block;
  height: 100%;
}

.staff3-items article .staff3-rollover .staff3-rollover-inner p {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  width: 90%;
  padding: 1em 5% 0 5% !important;
  margin: 0 !important;
  font-size: 14px;
  line-height: 2em;
  text-align: center;
}

.staff3-items article .staff3-rollover .staff3-rollover-inner span.spacer {
  height: 100%;
  display: inline-block;
  vertical-align: middle;
}

.staff3-items article .staff3-rollover ul, .staff3-items article .staff3-rollover li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.staff3-items article .staff3-rollover ul {
  position: absolute;
  left: 0;
  bottom: 20px;
  width: 100%;
  display: -webkit-box;
  display: flex;
  -webkit-box-pack: center;
  justify-content: center;
}

.staff3-items article .staff3-rollover ul li {
  padding: 0 .25rem !important;
}

.staff3-items article .staff3-rollover ul li a {
  display: block;
  width: 28px;
  height: 28px;
  text-align: center;
  border-radius: 100%;
  opacity: .5;
}
.staff3-items article .staff3-rollover ul li a:hover {
  opacity: 1;
}

.staff3-items article .staff3-rollover ul li a .icon {
  display: inline-block;
  font-size: 16px;
  line-height: 28px;
}

.staff3-items article .staff3-info p {
  font-size: 16px;
}

.staff3-items article .staff3-info .name {
  margin-bottom: 0;
  line-height: 1.3;
}

.staff3-items.pastors article .staff3-rollover .staff3-rollover-inner p {
  padding: 1em 10% 0 10% !important;
  width: 80%;
  font-size: 14px;
}

/* SEARCH */
#staff3 .filters #module-search {
  position: relative;
  width: 200px;
}

@media (min-width: 992px) {
  #staff3 .filters #module-search {
    width: 220px;
  }
}

#staff3 .filters #module-search #module-search-term {
  border: 0;
  height: 47px;
  padding: 4px 1em 0;
}

#staff3 .filters #module-search #search_submit {
  display: block;
  position: absolute;
  right: 0;
  top: 0;
  width: 20%;
  height: 47px;
  text-align: center;
  margin: 0;
  padding: 0;
  font-size: 0;
  text-indent: -9999px;
  cursor: pointer;
  border: none;
}

#staff3 .filters #module-search #search_submit + span.icon {
  font-size: 1.25rem;
  z-index: 2;
  position: absolute;
  top: 50%;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  right: .5em;
  pointer-events: none;
  transition: color .2s ease-in-out;
  -moz-transition: color .2s ease-in-out;
  -webkit-transition: color .2s ease-in-out;
}

/******************************* DETAIL */
.staff3-items.staff3-detail article {
  overflow: hidden;
  margin: 1em 0;
}

@media (min-width: 768px) {
  .staff3-items.staff3-detail article .staff3-image {
    float: left;
    width: 30%;
  }
}

@media (min-width: 768px) {
  .staff3-items.staff3-detail article .staff3-info {
    float: right;
    width: 65%;
  }
}

.staff3-items.staff3-detail article .staff3-info h3 {
  text-transform: uppercase;
}

.staff3-items.staff3-detail article ul.staff3-social {
  list-style: none !important;
  margin: .75em 0 1.5em 0 !important;
  padding: 0 !important;
}

.staff3-items.staff3-detail article ul.staff3-social li {
  display: inline-block;
  list-style: none !important;
  margin: 0 1em 0 0 !important;
  padding: 0 !important;
}

.staff3-items.staff3-detail article ul.staff3-social li a {
  display: block;
  width: 28px;
  height: 28px;
  text-align: center;
  border-radius: 100%;
}

.staff3-items.staff3-detail article ul.staff3-social li a .icon {
  display: inline-block;
  font-size: 16px;
  line-height: 28px;
}

#staff3-return {
  text-align: center;
  font-size: 13px;
  line-height: 1;
}

@media (min-width: 768px) {
  #staff3-return {
    text-align: right;
  }
}

#staff3-return a {
  display: inline-block;
  text-transform: uppercase;
  padding: .75em 2em;
  line-height: 1;
  font-weight: 700;
}
