/* Natural proportions for content images; crop only photographs deliberately. */
#main-content .feature-image {
  display: block;
  height: auto;
  max-width: 100%;
  min-width: 0;
}

/* A conversation screenshot must remain complete at every screen size. */
#main-content .feature-image[src$="whatsapp-business-agent-customer-view.png"] {
  width: auto;
  height: auto;
  max-height: 680px;
  aspect-ratio: auto;
  object-fit: contain;
  justify-self: center;
  filter: none !important;
}

/* Both portrait and landscape documents fit inside the preview surface. */
#main-content .resource-art img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 900px) {
  #main-content .sp-hero-visual {
    min-height: 0 !important;
    height: auto;
    align-self: start;
    padding: 0;
  }
  #main-content .sp-hero-visual > img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
  }
  #main-content .sp-hero-visual::before { display: none; }
}

@media (max-width: 640px) {
  #main-content .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }
  /* Keep the whole skyline visible and place the caption outside the image. */
  #main-content .home-hero-photo {
    height: auto;
    min-height: 0;
  }
  #main-content .home-hero-photo img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    transform: none !important;
  }
  #main-content .home-hero-photo::after { display: none; }
  #main-content .hero-photo-caption {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    color: #fff5e7;
    background: #33271f;
  }

  /* Let wide field photography and portrait screens keep their real shape. */
  #main-content .feature-image {
    aspect-ratio: auto;
    object-fit: contain;
  }
  #main-content .feature-image[src$="whatsapp-business-agent-customer-view.png"] {
    max-height: 620px;
  }
  #main-content .resource-art {
    height: clamp(280px, 95vw, 400px);
    padding: 22px;
  }
  #main-content .paper-preview { max-width: 100%; }
  #main-content .paper-preview img { display: block; max-width: 100%; height: auto; }

  /* Show complete industry illustrations, including the portrait energy image. */
  #main-content .industry-card > img {
    width: 100%;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #eee6da;
  }

  /* Small inset screenshots become readable, separate figures on a phone. */
  #main-content .adat-image-pair {
    display: grid;
    gap: 12px;
    height: auto;
    min-height: 0;
    padding: 12px;
    background: #eee6da;
  }
  #main-content :is(.adat-main-image, .adat-view-image) {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 3px;
    box-shadow: none;
  }
  #main-content :is(.adat-main-image, .adat-view-image) img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  #main-content :is(.adat-main-image, .adat-view-image) figcaption {
    position: static;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 0;
    background: #33271f;
  }
}
