body {
  margin: 0;
  background: #f3f8fc;
  font-family: 'Montserrat', sans-serif;
}

/* Style for gallery section title */
#gallery-section h2 {
  text-align: center;
  color: #2366d1;
  margin-top: 2vw;
  margin-bottom: 2vw;
  font-size: 2.5vw;
}

/* Flexbox Gallery Container */
#gallery-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2vw;
  padding: 2vw;
}

/* Individual Gallery Items */
.gallery-item {
  background: #fff;
  border: 0.3vw solid #2366d1;
  border-radius: 1vw;
  box-shadow: 0 0.5vw 2vw #2366d122;
  padding: 1vw;
  width: 22vw;      /* Responsive width */
  margin: 1vw 0;
  box-sizing: border-box;
  transition: box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-item:hover {
  box-shadow: 0 1vw 3vw #2366d1aa;
}

/* Images: Responsive, fit container, maintain aspect ratio */
.gallery-item img {
  width: 100%;
  height: 13vw;
  object-fit: cover;
  border-radius: 0.5vw;
  margin-bottom: 0.7vw;
  border: 0.2vw solid #bad1f7;
}

/* Figcaption style */
.gallery-item figcaption {
  color: #23395d;
  font-size: 1.15vw;
  text-align: center;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 900px) {
  .gallery-item {
    width: 45vw;
    padding: 2vw;
  }
  .gallery-item img {
    height: 25vw;
  }
  #gallery-section h2 {
    font-size: 5vw;
  }
  .gallery-item figcaption {
    font-size: 2.8vw;
  }
}

@media (max-width: 550px) {
  .gallery-item {
    width: 90vw;
    padding: 3vw;
  }
  .gallery-item img {
    height: 40vw;
  }
}