.gallery-section {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  margin: 40px auto;
}
.gallery-section p {
margin: 5px 0 10px 0;
  font-size: 1.1rem;
  color: #555;
  max-width: 800px;        /* control width for wrapping */
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;        
}

.gallery-section h2 {
  font-size: 2rem;
  margin: 0;
  font-weight: 500;
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
}

.gallery-container {
  width: 95%;
  max-width: 1400px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* wrapper for each image */
.gallery-item {
  overflow: hidden; /* keep zoom inside the box */
  height: 200px;    /* same fixed height */
}

.gallery-item img {
  width: 100%;
  height:200px;
  object-fit: cover;
  transition: transform 0.4s ease;
  cursor: pointer;
  border-radius: 0;
}

/* Hover zoom (inside border) */
.gallery-item:hover img {
  transform: scale(1.1);
}

/* Responsive: 2 per row on tablets */
@media (max-width: 768px) {
  .gallery-section h2 {
    font-size: 1.6rem;
  }
  
  .gallery-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .gallery-section h2 {
    font-size: 1.4rem;
  }
  
  .gallery-container {
    grid-template-columns: 1fr;
  }
}
/* Popup Modal (hidden by default) */
.popup-modal {
  display: none; 
  position: fixed;
  z-index: 1000;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.9);
  text-align: center;
}

/* Popup image */
.popup-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
  border-radius: 4px;
}

/* Caption text */
#caption {
  margin-top: 15px;
  color: #ccc;
  font-size: 18px;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
.close-btn:hover {
  color: #f00;
}
