.gallery-carousel {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.gallery-carousel > a {
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.gallery-carousel > a > img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-carousel > [hidden] {
  display: none;
}

.gallery-carousel-arrow {
  position: absolute;
  z-index: 1;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease, background .2s ease;
}

.gallery-carousel-previous { left: 10px; }
.gallery-carousel-next { right: 10px; }

.gallery-carousel-arrow::before {
  content: '';
  width: 12px;
  height: 12px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: translateX(-3px) rotate(45deg);
}

.gallery-carousel-previous::before {
  transform: translateX(3px) rotate(-135deg);
}

.gallery-carousel:hover > .gallery-carousel-arrow,
.gallery-carousel:focus-within > .gallery-carousel-arrow {
  opacity: 1;
}

.gallery-carousel-arrow:hover { background: rgba(0, 0, 0, .9); }

.gallery-carousel-arrow:focus-visible,
.gallery-carousel > a:focus-visible {
  outline: 3px solid #458ccb;
  outline-offset: 3px;
}

.gallery-carousel-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .gallery-carousel { grid-template-columns: minmax(0, 1fr); }
  .gallery-carousel-arrow {
    width: 44px;
    height: 44px;
    opacity: 1;
  }
  .gallery-carousel-arrow::before { width: 9px; height: 9px; }
}

@media (hover: none) {
  .gallery-carousel-arrow { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-carousel-arrow { transition: none; }
}
