/* Model Making & Restoration gallery additions */

.service-hero {
  border-bottom: 1px solid var(--line);
}

/* Feature image */

.feature-image {
  width: 100%;
  margin: 0;
  align-self: center;
}

.feature-image-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft, #f4f4f4);
}

.feature-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Gallery spacing */

.gallery-section {
  padding: 96px 0 110px;
}

.gallery-group + .gallery-group {
  margin-top: 96px;
}

/* Three-column grid matching the index-page style */

.image-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.gallery-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

/* Guaranteed square image area */

.gallery-image-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--soft, #f4f4f4);
}

.gallery-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Caption directly beneath its image */

.gallery-item figcaption {
  margin: 0;
  padding: 14px 18px 16px;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink);
}

/* Tablet */

@media (max-width: 960px) {
  .feature-image {
    width: min(100%, 620px);
    justify-self: center;
  }

  .image-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */

@media (max-width: 640px) {
  .gallery-section {
    padding: 64px 0;
  }

  .gallery-group + .gallery-group {
    margin-top: 72px;
  }

  .image-gallery {
    grid-template-columns: 1fr;
  }
}