/* CSS with BEM convention */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.popup--active {
  display: flex;
}

.popup__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Dark semi-transparent background */
  z-index: 1;
}

.popup__content {
  position: relative;
  z-index: 2;
  max-width: 90%;
  max-height: 90vh;
  margin: 0 auto;
}

.popup__link {
  display: block;
  width: 100%;
  height: 100%;
}

.popup__image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.popup__close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 30px;
  height: 30px;
  background: #fff;
  border-radius: 50%;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.popup__close:hover {
  background: #f0f0f0;
}