.main-gallery .nav {
  justify-content: center;
  margin-bottom: 36px;
}
.main-gallery .nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  list-style: none;
  margin: 0px;
}
.main-gallery .nav ul li {
  margin: 0px;
}
.main-gallery .nav ul li a {
  background-color: rgb(245, 245, 245);
  border: 1px solid var(--primary-color);
  border-radius: 25px;
  color: rgb(0, 0, 0);
  cursor: pointer;
  font-size: var(--fz-18);
  line-height: 1.5;
  padding: 9px 27px;
  transition: 0.3s;
  display: flex;
}
.main-gallery .nav ul li a:hover,
.main-gallery .nav ul li[class*="current-"] a {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: rgb(255, 255, 255);
}

.main-gallery .list-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.main-gallery .list-gallery .item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.main-gallery .list-gallery .item a {
  display: block;
  position: relative;
  overflow: hidden;
  animation: 0.5s ease 0s 1 normal forwards running scaleUp;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  height: 100%;
  width: 100%;
  opacity: 0;
  border-radius: 8px;
}

.main-gallery .list-gallery .item a img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.5s;
  display: block;
}

.main-gallery .list-gallery .item a:hover img {
  transform: scale(1.1);
}

.main-gallery .list-gallery .item a::before {
  background: rgba(0, 0, 0, 0.2);
  content: "";
  inset: 0px;
  opacity: 0;
  position: absolute;
  transition: opacity 0.3s;
  z-index: 1;
}

.main-gallery .list-gallery .item a:hover::before {
  opacity: 1;
}

@keyframes scaleUp {
  0% {
    opacity: 0;
    transform: scale(0.3) translate(-100px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translate(0px);
  }
}

@media (min-width: 768px) {
  .main-gallery .list-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1200px) {
  .main-gallery .list-gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Custom Pagination for Gallery */
.main-gallery .list-pagination {
  margin-top: 40px;
  text-align: center;
}

.main-gallery .list-pagination ul {
  display: inline-flex;
  justify-content: center;
  align-items: stretch;
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.main-gallery .list-pagination ul li {
  margin: 0;
  border-right: 1px solid #dee2e6;
  display: flex;
}

.main-gallery .list-pagination ul li:last-child {
  border-right: none;
}

.main-gallery .list-pagination ul li a,
.main-gallery .list-pagination ul li span {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 45px;
  height: 45px;
  padding: 0 10px;
  background-color: #fff;
  color: var(--primary-color);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  transition: all 0.3s ease;
  text-decoration: none;
}

.main-gallery .list-pagination ul li a:hover {
  background-color: #f5f5f5;
}

.main-gallery .list-pagination ul li span.current {
  background-color: var(--primary-color);
  color: #fff;
}

.main-gallery .list-pagination ul li span.dots {
  background-color: #e9ecef;
  color: var(--primary-color);
}

/* AJAX Loading State */
.main-gallery {
  position: relative;
  min-height: 200px;
}

/*.main-gallery.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(71, 69, 69, 0.6);
  z-index: 10;
}*/

.main-gallery.is-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 11;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.fancybox__thumbs {
  display: none !important;
}
