@import url('./variables.css');

/*! GALLERY STYLES */
.main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.main__title {
  margin-block: 40px;
  font-size: 2.5rem;
  color: var(--title-color);
}
.main__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.main__gallery-image {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 20px #00000020;
  transition: 0.3s;
}
.main__gallery-image:hover {
  transform: scale(1.02);
}

/*! MEDIA QUERY */
@media all and (width <= 970px) {
  .main__gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media all and (width <= 650px) {
  .main__gallery {
    margin-inline: 15px;
    grid-template-columns: 1fr;
  }
  .main__gallery-image {
    width: 100%;
  }
}

/*! LIGHTBOX STYLES */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000e6;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99;
}
.lightbox__image {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}
.lightbox.hidden {
  display: none;
}
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.lightbox__close:hover {
  opacity: 0.8;
  scale: 1.04;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  z-index: 100;
  border-radius: 10px;
  transition: 0.3s;
  user-select: none;
}
.lightbox__nav:hover {
  opacity: 0.8;
  scale: 1.04;
}
#prev-btn {
  left: 10px;
}
#next-btn {
  right: 10px;
}
