/* Real customization examples, inside the homepage's process section. */
.ws-custom-gallery {
  scroll-margin-top: 110px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: clamp(30px, 4vw, 44px);
  border-top: 1px solid rgba(17, 32, 81, .12);
}

.ws-custom-gallery__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.ws-custom-gallery__heading h3 {
  margin: 0 0 8px;
  color: var(--ws-navy, #112051);
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.2;
  text-wrap: balance;
}

.ws-custom-gallery__heading p {
  margin: 0;
  color: var(--ws-text, #526078);
  font-size: 1rem;
  line-height: 1.6;
}

.ws-custom-gallery__count {
  flex: 0 0 auto;
  margin-bottom: 3px;
  color: var(--ws-blue, #006fc4);
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.ws-custom-gallery__viewport {
  min-width: 0;
  border-radius: 20px;
}

.ws-custom-gallery__viewport:focus-visible {
  outline: 3px solid var(--ws-blue, #006fc4);
  outline-offset: 7px;
}

.ws-custom-gallery__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-custom-gallery__item,
.ws-custom-gallery__item figure {
  min-width: 0;
  margin: 0;
}

.ws-custom-gallery__image {
  box-sizing: border-box;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  box-shadow: 0 5px 18px rgba(17, 32, 81, .035);
  place-items: center;
}

.ws-custom-gallery__image img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  transform: scale(var(--gallery-image-scale, 1));
}

.ws-custom-gallery__item figcaption {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 12px 3px 0;
  color: var(--ws-navy, #112051);
  font-size: 1rem;
  line-height: 1.45;
}

.ws-custom-gallery__item figcaption > span {
  flex: 0 0 auto;
  color: var(--ws-blue, #006fc4);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .05em;
}

.ws-custom-gallery__item figcaption strong {
  min-width: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.ws-custom-gallery__help {
  display: none;
  margin: 12px 0 0;
  color: var(--ws-text, #526078);
  font-size: .9rem;
  line-height: 1.5;
}

@media (max-width: 1000px) {
  .ws-custom-gallery__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .ws-custom-gallery__heading { align-items: flex-start; gap: 16px; margin-bottom: 20px; }
  .ws-custom-gallery__heading h3 { max-width: 250px; }
  .ws-custom-gallery__heading p { max-width: 265px; }
  .ws-custom-gallery__count { display: none; }
  .ws-custom-gallery__viewport {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    scrollbar-width: thin;
    scrollbar-color: #a5bfd8 transparent;
    -webkit-overflow-scrolling: touch;
  }
  .ws-custom-gallery__list {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(78vw, 340px);
    gap: 14px;
    padding-block: 2px 12px;
  }
  .ws-custom-gallery__item { scroll-snap-align: start; }
  .ws-custom-gallery__image { border-radius: 18px; }
  .ws-custom-gallery__item figcaption { padding-top: 11px; }
  .ws-custom-gallery__help { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .ws-custom-gallery__viewport { scroll-behavior: auto; }
}
