/*
*
* This sheet contains the
* project component styles
*
*/
/*
*
* Project Cards Container
*
*/
#component__project-cards-container {
  background-color: white;
}

@media only screen and (max-width:767px) {
  #component__project-cards-container {
    background-color: #E8EAEF;
  }
}

#component__project-cards-container::before, #component__project-cards-container::after {
  content: '';
  display: table;
}

#component__project-cards-container::after {
  clear: both;
}

#component__project-cards-container {
  zoom: 1;
}

/*
*
* Project Card
*
*/
.component__project-card {
  float: left;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/*
*
* Project Card Background Color in ::before
*
*/
.component__project-card::before {
  content: '';
  position: absolute;
  z-index: 1;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  background-color: #EFEFEF;
}

/*
*
* Project Card Animating Gradient in ::after
*
*/
.component__project-card::after {
  content: '';
  position: absolute;
  z-index: 2;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  background-image: linear-gradient(to right, #EFEFEF, #E2E2E2, #EFEFEF);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
  animation-name: animateGradient;
  animation-duration: 1.2s;
  animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000);
  animation-iteration-count: infinite;
  will-change: transform;
}

@keyframes animateGradient {
  0% {
    transform: translate3d(-100%, 0, 0);
  }

  100% {
    transform: translate3d(100%, 0, 0);
  }
}

/*
*
* Project Card Layout when there are
* 1. less than 3 projects
* 2. atleast 4 projects
*
*/
@media only screen and (min-width:768px) {

  /* 4 projects */
  .component__project-card {
    width: 25vw;
    height: 25vw;
  }

  /* 3 projects */
  .component__project-card:first-child:nth-last-child(1),
  .component__project-card:first-child:nth-last-child(1)~.component__project-card,
  .component__project-card:first-child:nth-last-child(2),
  .component__project-card:first-child:nth-last-child(2)~.component__project-card,
  .component__project-card:first-child:nth-last-child(3),
  .component__project-card:first-child:nth-last-child(3)~.component__project-card {
    width: calc(4rem/12 - 30px);
    height: calc(4rem/12 - 30px);
  }

  .component__project-card:first-child:nth-last-child(1),
  .component__project-card:first-child:nth-last-child(2),
  .component__project-card:first-child:nth-last-child(3) {
    margin-left: calc(50vw - 0.5rem + 15px)
  }

  .component__project-card:first-child:nth-last-child(1)~.component__project-card,
  .component__project-card:first-child:nth-last-child(2)~.component__project-card,
  .component__project-card:first-child:nth-last-child(3)~.component__project-card {
    margin-left: 30px;
  }
}

@media only screen and (max-width:767px) {
  .component__project-card:not(:first-child) {
    margin-top: 20px;
  }
}

/*
*
* Project Image
*
*/
.component__project-card .project-image {
  position: relative;
  z-index: 3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media only screen and (min-width:767px) {
  .component__project-card .project-image {
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
  }
}

@media only screen and (max-width:767px) {
  .component__project-card .project-image {
    width: 100vw;
    height: 100vw;
  }
}

/*
*
* Project Details
*
*/
.component__project-card .project-details {
  position: relative;
  z-index: 4;
}

/* Project Name */
.component__project-card .project-name {
  font-family: 'GraphikMedium';
}

@media only screen and (min-width:768px) {
  .component__project-card .project-details {
    position: absolute;
    bottom: 0;
    left: -2px;
    width: calc(100% + 4px);
    background-image: linear-gradient(to top, rgba(7, 7, 7, 0.8), rgba(0, 0, 0, 0));
    height: calc(100% - 87px);
    padding: 0 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 200ms;
  }

  .component__project-card:hover .project-details {
    opacity: 1;
  }

  .component__project-card .project-name {
    font-size: 22px;
    line-height: 30px;
    color: white;
  }

  .component__project-card .project-location {
    margin-top: 13px;
    font-size: 14px;
    line-height: 1;
    color: white;
  }
}
/*  */
.component__project-card .project-details.no-location{
  padding-bottom: 40px;
}
@media only screen and (max-width:767px) {
  .component__project-card .project-details.no-location{
    padding-top:30px;
  }
}
/*  */
@media only screen and (max-width:767px) {
  .component__project-card .project-details {
    padding: 25px;
    background-color: white;
  }

  .component__project-card .project-name {
    font-size: 20px;
    line-height: 28px;
    color: #303843;
  }

  .component__project-card .project-location {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1;
    color: #303843;
  }
}
