/* Unified post / album / artist card polish — mifa.dinbo.de */

.mifa-post-card,
.card.card-custom.hover.w-225px,
.card.card-custom.hover.w-175px,
.card.card-custom.hover.special-post,
a > .card.card-custom.hover {
  background: rgba(16, 16, 22, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 18px !important;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.mifa-post-card:hover,
.card.card-custom.hover.w-225px:hover,
.card.card-custom.hover.w-175px:hover,
.card.card-custom.hover.special-post:hover,
a:hover > .card.card-custom.hover {
  transform: translateY(-5px);
  border-color: rgba(245, 197, 24, 0.35) !important;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(245, 197, 24, 0.12);
}

/* Cover */
.mifa-post-card .mifa-cover,
.card.card-custom.hover .m-2.position-relative,
.card.card-custom.hover .cover-wrap {
  margin: 0.55rem !important;
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
}

.mifa-post-card .mifa-cover img,
.card.card-custom.hover .m-2.position-relative > img,
.card.card-custom.hover .cover-wrap > img {
  border-radius: 14px !important;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s ease;
}

.mifa-post-card:hover .mifa-cover img,
.card.card-custom.hover:hover .m-2.position-relative > img {
  transform: scale(1.06);
}

/* Shine sweep on cover */
.mifa-post-card .mifa-cover::after,
.card.card-custom.hover .m-2.position-relative:not(.cover-wrap)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.18) 48%,
    transparent 62%
  );
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
}

.mifa-post-card:hover .mifa-cover::after,
.card.card-custom.hover:hover .m-2.position-relative:not(.cover-wrap)::after {
  transform: translateX(120%);
}

/* Corner play button removed site-wide (incl. songs list) */
.card.card-custom.hover .play-icon,
.mifa-post-card .play-icon,
span.play-icon {
  display: none !important;
}

/* Type badges */
.mifa-type-badge {
  left: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.mifa-type-badge--song {
  background: linear-gradient(135deg, rgba(255, 159, 26, 0.95), rgba(245, 197, 24, 0.9));
  color: #1a1200;
}

.mifa-type-badge--album {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.92), rgba(99, 102, 241, 0.9));
}

.mifa-type-badge--video {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.92), rgba(56, 189, 248, 0.88));
}

/* Title / artist */
.mifa-post-card .card-body,
.card.card-custom.hover > .card-body,
.card.card-custom.hover > a.card-body-link {
  text-align: right !important;
  padding: 0.35rem 0.85rem 0.85rem !important;
}

