/* Global image sizing override: force consistent thumbnails/banners
   Target size provided by user: 692*545 px (aspect ratio 692/545) */

:root {
  --img-target-w: 692;
  --img-target-h: 545;
  --img-target-ar: calc(var(--img-target-w) / var(--img-target-h));
}

/* Use this on common thumbnail wrappers across pages.
   Applies to portfolio cards + mega-menu thumbs + any element with these utility classes. */

.img-fit-fixed,
.tw-image-fixed {
  width: 100%;
  aspect-ratio: var(--img-target-ar);
  height: auto;
}

/* If wrapper already forces height/width via utility classes, keep aspect-ratio but ensure cropping is consistent */
.img-fit-fixed img,
.tw-image-fixed img,
.img-fit-fixed,
.tw-image-fixed {
  object-fit: cover;
  object-position: center;
}

/* Mega menu thumbs currently use tw-h-320-px + object-fit-cover.
   Keep width 100% and normalize height by aspect ratio instead of fixed height when wrapper uses this class. */
.mega-menu-item img.object-fit-cover {
  object-fit: cover;
  object-position: center;
}

/* Service details gallery:
   Make images sit next to each other with consistent size (same height crop)
   inside each .service-details-gallery row. */
.service-details-gallery {
  align-items: stretch;
}

.service-details-gallery > div {
  display: flex;
}

.service-details-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* If parent doesn't define a height, normalize using aspect ratio. */
.service-details-gallery > div > img {
  aspect-ratio: var(--img-target-ar);
  height: auto;
}


