/* Adapter layer: the supplied design assumes short, fixed headings. CMS-managed page titles can be longer,
   so the inner-page banner grows with its content instead of clipping/overflowing. */
.inside-banner { display: block; height: auto !important; min-height: 400px; }
.inside-banner .banner-overlay { height: auto !important; min-height: 400px; display: flex; align-items: flex-end; padding: 0 0 38px; }
.inside-banner .banner-overlay > .container { width: 100%; margin-top: auto; margin-bottom: 0; }
.inside-banner h1 { padding-top: 0 !important; overflow-wrap: anywhere; }
@media (max-width: 991px) {
  .inside-banner, .inside-banner .banner-overlay { min-height: 300px; }
  .inside-banner .banner-overlay { padding-bottom: 35px; }
}
@media (max-width: 575px) {
  .inside-banner, .inside-banner .banner-overlay { min-height: 220px; }
  .inside-banner .banner-overlay { padding-bottom: 25px; }
  .inside-banner p { margin: 10px 0 0; }
}
/* images from the CMS must never exceed their column */
img { max-width: 100%; }
/* Client / portfolio logos come from the CMS in assorted sizes: show each in a uniform box like the design. */
.client-list img.slb { aspect-ratio: 4 / 3; height: auto; object-fit: contain; background: #fff; border: 1px solid #e3e3e3; }
/* Wide feature photo in "company details" blocks: CMS images can be portrait, so crop to the design's wide ratio. */
.company-details img.full-size, .sharepoint-hire img.full-size { width: 100%; aspect-ratio: 2.4 / 1; height: auto; object-fit: cover; }
/* Life@Ammaiya gallery: uniform portrait tiles regardless of the uploaded photo's shape. */
.lifeatammaiya img.slb { width: 100%; aspect-ratio: 195 / 235; height: auto; object-fit: cover; }
/* Blog details: CMS images keep the design's wide crop. */
.blog-details-left img.full-size { width: 100%; aspect-ratio: 2.65 / 1; height: auto; object-fit: cover; }
.blog-details-right > img.full-size { width: 100%; aspect-ratio: 2.1 / 1; height: auto; object-fit: cover; }
/* "Hire ... experts" tiles: CMS photos in assorted shapes, shown in the design's uniform tile. */
.dm-hiring img { width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; display: block; }

/* ---- CMS uploads inside the design's slots: keep the design's own image sizes ---- */
.main-three-box img[src*="/uploads/"], .facts-box img[src*="/uploads/"], .builder-box img[src*="/uploads/"],
.crm-key-feature-holder img[src*="/uploads/"], .msd-key-feature-holder img[src*="/uploads/"], .white-box img[src*="/uploads/"],
.data-white-box img[src*="/uploads/"], .data-yellow-box img[src*="/uploads/"], .print-box img[src*="/uploads/"],
.crm-box img[src*="/uploads/"], .gs-box img[src*="/uploads/"], .digital-marketing-holder img[src*="/uploads/"],
.four-columns .column img[src*="/uploads/"], .php-key-feature-holder img[src*="/uploads/"], .crm-white-box img[src*="/uploads/"],
.sap-crm-box img[src*="/uploads/"], .php-framework-box img[src*="/uploads/"], .half-right span img[src*="/uploads/"] {
  width: auto !important; max-width: 100%; height: 80px !important; object-fit: contain; }
.half-right span img[src*="/uploads/"] { height: 48px !important; }
.graphics-box > img, .data-team .col-sm-4 > img, .product-box > img, .dm-hiring img { aspect-ratio: 3 / 2; height: auto; object-fit: cover; }
.service-holder figure img[src*="/uploads/"] { width: 100%; aspect-ratio: 3 / 4; height: auto; object-fit: cover; }
.service-holder figure img.mono[src*="/uploads/"] { object-fit: contain; background: #2e2e38; padding: 18% 18% 55%; filter: none; }
/* icon colour exactly as the design draws icons in each block */
.facts-box img.mono, .dark-grey-area img.mono { filter: brightness(0) invert(1); }
.main-three-box img.mono, .builder-box img.mono, .crm-key-feature-holder img.mono, .msd-key-feature-holder img.mono,
.data-white-box img.mono, .data-yellow-box img.mono, .print-box img.mono, .crm-box img.mono,
.digital-marketing-holder img.mono, .four-columns .column img.mono { filter: brightness(0); }
/* keep the design's card proportion (its photos are 626 x 900) so titles are not clipped */
.service-holder figure img[src*="/uploads/"] { aspect-ratio: 626 / 900; box-sizing: border-box; }
.service-holder figure img.mono[src*="/uploads/"] { padding: 30% 22% 62%; }
/* uploads with a white background: blend the white away so only the icon shows, in the design's colour */
.facts-box img[src*="/uploads/"]:not(.mono) { filter: grayscale(1) invert(1) contrast(1.3); mix-blend-mode: screen; }
.main-three-box img[src*="/uploads/"]:not(.mono) { mix-blend-mode: multiply; }
/* the blend needs the section colour directly behind the icon; this is the same colour the design uses */
.facts .facts-box { background-color: #2e2e38; }
.facts-box img[src*="/uploads/"]:not(.mono) { filter: grayscale(1) invert(1) brightness(1.8); }
/* home banner upload: show its upper (empty) part so the heading does not sit on the artwork */
.banner { background-position: center top; }
/* labelled photos inside the design's team-box on Life@Ammaiya keep one shape */
.lifeatammaiya .team-box img { width: 100%; aspect-ratio: 195 / 235; object-fit: cover; }
