

.ambassador-gallery {
  padding: 50px 20px;
  background-color: #2F2F2F;
  text-align: center;
}

/* The gallery grid that adapts to available space */
.gallery-grid {
  display: grid;
  /* This automatically creates as many columns as will fit at min 200px each */
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Images & videos fill their columns while maintaining aspect ratio */
.gallery-grid img,
.gallery-grid video {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.gallery-grid img:hover,
.gallery-grid video:hover {
  transform: scale(1.05);
}

/* Lightbox Modal (if you’re using one) */
.lightbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.5s;
}

.lightbox.active {
  visibility: visible;
  opacity: 1;
}

.lightbox img,
.lightbox video {
  max-width: 90%;
  max-height: 70%;
  margin-bottom: 10px;
}

.caption {
  color: white;
  font-size: 1rem;
  text-align: center;
  margin-top: 10px;
  max-width: 90%;
  word-wrap: break-word;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 30px;
  color: white;
  cursor: pointer;
}

/* ———————————————
   RESPONSIVE BREAKPOINTS
   ——————————————— */

/* For screens under 800px: reduce the image height so they don’t get cut off */
@media (max-width: 800px) {
  .gallery-grid img,
  .gallery-grid video {
    height: 200px;
  }
}

/* For very narrow screens, make sure we only have one column and 
   images scale properly to avoid layout issues */
@media (max-width: 500px) {
  .gallery-grid {
    grid-template-columns: 1fr; /* Only one column */
  }
  .gallery-grid img,
  .gallery-grid video {
    height: auto; /* let the height adjust automatically on small screens */
    max-width: 100%;
  }
}


/* ———————————————
   RESPONSIVE BREAKPOINTS
   ——————————————— */

@media (max-width: 800px) {
  .ambassador-hero {
    min-height: 50vh; 
    background-attachment: scroll; /* remove fixed if previously used */
  }
  .ambassador-hero-content {
    margin-bottom: 10px;
    padding: 10px;
  }
  .ambassador-gallery {
    padding: 30px 15px;
  }

  .gallery-grid {
    gap: 15px;
  }

  .gallery-grid img,
  .gallery-grid video {
    height: 250px; /* Slightly smaller for medium screens */
  }
}

/* Small screens: further reduce padding & image height */
@media (max-width: 500px) {
  .gallery-grid {
    grid-template-columns: 1fr; /* Only one column */
  }
  .gallery-grid img,
  .gallery-grid video {
    height: auto; /* let the height adjust automatically on small screens */
    max-width: 100%;
  }