/* Gallery block style "Prinzenpaare" (inc/blocks.php): one couple per row, each photo framed like a portrait
   in the club hall, the names on a plaque below the photo. Core overlays gallery captions on the image; this
   style undoes that. Selectors carry :not(#individual-image) because core's own gallery rules do. */

.wp-block-gallery.has-nested-images.is-style-kg-paare {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(2.5rem, 7vw, 4.5rem);
  padding-block: 1.5rem;
}

.wp-block-gallery.has-nested-images.is-style-kg-paare figure.wp-block-image:not(#individual-image) {
  flex: 0 0 auto;
  width: auto;
  max-width: min(100%, 34rem);
  margin: 0;
  padding: 0.75rem 0.75rem 0;
  background: var(--global-palette9);
  border: 4px solid var(--global-palette10);
  border-radius: var(--kg-radius);
  box-shadow:
    0 0 0 3px var(--global-palette1),
    0 18px 30px -12px rgb(29 26 43 / 35%);
  transform: rotate(-1deg);
}

.wp-block-gallery.has-nested-images.is-style-kg-paare
  figure.wp-block-image:not(#individual-image):nth-child(even) {
  transform: rotate(1deg);
}

@media (prefers-reduced-motion: no-preference) {
  .wp-block-gallery.has-nested-images.is-style-kg-paare
    figure.wp-block-image:not(#individual-image) {
    transition: transform 0.25s ease;
  }

  .wp-block-gallery.has-nested-images.is-style-kg-paare
    figure.wp-block-image:not(#individual-image):hover {
    transform: rotate(0deg) scale(1.015);
  }
}

/* No blurred backdrop behind the caption. */
.wp-block-gallery.has-nested-images.is-style-kg-paare figure.wp-block-image::before {
  content: none;
}

/* Whole photo, never cropped, and never taller than the screen. */
.wp-block-gallery.has-nested-images.is-style-kg-paare figure.wp-block-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 78vh;
  margin-inline: auto;
  border-radius: calc(var(--kg-radius) - 8px);
  object-fit: contain;
}

/* The plaque: a gold crown over the names. */
.wp-block-gallery.has-nested-images.is-style-kg-paare figure.wp-block-image figcaption {
  position: static;
  flex: none;
  width: auto;
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 0.6rem 0.75rem 1rem;
  background: none;
  color: var(--global-palette3);
  text-shadow: none;
  -webkit-mask-image: none;
  mask-image: none;
  font-family: var(--global-heading-font-family);
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.35rem);
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
}

.wp-block-gallery.has-nested-images.is-style-kg-paare figure.wp-block-image figcaption::before {
  content: "";
  display: block;
  width: 2.25rem;
  height: 1.4rem;
  margin: 0 auto 0.35rem;
  background: var(--global-palette10);
  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 22'%3E%3Cpath d='M3 7l7.5 5.5L18 2l7.5 10.5L33 7l-3 13H6z'/%3E%3Ccircle cx='3' cy='5' r='2.5'/%3E%3Ccircle cx='18' cy='2.5' r='2.5'/%3E%3Ccircle cx='33' cy='5' r='2.5'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 22'%3E%3Cpath d='M3 7l7.5 5.5L18 2l7.5 10.5L33 7l-3 13H6z'/%3E%3Ccircle cx='3' cy='5' r='2.5'/%3E%3Ccircle cx='18' cy='2.5' r='2.5'/%3E%3Ccircle cx='33' cy='5' r='2.5'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
