.Gallery {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.Gallery--vertical {
  max-width: 550px;
  padding-bottom: 20px;
}

.Gallery-pages {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.Gallery-page {
  position: relative;
  width: 100%;
}

.Gallery-page img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  box-shadow:
    0.3px 0.5px 0.7px hsl(0deg 0% 63% / 0.36),
    0.8px 1.6px 2px -0.8px hsl(0deg 0% 63% / 0.36),
    2.1px 4.1px 5.2px -1.7px hsl(0deg 0% 63% / 0.36),
    5px 10px 12.6px -2.5px hsl(0deg 0% 63% / 0.36);
}

.Gallery-page--pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  aspect-ratio: 2 / 1;
  gap: 0;
}

.Gallery-page--pair img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

.Gallery--horizontal .Gallery-pages {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.Gallery--horizontal .Gallery-page {
  grid-area: 1 / 1;
  width: max-content;
  max-width: 100%;
  justify-self: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease-in-out;
}

.Gallery--no-transition .Gallery-page {
  transition: none;
}

.Gallery--horizontal .Gallery-page--pair {
  width: 100%;
}

.Gallery--horizontal .Gallery-page--active {
  opacity: 1;
  pointer-events: auto;
}

.Gallery--vertical .Gallery-page {
  opacity: 1;
  pointer-events: auto;
}

.Gallery--vertical .Gallery-page img {
  width: 100%;
}

.Gallery-navigation {
  position: absolute;
  inset: 0;
}

.Gallery-prev,
.Gallery-next {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  width: 50%;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.Gallery-prev {
  left: 0;
}

.Gallery-next {
  right: 0;
}

.Gallery-prev::before,
.Gallery-next::before {
  width: 0;
  height: 0;
  border-style: solid;
  opacity: 0;
  content: "";
  transition: opacity 0.3s ease;
}

.Gallery-prev:hover::before,
.Gallery-next:hover::before {
  opacity: 1;
}

.Gallery-prev::before {
  border-width: 20px 30px 20px 0;
  border-color: transparent rgb(255 255 255 / 80%) transparent transparent;
}

.Gallery-next::before {
  border-width: 20px 0 20px 30px;
  border-color: transparent transparent transparent rgb(255 255 255 / 80%);
}

.Gallery-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.Gallery-control {
  display: flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.Gallery-control::before {
  display: block;
  width: 20px;
  height: 4px;
  background-color: #ccc;
  content: "";
  transition: background-color 0.2s ease;
}

.Gallery-control:hover::before {
  background-color: #888;
}

.Gallery-control--active::before {
  background-color: #666;
}

.Gallery-control:focus-visible,
.Gallery-prev:focus-visible,
.Gallery-next:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
