main {
  padding: 0 !important;
  margin: 0 !important;
}

.gallery {
  height: 100vh;
  background-color: #f8fafa;
  padding: 10%;
  position: relative;
}
.trans {
  transition: all 1s ease;
  -moz-transition: all 1s ease;
  -ms-transition: all 1s ease;
  -o-transition: all 1s ease;
  -webkit-transition: all 1s ease;
}

.gallery__arrow {
  width: 50px;
  height: 50px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(1);
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
}

.gallery__arrow:hover {
  transform: translateY(-53%) scale(1.05);
}

.gallery__arrow--right {
  right: 20px;
}

.gallery__arrow--left {
  left: 20px;
}

.gallery__arrow img {
  filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.7));
  width: 100%;
  height: 100%;
}

.gallery__container {
  overflow-y: scroll;
  direction: rtl;
  display: flex;
  background-color: #f8fafa;
  max-height: 100%;
  height: 100%;
  padding-left: 10px;
}

.gallery__container::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  background-color: #f5f5f5;
  border-radius: 10px;
}

.gallery__container::-webkit-scrollbar {
  width: 10px;
  background-color: #f5f5f5;
}

.gallery__container::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-image: -webkit-gradient(
    linear,
    left bottom,
    left top,
    color-stop(0.44, rgb(122, 182, 217)),
    color-stop(0.72, var(--primary)),
    color-stop(0.86, var(--dark-primary))
  );
}

.gallery__container ul {
  list-style: none;
  width: 100%;
  height: 100%;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
}
.gallery__container ul li {
  position: relative;
  display: flex;
  flex: 0 0 50%;
  height: 20%;
  overflow: hidden;
}

.gallery__container ul li::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  content: '';
  color: white;
  opacity: 0.4;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
  transition: all 0.5s ease;
  -moz-transition: all 0.5s ease;
  -ms-transition: all 0.5s ease;
  -o-transition: all 0.5s ease;
  -webkit-transition: all 0.5s ease;
}
.gallery__container ul li:hover::before {
  opacity: 0;
  background-color: rgba(0, 0, 0, 0.9);
}

.gallery__container ul li a {
  height: 100%;
  width: 100%;
}

.gallery__container ul li img {
  width: 100%;
  height: auto;
  overflow: hidden;
}
.lightbox {
  position: absolute;
  width: 100%;
  height: 100%;
  text-align: center;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
}
.lightbox img {
  max-width: 90%;
  max-height: 80%;
  position: relative;
  top: -100%;
  /* Transition */
  transition: all 1s ease;
  -moz-transition: all 1s ease;
  -ms-transition: all 1s ease;
  -o-transition: all 1s ease;
  -webkit-transition: all 1s ease;
}
.lightbox:target {
  outline: none;
  top: 0;
  opacity: 1;
  pointer-events: auto;
  transition: all 1s ease;
  -moz-transition: all 1s ease;
  -ms-transition: all 1s ease;
  -o-transition: all 1s ease;
  -webkit-transition: all 1s ease;
}
.lightbox:target img {
  top: 0;
  top: 50%;
  transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
  -webkit-transform: translateY(-50%);
}

@media (min-width: 769px) {
  .gallery {
    padding: 7%;
  }
  .gallery__container ul li {
    flex: 0 0 33%;
    height: 33%;
  }
}

@media (min-width: 993px) {
  .gallery {
    padding: 5%;
  }
  .gallery__container ul li {
    flex: 0 0 25%;
  }
}
