/* RIEIRS 0.6.0: cohesive previews, media, progressively enhanced galleries */
:root { --rieirs-photo-bg:#eef2f6; }
/* Natural text: never cut a paragraph or a sentence at a fixed line count. */
body.rieirs-home .blog-item :is(.item-content,.com-content-article__body),
body.rieirs-inner-view .blog-item :is(.item-content,.com-content-article__body),
body.rieirs-home .blog-featured .blog-item .item-content,
body.rieirs-home .blog-featured .blog-item .com-content-article__body {
  display:flow-root!important;
  max-height:none!important;
  height:auto!important;
  overflow:visible!important;
  -webkit-line-clamp:unset!important;
  line-clamp:unset!important;
  -webkit-box-orient:initial!important;
  text-overflow:clip!important;
  font:400 16px/1.68 "Segoe UI",Arial,sans-serif!important;
  text-align:start!important;
}
body .blog-item :is(.item-content,.com-content-article__body) p {margin:0 0 .85em!important;line-height:1.65!important;text-align:start!important;}
body .blog-item :is(.item-content,.com-content-article__body) p:last-child {margin-bottom:0!important;}
body .blog-item :is(.item-content,.com-content-article__body) img {max-width:100%;height:auto;}
body .blog-item { height:auto!important; align-self:start!important; }
body .blog-items { align-items:start!important; }
/* Equal-size previews on home and category pages; crop the preview, never its source. */
body .blog-item .item-image,
body .blog-item figure.item-image {
  display:block!important; float:none!important;
  aspect-ratio:16/9; height:auto!important;
  overflow:hidden!important; background:var(--rieirs-photo-bg)!important;
}
body .blog-item .item-image img,
body .blog-item figure.item-image img,
body .blog-item .item-image a > img {
  width:100%!important; height:100%!important; max-height:none!important;
  aspect-ratio:auto!important; object-fit:cover!important;
  object-position:center center; display:block!important;
}
/* Article lead image: standard editorial frame, fully visible photo (letterboxing if needed). */
body.rieirs-inner-view .com-content-article .item-image,
body.rieirs-inner-view .item-page .item-image,
body.rieirs-inner-view .com-content-article figure.item-image,
body.rieirs-inner-view .item-page figure.item-image {
  aspect-ratio:16/9; max-height:560px;
  background:var(--rieirs-photo-bg)!important;
  display:flex!important; align-items:center; justify-content:center;
  float:none!important; clear:both!important;
  border-radius:13px; overflow:hidden!important;
}
body.rieirs-inner-view .com-content-article .item-image img,
body.rieirs-inner-view .item-page .item-image img,
body.rieirs-inner-view .com-content-article figure.item-image img,
body.rieirs-inner-view .item-page figure.item-image img {
  display:block!important; width:100%!important; height:100%!important;
  max-height:none!important; object-fit:contain!important;
}
body.rieirs-inner-view .com-content-article .item-image:has(figcaption),
body.rieirs-inner-view .item-page .item-image:has(figcaption) { display:block!important; aspect-ratio:auto; }
body.rieirs-inner-view .item-image:has(figcaption) img { aspect-ratio:16/9; object-fit:contain!important; max-height:560px!important; }
/* Gallery enhancement only targets recognised gallery containers or confirmed image runs. */
body.rieirs-inner-view .rieirs-gallery,
body.rieirs-inner-view .com-content-article__body .gallery:has(img),
body.rieirs-inner-view .com-content-article__body ul.sigProContainer,
body.rieirs-inner-view .com-content-article__body .sigProContainer:has(img),
body.rieirs-inner-view .com-content-article__body .sigProWrapper:has(img) {
  display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important; list-style:none!important;
  padding:0!important; margin:26px 0!important;
  max-width:100%!important; overflow:visible!important;
  clear:both;
}
body.rieirs-inner-view .rieirs-gallery > *,
body.rieirs-inner-view .com-content-article__body ul.sigProContainer > *,
body.rieirs-inner-view .com-content-article__body .gallery > * {
  width:100%!important; min-width:0!important; height:auto!important;
  float:none!important; margin:0!important; padding:0!important;
  list-style:none!important;
}
body.rieirs-inner-view .rieirs-gallery a,
body.rieirs-inner-view .rieirs-gallery button,
body.rieirs-inner-view .com-content-article__body ul.sigProContainer a {
  display:block; width:100%; height:100%; border:0; padding:0;
  cursor:zoom-in; background:transparent;
}
body.rieirs-inner-view .rieirs-gallery img,
body.rieirs-inner-view .com-content-article__body .gallery img,
body.rieirs-inner-view .com-content-article__body ul.sigProContainer img,
body.rieirs-inner-view .com-content-article__body .sigProContainer img {
  display:block!important; width:100%!important; height:auto!important;
  aspect-ratio:4/3!important; object-fit:cover!important;
  border-radius:9px!important; box-shadow:0 2px 10px rgba(13,37,67,.09);
  transition:transform .2s ease, box-shadow .2s ease;
}
body.rieirs-inner-view .rieirs-gallery a:hover img,
body.rieirs-inner-view .com-content-article__body ul.sigProContainer a:hover img { transform:scale(1.015); box-shadow:0 6px 18px rgba(13,37,67,.2); }
.rieirs-lightbox[hidden] {display:none!important;}
.rieirs-lightbox {position:fixed; inset:0; z-index:100000; background:rgba(7,17,33,.94); display:flex; align-items:center; justify-content:center; padding:54px 64px;}
.rieirs-lightbox__image {max-width:100%; max-height:calc(100vh - 125px); width:auto; height:auto; object-fit:contain; border-radius:4px; box-shadow:0 18px 70px rgba(0,0,0,.4);}
.rieirs-lightbox__control {position:absolute; z-index:1; background:rgba(255,255,255,.15); color:#fff; border:1px solid rgba(255,255,255,.4); border-radius:50%; width:44px; height:44px; cursor:pointer; font:28px/1 Arial,sans-serif;}
.rieirs-lightbox__control:hover,.rieirs-lightbox__control:focus-visible{background:rgba(255,255,255,.28);outline:2px solid white;}
.rieirs-lightbox__close{right:18px;top:18px}.rieirs-lightbox__prev{left:12px;top:50%;transform:translateY(-50%)}.rieirs-lightbox__next{right:12px;top:50%;transform:translateY(-50%)}
.rieirs-lightbox__caption {position:absolute;bottom:16px;left:14px;right:14px;text-align:center;color:#e4eaf1;font:14px/1.4 "Segoe UI",Arial,sans-serif;}
@media(max-width:760px){body.rieirs-inner-view .rieirs-gallery,body.rieirs-inner-view .com-content-article__body .gallery:has(img),body.rieirs-inner-view .com-content-article__body ul.sigProContainer {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.rieirs-lightbox{padding:64px 43px;}.rieirs-lightbox__control{width:36px;height:36px;font-size:24px}}
@media(max-width:420px){body.rieirs-inner-view .rieirs-gallery,body.rieirs-inner-view .com-content-article__body .gallery:has(img),body.rieirs-inner-view .com-content-article__body ul.sigProContainer {gap:6px!important;}}
@media(prefers-reduced-motion:reduce){body.rieirs-inner-view .rieirs-gallery img{transition:none!important;}}


/* 0.7.5 — identical gallery behaviour in newly authored and migrated articles.
   The content renderer already emits <div class="rieirs-gallery"> in both cases;
   do not depend on an "inner-view" body class or a particular content field. */
.rieirs-gallery[data-gallery-path],
.com-content-article .rieirs-gallery,
.item-page .rieirs-gallery {
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
  clear:both!important;
  width:100%!important;
  max-width:100%!important;
  padding:0!important;
  margin:24px 0!important;
  overflow:visible!important;
  list-style:none!important;
  align-items:stretch!important;
}
.rieirs-gallery > .rieirs-gallery__item,
.rieirs-gallery > figure {
  display:block!important;
  margin:0!important;
  padding:0!important;
  float:none!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  border:0!important;
  list-style:none!important;
}
.rieirs-gallery > figure > a {
  display:block!important;
  width:100%!important;
  height:100%!important;
  cursor:zoom-in!important;
  padding:0!important;
  margin:0!important;
}
.rieirs-gallery > figure img,
.rieirs-gallery .rieirs-gallery__item img {
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  aspect-ratio:4 / 3!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:9px!important;
  float:none!important;
  margin:0!important;
  box-shadow:0 2px 10px rgba(13,37,67,.09);
}
@media(max-width:760px){
  .rieirs-gallery[data-gallery-path],
  .com-content-article .rieirs-gallery,
  .item-page .rieirs-gallery {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
}
@media(max-width:420px){
  .rieirs-gallery[data-gallery-path],
  .com-content-article .rieirs-gallery,
  .item-page .rieirs-gallery {gap:6px!important;}
}
