/* ============================================= */
/* کانتینر اختصاصی گالری                       */
/* ============================================= */
.container-custom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  direction: rtl;
}

/* ============================================= */
/* هدر بخش گالری (صفحه اصلی گالری)             */
/* ============================================= */
.gallery-part .gallery-head {
  text-align: center;
  margin: 40px 0 30px;
  width: 100%;
}
.gallery-part .gallery-title {
  font-family: "Poppins", "Vazirmatn", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6a1b9a, #b23c9e);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
  border-bottom: 3px solid #e1bee7;
  display: inline-block;
  padding-bottom: 8px;
}

/* ============================================= */
/* گرید گالری (نمایش کارتی)                    */
/* ============================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
  margin: 30px 0 60px;
}
.gallery-card {
  text-decoration: none;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.08),
    0 8px 10px -6px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 30px -12px rgba(106, 27, 154, 0.2);
}
.card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f9f0ff;
}
.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-card:hover .thumb-img {
  transform: scale(1.05);
}
.card-title {
  padding: 16px 14px 18px;
  font-family: "Vazirmatn", "Poppins", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #4a2c5e;
  text-align: center;
  background: #fef9ff;
  border-top: 1px solid #f3e5f5;
}

/* ============================================= */
/* نمایش تک گالری (اسلایدر)                    */
/* ============================================= */
.gallery-single {
  margin: 30px 0 50px;
}
.gallery-carousel {
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(145deg, #f7eefc, #fff0fa);
  padding: 20px;
  box-shadow: 0 25px 40px -12px rgba(88, 50, 102, 0.25);
}
.carousel-container {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #00000010;
}
.carousel-slides {
  position: relative;
  aspect-ratio: 16 / 9;
}
.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e0a2a;
}
.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}
.gallery-media {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
video.gallery-media {
  background: #000;
}

/* --- دکمه‌های اسلایدر --- */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  border: none;
  font-size: 2.5rem;
  font-weight: 600;
  width: 48px;
  height: 48px;
  border-radius: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6a1b9a;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}
.carousel-btn:hover {
  background: #ffffff;
  color: #b23c9e;
  transform: translateY(-50%) scale(1.05);
}
.prev-btn {
  left: 20px;
}
.next-btn {
  right: 20px;
}

/* --- اندیکاتورها --- */
.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  z-index: 10;
}
.indicator {
  width: 10px;
  height: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s;
}
.indicator.active {
  width: 26px;
  background: #b23c9e;
  box-shadow: 0 0 6px #ff80ab;
}

/* ============================================= */
/* اطلاعات گالری (متا دیتا)                    */
/* ============================================= */
.gallery-meta {
  margin-top: 40px;
  background: #ffffffdd;
  backdrop-filter: blur(2px);
  border-radius: 32px;
  padding: 24px 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0e1ff;
}
.meta-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 1rem;
  align-content: center;
  flex-direction: row;
  justify-content: center;
}
.meta-label {
  font-weight: 800;
  color: #5e2a7a;
  background: #f3e5f5;
  font-family: "Vazirmatn", sans-serif;
  padding: 4px 12px;
  border-radius: 40px;
  font-size: 0.85rem;
}
.meta-value {
  font-feature-settings: "ss01";
  color: #2c1a3a;
  font-weight: 500;
}
.role {
  font-size: 0.8rem;
  color: #a56cc2;
  margin-right: 6px;
}
.meta-description {
  margin-top: 12px;
  border-top: 1px dashed #dec9f0;
  padding-top: 18px;
}
.desc-text {
  font-family: "Vazirmatn", sans-serif;
  line-height: 1.7;
  color: #3e2b4f;
  background: #faf5ff;
  padding: 14px 18px;
  border-radius: 24px;
  margin-top: 8px;
  font-size: 0.95rem;
}

/* ============================================= */
/* صفحه 404 گالری                              */
/* ============================================= */
.notfound-part {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  text-align: center;
}
.notfound-avatar {
  width: 260px;
  max-width: 80%;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.1));
}
.notfound-txt {
  font-family: "Vazirmatn", "B Nazanin", sans-serif;
  font-size: 1.8rem;
  color: #6a1b9a;
  font-weight: 600;
}

/* ============================================= */
/* ریسپانسیو گالری                             */
/* ============================================= */
@media (max-width: 768px) {
  .gallery-title {
    font-size: 1.8rem;
  }
  .gallery-grid {
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1.8rem;
  }
  .prev-btn {
    left: 10px;
  }
  .next-btn {
    right: 10px;
  }
  .gallery-meta {
    padding: 18px;
  }
  .meta-info {
    flex-direction: column;
    gap: 6px;
  }
  .desc-text {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .container-custom {
    padding: 0 12px;
  }
  .gallery-card .card-title {
    font-size: 0.9rem;
    padding: 12px 8px;
  }
  .carousel-slides {
    aspect-ratio: 4 / 3;
  }
  .indicator {
    width: 8px;
    height: 8px;
  }
  .indicator.active {
    width: 20px;
  }
  .notfound-avatar {
    width: 200px;
  }
  .notfound-txt {
    font-size: 20px;
  }
}
