/* Harmony Healing Center — V7.9.66
   Mobile image/responsive polish.
   Scope is intentionally narrow:
   1) Arabic mobile hero uses its dedicated portrait asset.
   2) Arabic mobile hero veil is tuned so artwork remains visible.
   3) Trusted Organizations mobile logo cards are normalized and the odd last
      card is centered instead of leaving an awkward empty column.
*/

@media (max-width: 760px) {
  html[lang="ar"] .homev766-hero-visual,
  html[lang="ar"] .homev766-hero-visual picture {
    overflow: hidden !important;
  }

  html[lang="ar"] .homev766-hero-visual-img,
  html[lang="ar"] .homev766-hero-visual picture img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: 50% 50% !important;
    transform: none !important;
  }

  /* Keep copy readable while allowing the new portrait artwork to remain visible. */
  html[lang="ar"] .homev766-hero-veil {
    background: linear-gradient(
      180deg,
      rgba(255,255,255,.97) 0%,
      rgba(255,255,255,.94) 27%,
      rgba(255,255,255,.86) 47%,
      rgba(255,255,255,.66) 64%,
      rgba(255,255,255,.36) 79%,
      rgba(255,255,255,.12) 91%,
      rgba(255,255,255,0) 100%
    ) !important;
  }

  /* Trusted Organizations: clean two-column mobile grid. */
  html[lang="ar"] .home45d-card-row,
  html[lang="ar"] .home45z-mobile-cards {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    align-items: stretch !important;
    justify-content: center !important;
    direction: ltr !important;
    width: 100% !important;
  }

  html[lang="ar"] .home45d-card,
  html[lang="ar"] .home45z-mobile-cards > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
  }

  /* If the number of partner cards is odd, center the final card. */
  html[lang="ar"] .home45d-card:last-child:nth-child(odd),
  html[lang="ar"] .home45z-mobile-cards > *:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
    width: calc(50% - 7px) !important;
    justify-self: center !important;
  }

  html[lang="ar"] .home45d-card img,
  html[lang="ar"] .home45z-mobile-cards img {
    display: block !important;
    max-width: 82% !important;
    max-height: 72% !important;
    object-fit: contain !important;
    object-position: center !important;
    margin-inline: auto !important;
  }
}

@media (max-width: 420px) {
  html[lang="ar"] .home45d-card-row,
  html[lang="ar"] .home45z-mobile-cards {
    gap: 11px !important;
  }

  html[lang="ar"] .home45d-card:last-child:nth-child(odd),
  html[lang="ar"] .home45z-mobile-cards > *:last-child:nth-child(odd) {
    width: calc(50% - 5.5px) !important;
  }
}
