:root {
  --modal-bg: rgba(0, 0, 0, 1);
  --modal-border-color: #666;
  --caption-color: #ccc;
  --close-color: #f00;
  --close-hover: #bbb;
  --modal-max-width: 1200px;
  --modal-padding: 10px;
}

/* Thumbnail image */
.myImg {
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.3s ease;
  max-width: 218px;
  max-height: 145px;
  display: block;
  margin-bottom: 20px;
}

.myImg:hover {
  opacity: 0.5;
}

/* Modal overlay */
.modal {
  display: none;
  position: fixed; /* More consistent across devices */
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-image:url('../homePageImages/bg.gif'); 
  background-repeat:repeat;
  /*background-color: #000;*/
}

/* Enlarged image */
.modal-content {
  margin: auto;
  display: block;
  width: 100%;
  max-width: var(--modal-max-width);
  height: auto;
  border: 1px solid #555;
  animation: zoom 0.6s ease;
}


/* Caption text */
#caption {
  margin: auto;
  display: block;
  width: 90%;
  max-width: var(--modal-max-width);
  text-align: center;
  color: var(--caption-color);
  padding: var(--modal-padding) 0;
  animation: zoom 0.6s ease;
}

/* Zoom animation */
@keyframes zoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* Close button */
.close {
  position: absolute;
  top: 10px;
  right: 25%;
  color: #f00;
  font-size: 25px;
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover,
.close:focus {
  color: var(--close-hover);
  text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 750px) {
  .myImg:hover {
    opacity: 1;
  }

  .modal-content {
    width: 100%;
  }

  .close {
    right: 10px;
    font-size: 20px;
  }
}

@media (min-width: 751px) {
  .modal-content {
    width: 80%;
  }
}
