.gallery {
  display: grid;
  grid-template-columns: repeat(14, 1fr); /* Exactly 14 columns */
  gap: 3px; /* Minimal spacing between images */
  margin-top: 20px;
  padding: 0 10px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 2px; /* Smaller border radius for tiny images */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Subtle shadow */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.gallery-item div {
  width: 100%;
  height: 60px; /* Small fixed height for compact grid */
  display: block;
  transition: transform 0.2s ease;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.gallery-item:hover {
  transform: scale(1.1); /* Slight zoom on hover */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 10; /* Bring hovered item to front */
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(10, 1fr); /* Reduce to 10 columns on tablets */
  }
}

@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(7, 1fr); /* 7 columns on mobile */
    gap: 2px;
  }
  
  .gallery-item div {
    height: 50px; /* Slightly smaller on mobile */
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr); /* 4 columns on small phones */
  }
  
  .gallery-item div {
    height: 70px; /* Make them a bit taller on tiny screens */
  }
}

/* ============================================
   HOTSPOT STYLES
   ============================================ */

/* Background highlight when hovering a hotspot */
.gallery-item.hotspot-active {
  background-color: rgba(3, 113, 156, 0.3); /* Light blue background */
  border-radius: 4px;
  padding: 2px;
}

/* Info popup box */
.hotspot-info {
  position: absolute;
  background-color: white;
  border: 2px solid #03719c;
  border-radius: 6px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  max-width: 300px;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
  z-index: 1000;
  pointer-events: none; /* So it doesn't interfere with mouse movement */
  
  /* Animation - starts hidden and slightly raised */
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Show the info box when active */
.hotspot-info.active {
  opacity: 1;
  transform: translateY(0);
}

/* Little arrow pointing to the image - the fill */
.hotspot-info::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

/* Little arrow pointing to the image - the border */
.hotspot-info::before {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid #03719c;
}

/* Toggle button styling */
.hotspot-toggle-btn {
  display: block;
  margin: 20px auto;
  padding: 12px 24px;
  background-color: #03719c;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-family: monospace;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hotspot-toggle-btn:hover {
  background-color: #025a7a;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.hotspot-toggle-btn:active {
  transform: translateY(0);
}

.hotspot-toggle-btn.active {
  background-color: #d9534f; /* Red when active (showing hotspots) */
}

.hotspot-toggle-btn.active:hover {
  background-color: #c9302c;
}

/* Background highlight when hovering a hotspot */
.gallery-item.hotspot-active {
  background-color: #c9302c; 
  border-radius: 5px;
  padding: 2px;
}

/* Info popup box */
.hotspot-info {
  position: absolute;
  background-color: white;
  border: 2px solid #03719c;
  border-radius: 6px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  max-width: 300px;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center; /* Center the text inside the box */
  z-index: 1000;
  pointer-events: none; /* So it doesn't interfere with mouse movement */
  
  /* Animation - starts hidden and slightly raised */
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Show the info box when active */
.hotspot-info.active {
  opacity: 1;
  transform: translateY(0);
}

/* Little arrow pointing to the image - the fill */
.hotspot-info::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

/* Little arrow pointing to the image - the border */
.hotspot-info::before {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid #03719c;
}