/* ============================================================
   TOKENS — هماهنگ با پالت اصلی سایت (طلایی/زرشکی)
   دقیقاً همون متغیرهای صفحات آرشیو / مراسمات / آثار صوتی
   ============================================================ */
:root{
  --bg: #100d0e;
  --bg-soft: rgba(255,255,255,0.045);
  --bg-soft-strong: rgba(255,255,255,0.07);
  --border-soft: rgba(201,151,74,0.18);
  --border-soft-strong: rgba(201,151,74,0.32);
  --gold: #c9974a;
  --gold-light: #eccb84;
  --maroon: #6e1b26;
  --maroon-light: #9c2e3b;
  --text: #f3ede2;
  --text-muted: rgba(243,237,226,0.55);
  --radius-lg: 20px;
  --radius-md: 14px;
  --ease: cubic-bezier(.22,1,.36,1);

  /* alias نگه‌داشته شده برای سازگاری با کدهای قدیمی */
  --neon: var(--gold);
}

/* ============================================================
   عنوان صفحه — هم‌استایل با بقیه‌ی صفحات
   ============================================================ */
h2{
  position: relative;
  margin-top: 30px;
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  animation: fadeInDown .8s var(--ease);
}

h2::after{
  content: "";
  display: block;
  width: 90px;
  height: 1px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
}

@keyframes fadeIn{
  0%{ opacity: 0; transform: translateY(20px); }
  100%{ opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown{
  0%{ opacity: 0; transform: translateY(-20px); }
  100%{ opacity: 1; transform: translateY(0); }
}

/* ============================================================
   دراپ‌داون تعداد نمایش (کاستوم)
   ============================================================ */
.dropdown-wrapper{
  position: relative;
  display: inline-block;
  z-index: 1000;
  animation: fadeIn .7s var(--ease) .1s both;
}

.dropdown-btn{
  background: var(--bg-soft);
  backdrop-filter: blur(10px); /* یک نمونه‌ی تکی روی صفحه -> بی‌خطر برای اسکرول */
  border: 1px solid var(--border-soft);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.dropdown-btn:hover{
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(201,151,74,0.3);
}

.dm{
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  z-index: 1001;

  background: rgba(16,13,14,0.95);
  backdrop-filter: blur(15px); /* تکی -> بی‌خطر */

  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);

  padding: 8px;
  min-width: 120px;
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;

  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}

.dm.show{
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}

.dm a{
  display: block;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-soft);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}

.dm a:hover{
  color: var(--gold-light);
  border-color: var(--gold);
  background: rgba(201,151,74,0.12);
  transform: translateY(-2px);
}

.dm hr{
  margin: 0;
  border-color: var(--border-soft);
  opacity: .5;
}

/* ============================================================
   نوار فیلتر (بروزرسانی / ترتیب / سبک / مناسبت)
   ============================================================ */
.filter-wrapper{
  animation: fadeIn .8s var(--ease) .1s both;
}

.filter-btn{
  background: var(--bg-soft) !important;
  border: 1px solid var(--border-soft) !important;
  color: var(--text) !important;
  border-radius: 30px !important;
  padding: 8px 20px !important;
  font-size: 13px !important;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease) !important;
}

.filter-btn:hover,
.filter-btn:focus{
  border-color: var(--gold) !important;
  color: var(--gold-light) !important;
  box-shadow: 0 0 10px rgba(201,151,74,0.25) !important;
}

.filter-top .filter-btn{
  cursor: default;
  color: var(--text-muted) !important;
}

.filter-item .dropdown-menu{
  background: rgba(16,13,14,0.95);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.filter-item .dropdown-item{
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  transition: color .2s var(--ease), background .2s var(--ease);
}

.filter-item .dropdown-item:hover,
.filter-item .dropdown-item:focus{
  color: var(--gold-light);
  background: rgba(201,151,74,0.12);
}

.filter-item .dropdown-menu hr{
  margin: 2px 0;
  border-color: var(--border-soft);
  opacity: .5;
}

/* ============================================================
   گرید ویدئوها
   ============================================================ */
.video-slider{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 0;
  justify-content: center;
}

@media (min-width: 600px){
  .video-slider{ grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 991px){
  .video-slider{ grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1200px){
  .video-slider{ grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 375px){
  .video-slider{ grid-template-columns: 1fr; }
}

.video-slider a{
  text-decoration: none;
  color: inherit;
  display: flex;
}

/* ============================================================
   کارت ویدئو
   نکته‌ی مهم برای اسکرول: تا ۲۰۰ آیتم در هر صفحه ممکنه رندر بشه،
   پس backdrop-filter روی خود کارت‌ها گذاشته نشده؛ فقط گرادیان
   و سایه‌ی ساده که تقریباً هزینه‌ی رندر نداره.
   ============================================================ */
.video-card{
  width: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, var(--bg-soft-strong), var(--bg-soft));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 8px;
  overflow: hidden;
   transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  animation: fadeIn .5s var(--ease) both;
}

.video-slider a:nth-child(1) .video-card{ animation-delay: .02s; }
.video-slider a:nth-child(2) .video-card{ animation-delay: .06s; }
.video-slider a:nth-child(3) .video-card{ animation-delay: .10s; }
.video-slider a:nth-child(4) .video-card{ animation-delay: .14s; }
.video-slider a:nth-child(5) .video-card{ animation-delay: .18s; }
.video-slider a:nth-child(6) .video-card{ animation-delay: .22s; }
.video-slider a:nth-child(7) .video-card{ animation-delay: .26s; }
.video-slider a:nth-child(8) .video-card{ animation-delay: .30s; }

.video-card:hover{
  transform: translateY(-6px);
  border-color: var(--border-soft-strong);
  box-shadow: 0 14px 28px rgba(0,0,0,0.4), 0 0 16px rgba(201,151,74,0.2);
}

 

.video-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
   transition: transform .4s var(--ease);
}

.video-card:hover img{
  transform: scale(1.06);
}

.video-wrapper::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16,13,14,0.7) 0%, rgba(16,13,14,0.15) 45%, transparent 65%);
  pointer-events: none;
}

