/* Preserva rostos em miniaturas com object-cover (mobile e desktop) */

img.object-cover {
  object-position: center 20%;
}

img.object-top {
  object-position: top center;
}

img.object-center {
  object-position: center center;
}

/* Cards de projetos e posts */
[data-slot="card"] > img.object-cover {
  object-position: center 18%;
}

/* Destaque de artigos */
.max-w-4xl.-mt-10 img.object-cover,
.-mt-10.mb-12 img.object-cover {
  object-position: center 22%;
}

/* Cards de blog com altura fixa no container */
.h-48 img.object-cover,
.h-52 img.object-cover,
.h-56 img.object-cover,
.h-64 img.object-cover,
.h-72 img.object-cover {
  object-position: center 20%;
}

/* Ilustrações e ícones — manter centralizado */
img[src*="inclusao-adem"],
img[src*="inclusao-social"],
img[src*="educacao-inclusiva.png"],
img[src*="acessibilidade.png"],
img[src*="saude-reabilitacao"],
img[src*="e5e7f4154ea9b276"],
img[src*="b4c4e5ed779af8e0"],
img[src*="a272d8e2cf07c647"],
img[src*="7cec0b70178712c3"] {
  object-position: center center;
}

/* Lightbox: imagem completa */
#adem-gallery-lightbox .lb-image {
  object-position: center center;
}


/* Fotos retrato — preservar rostos no topo */
img[class*="aspect-[3/4]"].object-cover,
img[class*="aspect-[3/4]"].object-cover.object-top,
img[src*="blog/arraial/01-atracao-musical"],
img[src*="blog/arraial/02-danca-inclusiva"] {
  object-position: top center;
}

img.object-top.object-cover {
  object-position: top center;
}

/* Galeria Lojinha do Bem — mostrar produto inteiro, sem cortar estampas */
.adem-lojinha-gallery img.object-contain {
  object-fit: contain;
  object-position: center center;
}

/* Proporções de galeria */
img[class*="aspect-[4/3]"].object-cover,
img[class*="aspect-[3/2]"].object-cover,
img[class*="aspect-[16/10]"].object-cover,
img[class*="aspect-[16/9]"].object-cover,
img[class*="aspect-[2/1]"].object-cover {
  object-position: center 20%;
}

/* Fallback: proporções quando o bundle Tailwind não inclui utilitários arbitrários */
img[class*="aspect-[4/3]"] {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
}

img[class*="aspect-[3/4]"] {
  aspect-ratio: 3 / 4;
  width: 100%;
  height: auto;
}

@media (min-width: 640px) {
  img[class*="sm:aspect-[3/2]"] {
    aspect-ratio: 3 / 2;
  }
}

img[class*="aspect-[16/10]"] {
  aspect-ratio: 16 / 10;
  width: 100%;
  height: auto;
}

@media (min-width: 640px) {
  img[class*="sm:aspect-[16/9]"] {
    aspect-ratio: 16 / 9;
  }
}

@media (min-width: 768px) {
  img[class*="md:aspect-[2/1]"] {
    aspect-ratio: 2 / 1;
  }
}

/* === Fotos com pessoas: quadrado, imagem inteira (sem cortar) === */

.adem-photo-hero {
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 1rem;
}

figure > .adem-photo-hero + .adem-gallery-caption {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 1.0625rem !important;
  line-height: 1.55;
  padding: 0.875rem 0 0;
}

.adem-photo-hero > img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center !important;
  aspect-ratio: auto !important;
  border-radius: 0;
  box-shadow: none;
}

.adem-gallery .adem-gallery-photo {
  aspect-ratio: 1 / 1;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.adem-gallery .adem-gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center !important;
  aspect-ratio: auto !important;
}

.adem-photo-thumb {
  aspect-ratio: 1 / 1;
  height: auto !important;
  min-height: 0;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.adem-photo-thumb > img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center !important;
}

.adem-parceiros-gallery .adem-gallery-photo,
.adem-parceiros-gallery .overflow-hidden.rounded-t-2xl,
#galeria-parceiros .adem-gallery-photo {
  position: relative;
  aspect-ratio: 1 / 1 !important;
  width: 100%;
  background: #f9fafb;
  overflow: hidden;
}

.adem-parceiros-gallery .adem-gallery-photo > img,
#galeria-parceiros .adem-gallery-photo > img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: auto !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform-origin: center center !important;
  aspect-ratio: auto !important;
}

.adem-photo-hero img,
.adem-gallery img,
.adem-photo-thumb img {
  object-position: center center !important;
}

/* Cards da página Projetos — quadrado preenchido */
.adem-projetos-card-photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eef0f4;
}

.adem-projetos-card-photo > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover !important;
  object-position: center 35% !important;
}
