.ams-gallery-section + .ams-gallery-section {
  margin-top: 72px;
}

.ams-gallery-heading {
  max-width: 820px;
  margin-bottom: 28px;
}

.ams-gallery-heading p:last-child {
  margin-bottom: 0;
}

.ams-gallery-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 36px;
  padding: 14px;
  border: 1px solid #dedede;
  background: #fff;
}

.ams-gallery-jumps a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #95601f;
  color: #633b18;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.ams-gallery-jumps a:hover,
.ams-gallery-jumps a:focus-visible {
  background: #95601f;
  color: #fff;
}

.ams-gallery-grid,
.ams-before-after-grid {
  display: grid;
  gap: 24px;
}

.ams-gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ams-before-after-list {
  display: grid;
  gap: 32px;
}

.ams-before-after-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ams-photo-card {
  min-width: 0;
  margin: 0;
  border: 1px solid #dedede;
  background: #fff;
}

.ams-photo-card > a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ededed;
}

.ams-photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ams-photo-card figcaption {
  padding: 18px 20px 20px;
}

.ams-photo-card h3 {
  margin: 7px 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.ams-photo-card p {
  margin: 0;
  color: #5e5e5e;
  font-size: 0.92rem;
  line-height: 1.55;
}

.ams-photo-label {
  color: var(--bs-primary, #b46d16);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ams-pair-title {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

@media (max-width: 991.98px) {
  .ams-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .ams-gallery-section + .ams-gallery-section {
    margin-top: 52px;
  }

  .ams-gallery-grid,
  .ams-before-after-grid {
    grid-template-columns: 1fr;
  }

  .ams-photo-card figcaption {
    padding: 16px;
  }

  .ams-gallery-jumps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
  }

  .ams-gallery-jumps a {
    justify-content: center;
    padding-inline: 10px;
    text-align: center;
  }
}