.mifa-post-card .mifa-title,
.card.card-custom.hover .card-body .text-dark.font-size-lg,
.card.card-custom.hover .card-body-link .text-dark.font-size-lg {
  color: #f3f4f8 !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mifa-post-card .mifa-artist,
.card.card-custom.hover .card-body .text-muted,
.card.card-custom.hover .card-body-link .text-muted {
  color: #9aa0b4 !important;
  font-size: 0.78rem !important;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card.card-custom.hover > a.card-body-link:hover .text-dark {
  color: #f5c518 !important;
}

/* Suggest cards — match mifamusic.ir orange plate */
.suggest-objects .card.card-custom.bg-primary,
.suggest-objects .card.hover-dark.bg-primary,
.suggest-objects .mifa-suggest-card {
  background-color: var(--primary, #ff9914) !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  overflow: hidden;
}

.suggest-objects .mifa-suggest-card .mifa-cover {
  margin: 0.5rem !important;
}

.suggest-objects .mifa-suggest-card .card-body {
  text-align: center !important;
  padding: 0.15rem 0.6rem 0.65rem !important;
}

.suggest-objects .card.bg-primary .text-black,
.suggest-objects .card.bg-primary a.text-black,
.suggest-objects .mifa-suggest-card .mifa-title,
.suggest-objects .mifa-suggest-card a.mifa-title {
  color: #111 !important;
}

.suggest-objects .card.bg-primary a.font-size-sm,
.suggest-objects .mifa-suggest-card .mifa-artist,
.suggest-objects .mifa-suggest-card a.mifa-artist {
  color: #1a1a1a !important;
}

.suggest-objects .card.bg-primary:hover,
.suggest-objects .mifa-suggest-card:hover {
  filter: brightness(1.04);
  transform: translateY(-3px);
}

/* Special posts — keep steam/border glow always visible (not hover-only) */
.card.card-custom.hover.special-post,
.special-post.mifa-post-card,
.special-post {
  border-radius: 18px !important;
  /* Let :before/:after steam ring paint outside the card */
  overflow: visible !important;
  isolation: isolate;
  z-index: 1;
}

/* Owl stage otherwise clips the animated rim */
.owl-carousel.special-posts .owl-stage-outer {
  overflow: visible;
  padding-top: 6px;
  padding-bottom: 6px;
  margin-top: -6px;
  margin-bottom: -6px;
}
.owl-carousel.special-posts .owl-item {
  overflow: visible;
}

.special-post .mifa-cover,
.special-post .m-2.position-relative {
  overflow: hidden;
  border-radius: 14px;
}

.special-post:before,
.special-post:after {
  /* Reinforce always-on animated rim (style.css steam keyframes) */
  animation: steam 28s linear infinite !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.special-post .text-primary {
  color: #f5c518 !important;
  font-weight: 700;
}

.special-post .fa-star {
  color: #f5c518 !important;
}

/* Cover shine loops on special posts without needing hover */
.special-post .mifa-cover::after,
.special-post.mifa-post-card .mifa-cover::after {
  animation: mifa-special-shine 7s ease-in-out infinite;
  transition: none;
}

@keyframes mifa-special-shine {
  0% {
    transform: translateX(-120%);
  }
  55%,
  100% {
    transform: translateX(120%);
  }
}

/* Artist cards */
.artist-objects .card.card-custom.hover {
  border-radius: 18px !important;
  overflow: hidden;
}

.artist-objects .card.card-custom.hover img {
  transition: transform 0.4s ease;
}

.artist-objects .card.card-custom.hover:hover img {
  transform: scale(1.05);
}

.artist-objects .card .card-body.position-absolute {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent) !important;
  backdrop-filter: blur(2px);
}

.artist-objects .card .card-body a {
  color: #fff !important;
  font-weight: 700;
}

/* Hover preview refinements */
.js-hover-preview {
  border-radius: 18px !important;
}

.js-hover-preview .cover-wrap {
  border-radius: 14px !important;
}

.js-hover-preview.is-previewing,
.js-hover-preview:hover {
  border-color: rgba(255, 153, 20, 0.45) !important;
}

.hover-preview-overlay {
  border-radius: 14px !important;
  background: linear-gradient(
    to top,
    rgba(8, 8, 12, 0.88) 0%,
    rgba(8, 8, 12, 0.4) 48%,
    rgba(8, 8, 12, 0.08) 100%
  ) !important;
}

.hover-preview-overlay .sc-wave span {
  background: rgba(255, 255, 255, 0.22);
}

.js-hover-preview.is-previewing .hover-preview-overlay .sc-wave span {
  background: rgba(255, 179, 71, 0.35);
}

.hover-preview-overlay .sc-wave span.is-played {
  background: linear-gradient(180deg, #ffc266, #ff9914);
}

.hover-preview-overlay .sc-progress-bar {
  background: linear-gradient(90deg, #ff9f1a, #f5c518);
}

/* Owl items spacing */
.owl-carousel .item .mifa-post-card,
.owl-carousel .item .card.card-custom.hover {
  margin-left: auto;
  margin-right: auto;
}

@media (hover: none), (max-width: 767.98px) {
  .mifa-post-card:hover,
  .card.card-custom.hover.w-225px:hover,
  .card.card-custom.hover.w-175px:hover {
    transform: none;
  }

}


/* ===== Mobile search/grid: fluid cards (fix 225px overflow → page/dock clip) ===== */
@media (max-width: 767.98px) {
  .w-sm-double,
  .w-sm-double.w-225px,
  .w-225px.w-sm-double {
    width: calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .w-sm-double > .w-225px,
  .w-sm-double > .card.w-225px,
  .w-sm-double > .mifa-post-card,
  .w-sm-double > a.w-225px,
  .w-sm-double .card.card-custom.hover.w-225px,
  .w-sm-double .mifa-post-card.w-225px {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .row > .w-225px:not(.w-sm-double),
  .row > .mifa-post-card.w-225px {
    width: calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
  }

  html, body {
    overflow-x: hidden;
  }
}

@media (max-width: 500px) {
  .w-sm-double img,
  .w-sm-double .mifa-cover img,
  .w-sm-double .cover-wrap img {
    height: auto !important;
    aspect-ratio: 1 / 1;
    max-height: none;
  }
}
