/*!
 * Porto Cards Backport (for Porto 5.7 + Bootstrap 3.3.7)
 * Extracted from Porto 9.9.2 and adapted for Bootstrap 3
 */

/* Base Card */
.card {
  position: relative;
  display: block;
  background-color: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: .25rem;
  margin-bottom: 1.5rem;
}

.card-header {
  border-bottom: 1px solid rgba(0,0,0,.06);
  background-color: #f7f7f7;
  padding: .75rem 1.25rem;
  font-weight: 600;
}

.card-body {
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.card-footer {
  border-top: 1px solid rgba(0,0,0,.06);
  background-color: #f7f7f7;
  padding: .75rem 1.25rem;
}

/* Card Titles/Text */
.card-title {
  margin-bottom: .75rem;
}
.card-text:last-child {
  margin-bottom: 0;
}

/* Card Images */
.card-img-top,
.card-img-bottom {
  width: 100%;
  border-radius: calc(.25rem - 1px);
}
.card-img-top {
  border-top-left-radius: calc(.25rem - 1px);
  border-top-right-radius: calc(.25rem - 1px);
}
.card-img-bottom {
  border-bottom-left-radius: calc(.25rem - 1px);
  border-bottom-right-radius: calc(.25rem - 1px);
}
.card .img-thumbnail {
  border: 0;
  border-radius: 0;
  margin-bottom: 0;
}

/* Helpers */
.card-text-color-hover-light:hover * {
  color: #fff !important;
}
.card-background-image-hover {
  background-size: cover;
  background-position: center;
}
.card-background-image-hover .card-body {
  background: rgba(255,255,255,0.9);
  margin: 1rem;
  padding: 1rem;
}

/* Borders */
.card-border {
  overflow: hidden;
}
.card-border:after {
  content: "";
  transition: .2s all ease;
  backface-visibility: hidden;
  position: absolute;
  left: 50%;
  height: 5px;
  width: 100%;
  transform: translateX(-50%);
  background-color: var(--primary, #CCC);
}
.card-border.card-border-top:after { top: 0; }
.card-border.card-border-bottom:after { bottom: 0; }
.card-border.card-border-hover:after { width: 0; }
.card-border.card-border-hover:hover:after { width: 100%; }

/* Flip Cards */
.flip-card {
  position: relative;
  border: none;
  perspective: 1000px;
}
.flip-card .flip-front,
.flip-card .flip-back {
  padding: 2rem;
  backface-visibility: hidden;
  background: #fff;
  box-shadow: 0 0 44px -10px rgba(0,0,0,.15);
  transform-style: preserve-3d;
  transition: ease transform 500ms;
}
.flip-card .flip-front { transform: rotateY(0deg); }
.flip-card .flip-back {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  transform: rotateY(180deg);
}
.flip-card:hover .flip-front { transform: rotateY(-180deg); }
.flip-card:hover .flip-back { transform: rotateY(0deg); }
.flip-card.flip-card-vertical .flip-front { transform: rotateX(0deg); }
.flip-card.flip-card-vertical .flip-back { transform: rotateX(180deg); }
.flip-card.flip-card-vertical:hover .flip-front { transform: rotateX(-180deg); }
.flip-card.flip-card-vertical:hover .flip-back { transform: rotateX(0deg); }
