/* The original two static cards remain intact if this enhancement cannot load. */
.im-home-proof-examples { --im-home-references-ready: 1; }
#main.im-home-shortened .im-home-proof-examples.im-home-references-ready {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.15fr);
  align-items: start;
}
#main.im-home-shortened .im-home-references { min-width: 0; max-width: 100%; }
#main.im-home-shortened .im-home-references__viewport {
  --im-home-reference-visible: 2;
  display: flex;
  position: relative;
  align-items: stretch;
  gap: 20px;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: auto;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #9aad9b #edf1e9;
}
#main.im-home-shortened .im-home-references__viewport > .im-home-case {
  box-sizing: border-box;
  flex: 0 0 calc((100% - 20px) / 2);
  min-width: 0;
  max-width: none;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  overflow-wrap: anywhere;
}
#main.im-home-shortened .im-home-references .im-home-case :is(.im-home-case-city, .im-home-case-status, p, time) {
  font-size: 16px;
  line-height: 1.5;
}
/* One consistent image field; keep the card as tall as its content needs.
   Extra scope overrides the older fixed 500/560px homepage tuning rules. */
#main.im-home-shortened .im-home-references .im-home-references__viewport > .im-home-case {
  min-height: 0 !important;
}
#main.im-home-shortened .im-home-references .im-home-references__viewport .im-home-case-visual {
  height: auto !important;
  min-height: 0 !important;
  max-height: 260px !important;
  aspect-ratio: 16 / 10 !important;
}
#main.im-home-shortened .im-home-references .im-home-references__viewport .im-home-case-visual--photo > img {
  object-fit: cover !important;
}
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__viewport .im-home-case-visual--crop {
  position: relative !important;
  overflow: hidden !important;
}
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__viewport .im-home-case-visual--crop > img {
  position: absolute !important;
  display: block !important;
  width: var(--im-reference-crop-width, 100%) !important;
  height: var(--im-reference-crop-height, 100%) !important;
  left: var(--im-reference-crop-left, 0) !important;
  top: var(--im-reference-crop-top, 0) !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  object-fit: contain !important;
}
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__viewport .im-home-case-visual--crop > img[hidden] { display: none !important; }
#main.im-home-shortened .im-home-references__original { position: relative; }
#main.im-home-shortened .im-home-references__original img { object-fit: contain; }
#main.im-home-shortened .im-home-references__original img[hidden] { display: none; }
#main.im-home-shortened .im-home-references__no-photo {
  display: grid;
  height: 100%;
  box-sizing: border-box;
  place-items: center;
  padding: 24px;
  color: #667064;
  background: #f2f4ef;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
}
#main.im-home-shortened .im-home-references__controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
#main.im-home-shortened .im-home-references__controls[hidden] { display: none; }
#main.im-home-shortened .im-home-references__counter { color: #536057; font-size: 16px; line-height: 1.5; font-variant-numeric: tabular-nums; text-align: center; }
#main.im-home-shortened .im-home-references__swipe { display: none; margin: 12px 0 0; color: #667064; font-size: 16px; line-height: 1.5; text-align: center; }
#main.im-home-shortened .im-home-references__all { display: inline-flex; align-items: center; min-height: 48px; max-width: 100%; margin-top: 12px; padding-block: 8px; color: #234d35; font-size: 16px; font-weight: 600; line-height: 1.55; text-decoration: underline; text-underline-offset: .22em; }
#main.im-home-shortened .im-home-references :is(.im-home-references__viewport, .im-home-references__chevron, .im-home-references__all):focus-visible { outline: 2px solid #111; outline-offset: 2px; }
#main.im-home-shortened .im-home-references .im-home-case:focus-visible { outline: 3px solid #47725a; outline-offset: -3px; }
@media (max-width: 900px) {
  #main.im-home-shortened .im-home-proof-examples.im-home-references-ready { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 780px) {
  #main.im-home-shortened .im-home-references__viewport { --im-home-reference-visible: 1; gap: 16px; }
  #main.im-home-shortened .im-home-references__viewport > .im-home-case { flex-basis: 100%; scroll-snap-stop: always; }
  #main.im-home-shortened .im-home-references__swipe { display: block; }

  /* Show one swipeable reference even while deferred scripts are loading.
     Older translated layouts also contain a review in this element; leave
     those alone until the enhancement moves the references into their track. */
  #main.im-home-shortened .im-home-proof-examples:not(.im-home-references-ready):not(:has(> .im-home-client-voice)) {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    align-items: stretch;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }
  #main.im-home-shortened .im-home-proof-examples:not(.im-home-references-ready) > .im-home-case {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}
@media (pointer: coarse) { #main.im-home-shortened .im-home-references__swipe { display: block; } }

/* Side navigation: dedicated gutters keep the 44px controls off the cards. */
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__frame {
  position: relative;
  box-sizing: border-box;
  width: calc(100% + 32px);
  max-width: none;
  margin-inline: -16px;
  padding-inline: 44px;
}
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__frame--single { width: 100%; margin-inline: 0; padding-inline: 0; }
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__chevron {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #111;
  font: 400 46px/1 Arial, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__chevron--previous { left: 0; }
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__chevron--next { right: 0; }
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__chevron[hidden] { display: none; }
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__controls {
  display: flex !important;
  justify-content: center !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__controls[hidden] { display: none !important; }
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__controls::after { display: none !important; content: none !important; }
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__counter { min-width: 0 !important; color: #555 !important; font-size: 14px !important; font-weight: 400 !important; line-height: 1.5 !important; }
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__swipe { display: block !important; margin: 8px 0 0 !important; color: #555 !important; font-size: 14px !important; line-height: 1.5 !important; }

/* Keep mobile cards wide enough to read, with chevrons in the outer gutter. */
@media(max-width:780px){
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__frame:not(.im-home-references__frame--single){width:calc(100% + 64px);margin-inline:-32px;padding-inline:44px}
}
@media(max-width:780px){#main.im-home-shortened .im-home-references .im-home-case h4{font-size:20px!important;line-height:1.3;hyphens:auto}}

/* Let each reference keep its natural content height. */
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__viewport{align-items:flex-start}
#main.im-home-shortened .im-home-references.im-home-side-navigation .im-home-references__viewport>.im-home-case{height:auto!important;align-self:flex-start}


/* Unified status labels, 2026-11-24: label overlays do not alter photo pixels/crops. */
#main .im-home-case .im-home-case-visual { position: relative; }
#main .im-home-case .im-home-case-visual > .im-reference-status-badge,
#im-references .ir-card .ir-card-media > .im-reference-status-badge,
#im-references .ir-dialog-img-wrap > .im-reference-status-badge {
  position: absolute !important;
  z-index: 2;
  top: 12px;
  left: 12px;
  right: auto !important;
  bottom: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  max-width: calc(100% - 24px);
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #c91f2e;
  border-radius: 3px;
  background: #c91f2e !important;
  color: #fff !important;
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
  pointer-events: none;
}
#im-references .ir-dialog-img-wrap > .im-reference-status-badge[hidden] { display: none !important; }
#im-references .ir-card-completion { margin: 10px 0 0; color: #555; font-size: 14px; line-height: 1.5; }
@media (max-width: 640px) {
  #main .im-home-case .im-home-case-visual > .im-reference-status-badge,
  #im-references .ir-card .ir-card-media > .im-reference-status-badge,
  #im-references .ir-dialog-img-wrap > .im-reference-status-badge { font-size: 13px; padding: 7px 10px; }
}
