
/* This allows the amount of columns to be set to 6 with each section taking up a single equal fraction. It also sets the grid row height to interchange between 100px and 300px automatically. Grid-auto-flow attemps to fill any wholes created from spanning.*/
.gcontain{
  display:grid;
  grid-template-columns: repeat(6,1fr);
  grid-auto-rows:100px 300px;
  grid-gap:10px;
  grid-auto-flow:dense;
}

.gallery-item{
  width:100%;
  height:100%;
  position:relative;
}

.gallery-item .images{
  width:100%;
  height:100%;
  overflow:hidden
}

/* object-fit allows the element to re-size itself. object-position sets the elemnt to focus on the center of the image instead of the default top left*/
.gallery-item .images img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position: 50% 50%;
  cursor: pointer;
  transition:.5s ease-in-out;
}

.gallery-item:hover .images img{
  overflow: hidden;
}

.gallery-item .title{
  opacity:0;
  position: absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
    color:#fff;
  font-size:20px;
  pointer-events:none;
  z-index:4;
  transistion: .3s ease-in-out;
  -webkit-backdrop-filter: blur(5px) saturate(1.8);
  backdrop-filter: blur(5px) saturate(1.8);
   max-width: 80%;
}

.gallery-item:hover .title{
  opacity:1;
  animation: move-down .3s linear;
  padding:1em;
  width:100%;
}

/* grid-column allows an element to span however many  columns you designate, in this case it is 3 for all elements with the w-3 class. This is helpful for a dynamic grid*/
.w-3{
  grid-column: span 3
}

.w-2{
  grid-column: span 2
}

.w-1{
  grid-column: span 1
}

.w-4{
  grid-column: span 4
}

.w-5{
  grid-column: span 5
}

.w-6{
  grid-column: span 6
}

/*  grid-row allows an element to span however many  rows you designate, in this case it is 3 for all elements with the h-3 class. */
.h-3{
  grid-row: span 3
}

.h-1{
  grid-row: span 1
}
.h-2{
  grid-row: span 2
}
.h-4{
  grid-row: span 4
}
.h-5{
  grid-row: span 5
}
.h-6{
  grid-row: span 6
}

/* lightbox */

#lightbox {
  position:fixed;
  z-index: 1000;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, .8);
  display: none;
}

#lightbox.active{
  display: flex;
  justify-content: center;
  align-items: center
}

#lightbox img {
  max-width: 90%;
  max-height: 80%;
  padding: 2px;
  background-color: gray;
  border: 3px solid black;
}

/* responsive to phone screen size */
@media screen and (max-width:550px){
  .container{
    grid-template-columns: repeat(2,1fr);
  }
.w-3,.w-4,.w-5,.w-6{
    grid-column:span 1;
  }
}


/* animation instructions for move-down in text */
@keyframes move-down{
  0%{
    top:10%;
  }
  50%{
    top:35%
  }
  100%{
    top:50%
  }
}