/* لایت‌باکس اصلی */
.custom-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 9999;
  overflow: hidden;
}

/* فیلتر پشت عکس */
.custom-filter {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(15px) brightness(0.9);
  transform: scale(1.1);
  z-index: 10000;
}

/* عکس وسط */
.custom-lightbox img {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.4s ease; /* افکت محو */
}

/* فلش‌ها */
.custom-arrowl, .custom-arrowr {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  z-index: 10002;
  user-select: none;
}

.custom-arrowl { right: 20px; } /* تغییر مکان فلش‌ها */
.custom-arrowr { left: 20px; }

/* دکمه بستن */
.custom-close {
  position: fixed;
  top: 40px;
  right: 30px;
  font-size: 3rem;
  color: red;
  background-color: black;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10002;
  user-select: none;
  border-radius: 5px;
  transition: 0.3s ease;
}

.custom-close:hover {
  color: black;
  background-color: red;
}

/* اصلاح lightboxOverlay اصلی که JS ایجاد می‌کنه */
#lightboxOverlay.lightboxOverlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  z-index: 9999 !important;
}
