/* Quiet photographic detail at the end of selected service pages. */
.service-gallery {
  padding: clamp(54px, 7vw, 90px) 0;
  color: #f2f7fa;
  background: #0a1a2b;
  border-top: 1px solid rgba(111, 217, 233, .18);
}

.service-gallery__heading {
  max-width: 730px;
  margin-bottom: 30px;
}

.service-gallery .eyebrow {
  margin-bottom: 10px;
  color: #7edbe8;
}

.service-gallery h2 {
  scroll-margin-top: calc(var(--header-height, 80px) + 26px);
  margin: 0;
  color: #f2f7fa;
  font-size: clamp(1.55rem, 2.8vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.service-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.service-gallery__grid--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 920px;
}

.service-gallery__card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #112538;
  border: 1px solid rgba(189, 221, 234, .14);
  border-radius: 12px;
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.service-gallery__photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #07121e;
}

.service-gallery__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Near-4:3 thermograms fill the frame with a slight crop, never distortion. */
.service-gallery__photo--thermogram img {
  object-fit: cover;
  object-position: center;
}

.service-gallery__card figcaption {
  padding: 19px 21px 21px;
}

.service-gallery__card h3 {
  margin: 0 0 6px;
  color: #f2f7fa;
  font-size: 1rem;
  line-height: 1.4;
}

.service-gallery__card p {
  margin: 0;
  color: #bdccd8;
  font-size: .875rem;
  line-height: 1.6;
}

@media (hover: hover) {
  .service-gallery__card:hover {
    border-color: rgba(126, 219, 232, .48);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
  }
}

@media (max-width: 880px) {
  .service-gallery__grid { gap: 16px; }
  .service-gallery__card figcaption { padding: 16px; }
}

@media (max-width: 700px) {
  .service-gallery__grid,
  .service-gallery__grid--pair {
    grid-template-columns: minmax(0, 1fr);
    max-width: 540px;
  }
  .service-gallery__heading { margin-bottom: 24px; }
  .service-gallery__grid { gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .service-gallery__card { transition: none; }
}
