/* Homepage only: turn a one-item residence carousel into an editorial feature.
   Categories with two or more items retain the existing carousel unchanged. */
.snap-mandatory:has(> :only-child .premium-shadow) {
  display: block;
  overflow: visible;
  padding-block: 2rem;
}

.snap-mandatory:has(> :only-child .premium-shadow) > :only-child {
  min-width: 100%;
}

@media (min-width: 768px) {
  .snap-mandatory:has(> :only-child .premium-shadow) > :only-child > .group > .premium-shadow {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: clamp(1.25rem, 2vw, 2rem);
    min-height: 29rem;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .snap-mandatory:has(> :only-child .premium-shadow) > :only-child > .group > .premium-shadow > :first-child {
    order: 2;
    height: auto;
    min-height: 29rem;
    border-radius: 2rem;
  }

  .snap-mandatory:has(> :only-child .premium-shadow) > :only-child > .group > .premium-shadow > :nth-child(2) {
    order: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(.5rem, 2vw, 1.5rem);
    background: transparent;
    box-shadow: none;
  }

  .single-residence-logo {
    display: flex;
    margin-bottom: 1.75rem;
  }

  .single-residence-logo > img {
    width: min(var(--single-residence-logo-width, 640px), 100%);
    max-height: 360px;
    object-fit: contain;
  }

  .single-residence-logo.has-background > img {
    border-radius: 0;
    padding: 0;
    background: transparent !important;
    box-shadow: none;
  }

  .rtl .snap-mandatory:has(> :only-child .premium-shadow) > :only-child > .group > .premium-shadow > :first-child {
    order: 1;
  }

  .rtl .snap-mandatory:has(> :only-child .premium-shadow) > :only-child > .group > .premium-shadow > :nth-child(2) {
    order: 2;
  }
}
