.section-works-slider {
  background-color: var(--dark);
  padding-top: 96px;
  padding-bottom: 60px;
}

.section-all-works {
  background-color: #0a0a0b;
  padding: 80px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.works-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* فریم تیره بنتویی با گوشه‌های خیلی گرد کاملاً شبیه به عکس نمونه */
.work-bento-card {
  position: relative;
  height: 380px;
  background: #131418;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s, box-shadow 0.4s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
}

.work-bento-card.featured-variant {
  height: 460px;
}

.work-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
  z-index: 1;
}

.work-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(10, 10, 12, 0.95) 85%);
  z-index: 2;
}

.work-card-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.work-title {
  color: var(--light);
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.work-description {
  color: #a1a1a6;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 8px 0;
}

/* ردیف دکمه‌های کنترلی شبیه به المان‌های شناور تصویر */
.work-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

/* دکمه دایره‌ای پخش صدا متناسب با المان‌های پاپ‌آپ سفید تصویر */
.audio-play-btn {
  background: var(--light);
  color: var(--dark);
  border: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.3s, background-color 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.audio-play-btn:hover {
  transform: scale(1.08);
  background: #ffffff;
}

/* دکمه شیشه‌ای و مات متنی برای PDF */
.pdf-download-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--light);
  padding: 10px 20px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: background 0.3s, border-color 0.3s;
}

.pdf-download-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* حالت فعال کارت وقتی صدا در حال پخش است (افکت نوری ملایم دور قاب) */
.work-bento-card.is-playing {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.05);
}

.work-bento-card.is-playing .audio-play-btn {
  background: #e5bf97; /* تغییر رنگ ملایم دکمه هنگام پخش */
  color: #000;
}

/* هاور کلی کارت */
.work-bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.work-bento-card:hover .work-card-img {
  transform: scale(1.03);
  opacity: 0.75;
}

/* تراز متون در زبان فارسی */
html[dir="rtl"] .work-card-content {
  text-align: right;
}
html[dir="rtl"] .work-actions {
  flex-direction: row-reverse;
}

@media screen and (max-width: 767px) {
  body.works-page {
    background-image: linear-gradient(rgba(0, 0, 0, .75), rgba(0, 0, 0, .75)), url("../images/stone-768.b4ba0ebcfe5c.webp") !important;
  }
  .section-works-slider,
  .section-all-works {
    padding-top: 52px;
    padding-bottom: 52px;
  }
  .works-bento-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin-top: 28px;
  }
  .section-past-events .form-heading {
    margin-bottom: 32px !important;
  }
  .section-past-events .form-heading h2 {
    max-width: 100%;
    margin: 8px auto 0 !important;
    font-size: clamp(27px, 8vw, 34px) !important;
    line-height: 1.28 !important;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
  }
  .work-bento-card {
    width: 100%;
    min-width: 0;
    height: 380px;
    border-radius: 24px;
    padding: 20px;
  }
  .work-bento-card.featured-variant {
    height: min(115vw, 430px);
    min-height: 360px;
  }
  .work-title {
    font-size: 21px;
    overflow-wrap: anywhere;
  }
  .work-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
  }
  .work-actions,
  html[dir="rtl"] .work-actions {
    flex-flow: row wrap;
    gap: 10px;
  }
  .audio-play-btn {
    width: 46px;
    height: 46px;
  }
  .pdf-download-btn {
    padding: 9px 16px;
  }
}
