/* Article / long-form images — standard (thumbnail-ish) sizing with a
   hover (desktop) / tap (mobile) enlarger. Loaded on article pages and
   page-builder pages; JS lives in js/article-images.js. */

/* Uniform images: consistent max height, never distorted, centred.
   `width:auto` overrides the width/height attributes CKEditor writes (which,
   combined with a max-height, would otherwise squash portrait images), and
   `object-fit: contain` is a safety net so a definite box never stretches. */
.article-body img,
.longform img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
  border-radius: 1rem;
  cursor: zoom-in;
}
.article-body figure.image img,
.longform figure.image img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.article-body img.article-zoomable:hover,
.longform img.article-zoomable:hover {
  box-shadow: 0 18px 44px rgba(37, 25, 19, 0.22);
}

/* Overlay — non-interactive for hover previews, interactive for click/tap. */
.article-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  background: rgba(10, 16, 28, 0.9);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.article-lightbox[hidden] { display: none; }
.article-lightbox.is-open { opacity: 1; }
.article-lightbox[data-mode="hover"] { pointer-events: none; }

.article-lightbox__img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  background: #fff;
}

.article-lightbox__close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.article-lightbox__close:hover { background: rgba(255, 255, 255, 0.26); }
.article-lightbox[data-mode="hover"] .article-lightbox__close { display: none; }
