/* ==========================================================================
   Platform Al-Fath (منصة الفتح) - Religious Programs Section Styles
   ========================================================================== */

/* ==========================================================================
   Religious Programs Section
   ========================================================================== */
.programs-filter-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.prog-filter-chip {
  padding: 7px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.86rem;
  transition: var(--transition-fast);
}

.prog-filter-chip.active,
.prog-filter-chip:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.program-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.program-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-gold);
}

.program-thumb-box {
  position: relative;
  height: 165px;
  overflow: hidden;
}

.program-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.program-card:hover .program-thumb-box img {
  transform: scale(1.06);
}

.program-category-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(2, 54, 56, 0.88);
  backdrop-filter: blur(6px);
  color: var(--secondary-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
}

body[dir="ltr"] .program-category-pill {
  right: auto;
  left: 10px;
}

.program-episodes-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
}

body[dir="ltr"] .program-episodes-badge {
  left: auto;
  right: 10px;
}

.program-body {
  padding: 18px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.program-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 6px;
  line-height: 1.4;
}

.program-host {
  font-size: 0.8rem;
  color: var(--secondary-dark);
  font-weight: 700;
  margin-bottom: 8px;
}

.program-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
  flex-grow: 1;
}

.program-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.program-duration {
  font-size: 0.76rem;
  color: var(--text-light);
}

.btn-watch-program {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  transition: var(--transition-fast);
}

.btn-watch-program:hover {
  color: var(--secondary-dark);
}

/* ==========================================================================
   Religious Programs Section - Animated Carousel & Video Mark Styling
   ========================================================================== */
.programs-carousel-container {
  position: relative;
  margin: 35px 0 25px;
  padding: 0 8px;
}

.programs-carousel-nav {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  z-index: 15;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #023638;
  border: 2px solid #CD9F5C;
  color: #CD9F5C;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 18px rgba(2, 54, 56, 0.35);
}

.programs-carousel-nav:hover {
  background: #CD9F5C;
  color: #012425;
  border-color: #023638;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 8px 24px rgba(205, 159, 92, 0.45);
}

.programs-carousel-nav.btn-prev {
  right: -20px;
}

.programs-carousel-nav.btn-next {
  left: -20px;
}

@media (max-width: 768px) {
  .programs-carousel-nav.btn-prev {
    right: -8px;
    width: 38px;
    height: 38px;
  }
  .programs-carousel-nav.btn-next {
    left: -8px;
    width: 38px;
    height: 38px;
  }
}

.programs-carousel-viewport {
  overflow: hidden;
  border-radius: 20px;
  padding: 10px 4px 20px;
}

.programs-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.program-card-enhanced {
  flex: 0 0 calc((100% - 48px) / 3);
  background: #ffffff;
  border-radius: 20px;
  border: 1.5px solid rgba(205, 159, 92, 0.28);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(2, 54, 56, 0.06);
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@media (max-width: 1024px) {
  .program-card-enhanced {
    flex: 0 0 calc((100% - 24px) / 2);
  }
}

@media (max-width: 640px) {
  .program-card-enhanced {
    flex: 0 0 100%;
  }
}

.program-card-enhanced:hover {
  transform: translateY(-8px);
  border-color: #CD9F5C;
  box-shadow: 0 18px 40px rgba(2, 54, 56, 0.14), 0 0 20px rgba(205, 159, 92, 0.22);
}

.program-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 205px;
  overflow: hidden;
  background: #012425;
}

.program-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.program-card-enhanced:hover .program-thumb-wrapper img {
  transform: scale(1.08);
}

