/* Anekaraya responsive image gallery */

.arc-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  align-items: stretch;
}

.arc-gallery-item {
  position: relative;
  display: block;
  flex: var(--arc-ratio) 1 160px;
  height: 160px;
  overflow: hidden;
  background: #f2f2f2;
  border-radius: 2px;
}

.arc-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.arc-gallery-item:hover img {
  transform: scale(1.035);
}

.arc-gallery-item:focus-visible {
  outline: 3px solid #c7222c;
  outline-offset: 2px;
}

.arc-gallery-lightbox {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 54px 45px;
  border: 0;
  background: rgba(0,0,0,.94);
  color: white;
}

.arc-gallery-lightbox::backdrop {
  background: rgba(0,0,0,.8);
}

.arc-gallery-lightbox img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.arc-gallery-lightbox button {
  position: absolute;
  z-index: 2;
  border: 0;
  background: rgba(255,255,255,.12);
  color: #fff;
  cursor: pointer;
}

.arc-gallery-close {
  top: 10px;
  right: 15px;
  padding: 5px 12px;
  font-size: 30px;
}

.arc-gallery-prev,
.arc-gallery-next {
  top: 50%;
  transform: translateY(-50%);
  padding: 12px;
  font-size: 28px;
}

.arc-gallery-prev { left: 5px; }
.arc-gallery-next { right: 5px; }

.arc-gallery-counter {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 767px) {
  .arc-gallery-item {
    flex-basis: calc(50% - 3px);
    height: 145px;
  }

  .arc-gallery-lightbox {
    padding: 55px 34px;
  }

  .arc-gallery-prev,
  .arc-gallery-next {
    font-size: 20px;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .arc-gallery-item {
    flex-basis: calc(50% - 3px);
    height: 115px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arc-gallery-item img {
    transition: none;
  }
}
