/* ============================================================
   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);
}

/* ============================================================
   جداکننده‌ی بخش‌ها
   ============================================================ */
.section-divider{
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 46px auto;
  padding: 0 12px;
  box-sizing: border-box;
}

.section-divider::before{
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-soft-strong) 15%, var(--gold) 50%, var(--border-soft-strong) 85%, transparent);
}

.section-divider::after{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: linear-gradient(135deg, var(--gold-light), var(--maroon));
  border-radius: 2px;
 }

/* ============================================================
   ساختار کلی کانتینر
   ============================================================ */
.container{
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 0;
  box-sizing: border-box;
}

@media (max-width: 768px){
  .container{ padding-left: 10px; padding-right: 10px; }
}

/* ============================================================
   استوری‌ها
   ============================================================ */
.story{
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 14px;
  align-items: flex-start;
  scrollbar-width: none;
  justify-content: flex-start !important;
}
.story::-webkit-scrollbar{ display: none; }

.story-border{
  width: 82px;
  height: 82px;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 45%, var(--maroon));
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
  cursor: pointer;
}

.img-story{
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
}

/* ============================================================
   اسلایدر بالا
   ============================================================ */
.slider-img{
  width: 100%;
  height: 500px;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.03);
}

#mainSlider{
  position: relative;
  overflow: hidden;
}

 
.carousel-control-prev,
.carousel-control-next{
  width: 46px;
  height: 46px;
  background: rgba(16,13,14,0.5);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}

.slider-top-btn{
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.slider-top-btn .btn{
  border-width: 1px;
  border-radius: 10px;
  padding: 4px 14px;
  font-size: 12px;
  color: var(--text);
  border-color: rgba(255,255,255,0.4);
  background: rgba(16,13,14,0.35);
}

@media (max-width: 768px){
  #mainSlider .carousel-inner{
    width: 100%;
    overflow: hidden;
  }
  #mainSlider .carousel-item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

#mainSlider .carousel-indicators{
  position: absolute;
  top: 15px;
  bottom: auto;
  left: 20px;
  right: auto;
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  z-index: 10;
}

#mainSlider .carousel-indicators button{
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: none;
  margin: 0;
}

#mainSlider .carousel-indicators .active{
  background-color: var(--gold-light);
  transform: scale(1.3);
}

@media (max-width: 400px){
  #mainSlider .carousel-indicators{ left: 12px; gap: 5px; }
}

/* ============================================================
   عناوین بخش‌ها
   ============================================================ */
.section-header{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 56px;
  margin-bottom: 14px;
  padding: 0;
  box-sizing: border-box;
}

.section-header h2{
  position: relative;
  margin: 0;
  padding-right: 18px;
  font-size: 16px;
  letter-spacing: .2px;
  color: var(--text);
  z-index: 1;
}

.section-header h2::before{
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--gold-light), var(--maroon));
  border-radius: 2px;
}

.section-header h2 i{
  color: var(--gold);
  margin-left: 8px;
}

.see-all{
  position: relative;
  z-index: 1;
  text-decoration: none;
  font-weight: bold;
  font-size: 12.5px;
  color: var(--gold);
  margin-left: 10px;
}

@media (max-width: 768px){
  .section-header{ margin-top: 40px; margin-left: 10px; margin-right: 10px; }
}

/* ============================================================
   داشبورد مداحی‌ها — پلیر بزرگ + لیست
   ============================================================ */
.madahi-dashboard{
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
  align-items: stretch;
}

/* ----- پلیر بزرگ ----- */
.madahi-hero{
  position: relative;
  border-radius: var(--radius-lg);
  padding: 20px;
  background: linear-gradient(160deg, var(--bg-soft-strong), var(--bg-soft));
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

.madahi-hero::before{
  content: "";
  position: absolute;
  top: -40%;
  left: -20%;
  width: 60%;
  height: 140%;
  background: radial-gradient(circle, rgba(201,151,74,0.10), transparent 70%);
  pointer-events: none;
}

.madahi-hero-top{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  position: relative;
}

.madahi-hero-cover{
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--border-soft-strong);
}

