/* Gallery — Swiper strip + Fancybox group.
   Slide frame: 732×404 → 9:5 (closest common ratio).
   Root class `.gallery` collides with WP core gallery — reset that chrome. */

.gallery {
  --gallery-aspect: 9 / 5;
  position: relative;
  margin: 0;
  overflow: visible;
}

.gallery-swiper {
  overflow: hidden;
  inline-size: 100%;
  border-start-start-radius: var(--radius-lg);
  border-end-end-radius: var(--radius-lg);
}

.gallery-slide {
  overflow: hidden;
  aspect-ratio: var(--gallery-aspect);
  height: auto;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
}

.gallery-link {
  display: block;
  overflow: hidden;
  inline-size: 100%;
  block-size: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
}

.gallery-link:hover,
.gallery-link:focus,
.gallery-link:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
}

.gallery-image,
.gallery img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  width: 100%;
  height: 100%;
  max-inline-size: none;
  max-block-size: none;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  object-fit: cover;
  object-position: center;
}

.gallery button.gallery-nav {
  position: absolute;
  inset-block-start: 50%;
  z-index: 5;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  padding: 0.75rem;
  border: 0;
  border-radius: 50% !important;
  cursor: pointer;
  pointer-events: auto;
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.gallery button.gallery-prev {
  inset-inline-start: 0;
  transform: translate(-50%, -50%);
}

.gallery button.gallery-next {
  inset-inline-end: 0;
  transform: translate(50%, -50%);
}

.gallery button.gallery-nav:focus-visible {
  outline: 0.125rem solid currentColor;
  outline-offset: 0.125rem;
}

.gallery-arrow {
  display: block;
  inline-size: 1rem;
  block-size: 1rem;
  background-color: currentColor;
  mask: var(--gallery-arrow) center / contain no-repeat;
  -webkit-mask: var(--gallery-arrow) center / contain no-repeat;
}

.gallery-arrow-prev {
  transform: rotate(-90deg);
}

.gallery-arrow-next {
  transform: rotate(90deg);
}
