.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
  overflow: hidden;
}

.lightbox.show {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  transform: scale(1);
  opacity: 0;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  z-index: 1000;
}

.lightbox.show img {
  transform: scale(1);
  opacity: 1;
}

.main__content .rectangle img {
  height: 100%;
  width: auto;
  object-fit: cover;
}

.lightbox-controls {
  position: absolute;
  bottom: 120px;
  display: flex;
  z-index: 10000;
  justify-content: center;
  width: 100%;
  gap: 8px;
}

.lightbox-controls button img {
  width: 22px;
  height: auto;
}

.lightbox-controls button {
  background: rgba(255, 255, 255, 0.438);
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  border-radius: 20px;
  border: black solid 1px;
}

.lightbox-controls button:hover {
  background: white;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: black solid 1px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.438);
  transition: background 0.2s;
  color: black;
  font-size: 28px;
  font-weight: 100;
  cursor: pointer;
  z-index: 10000;
}

.lightbox-close:hover {
  background: white;
}

@media screen and (max-width: 768px) {
  .lightbox-controls {
    bottom: 160px;
  }
}

@media screen and (max-width: 600px) {
  .lightbox-controls {
    bottom: 210px;
  }
}

@media screen and (max-width: 480px) {
  .lightbox-controls {
    bottom: 240px;
  }
}

@media screen and (max-width: 360px) {
  .lightbox-controls {
    bottom: 290px;
  }
}
