
main {
  background-image: url("../../images/backgrounds/gallery.jpg?v=1763854361");
  background-size: auto;
  background-repeat: repeat;
  background-position: center;
  background-color: #000;
}

main > div {
  background-color: rgba(0, 0, 0, 0) !important;
}

#gallery {
  box-sizing: border-box;
  padding: var(--pagePadding) calc(var(--pagePadding) + var(--pageMargin));
  width: 100%;
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 50px;
}

#gallery > h2 {
  align-self: flex-start;
}

#galleryNav {
  width: 100%;
  margin: 0 calc(var(--pagePadding) + var(--pageMargin));
}

#galleryNav ul {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-content: center;
  align-items: center;
}

#galleryNav ul li {
  width: 100%;
  height: 100%;
  aspect-ratio: 1.5/1;
}

#galleryNav a {
  display: flex;
  position: relative;
  height: 100%;
  width: 100%;
  cursor: pointer;
  overflow: hidden;
}

#galleryNav a:focus-visible {
  z-index: 2;
}

#galleryNav a:hover img, #galleryNav a:focus-visible img {
  transform: scale(1.1);
  filter: brightness(1.1);
}

#galleryNav a:hover p, #galleryNav a:focus-visible p {
  color: #fff;
}

#galleryNav img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s, filter 0.2s;
  background-color: #000;
  will-change: transform;
  position: relative;
  z-index: 0;
  pointer-events: none;
}

#galleryNav a::after {
  content: "";
  background-color: rgba(0, 0, 0, 0.001);
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 1;
}

#galleryNav p {
  position: absolute;
  bottom: 0;
  left: 0;
  line-height: 1;
  width: 100%;
  background-color: var(--elementBackgroundColorTransparent);
  padding: 2%;
  box-sizing: border-box;
  font-size: clamp(.8rem, .2rem + 1vw, 3rem);
  font-family: Arial, Helvetica, sans-serif;
  text-transform: capitalize;
  backdrop-filter: blur(1px);
  color: rgb(212, 212, 212);
  transition: color 0.2s;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-all;
}

@media (max-width: 950px) and (orientation: portrait) { 
  #gallery {
    padding: 0 0 50px 0;
  }

  #gallery > h2 {
    align-self: center;
  }

  #galleryNav {
    width: 100%;
    margin: 0;
  }

  #galleryNav ul {
    grid-template-columns: auto;
    gap: 50px;
  }

  #galleryNav ul li {
    width: 80vw;
    height: 80vw;
  }
}

@media (max-width: 950px) and (orientation: landscape) { 
  #gallery {
    padding: 0 0 50px 0;
  }

  #gallery > h2 {
    align-self: center;
  }

  #galleryNav {
    width: 100%;
    margin: 0;
  }

  #galleryNav ul {
    grid-template-columns: auto;
    gap: 50px;
  }

  #galleryNav ul li {
    width: 80vh;
    height: 80vh;
  }
}