/*
 * ASHE public news image display — v34.9.48
 * Goal: never crop uploaded announcement/news images on desktop or mobile.
 * This file is loaded after the existing public styles and therefore acts as
 * a narrow, safe override for news imagery only.
 */

/* Main image on a single announcement/news article: preserve the exact source ratio. */
.news-article__image {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Fixed-ratio preview areas may keep their professional card dimensions,
   but the photo itself must always remain fully visible inside them. */
.news-featured__visual,
.news-card__visual,
.related-news__visual,
.news-thumb {
  overflow: hidden;
  background-color: #f3f6f9;
  background-image: none;
}

.news-featured__visual img,
.news-card__visual img,
.related-news__visual img,
.news-thumb img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
}

/* Prevent hover/animation rules from zooming a news image and reintroducing crop. */
.news-featured__visual:hover img,
.news-card__visual:hover img,
.related-news__visual:hover img,
.latest-news article:hover .news-thumb img {
  transform: none !important;
}

/* Mobile: the main article image follows the phone width and its natural height.
   No fixed height, min-height or aspect ratio is allowed to crop it. */
@media (max-width: 767px) {
  .news-article__image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
}

/* Desktop/tablet uses the same no-crop rule. This explicit rule protects the
   behaviour from future responsive cover rules in the base stylesheet. */
@media (min-width: 768px) {
  .news-article__image {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
}