/* ============================================================
   دکمه‌ی «پخش» — همیشه دیده میشه و مدام (مثل هشدار) می‌تپه
   تا توجه رو به سمت خودش جلب کنه
   ============================================================ */
.watch-btn{
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;

  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #1c1408;
  font-size: 15px;

  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  animation: watchFloat 2.6s ease-in-out infinite;
}

/* حلقه‌های هشداردهنده‌ی دور دکمه */
.watch-btn::before,
.watch-btn::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--gold-light);
  animation: watchPing 1.8s cubic-bezier(.22,1,.36,1) infinite;
}

.watch-btn::after{
  animation-delay: 10s;
}

@keyframes watchPing{
  0%{
    transform: scale(1);
    opacity: .65;
  }
  100%{
    transform: scale(2.1);
    opacity: 0;
  }
}

@keyframes watchFloat{
  0%, 100%{ transform: translateX(-50%) translateY(0); }
  50%{ transform: translateX(-50%) translateY(-4px); }
}

.video-card:hover .watch-btn{
  animation-play-state: paused;
  transform: translateX(-50%) scale(1.12);
  box-shadow: 0 8px 22px rgba(201,151,74,0.5);
}

.video-body{
  height: auto;
  padding-top: 8px;
  text-align: center;
}

.video-card h6{
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .3s var(--ease);
}

.video-card:hover h6{
  color: var(--gold-light);
}

.video-body p{
  margin-top: 5px;
  margin-bottom: 0;
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
}

/* ============================================================
   عناوینِ بخش (در صورت استفاده در جاهای دیگه)
   ============================================================ */
.section-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  margin-left: 90px;
  margin-right: 100px;
  position: relative;
}

@media (max-width: 768px){
  .section-header{
    margin-left: 10px;
    margin-right: 10px;
  }
}

.section-header h2{
  margin: 0;
  padding-left: 15px;
  font-size: 16px;
  color: var(--text);
}

.see-all{
  position: relative;
  z-index: 1;
  color: var(--gold);
  text-decoration: none;
  font-weight: bold;
  transition: color .3s var(--ease);
}

.see-all:hover{
  color: var(--gold-light);
}

/* ============================================================
   Pagination
   بلور از تک‌تک دکمه‌ها به کانتینر مشترک منتقل شد (یک بار
   محاسبه به‌جای N بار روی هر لینک صفحه).
   ============================================================ */
.pagination{
  gap: 8px;
  background: var(--bg-soft);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 8px;
  width: fit-content;
  margin: 0 auto;
}

.pagination .page-link{
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  min-width: 40px;
  text-align: center;
  transition: transform .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}

.pagination .page-link:hover{
  background: rgba(201,151,74,0.12);
  border-color: var(--border-soft-strong);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.pagination .page-item.active .page-link{
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #1c1408;
  font-weight: bold;
  box-shadow: 0 0 12px rgba(201,151,74,0.45);
  border-color: transparent;
}

.pagination .page-item.disabled .page-link{
  opacity: .4;
  cursor: not-allowed;
  background: transparent;
}

.top-header{ z-index: 15000 !important; }
.mobile-menu{ z-index: 15001 !important; }

@media (prefers-reduced-motion: reduce){
  .watch-btn,
  .watch-btn::before,
  .watch-btn::after,
  .video-card{
    animation: none !important;
  }
}

/* ===== موبایل: حذف باقی‌مانده‌ی بلورها برای اسکرول کاملاً نرم ===== */
@media (max-width: 768px){
  .pagination,
  .dropdown-btn,
  .dm,
  .filter-item .dropdown-menu{
    backdrop-filter: none;
    background-color: rgba(16,13,14,0.92);
  }
}

.video-wrapper{
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 3px !important;
    padding: 0;
    margin: 0;
}

.video-card{
    padding: 0;
}

.video-card img{
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.video-card h6,
.video-card p{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-card{
    width: 250px;
}
@media (max-width: 768px){
  .video-slider{
     justify-items: center;
  }
.video-card{
    width: 190px;
}}
@media (max-width: 407px){
  .video-slider{
     justify-items: center;
  }
.video-card{
    width: 160px;
}}
@media (max-width: 374px){

  .video-slider{
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .video-card{
    width: 300px;
    max-width: 100%;
  }

}



 .dropdown-menu a:hover{
  color: #100d0e;
}
.dropdown-menu  {
  background-color: #000000 !important;
}


.filter-wrapper{
    position: relative;
    z-index: auto;
}

.filter-item{
    position: relative;
}

.filter-item .dropdown-menu{
    position: absolute;
    z-index: 999999;
}
.filter-wrapper{ position: relative; z-index: 15; }