.madahi-hero-info{
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-text{ flex: 1; }

.madahi-hero-badge{
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 10px;
  color: #1c1408;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  margin-bottom: 6px;
  font-weight: 700;
}

.madahi-hero-info h3{
  color: var(--text);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-download-btn{
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,.7);
  padding: 8px 18px;
  border-radius: 15px;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 340px){
  .hero-download-btn{ padding: 4px 5px; }
}

/* ----- ویو فرم ----- */
.madahi-wave{
  display: flex;
  flex-direction: row;
  direction: ltr;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 3px;
  height: 46px;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.wave-bar{
  flex: 1;
  min-width: 2px;
  max-width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  opacity: 0.8;
}

.wave-bar:nth-child(6n+1){ height: 30%; }
.wave-bar:nth-child(6n+2){ height: 65%; }
.wave-bar:nth-child(6n+3){ height: 95%; }
.wave-bar:nth-child(6n+4){ height: 45%; }
.wave-bar:nth-child(6n+5){ height: 75%; }
.wave-bar:nth-child(6n+6){ height: 55%; }

/* ===== ویوفرم زنده: بخش پخش‌شده هنگام پخش صوت ===== */
.madahi-wave .wave-bar.played{
  background: linear-gradient(180deg, var(--maroon-light), var(--maroon));
  opacity: 1;
}

/* ----- کنترل‌ها ----- */
.madahi-hero-controls{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
}

.wave-ctrl{
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.wave-ctrl-main{
  width: 44px;
  height: 44px;
  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;
}

.madahi-hero-time{
  margin-right: auto;
  font-size: 12px;
  color: var(--text-muted);
  direction: ltr;
}

/* ----- لیست کناری ----- */
 

.madahi-row{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 12.5px;
}

.madahi-row.active{
  background: linear-gradient(135deg, rgba(201,151,74,0.18), rgba(201,151,74,0.05));
  color: var(--gold-light);
 }

.madahi-row-icon{
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  background: rgba(255,255,255,0.08);
  color: inherit;
}

.madahi-row.active .madahi-row-icon{
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #1c1408;
}

.madahi-row-title{
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.madahi-row-time{
  flex: 0 0 auto;
  font-size: 11px;
  direction: ltr;
  opacity: .8;
}

 /* ============================================================
   ردیف محتوا — چیدمان بنتوی نامتقارن
   ویدیو بزرگ + صفحه‌ی تذهیب‌شده‌ی شعر + موزاییک تصاویر
   ============================================================ */
.content-bento{
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
  margin-top: 24px;
}

.bento-tile{
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  padding: 18px;
  background: linear-gradient(160deg, var(--bg-soft-strong), var(--bg-soft));
  border: 1px solid var(--border-soft);
}

.bento-tile .mini-card-header h4{
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 14px;
}

.bento-tile .mini-card-header h4 i{ color: var(--gold); }

.bento-tile .mini-card-more{
  margin-top: auto;
  padding-top: 14px;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  color: var(--gold);
  text-decoration: none;
}

.bento-tile .mini-card-more-inline{ margin-top: 0; padding-top: 0; font-size: 11.5px; }

/* ----- تایل ویدیو: عمودی و بزرگ، محل اصلی توجه ----- */
.bento-video{
  grid-row: 1 / 3;
  min-height: 100%;
}

.bento-video .mini-card-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bento-video .mini-card-header h4{ margin: 0; }

.bento-video .video-feature{
  position: relative;
  display: block;
  width: 100%;
  flex: 1;
  min-height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 10px;
}

.video-feature img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-feature::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent 60%);
}

.video-feature-title{
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-feature-play{
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 46px;
  height: 46px;
  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;
}

.video-thumbs-row{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.video-thumb-sm{
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
}

.video-thumb-sm img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-thumb-sm::after{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
}

.video-thumb-sm i{
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-size: 10px;
  color: #fff;
}

/* ----- تایل شعر: صفحه‌ی تذهیب‌شده — عنصر امضای این بخش ----- */
.bento-manuscript{
  grid-row: 1;
  position: relative;
  padding: 26px 22px;
  background:
    radial-gradient(ellipse 260px 180px at 50% 40%, rgba(110,27,38,0.16), transparent 70%),
    linear-gradient(160deg, var(--bg-soft-strong), var(--bg-soft));
  border: 1px solid var(--border-soft-strong);
}

.bento-manuscript::before,
.bento-manuscript::after{
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201,151,74,0.28);
  border-radius: 12px;
  pointer-events: none;
}

.bento-manuscript::after{
  inset: 11px;
  border-color: rgba(201,151,74,0.14);
}

.manuscript-corner{
  position: absolute;
  width: 20px;
  height: 20px;
  z-index: 1;
  pointer-events: none;
}
.manuscript-corner.tl{ top: 8px; left: 8px; border-top: 2px solid var(--gold-light); border-left: 2px solid var(--gold-light); }
.manuscript-corner.tr{ top: 8px; right: 8px; border-top: 2px solid var(--gold-light); border-right: 2px solid var(--gold-light); }
.manuscript-corner.bl{ bottom: 8px; left: 8px; border-bottom: 2px solid var(--gold-light); border-left: 2px solid var(--gold-light); }
.manuscript-corner.br{ bottom: 8px; right: 8px; border-bottom: 2px solid var(--gold-light); border-right: 2px solid var(--gold-light); }

.manuscript-eyebrow{
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
}

.manuscript-eyebrow i{ color: var(--gold); }

.manuscript-verse{
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
}

.manuscript-verse p{
  width: 100%;
  margin: 0;
  color: var(--text);
  font-size: 14.5px;
  line-height: 2.5;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.manuscript-verse .verse-divider{
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 8px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateY(-2px);
  opacity: .7;
}

.bento-manuscript .mini-card-more{
  position: relative;
  z-index: 1;
}

/* ----- تایل تصاویر: موزاییک نامتقارن ----- */
.bento-gallery{ grid-row: 2; }

.gallery-mosaic{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
  flex: 1;
  min-height: 140px;
}

.gallery-mosaic a{
  display: block;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

.gallery-mosaic a:first-child{
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

.gallery-mosaic a img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 991px){
  .content-bento{ grid-template-columns: 1fr; }
  .bento-video{ grid-row: auto; }
  .bento-manuscript{ grid-row: auto; }
  .bento-gallery{ grid-row: auto; }
}

/* ============================================================
   معرفی
   ============================================================ */
.intro-section{
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding-top: 30px;
}

.intro-section::before{
  content: "";
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 0 auto 6px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-soft-strong) 20%, var(--gold) 50%, var(--border-soft-strong) 80%, transparent);
}

.intro-title{
  position: relative;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: .2px;
}

.intro-text{
  font-size: 0.85rem;
  line-height: 1.95;
  color: var(--text-muted);
  text-align: justify;
  text-justify: inter-word;
  word-spacing: -1px;
}

@media (min-width: 769px){
  .intro-text{ font-size: 1rem; line-height: 1.9; }
}

/* ============================================================
   ریسپانسیو کلی
   ============================================================ */
@media (max-width: 991px){
  .madahi-dashboard{ grid-template-columns: 1fr; }
  .madahi-list{ max-height: 220px; }
}

@media (max-width: 480px){
  .madahi-hero{ padding: 16px; }
  .madahi-hero-cover{ width: 52px; height: 52px; }
  .madahi-hero-info h3{ font-size: 13px; }
  .wave-ctrl-main{ width: 40px; height: 40px; }
}

/* ============================================================
   مودال استوری — استایل اینستاگرامی
   ============================================================ */
.story-modal{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: #000;
}

.story-modal.open{ display: flex; align-items: center; justify-content: center; }

.story-modal-inner{
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 100vh;
  background: #000;
  overflow: hidden;
}

@media (min-width: 600px){
  .story-modal-inner{
    height: 92vh;
    max-height: 820px;
    border-radius: 16px;
  }
}

.story-progress-row{
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  gap: 4px;
}

.story-progress-seg{
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,0.3);
  overflow: hidden;
}

.story-progress-seg-fill{
  height: 100%;
  width: 0%;
  background: var(--gold-light, #eccb84);
}

.story-modal-header{
  position: absolute;
  top: 22px;
  left: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
}

.story-modal-avatar{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.5);
}

.story-modal-title{
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-close-btn{
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.story-video{
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.story-tap-zone{
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  z-index: 10;
}

.story-tap-right{ right: 0; }
.story-tap-left{ left: 0; }

body.story-open{ overflow: hidden; }



.madahi-list-wrap{
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  overflow: hidden;          /* اینجا کراپ اتفاق می‌افته */
  max-height: 260px;
}

.madahi-list{
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  overflow-y: auto;
  padding: 10px;
  /* بوردر و بک‌گراند و رادیوس رو از اینجا حذف کردیم */
}

.madahi-list::-webkit-scrollbar{ width: 3px; }
.madahi-list::-webkit-scrollbar-thumb{ background: var(--gold); border-radius: 50px; }





/* ----- دکمه‌ی تکرار ----- */
.wave-ctrl-repeat{
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  transition: all .35s var(--ease);
}

.wave-ctrl-repeat i{
  font-size: 13px;
  transition: transform .35s var(--ease);
}

.wave-ctrl-repeat:hover{
  border-color: var(--border-soft-strong);
  color: var(--gold-light);
}

/* حالت فعال: تکرار روشنه */
.wave-ctrl-repeat.active{
  background: linear-gradient(135deg, rgba(201,151,74,0.28), rgba(110,27,38,0.18));
  border-color: var(--gold);
  color: var(--gold-light);
 }

.wave-ctrl-repeat.active i{
  transform: rotate(180deg);
}

/* نقطه‌ی کوچیک نشانگر زیر آیکون وقتی فعاله */
.wave-ctrl-repeat.active::after{
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-light);
  transform: translateX(-50%);
  box-shadow: 0 0 4px var(--gold-light);
}




/* نوار پیشرفت اسکرول بالای صفحه */
.scroll-progress{
  position:fixed; top:0; left:0; width:100%; height:3px;
  background:linear-gradient(90deg,#d4af37,#fff2c2);
  transform-origin:left; transform:scaleX(0); z-index:9999;
}

#storyBar{perspective:900px;}
.madahi-dashboard{perspective:1200px;}
.intro-section{perspective:700px;}
.word-inline{display:inline-block; will-change:transform,opacity;}