.program-category-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(2, 54, 56, 0.88);
  backdrop-filter: blur(8px);
  color: #CD9F5C;
  border: 1px solid rgba(205, 159, 92, 0.45);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.program-episodes-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(1, 36, 37, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Video Play Indicator Overlay (علامة الفيديو على الصورة) */
.video-play-indicator {
  position: absolute;
  bottom: 12px;
  right: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(1, 36, 37, 0.9) 0%, rgba(2, 54, 56, 0.95) 100%);
  backdrop-filter: blur(10px);
  border: 1.2px solid rgba(205, 159, 92, 0.6);
  border-radius: 12px;
  z-index: 4;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.program-card-enhanced:hover .video-play-indicator {
  background: #023638;
  border-color: #CD9F5C;
  box-shadow: 0 6px 20px rgba(205, 159, 92, 0.38);
}

.video-play-disc {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #012425;
  border: 1.5px solid #CD9F5C;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.program-card-enhanced:hover .video-play-disc {
  background: #CD9F5C;
  transform: scale(1.12);
}

.program-card-enhanced:hover .video-play-disc svg {
  fill: #012425 !important;
}

.video-badge-pill {
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.video-pulse-glow {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #CD9F5C;
  box-shadow: 0 0 10px #CD9F5C;
  animation: videoPulse 1.8s infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes videoPulse {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 4px #CD9F5C; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #CD9F5C; }
  100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 4px #CD9F5C; }
}

.program-card-info {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.program-host-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.host-avatar-icon {
  font-size: 0.95rem;
}

.program-host-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: #CD9F5C;
}

.program-title-h3 {
  font-size: 1.12rem;
  font-weight: 800;
  color: #023638;
  margin: 0 0 8px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.program-summary {
  font-size: 0.86rem;
  color: #557072;
  line-height: 1.6;
  margin: 0 0 16px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.program-meta-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(2, 54, 56, 0.08);
  gap: 10px;
  margin-top: auto;
}

.program-duration-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #718096;
}

.btn-open-program-episodes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(2, 54, 56, 0.06);
  color: #023638;
  border: 1.2px solid rgba(2, 54, 56, 0.15);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-open-program-episodes:hover {
  background: #023638;
  color: #CD9F5C;
  border-color: #023638;
}

/* Indicators */
.programs-carousel-indicators {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.prog-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(2, 54, 56, 0.22);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.prog-dot.active {
  width: 32px;
  background: #CD9F5C;
  box-shadow: 0 0 10px rgba(205, 159, 92, 0.6);
}

/* ==========================================================================
   Playlist Cards Styling on Homepage (Matching Programs Directory Page)
   ========================================================================== */
#programsCarouselTrack .playlist-card {
  flex: 0 0 calc((100% - 48px) / 3);
  max-width: calc((100% - 48px) / 3);
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding-top: 10px;
}

@media (max-width: 1024px) {
  #programsCarouselTrack .playlist-card {
    flex: 0 0 calc((100% - 24px) / 2);
    max-width: calc((100% - 24px) / 2);
  }
}

@media (max-width: 640px) {
  #programsCarouselTrack .playlist-card {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Physical Stack Layer Accents */
.playlist-stack-layer {
  position: absolute;
  height: 10px;
  border-radius: 16px 16px 0 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.playlist-stack-layer.layer-back {
  top: 0px;
  left: 14px;
  right: 14px;
  background: #e4dfd3;
  border: 1px solid rgba(205, 159, 92, 0.25);
  opacity: 0.7;
}

.playlist-stack-layer.layer-middle {
  top: 5px;
  left: 7px;
  right: 7px;
  background: #ede8dc;
  border: 1px solid rgba(205, 159, 92, 0.3);
  opacity: 0.85;
}

.playlist-card:hover .playlist-stack-layer.layer-back {
  top: -3px;
  opacity: 0.9;
  background: #dfd8cb;
}

.playlist-card:hover .playlist-stack-layer.layer-middle {
  top: 3px;
  opacity: 1;
}

.playlist-card-inner {
  position: relative;
  background: #ffffff;
  border: 1.5px solid rgba(2, 54, 56, 0.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(2, 54, 56, 0.05);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.playlist-card:hover .playlist-card-inner {
  transform: translateY(-5px);
  border-color: rgba(205, 159, 92, 0.45);
  box-shadow: 0 16px 36px rgba(2, 54, 56, 0.11), 0 0 0 1px rgba(205, 159, 92, 0.25);
}

/* Playlist Cover / Thumbnail */
.playlist-cover-wrapper {
  position: relative;
  aspect-ratio: 16 / 9.5;
  overflow: hidden;
  background: #022324;
  cursor: pointer;
}

.playlist-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  display: block;
}

.playlist-card:hover .playlist-cover-img {
  transform: scale(1.06);
}

.cover-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 54, 56, 0.5) 0%, rgba(2, 54, 56, 0.1) 40%, rgba(2, 54, 56, 0.75) 100%);
  pointer-events: none;
}

/* Top Cover Badges */
.cover-badges-row {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}

.playlist-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(2, 54, 56, 0.9);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 800;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(205, 159, 92, 0.4);
}

.playlist-type-badge .badge-num {
  color: #CD9F5C;
  font-weight: 900;
}

.playlist-episodes-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.94);
  color: #023638;
  padding: 4px 11px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Center Play Disc */
.playlist-play-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.play-disc {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(205, 159, 92, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.25s ease;
}

.play-disc svg {
  margin-right: -2px;
}

.playlist-card:hover .play-disc {
  transform: scale(1.15);
  background: #ffffff;
}

/* Footer Cover Row */
.cover-footer-row {
  position: absolute;
  bottom: 10px;
  right: 12px;
  z-index: 2;
}

.playlist-duration-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(2, 54, 56, 0.82);
  color: #ffd79a;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(205, 159, 92, 0.3);
}

/* Playlist Card Body */
.playlist-content-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Host Info Row with Circular Avatar */
.playlist-host-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.host-avatar-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #CD9F5C;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(205, 159, 92, 0.2);
}

.host-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.host-text-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.host-name-label {
  font-size: 0.9rem;
  font-weight: 800;
  color: #1a202c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-genre-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #8c6426;
}

/* Title & Excerpt */
.playlist-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #023638;
  margin: 0 0 10px;
  line-height: 1.42;
  cursor: pointer;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.playlist-card:hover .playlist-title {
  color: #b8863f;
}

.playlist-title a {
  color: inherit;
  text-decoration: none;
}

.playlist-cover-wrapper {
  display: block;
  text-decoration: none;
}

.playlist-excerpt {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #5a6a70;
  margin: 0 0 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Action Button */
.playlist-actions-bar {
  border-top: 1px dashed rgba(2, 54, 56, 0.1);
  padding-top: 16px;
  margin-top: auto;
}

.btn-watch-playlist {
  width: 100%;
  background: #023638;
  color: #ffffff;
  border: 1.5px solid rgba(205, 159, 92, 0.3);
  border-radius: 12px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.28s ease;
  box-shadow: 0 3px 10px rgba(2, 54, 56, 0.12);
  text-decoration: none;
}

.btn-watch-playlist .btn-icon {
  color: #CD9F5C;
  display: flex;
  align-items: center;
}

.btn-watch-playlist .arrow-sym {
  transition: transform 0.25s ease;
}

.playlist-card:hover .btn-watch-playlist {
  background: #044b4e;
  border-color: #CD9F5C;
  color: #ffd79a;
  box-shadow: 0 6px 18px rgba(2, 54, 56, 0.2);
}

.playlist-card:hover .btn-watch-playlist .arrow-sym {
  transform: translateX(-4px);
}