/* PlacEVision public property image balance V10 */
.property-detail__gallery.pv-gallery-balanced{
  align-items:stretch !important;
}

.property-detail__gallery.pv-gallery-balanced > .property-detail__photo{
  position:relative !important;
  isolation:isolate !important;
  overflow:hidden !important;
  border:1px solid rgba(151,116,70,.18) !important;
  background:#fff !important;
  box-shadow:0 10px 24px rgba(53,39,24,.075) !important;
}

/* The decorative matte frame is absolutely positioned. Some live templates
   do not position the image wrapper, which made the frame use the page itself
   as its containing block and draw a huge rectangle across the detail page. */
.home-property-card__image,
.property-list-card__image{
  position:relative !important;
  overflow:hidden !important;
}

.property-detail__gallery.pv-gallery-balanced > .property-detail__photo img{
  transition:opacity .35s ease,filter .35s ease !important;
}

.property-detail__gallery.pv-gallery-balanced > .property-detail__photo.pv-white-matte,
.home-property-card__image.pv-white-matte,
.property-list-card__image.pv-white-matte{
  background:#fff !important;
}

.property-detail__gallery.pv-gallery-balanced > .property-detail__photo.pv-white-matte::after,
.home-property-card__image.pv-white-matte::after,
.property-list-card__image.pv-white-matte::after{
  content:none !important;
  display:none !important;
}

.property-detail__gallery.pv-gallery-balanced > .property-detail__photo.pv-white-matte img,
.home-property-card__image.pv-white-matte img,
.property-list-card__image.pv-white-matte img{
  z-index:1 !important;
  object-fit:contain !important;
  object-position:center !important;
  background:#fff !important;
}

@media(min-width:769px){
  .property-detail__gallery.pv-gallery-balanced[data-photo-count="2"],
  .property-detail__gallery.pv-gallery-balanced[data-photo-count="3"],
  .property-detail__gallery.pv-gallery-balanced[data-photo-count="4"]{
    display:grid !important;
    grid-template-columns:minmax(0,1.65fr) minmax(280px,.72fr) !important;
    gap:14px !important;
  }

  .property-detail__gallery.pv-gallery-balanced[data-photo-count="2"]{
    grid-template-rows:382px !important;
  }

  .property-detail__gallery.pv-gallery-balanced[data-photo-count="3"]{
    grid-template-rows:repeat(2,184px) !important;
  }

  .property-detail__gallery.pv-gallery-balanced[data-photo-count="4"]{
    grid-template-rows:repeat(3,122px) !important;
  }

  .property-detail__gallery.pv-gallery-balanced[data-photo-count="2"] > .property-detail__photo:first-child,
  .property-detail__gallery.pv-gallery-balanced[data-photo-count="3"] > .property-detail__photo:first-child,
  .property-detail__gallery.pv-gallery-balanced[data-photo-count="4"] > .property-detail__photo:first-child{
    grid-column:1 !important;
    grid-row:1 / -1 !important;
    height:100% !important;
    min-height:0 !important;
  }

  .property-detail__gallery.pv-gallery-balanced[data-photo-count="2"] > .property-detail__photo:nth-child(n+2),
  .property-detail__gallery.pv-gallery-balanced[data-photo-count="3"] > .property-detail__photo:nth-child(n+2),
  .property-detail__gallery.pv-gallery-balanced[data-photo-count="4"] > .property-detail__photo:nth-child(n+2){
    grid-column:2 !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
  }

  .property-detail__gallery.pv-gallery-balanced[data-photo-count="2"] > .property-detail__photo:nth-child(2){grid-row:1 !important}
  .property-detail__gallery.pv-gallery-balanced[data-photo-count="3"] > .property-detail__photo:nth-child(2){grid-row:1 !important}
  .property-detail__gallery.pv-gallery-balanced[data-photo-count="3"] > .property-detail__photo:nth-child(3){grid-row:2 !important}
  .property-detail__gallery.pv-gallery-balanced[data-photo-count="4"] > .property-detail__photo:nth-child(2){grid-row:1 !important}
  .property-detail__gallery.pv-gallery-balanced[data-photo-count="4"] > .property-detail__photo:nth-child(3){grid-row:2 !important}
  .property-detail__gallery.pv-gallery-balanced[data-photo-count="4"] > .property-detail__photo:nth-child(4){grid-row:3 !important}
}

@media(max-width:768px){
  .property-detail__gallery.pv-gallery-balanced[data-photo-count="4"] > .property-detail__photo:last-child{
    grid-column:1 / -1 !important;
    width:calc(50% - 6px) !important;
    justify-self:center !important;
  }

  .property-detail__gallery.pv-gallery-balanced > .property-detail__photo{
    border-radius:2px !important;
    box-shadow:0 8px 20px rgba(53,39,24,.07) !important;
  }
}

@media(prefers-reduced-motion:reduce){
  .property-detail__gallery.pv-gallery-balanced > .property-detail__photo img{
    transition:none !important;
  }
}
