:root {
  --num-rows: 4;
}

html, body {
  height: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #24272e;
}

body {
  position: relative;
}

.image-container {
  position: relative;
  opacity: 1;
  transition: opacity 2s;
  cursor: pointer;
}

.gallery-container {
  position: relative;
  height: 100%;
  width: 100%;
}

#gallery1, #gallery2 {
  transition: opacity 2s;
}

.gallery-grid.hidden {
  display: none;
}

.gallery-grid.visible {
  display: grid;
}

.gallery-grid {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(137px, 1fr));
  grid-template-rows: repeat(var(--num-rows), minmax(0, 1fr));
  gap: 2px;
  max-width: calc(137px * 11 + 10 * 2px);
  margin: 0 auto;
  overflow: hidden;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Styles for 2560x1440 screens */
@media screen and (min-width: 1950px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    max-width: calc(190px * 11 + 10 * 2px);
  }

  .gallery-grid img {
    width: 190px;
  }
}

/* Styles for 4k screens */
@media screen and (min-width: 3840px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(274px, 1fr));
    max-width: calc(274px * 11 + 10 * 2px);
  }

  .gallery-grid img {
    width: 274px;
  }
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 8px;
  font-size: 12px;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.company-name {
  font-size: larger;
  font-weight: bold;
}

.date-time {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  cursor: pointer;
}

.large-image {
  max-width: 350px;
}

.large-image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

.report-button {
  display: block;
  text-align: center;
  background-color: #ffffff;
  color: #000000;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 5px;
  margin-top: 10px;
}

.image-container:hover .image-overlay {
  transform: translateY(-100%);
}

.thumbnail-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.thumbnail-image {
  width: 70px;
  height: auto;
  margin: 0 2px;
  cursor: pointer;
}

.thumbnail-container-item {
  position: relative;
}

.thumbnail-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px;
  font-size: 10px;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.thumbnail-time {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.modal-overlay {
  position: fixed; /* Use fixed positioning to keep the overlay in place even when scrolling */
  top: 0;
  left: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
  display: flex;
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  z-index: 20; /* Ensure it sits above other content */
}

.modal-overlay iframe {
  width: 80%; /* Adjust based on preference */
  height: 80%; /* Adjust based on preference */
  border: 2px solid #FFF; /* Optional: adds a border around the iframe */
  border-radius: 10px; /* Optional: rounds the corners of the iframe */
}