/* *****  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;
}

/* 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;
  }  
}