/* Keep anchored sections visible below the sticky navigation bar */
section[id] {
  scroll-margin-top: 6rem;
}

@media (min-width: 640px) {
  section[id] {
    scroll-margin-top: 6.5rem;
  }
}

/* Selected Appearances inline gallery */
.media-gallery-panel {
  background: #ffffff;
}

.media-gallery-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.media-gallery-image {
  display: block;
  width: 100%;
  max-height: min(62vh, 720px);
  object-fit: contain;
  background: rgba(248, 250, 252, 1);
}

.media-gallery-caption {
  border-top: 1px solid rgba(226, 232, 240, 1);
  padding: 0.7rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(71, 85, 105, 1);
}

.media-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid rgba(226, 232, 240, 1);
  background: rgba(248, 250, 252, 1);
  padding: 0.75rem 1rem;
}

.media-gallery-nav-btn {
  border: 1px solid rgba(203, 213, 225, 1);
  background: #ffffff;
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(15, 23, 42, 1);
}

.media-gallery-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.media-gallery-counter {
  font-size: 0.875rem;
  color: rgba(71, 85, 105, 1);
}
