/* Infinity Resort V43 - Equal Villa Card Height
   Purpose: keep all homepage villa cards the same desktop/tablet height after V41/V42.
   Does not change DB data, primary preview selection, popup JS, admin, config, analytics, or backup tool. */

#villas .villa-stack {
  align-items: stretch !important;
}

@media (min-width: 901px) {
  #villas .villa-panel {
    height: clamp(500px, 40vw, 540px) !important;
    min-height: clamp(500px, 40vw, 540px) !important;
    max-height: clamp(500px, 40vw, 540px) !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }

  #villas .villa-panel > .villa-photo,
  #villas .villa-panel > .villa-info {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: stretch !important;
  }

  #villas .villa-photo {
    overflow: hidden !important;
    display: block !important;
  }

  #villas .villa-photo img {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  #villas .villa-info {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  #villas .villa-info p {
    flex: 0 0 auto !important;
  }

  #villas .villa-info .chips {
    flex: 0 1 auto !important;
    overflow: visible !important;
  }
}

@media (max-width: 900px) {
  #villas .villa-panel,
  #villas .villa-panel > .villa-photo,
  #villas .villa-panel > .villa-info {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  #villas .villa-photo img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    object-fit: cover !important;
  }
}