/* //// Split Nav & Gallery //// */
.work-grid-container {
  display:grid;
  grid-template-areas: "gallery-grid-nav grid-gallery";
  grid-template-columns: 6fr 10fr;
}


.gallery-grid-nav {
  grid-area: gallery-grid-nav;
  display:grid;

  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(8, 1fr);
  /* Position of the navigation section */
  position:-webkit-sticky;
  position:sticky;
  /* Ensuring its attached to the top of the page */
  top:0;
  /* Ensuring the height of to equal to the viewport's height */
  height:100vh;
}


/*-- Buttons --*/

#myBtnContainer {
  grid-column: 1 / span 6;
  grid-row: 7 / span 5;

  line-height: 2em;
}


.btn-box {
  display: block;
}

/* Style the buttons */
.btn {
  border: none;
  outline: none;
  cursor: pointer;
  color: #7b7b7b;
}

.btn:hover {
color: White;
}

.btn.active {
  color: white;
}


#myBtnContainer a:after{
  color: white;
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  display: block;
  margin-top: 0;
  left: 0;
  background: #fff;
  transition: width 0.5s linear;
  -webkit-transition: width 0.5s linear;
}


#myBtnContainer a:hover:after{
  width: 100%;
  background: #fff;
}


.separator {
  margin-left: .3em;
  margin-right: .3em;
  color: #7b7b7b;
  margin-bottom: 10px;
}

.button1 {
  position: relative;
  width: 24%;
}

.button2 {
  position: relative;
  width: 19%;
}

.button3 {
  position: relative;
  width: 21%;
}

.button4 {
  position: relative;
  width: 23%;
}

.button5 {
  position: relative;
  width: 22%;
}

.button6 {
  position: relative;
  width: 22%;
}

/* //// Grid Gallery //// */

.grid-gallery {
  grid-area: grid-gallery;

  min-height: 0;  /* NEW */
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(11, 1fr);
}


.box {
  color: white;
  min-width: 0;
  grid-column: 1 / span 11;
}


.projects-item-container {
   display: grid;
   position: relative;

   grid-template-columns: repeat(2, minmax(150px, 1fr));
   grid-auto-rows: 10.645vh;
   grid-column-gap: 4vw;
   grid-row-gap: 10.645vh;

   grid-auto-flow: dense;
}


.gallery-offset {
  grid-column-start: 2;
  grid-row: span 2;
}


.filterDiv {
  position: relative;
  grid-column: span 1;
  grid-row: span 4;
  color: white;
  display: none;
 }


.filterDiv img {
   position: relative;
   width: 100%;
   height: 100%;
   overflow: hidden;
   -o-object-fit: cover;
      object-fit: cover;
}


.gallery-image {
  display: block;
  width: 100%;
  height: auto;

  opacity: 1;
  -webkit-transition: .5s ease;
  transition: .5s ease;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;

  z-index: 15;
}


.gallery-text {
  position: absolute;
  bottom: 0%;
  padding: 0 0 7% 7%;
  width: 100%;
  display: -webkit-box;

  display: flex;
  align-content: flex-end;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
          flex-direction: column;

  -webkit-transition: .5s ease;

  transition: .5s ease;
  opacity: 0;

  z-index: 9999999999;
}

.gallery-text-category, .gallery-text-title {
  color: white;
}

.filterDiv:hover .gallery-image {
  opacity: 0.7;
  filter: gray; /* IE5+ */
  -webkit-filter: grayscale(1);
}


.filterDiv:hover .gallery-text {
  opacity: 1;
}


.show {
  display: block;
}


@media only screen and (max-width: 576px) {

  .work-grid-container {
    position: relative;
    width: 100%;
    display:grid;
    grid-template-areas: "gallery-grid-nav" "grid-gallery";
    grid-template-columns: 1fr;
    padding: 0 20px 0 20px;
  }

  .gallery-grid-nav {
    grid-area: gallery-grid-nav;
    display:grid;
    height: 50vh;
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    /* Position of the navigation section */
    position:relative;
    /* Ensuring its attached to the top of the page */
    top:0;
    /* Ensuring the height of to equal to the viewport's height */
  }

  #myBtnContainer {
    grid-column: 1 / span 4;
    grid-row: 3 / span 2;

    line-height: 1.5em !important;
  }


  .grid-gallery {
    grid-area: grid-gallery;

    min-height: 0;  /* NEW */
    min-width: 0;
    display: grid;
  }


  .box {
    color: white;
    min-width: 0;
  }


  .projects-item-container {
     display: -webkit-box;
     display: flex;
     -webkit-box-orient: vertical;
     -webkit-box-direction: normal;
             flex-direction: column;
     position: relative;
     width: 100%;
     height: auto
  }


  .gallery-offset {
   display: none;
  }


  .filterDiv {
    position: relative;
    width: 100%;
    height: 72.904vh;
    top: 0;
    margin-bottom: 50px;
   }


   .filterDiv img {
      position: relative;
      width: 100%;
      height: 90%;
      overflow: hidden;
      -o-object-fit: cover;
         object-fit: cover;
   }


   .gallery-text {
     position: relative;
     width: 100%;
     height: 10%;
     padding: 0;
     display: -webkit-box;
     display: flex;
     -webkit-box-pack: end;
             justify-content: flex-end;
     -webkit-box-align:  center;
             align-items:  center;

     -webkit-box-orient: horizontal;

     -webkit-box-direction: reverse;

             flex-direction: row-reverse;
     opacity: 1;

     z-index: 999;
   }


   .gallery-text-title {
     margin-right: 50px;
   }


   .gallery-text-category {
     padding: 0;
     margin: 0;
   }
}
