/* Новости: собственные фотокомпозиции и цитаты. Не влияет на обычную фотогалерею сайта. */
.article-text .news-inline-gallery {
  margin: 30px 0 33px;
  border: 0;
  padding: 0;
  min-width: 0;
}
.article-text .news-inline-gallery-grid {
  display: grid;
  gap: 10px;
  overflow: hidden;
  border-radius: 20px;
  background: #f0f3ed;
}
.article-text .news-inline-gallery-grid > a {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
  background: #e9f0e6;
  isolation: isolate;
  text-decoration: none;
}
.article-text .news-inline-gallery-grid > a > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .25s ease;
}
@media (hover:hover) {
  .article-text .news-inline-gallery-grid > a:hover > img { transform: scale(1.045); }
  .article-text .news-inline-gallery-grid > a:has(.news-inline-gallery-more):hover > img { transform: scale(1.045); }
}
.article-text .news-inline-gallery-grid > a:focus-visible {
  outline: 4px solid var(--green, #8bab48);
  outline-offset: -4px;
  z-index: 2;
}
/* 1 кадр: показываем целиком, не обрезаем по высоте. */
.article-text .news-inline-gallery.is-single .news-inline-gallery-grid {
  display: flex;
  justify-content: center;
  overflow: visible;
  background: transparent;
  border-radius: 0;
}
.article-text .news-inline-gallery.is-single .news-inline-gallery-grid > a {
  display: flex;
  justify-content: center;
  max-width: 100%;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(37,62,92,.09);
}
.article-text .news-inline-gallery.is-single .news-inline-gallery-grid img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 690px;
  object-fit: contain;
}
/* 2 кадра: симметричная пара, без одинокого последнего снимка. */
.article-text .news-inline-gallery.count-2 .news-inline-gallery-grid {
  grid-template-columns: repeat(2, minmax(0,1fr));
  aspect-ratio: 2.65 / 1;
}
/* 3 кадра: главный слева и два кадра справа. */
.article-text .news-inline-gallery.count-3 .news-inline-gallery-grid {
  grid-template-columns: repeat(2, minmax(0,1fr));
  grid-template-rows: repeat(2, minmax(0,1fr));
  aspect-ratio: 1.95 / 1;
}
.article-text .news-inline-gallery.count-3 .news-inline-gallery-grid > a:first-child { grid-row: span 2; }
/* 4 кадра: выровненные две строки. */
.article-text .news-inline-gallery.count-4 .news-inline-gallery-grid {
  grid-template-columns: repeat(2, minmax(0,1fr));
  grid-template-rows: repeat(2, minmax(0,1fr));
  aspect-ratio: 1.9 / 1;
}
/* 5–10 кадров: крупное первое фото + четыре акцентных превью. */
.article-text .news-inline-gallery.count-5 .news-inline-gallery-grid,
.article-text .news-inline-gallery.count-many .news-inline-gallery-grid {
  grid-template-columns: repeat(4, minmax(0,1fr));
  grid-template-rows: repeat(2, minmax(0,1fr));
  aspect-ratio: 1.85 / 1;
}
.article-text .news-inline-gallery.count-5 .news-inline-gallery-grid > a:first-child,
.article-text .news-inline-gallery.count-many .news-inline-gallery-grid > a:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
/* Скрытые миниатюры доступны при перелистывании в лайтбоксе. */
.article-text .news-inline-gallery.count-many .news-inline-gallery-grid > a:nth-child(n+6) { display: none; }
.article-text .news-inline-gallery-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(20,34,48,.57);
  font-size: clamp(25px,4.7vw,43px);
  line-height: 1;
  font-weight: 850;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.article-text .news-inline-gallery-tip {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 3px 0;
  font-size: 12px;
  line-height: 1.35;
  color: #7d8b86;
}
.article-text .news-inline-gallery-tip > span:first-child {
  color: #577342;
  font-weight: 800;
  white-space: nowrap;
}
/* Цитаты — самостоятельная редакционная карточка, не обычный абзац с отступом. */
.news-article-copy .article-text blockquote {
  position: relative;
  margin: 34px 0;
  padding: 36px 36px 34px 78px;
  border: 1px solid #dce8d1;
  border-left: 6px solid var(--green, #8bab48);
  border-radius: 0 20px 20px 0;
  background: linear-gradient(115deg, #f1f7eb 0%, #f8faf5 100%);
  color: #2b4560;
  box-shadow: 0 12px 32px rgba(37,62,92,.055);
  font-size: clamp(19px,2.6vw,22px);
  line-height: 1.56;
  letter-spacing: -.012em;
  font-weight: 630;
}
.news-article-copy .article-text blockquote::before {
  content: '“';
  position: absolute;
  top: 8px;
  left: 25px;
  color: var(--green, #8bab48);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 87px;
  font-weight: 700;
  line-height: 1;
  opacity: .86;
  pointer-events: none;
}
.news-article-copy .article-text blockquote > :first-child { margin-top: 0; }
.news-article-copy .article-text blockquote > :last-child { margin-bottom: 0; }
.news-article-copy .article-text blockquote strong { color: #213950; }
.news-article-copy .article-text blockquote a { text-underline-offset: 3px; }
@media (max-width:650px) {
  /* На телефоне — лента со свайпом и видимым краем следующей фотографии. */
  .article-text .news-inline-gallery { margin: 23px 0 27px; }
  .article-text .news-inline-gallery-grid { gap: 9px; border-radius: 0; }
  .article-text .news-inline-gallery:not(.is-single) .news-inline-gallery-grid {
    display: flex;
    aspect-ratio: auto;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 9px;
    background: transparent;
  }
  .article-text .news-inline-gallery:not(.is-single) .news-inline-gallery-grid > a {
    display: block !important;
    flex: 0 0 83%;
    aspect-ratio: 4 / 3;
    scroll-snap-align: start;
    border-radius: 15px;
  }
  .article-text .news-inline-gallery .news-inline-gallery-more { display: none; }
  .article-text .news-inline-gallery-tip { padding-top: 4px; }
  .article-text .news-inline-gallery-tip > span:last-child { font-size: 11px; }
  .article-text .news-inline-gallery.is-single .news-inline-gallery-grid > a { border-radius: 15px; }
  .news-article-copy .article-text blockquote {
    margin: 27px 0;
    padding: 49px 21px 22px 23px;
    border-left-width: 5px;
    border-radius: 0 16px 16px 0;
    font-size: 19px;
    line-height: 1.55;
  }
  .news-article-copy .article-text blockquote::before {
    top: 3px;
    left: 17px;
    font-size: 68px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .article-text .news-inline-gallery-grid > a > img { transition: none; }
}
/* Управление существующим просмотрщиком, общим для всех фотографий новости. */
.lightbox .lightbox-nav { position:absolute;top:50%;transform:translateY(-50%);width:44px;height:56px;border:1px solid rgba(255,255,255,.35);border-radius:14px;background:rgba(14,22,33,.64);color:#fff;font-size:32px;cursor:pointer;z-index:2; }
.lightbox .lightbox-prev { left:14px; }
.lightbox .lightbox-next { right:14px; }
.lightbox .lightbox-count { position:absolute;bottom:15px;left:50%;transform:translateX(-50%);color:white;font-size:13px;background:rgba(14,22,33,.7);padding:5px 12px;border-radius:999px; }
.lightbox .lightbox-nav[hidden],.lightbox .lightbox-count[hidden] { display:none!important; }
@media (max-width:700px) { .lightbox { padding:58px 8px 65px; } .lightbox .lightbox-nav { width:36px;height:48px;font-size:26px; } .lightbox .lightbox-prev { left:3px; } .lightbox .lightbox-next { right:3px; } .lightbox img { max-width:100%;max-height:78vh; } }
