/* SEO / CWV: reserve space to cut CLS; LCP-friendly covers (clone pass 4–11) */
.mifa-cover > img,
.mifa-post-card .mifa-cover > img {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #e8eef5;
}

.mifa-cover {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

img.max-w-500px.fit-contain,
img.max-w-500px.w-100.fit-contain {
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: 500px;
  background: #e8eef5;
}

.artist-hero__portrait {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e8eef5;
}

#footer-player,
.footer-player,
.mifa-footer-player {
  min-height: 64px;
}

/* Pass 5: home banner / carousel */
.mifa-index-carousel,
.index-carousel {
  aspect-ratio: 3 / 1;
  min-height: 140px;
  max-height: 420px;
  overflow: hidden;
  background: #d6e3f0;
}
@media (max-width: 767px) {
  .mifa-index-carousel,
  .index-carousel {
    aspect-ratio: 16 / 9;
    min-height: 120px;
  }
}
.mifa-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #d6e3f0;
}

/* Pass 6: dock / bottom nav */
.mifa-bottom-dock {
  min-height: 72px;
}
.mifa-footer-player {
  min-height: 64px;
}
.navigation-bottom {
  min-height: 58px;
}
@media (max-width: 991.98px) {
  body {
    padding-bottom: 70px;
  }
}
.social-pages,
.social-pages-2 {
  contain: layout;
}

/* Pass 10: cards + footer */
.mifa-post-card img,
.owl-carousel .rounded-xl,
img.rounded-xl.min-h-200px,
img.owl-lazy.rounded-xl {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e8eef5;
}
.mifa-footer__logo img {
  height: 48px;
  width: auto;
  max-width: 200px;
}
.player-image {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e8eef5;
}
.mifa-footer__hubs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
}
.mifa-footer__hubs a {
  color: inherit;
  opacity: 0.85;
  text-decoration: none;
  font-size: 0.9rem;
}
.mifa-footer__hubs a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Pass 11: force swap on site fonts if bundle missed */
@font-face {
  font-family: IRANYekanX;
  font-display: swap;
}

@media (max-width: 767.98px) {
  .social-pages,
  .social-pages-2 {
    display: none !important;
  }
}

/*
 * Owl FOUC guard (critical / blocking):
 * owl.theme is loaded async (media=print→all), so before it + JS arrive,
 * .item cards paint full-width / stacked. Show a horizontal strip instead
 * of display:none (avoids empty hole + CLS) until .owl-loaded.
 */
.owl-carousel:not(.owl-loaded):not(.index-slider) {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  overflow: hidden !important;
  width: 100%;
  max-width: 100%;
  gap: 10px;
  min-height: 220px;
  box-sizing: border-box;
}
.owl-carousel:not(.owl-loaded):not(.index-slider) > .item {
  flex: 0 0 auto;
  width: 180px;
  max-width: 42vw;
  box-sizing: border-box;
  padding-left: 5px;
  padding-right: 5px;
}
.owl-carousel:not(.owl-loaded):not(.index-slider) > .item .card.card-custom,
.owl-carousel:not(.owl-loaded):not(.index-slider) > .item .mifa-post-card,
.owl-carousel:not(.owl-loaded):not(.index-slider) > .item > a {
  width: 100% !important;
  max-width: 100% !important;
}
.owl-carousel:not(.owl-loaded):not(.index-slider) > .item img.card-img-top,
.owl-carousel:not(.owl-loaded):not(.index-slider) > .item .mifa-cover img,
.owl-carousel:not(.owl-loaded):not(.index-slider) > .item img.w-100 {
  width: 100% !important;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Wider special-post cards */
.owl-carousel.special-posts:not(.owl-loaded) {
  min-height: 300px;
}
.owl-carousel.special-posts:not(.owl-loaded) > .item {
  width: 250px;
  max-width: 72vw;
}

.owl-carousel.playlist-objects:not(.owl-loaded),
.owl-carousel.suggest-objects:not(.owl-loaded),
.owl-carousel.album-objects:not(.owl-loaded),
.owl-carousel.artist-objects:not(.owl-loaded),
.owl-carousel.special-objects:not(.owl-loaded) {
  min-height: 250px;
}

.new-objects-2rows .owl-carousel:not(.owl-loaded) {
  min-height: 280px;
}

/* Banner slider: only first slide until owl mounts */
.owl-carousel.index-slider:not(.owl-loaded) {
  display: block !important;
  overflow: hidden;
  width: 100%;
}
.owl-carousel.index-slider:not(.owl-loaded) > .item:not(:first-child) {
  display: none !important;
}
