/* *****  GALLERIES ***** */

.gallery-wrapper {
  padding: 15px 20px;
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: auto;
  grid-gap: 1rem;
  grid-auto-flow: dense;
}

/* Another way to do the same without declaring in the classes - remove h-x w-x from classes */
/* .gallery-wrapper {
  padding: 2rem 10rem;
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(5, 300px);
  grid-auto-rows: 200px;
  grid-gap: 1rem;
  grid-auto-flow: dense;
}
 */

.gallery-item {
  width: 100%;
  height: 100%;
  position: relative;
  filter: drop-shadow(2px 2px 3px #333);
}

.gallery-item .image {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery-item .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  cursor: pointer;
  transition: all 400ms ease-in;
  transform: scale(1);
}

.gallery-item .image img:hover {
  transform: scale(1.1);
}

.w-1{
  grid-column: span 1;
}
.w-2{
  grid-column: span 2;
}
.w-3{
  grid-column: span 3;
}
.w-4{
  grid-column: span 4;
}
.w-5{
  grid-column: span 5;
}

.h-1{
  grid-row: span 1;
}
.h-2{
  grid-row: span 2;
}
.h-3{
  grid-row: span 3;
}
.h-4{
  grid-row: span 4;
}
.h-5{
  grid-row: span 5;
}

/* ***** LIGHTBOX EFFECT ***** */

#lightbox {
  position: fixed;
  z-index: 10001;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, .92);
  display: none;
}

#lightbox.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

#lightbox img {
  max-width: 90%;
  max-height: 80%;
  padding: 4px;
  /* border-radius: 1%; */
  /* background-color: white; */
  border: 0.2px solid silver;
}

.img-wrapper {
  position: relative;
  margin-top: 15px;
}
  .img-wrapper img {
    width: 100%;
  }


.img-overlay {
  background: rgba(0,0,0,0.7);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  }
  .img-overlay i {
    color: #fff;
    font-size: 3em;
  }

#overlay {
  background: rgba(0,0,0,0.7);
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  -webkit-user-select: none;
  -moz-user-select: none;    
  -ms-user-select: none; 
  user-select: none; 
}
#overlay img
{
 width: 450px;
 height: 600px;
}

#nextButton {
  color: #fff;
  font-size: 2em;
  transition: opacity 0.8s;
  margin-left: 20px;
  }
  #nextButton:hover {
    opacity: 0.7;
  }
  @media screen and (min-width:768px) {
  #nextButton {
    font-size: 3em;
  }
}
#prevButton {
  color: #fff;
  font-size: 2em;
  transition: opacity 0.8s;
  margin-right: 20px;
}
  #prevButton:hover {
    opacity: 0.7;
  }
  @media screen and (min-width:768px) {
  #prevButton {
    font-size: 3em;
  }
}

#exitButton {
  color: #fff;
  font-size: 2em;
  transition: opacity 0.8s;
  position: absolute;
  top: 15px;
  right: 15px;
}
  #exitButton:hover {
    opacity: 0.7;
  }
  @media screen and (min-width:768px) {
  #exitButton{
    font-size: 3em;
  }
}










/* Generic Styles */
:root {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/*html {
  height: 100%;
  font-family: sans-serif;
  font-size: 1vw; 
  scroll-behavior: smooth;
}

body {
  height: 100vh;
  min-width: 100vw;
  margin: 0;
	padding: 0;
}*/

h1 {
  text-align: center;
  padding: 1rem;
  /* background: -webkit-linear-gradient(130deg, #A155DA, #41B3A3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;*/
}

@media only screen and (max-width: 800px) {
  .gallery-wrapper {
    grid-template-columns: repeat(2, 2fr);
    grid-template-rows: 1fr;
    grid-gap: 2;
    grid-auto-flow: dense;
  }  
  .gallery-container:nth-child(3n+2) {
    grid-column: 1 / span 2;
    grid-row-end: span 2;
  }
  
  .gallery-container:nth-child(4n+3) {
    grid-column: 2 / span 1;
    grid-row-end: span 2;
  }
  
/*  reseting the css for the class within the divs to show a different way to achieve grid control using the nth childs*/
  .w-1,
  .w-2,
  .w-3,
  .w-4,
  .w-5 {
  grid-column: span 1;
}

.h-1,
.h-2,
.h-3,
.h-4,
.h-5 {
  grid-row: span 1;
}
  
}

@media only screen and (max-width: 400px) {
/* An example to use combined with flex but could also be grids with different repetition of columns  */
  .gallery-wrapper {
    display: flex;
    flex-direction: column;
    flex: wrap;
    gap: 2.5rem;
    margin: 5rem;
  }  
}
@media (max-width: 1199px)
{
     #overlay img
    {
     width: 300px;
     height: 450px;
    }

}
@media (max-width: 1023px)
{
     #overlay img
    {
     width: 300px;
     height: 450px;
     margin-top: -400px;
    }
    #nextButton
   {
     margin-top: -400px;
   }
   #prevButton
   {
     margin-top: -400px;
   }

}
@media (max-width: 767px)
{
     #overlay img
    {
     width: 300px;
     height: 450px;
     margin-top: -50px;
    }
    #nextButton
   {
     margin-top: -50px;
   }
   #prevButton
   {
     margin-top: -50px;
   }

}
@media (max-width: 479px)
{
     #overlay img
    {
     width: 240px;
     height: 360px;
     margin-top: 0;
    }
    #nextButton
   {
     margin-top: 0;
   }
   #prevButton
   {
     margin-top: 0;
   }
   .gallery-wrapper {
    display: flex;
    flex-direction: column;
    flex: wrap;
    gap: 2.5rem;
    margin:0rem!important;
  }  

}
@media (max-width: 359px)
{
     #overlay img
    {
     width: 200px;
     height: 300px;
     margin-top: 0;
    }
    #nextButton
   {
     margin-left: 10px;
     
   }
   #prevButton
   {
     margin-right: 10px;
   }

}