/* Explore Goa image-frame consistency — v2.11.1-beta.1
 * Public uploaders can supply normal landscape, portrait or phone-camera images.
 * The theme owns the presentation crop; originals are never stretched.
 */

:root{--eg-listing-image-ratio:4/3}

/* WordPress's global responsive image rule uses height:auto. Inside a designed
 * media frame that can leave a visible blank band. These selectors deliberately
 * outrank that default only for framed Explore Goa media. */
body.eg-app-page .eg-guide-image img,
body.eg-app-page .eg-portal-hero-media>img,
body.eg-app-page .eg-portal-card-image img,
body.eg-app-page .eg-home-stream-image img,
body.eg-app-page .eg-portal-latest-image img,
body.eg-app-page .eg-app-live-media img,
body.eg-app-page .eguc-card-media img,
body.eg-app-page .eg-listing-gallery img,
body.eg-app-page .eg-listing-related-image img,
body.eg-app-page .eg-listing-editorial-image img,
body.eg-app-page .eg-article-listing-image img,
body.eg-app-page .eg-article-related-card img,
body.eg-app-page .eg-detail-image img{
  display:block;
  width:100%;
  height:100%!important;
  object-fit:cover;
  object-position:center center;
}

/* Primary public listing photograph: one predictable 4:3 frame on desktop,
 * tablet and mobile. Multiple photographs continue to use the existing mosaic
 * inside the same outer frame. */
body.eg-app-page .eg-listing-gallery{
  width:100%;
  min-height:0!important;
  aspect-ratio:var(--eg-listing-image-ratio);
}
body.eg-app-page .eg-listing-gallery figure{
  min-width:0;
  min-height:0;
}
body.eg-app-page .eg-listing-gallery.count-1 figure{
  width:100%;
  height:100%;
}
body.eg-app-page .eg-listing-gallery-placeholder{
  width:100%;
  min-height:0!important;
  height:100%;
}

/* Event and Essential reference photographs use the same public-detail frame. */
body.eg-app-page .eg-detail-image{
  width:100%;
  aspect-ratio:var(--eg-listing-image-ratio);
}
body.eg-app-page .eg-essential-reference-image{
  display:block;
  width:100%;
  height:auto!important;
  aspect-ratio:var(--eg-listing-image-ratio);
  max-height:none;
  object-fit:cover;
  object-position:center center;
}

/* Secondary listing gallery tiles are also normalised. */
body.eg-app-page .eg-listing-more-gallery img{
  display:block;
  width:100%;
  height:auto!important;
  aspect-ratio:var(--eg-listing-image-ratio);
  object-fit:cover;
  object-position:center center;
}

/* Related listing cards keep their compact layout but use one consistent crop. */
body.eg-app-page .eg-listing-related-image{
  aspect-ratio:4/3;
}

@media(max-width:760px){
  body.eg-app-page .eg-listing-gallery,
  body.eg-app-page .eg-listing-gallery.count-1{
    aspect-ratio:var(--eg-listing-image-ratio);
  }
}
