/* The family fixes the frame; client media fills it without stretching. */
[data-media-frame]:not(img):not(video){
  position:relative;
  overflow:hidden;
  min-width:0;
  aspect-ratio:var(--media-frame-ratio,4/3);
}
[data-media-frame]:not(img):not(video) > :is(img,video),
[data-media-frame]:not(img):not(video) > picture,
[data-media-frame]:not(img):not(video) > picture > img{
  display:block;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center center!important;
}
[data-media-frame]:not(img):not(video) > :is(img,video),
[data-media-frame]:not(img):not(video) > picture{
  position:absolute;
  inset:0;
}
:is(img,video)[data-media-frame]:not(.site-brand-logo):not(.logo){
  display:block;
  width:100%;
  aspect-ratio:var(--media-frame-ratio,4/3);
  object-fit:cover!important;
  object-position:center center!important;
}
.slot[data-media-frame] > :is(img,video)[data-media-frame]{
  position:absolute;
  inset:0;
  width:100%!important;
  height:100%!important;
}
/* Existing built-in frames retain their approved dimensions. */
body[data-site-family="goethe"] :is(.service-card .ph,.curated-card .ph,.profile-photo .ph,.catalog-photo,.gallery-stage,.get-founder-photo){overflow:hidden}
body[data-site-family="goethe"] :is(.service-card .ph,.curated-card .ph,.profile-photo .ph) > img{
  position:absolute;inset:0;display:block;width:100%!important;height:100%!important;
  object-fit:cover!important;object-position:center center!important;
}
body[data-site-family="goethe"] :is(.hero-photo,.hero-video,.catalog-hero-media img,.catalog-hero-media video,.catalog-photo > img,.gallery-stage img,.get-founder-photo img,.service-inner > img,.get-service > img,#vision .reason > img){
  object-fit:cover!important;object-position:center center!important;
}
/* Property level 2 intentionally shows the complete original against black. */
body[data-site-family="goethe"] .property-gallery .gallery-stage #property-main-image{
  object-fit:contain!important;object-position:center center!important;background:#000;
}
/* The visible edge of the mark follows the content grid, not a centered frame. */
body[data-site-family="goethe"] .goethe-header .goethe-brand img{
  object-fit:contain!important;object-position:left center!important;
}
body[data-site-family="goethe"] :is(.service-inner > img,.get-service > img,#vision .reason > img){
  display:block;width:100%;height:auto;aspect-ratio:4/3;
}
body[data-site-family="goethe"] :is(.professional-person > img,.professional-team-compact .professional-person > img,.profile-photo > .ph > img,.portrait-wrap > img,.get-founder-photo > img){
  object-fit:cover!important;object-position:center center!important;
}
body[data-site-family="cinema"] :is(.page-hero > img,.page-hero > video,.portrait-wrap img,.about-section .portrait img,.property-image img,.gallery-main img,.catalog-photo > img,.service-tile img,.feature > img,.contact-banner > img){
  object-fit:cover!important;object-position:center center!important;
}
body[data-site-family="cinema"] :is(.team-card img,.agent-card img,.contact-photo img,.service-image img,.zone-card img,.gallery-thumbnails img,.property-gallery img,.professional-person img){
  object-fit:cover!important;object-position:center center!important;
}
/* Brand marks must remain entirely visible; full-screen viewers show originals. */
img.site-brand-logo,img.logo-image,img.logo{object-fit:contain!important;object-position:center center!important}
:is(.gallery-dialog,.property-lightbox,.content-media-viewer) img{object-fit:contain!important;width:auto;max-width:100%;height:auto;max-height:90vh}
/* Presentation portraits are vertical, full-length photographs. Show the
   entire person; surrounding image slots keep their cover-center contract. */
body[data-site-family="goethe"] .profile-photo .ph > img,
body[data-site-family="goethe"] #get-arquitectura-preview .get-founder-photo > img{
  object-fit:contain!important;object-position:center center!important;
}
body[data-site-family="cinema"] .header{padding-inline:max(50px,calc((100vw - 1220px)/2))}
body[data-site-family="cinema"] .header .logo-image{object-position:left center!important}
@media(max-width:700px){body[data-site-family="cinema"] .header{padding-inline:20px}}
/* Fill only the spare sides with a soft continuation of the same background.
   The portrait itself remains an unmodified, fully visible original image. */
body[data-site-family="goethe"] .profile-photo .ph,
body[data-site-family="goethe"] #get-arquitectura-preview .get-founder-photo{isolation:isolate;position:relative}
body[data-site-family="goethe"] .profile-photo .ph::before,
body[data-site-family="goethe"] #get-arquitectura-preview .get-founder-photo::before{
  content:"";position:absolute;inset:-12px;background-image:var(--portrait-background);
  background-size:cover;background-position:center;filter:blur(14px);z-index:-1;
}
