@import url(https://fonts.googleapis.com/css?family=Raleway);

@media screen and (max-width: 640px){
  .container{
    display: block;
    width: 100%;
  }
}

@media screen and (min-width: 900px){
  .container{
    width: 33.33333%;
    }
}

.flex-container {
    margin-top: 5%;
    display: flex;
    justify-content: start;
    flex-wrap: wrap;
    padding-left: 20%;
  }
  
.flex-cell {
    flex: 0 0 50%;
    display: flex;
    justify-content: center;
    align-items: stretch;
    box-sizing: border-box;
  }
  
.flex-cell:before {
    content: '';
    display: table;
    padding-top: 100%;
  }
  
.flex-item {
    flex-grow: 1;
    border: 1px solid white;
    background: #A8FAD6;
    color: white;
    
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 250ms;
  }

.flex-item:hover {
      transform: translateY(-20px);
      background-color: #FCD9CF;
  }
  
.flex-item > img {
      object-fit: cover;
      width: 100%;
  }

.content {
  position: relative;
  /* width: 100%; */
  /* max-width: 400px; */
  margin: auto;
  overflow: hidden;
}

.content .content-overlay {
  background: rgba(0,0,0,0.7);
  position: absolute;
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  opacity: 0;
  -webkit-transition: all 0.4s ease-in-out 0s;
  -moz-transition: all 0.4s ease-in-out 0s;
  transition: all 0.4s ease-in-out 0s;
}

.content:hover .content-overlay{
  opacity: 1;
}

.content-details {
  position: absolute;
  text-align: center;
  padding-left: 1em;
  padding-right: 1em;
  width: 100%;
  top: 50%;
  left: 50%;
  opacity: 0;
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  -webkit-transition: all 0.3s ease-in-out 0s;
  -moz-transition: all 0.3s ease-in-out 0s;
  transition: all 0.3s ease-in-out 0s;
}

.content:hover .content-details{
  top: 50%;
  left: 50%;
  opacity: 1;
}

.content-details h3{
  color: #fff;
  font-weight: 500;
  font-size: 30px;
  letter-spacing: 0.15em;
  margin-bottom: 0.5em;
  text-transform: uppercase;
}

.content-details p{
  color: #fff;
  font-size: 1em;
  margin-left: -100px;
}

.fadeIn-bottom{
  top: 100%;
}

.portfolios-title {
  background-color: #FCD9CF;
  padding: 5px;
  margin-left: 20%;
}

.portfolio-title p {
  text-align: center;
  padding-left: 15%;
  letter-spacing: 0.15em;
  line-height: 2em;
}

@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (-webkit-min-device-pixel-ratio: 1) {
    .portfolio-title p {
      letter-spacing: 0.15em;
      line-height: 2em;
      font-size: 15px;
      margin-left: 60px;
    }

    .content-details h3 {
      margin-left: -10px;
      font-size: 20px;
    }

    .content-details p {
      margin-left: -30px;
      font-size: 12px;
    }
}

@media only screen 
  and (min-device-width: 320px) 
  and (max-device-width: 480px)
  and (-webkit-min-device-pixel-ratio: 2) {
    .portfolio-title p {
      letter-spacing: 0.15em;
      line-height: 2em;
      font-size: 12px;
      margin-left: 30px;
    }

    .content-details h3 {
      margin-left: -20px;
      font-size: 10px;
    }

    .content-details p {
      /* margin-right: 120px; */
      margin-left: -30px;
      font-size: 6px;
    }
}

@media only screen 
  and (min-device-width: 320px) 
  and (max-device-width: 376px)
  and (-webkit-min-device-pixel-ratio: 2) {
    .portfolio-title p {
      letter-spacing: 0.15em;
      line-height: 2em;
      font-size: 10px;
      margin-left: 30px;
    }

    .portfolios-title {
      font-size: 25px;
    }

    .content-details h3 {
      margin-left: -1px;
      font-size: 10px;
      width: auto;
    }

    .content-details p {
      /* margin-right: 120px; */
      margin-left: -12px;
      font-size: 5px;
      width: auto;
    }
}