/*
 * Новости УК «Спецтехника». Подключить ПОСЛЕ стилей действующего шаблона.
 * Вся область действия — .uk-news. Глобальные стили сайта не изменяются.
 * .container, Inter и --color-* / --container / --gutter берутся с сайта.
 */
.uk-news {
  --uk-news-bg: var(--color-light-bg, #f4f6f7);
  --uk-news-card: var(--color-light-card, #fff);
  --uk-news-ink: var(--color-text-dark, #111820);
  --uk-news-muted: var(--color-light-text-muted, #5c6872);
  --uk-news-line: var(--color-light-line, #d9dee2);
  --uk-news-link: #155bd8;
  --uk-news-link-hover: var(--cta-blue-start, #0b2c80);
  --uk-news-quote: #eaf1ff;
  --uk-news-radius: 20px;
  min-width: 0;
  color: var(--uk-news-ink);
  background: var(--uk-news-bg);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  text-align: start;
}

.uk-news,
.uk-news *,
.uk-news *::before,
.uk-news *::after { box-sizing: border-box; }

/* Та же формула, что у .container на сайте; fallback нужен для отдельного HTML. */
.uk-news .uk-news__container {
  width: min(calc(100% - var(--gutter, 20px) * 2), var(--container, 1932px));
  min-width: 0;
  margin-inline: auto;
}

/* Для вставки фрагмента внутрь уже существующего .container. */
.uk-news--contained .uk-news__container { width: 100%; }
.uk-news--listing { padding-block: 56px 64px; }
.uk-news--latest { padding-block: 56px; }
.uk-news--detail { padding-top: 48px; }

.uk-news .uk-news__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.uk-news .uk-news__section-title {
  min-width: 0;
  margin: 0;
  color: var(--uk-news-ink);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.uk-news .uk-news__all,
.uk-news .uk-news__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 44px;
  padding-block: 8px;
  color: var(--uk-news-link);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  text-decoration: none;
  white-space: nowrap;
}

.uk-news .uk-news__arrow {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.uk-news .uk-news__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 32px 24px;
}

.uk-news .uk-news__card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--uk-news-radius);
  color: var(--uk-news-ink);
  background: var(--uk-news-card);
}

.uk-news .uk-news__media {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  color: var(--uk-news-muted);
  background: var(--uk-news-line);
  text-decoration: none;
}

.uk-news .uk-news__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.uk-news .uk-news__media--placeholder {
  align-content: center;
  gap: 12px;
  padding: 24px;
  font-size: 14px;
  line-height: 22px;
}

.uk-news .uk-news__placeholder-icon { width: 48px; height: 48px; }

.uk-news .uk-news__card-body {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  padding: 20px 24px 24px;
}

.uk-news .uk-news__date {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--uk-news-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}

.uk-news .uk-news__calendar {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.uk-news .uk-news__card-title {
  display: -webkit-box;
  min-width: 0;
  margin: 12px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--uk-news-ink);
  font-size: 24px;
  font-weight: 600;
  line-height: 31px;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}

.uk-news .uk-news__card-title a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
}

.uk-news .uk-news__excerpt {
  display: -webkit-box;
  min-width: 0;
  margin: 12px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--uk-news-muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  overflow-wrap: anywhere;
}

/* Анонсы выровнены при одно- и двухстрочных заголовках; высота не фиксирована. */
.uk-news .uk-news__card:not(.uk-news__card--compact) .uk-news__card-title { min-height: 62px; }

.uk-news .uk-news__pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 48px;
}

.uk-news .uk-news__page {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--uk-news-ink);
  background: var(--uk-news-card);
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  text-decoration: none;
}

.uk-news .uk-news__page[aria-current="page"] {
  color: var(--uk-news-card);
  background: var(--uk-news-link);
}

.uk-news .uk-news__page--ellipsis { background: transparent; }

.uk-news .uk-news__cover {
  width: min(100%, 1120px);
  margin: 0 auto 40px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--uk-news-line);
}

.uk-news .uk-news__cover img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.uk-news .uk-news__content {
  display: flow-root;
  width: min(100%, 800px);
  min-width: 0;
  margin-inline: auto;
  color: var(--uk-news-ink);
  font-size: 17px;
  line-height: 28px;
  overflow-wrap: anywhere;
}

.uk-news .uk-news__content p { margin: 0 0 16px; }
.uk-news .uk-news__content :is(h2, h3, h4, h5, h6) {
  color: var(--uk-news-ink);
  font-weight: 600;
  font-style: normal;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.uk-news .uk-news__content h2 { margin: 40px 0 16px; font-size: 36px; line-height: 45px; }
.uk-news .uk-news__content h3 { margin: 32px 0 16px; font-size: 28px; line-height: 35px; }
.uk-news .uk-news__content h4 { margin: 32px 0 16px; font-size: 22px; line-height: 28px; }
.uk-news .uk-news__content h5 { margin: 24px 0 12px; font-size: 18px; line-height: 25px; }
.uk-news .uk-news__content h6 { margin: 24px 0 12px; font-size: 16px; line-height: 24px; }
.uk-news .uk-news__content :is(ul, ol) { margin: 16px 0 24px; padding-inline-start: 26px; }
.uk-news .uk-news__content li { margin: 0 0 8px; padding-inline-start: 4px; }
.uk-news .uk-news__content li:last-child { margin-bottom: 0; }
.uk-news .uk-news__content li::marker { color: var(--uk-news-link); }
.uk-news .uk-news__content li > :is(ul, ol) { margin-block: 8px 0; }
.uk-news .uk-news__content li > p { margin-bottom: 8px; }
.uk-news .uk-news__content :is(strong, b) { font-weight: 600; }
.uk-news .uk-news__content :is(em, i) { font-style: italic; }
.uk-news .uk-news__content a {
  color: var(--uk-news-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.uk-news .uk-news__content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
  border-radius: 16px;
}
.uk-news .uk-news__content figure { margin: 24px 0; }
.uk-news .uk-news__content figure img { margin: 0 auto; }
/* По согласованному макету подписи под фотографиями не выводятся. */
.uk-news .uk-news__content figcaption { display: none; }
.uk-news .uk-news__content blockquote {
  margin: 24px 0;
  padding: 20px;
  border: 0;
  border-inline-start: 3px solid var(--uk-news-link);
  border-radius: 8px;
  color: var(--uk-news-ink);
  background: var(--uk-news-quote);
  font-size: 18px;
  font-weight: 400;
  font-style: normal;
  line-height: 29px;
}
.uk-news .uk-news__content blockquote p { margin: 0 0 12px; }
.uk-news .uk-news__content blockquote p:last-child { margin-bottom: 0; }
.uk-news .uk-news__content blockquote cite {
  display: block;
  margin-top: 12px;
  color: var(--uk-news-muted);
  font-size: 14px;
  font-style: normal;
  line-height: 22px;
}
.uk-news .uk-news__content hr {
  height: 1px;
  margin: 32px 0;
  border: 0;
  background: var(--uk-news-line);
}
.uk-news .uk-news__content table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 24px 0;
  overflow-x: auto;
  border-collapse: collapse;
  color: var(--uk-news-ink);
  background: var(--uk-news-card);
  font-size: 14px;
  line-height: 22px;
}
.uk-news .uk-news__content :is(th, td) {
  min-width: 130px;
  padding: 12px 16px;
  border: 1px solid var(--uk-news-line);
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.uk-news .uk-news__content th { background: var(--uk-news-quote); font-weight: 600; }
.uk-news .uk-news__content caption { padding-bottom: 12px; text-align: start; }
.uk-news .uk-news__content pre { max-width: 100%; overflow: auto; white-space: pre-wrap; }
.uk-news .uk-news__content > :first-child { margin-top: 0; }
.uk-news .uk-news__content > :last-child { margin-bottom: 0; }

.uk-news .uk-news__article-end {
  width: min(100%, 800px);
  margin: 32px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--uk-news-line);
}
.uk-news .uk-news__related { margin-top: 72px; padding-block: 48px 56px; background: var(--uk-news-card); }

/* Необязательный фрагмент заголовка. Можно перенести в существующий hero сайта. */
.uk-news--heading { padding-block: 48px 0; }
.uk-news .uk-news__page-title { margin: 0; color: inherit; font-size: 52px; font-weight: 700; line-height: 60px; letter-spacing: -.035em; overflow-wrap: anywhere; }
.uk-news .uk-news__heading-date { margin-top: 20px; }
.uk-news--heading.uk-news--on-dark { color: var(--color-text-primary, #fff); background: transparent; }
.uk-news--heading.uk-news--on-dark .uk-news__date { color: var(--color-text-secondary, #c8d0d6); }

.uk-news .uk-news__empty { margin: 0; padding: 40px 24px; border-radius: 20px; color: var(--uk-news-muted); background: var(--uk-news-card); font-size: 17px; line-height: 28px; text-align: center; }
.uk-news [hidden] { display: none !important; }

.uk-news :is(a, button):focus-visible { outline: 2px solid var(--uk-news-link); outline-offset: 4px; }
.uk-news .uk-news__media:focus-visible { outline-offset: -4px; }
.uk-news .uk-news__card-title a:focus-visible { outline-offset: 0; }
.uk-news :is(.uk-news__all, .uk-news__back, .uk-news__content a):hover { color: var(--uk-news-link-hover); text-decoration: underline; }
.uk-news .uk-news__card-title a:hover { color: var(--uk-news-link); text-decoration: underline; }
.uk-news a.uk-news__page:hover { border-color: var(--uk-news-link); color: var(--uk-news-link); }
@media (hover: hover) and (pointer: fine) {
  .uk-news .uk-news__media:hover img { transform: scale(1.03); }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .uk-news .uk-news__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uk-news--latest .uk-news__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .uk-news--latest .uk-news__card-body { padding-inline: 16px; }
  .uk-news--latest .uk-news__card-title { font-size: 20px; line-height: 27px; }
  .uk-news--latest .uk-news__card:not(.uk-news__card--compact) .uk-news__card-title { min-height: 54px; }
}
@media (max-width: 599px) {
  .uk-news { --uk-news-radius: 20px; }
  .uk-news .uk-news__container { width: calc(100% - 40px); }
  .uk-news--contained .uk-news__container { width: 100%; }
  .uk-news--listing { padding-block: 28px 40px; }
  .uk-news--latest { padding-block: 32px 40px; }
  .uk-news--detail { padding-top: 28px; }
  .uk-news .uk-news__section-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 24px; }
  .uk-news .uk-news__section-title { font-size: 30px; line-height: 36px; }
  .uk-news .uk-news__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .uk-news .uk-news__card-body { padding-inline: 20px; }
  .uk-news .uk-news__card-title { font-size: 22px; line-height: 28px; }
  .uk-news .uk-news__card:not(.uk-news__card--compact) .uk-news__card-title { min-height: 0; }
  .uk-news .uk-news__pagination { gap: 8px; margin-top: 32px; }
  .uk-news .uk-news__cover { margin-bottom: 28px; border-radius: 16px; }
  .uk-news .uk-news__content { font-size: 16px; line-height: 26px; }
  .uk-news .uk-news__content h2 { font-size: 28px; line-height: 35px; }
  .uk-news .uk-news__content h3 { font-size: 23px; line-height: 29px; }
  .uk-news .uk-news__content h4 { font-size: 19px; line-height: 24px; }
  .uk-news .uk-news__content img { border-radius: 12px; }
  .uk-news .uk-news__content blockquote { font-size: 17px; line-height: 27px; }
  .uk-news .uk-news__related { margin-top: 48px; padding-block: 32px 40px; }
  .uk-news .uk-news__related .uk-news__container { display: flex; flex-direction: column; }
  .uk-news .uk-news__related .uk-news__section-head { display: contents; }
  .uk-news .uk-news__related .uk-news__section-title { margin-bottom: 24px; }
  .uk-news .uk-news__related .uk-news__grid { order: 1; }
  .uk-news .uk-news__related .uk-news__all { order: 2; margin-top: 24px; }
  .uk-news--heading { padding-top: 32px; }
  .uk-news .uk-news__page-title { font-size: 32px; line-height: 37px; }
}
@media (prefers-reduced-motion: reduce) {
  .uk-news .uk-news__media img { transition: none; }
  .uk-news .uk-news__media:hover img { transform: none; }
}

/* Верхний тёмный блок: у каталога inner — двухколоночная сетка (текст + поиск), у новостей поиска нет */
.news-page .catalog-intro__inner { grid-template-columns: 1fr; }
.news-page .catalog-intro__copy { max-width: 960px; }

/* Галерея доп. фото (свойство IMAGES) и лайтбокс с зумом */
.uk-news .uk-news__gallery {
  width: min(100%, 1120px);
  margin: 0 auto 40px;
}

.uk-news .uk-news__gallery-viewport {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 24px;
  background: var(--uk-news-line);
}
.uk-news .uk-news__gallery-viewport::-webkit-scrollbar { display: none; }

.uk-news .uk-news__gallery-slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
}

.uk-news .uk-news__gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.uk-news .uk-news__gallery-open img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform .25s ease;
}
@media (hover: hover) and (pointer: fine) {
  .uk-news .uk-news__gallery-open:hover img { transform: scale(1.02); }
}

.uk-news .uk-news__gallery-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}
.uk-news .uk-news__gallery-nav {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--uk-news-line);
  border-radius: 999px;
  color: var(--uk-news-ink);
  background: var(--uk-news-card);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.uk-news .uk-news__gallery-nav svg { width: 18px; height: 18px; }
.uk-news .uk-news__gallery-nav:hover,
.uk-news .uk-news__gallery-nav:focus-visible {
  border-color: var(--uk-news-link);
  color: var(--uk-news-link);
}
.uk-news .uk-news__gallery-counter {
  min-width: 56px;
  color: var(--uk-news-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  text-align: center;
}

.uk-news .uk-news__gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.uk-news .uk-news__gallery-thumbs::-webkit-scrollbar { display: none; }
.uk-news .uk-news__gallery-thumb {
  flex: 0 0 auto;
  width: 104px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--uk-news-line);
  cursor: pointer;
  transition: border-color .2s ease, opacity .2s ease;
}
.uk-news .uk-news__gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.uk-news .uk-news__gallery-thumb.is-active { border-color: var(--uk-news-link); }
.uk-news .uk-news__gallery-thumb:not(.is-active) { opacity: .65; }
.uk-news .uk-news__gallery-thumb:hover { opacity: 1; }

/* Лайтбокс с зумом */
.uk-news__lightbox {
  width: min(calc(100vw - 32px), 1440px);
  max-width: 1440px;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.uk-news__lightbox::backdrop {
  background: rgba(4, 8, 14, .84);
  backdrop-filter: blur(8px);
}
.uk-news__lightbox-panel {
  position: relative;
  min-height: min(88vh, 920px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}
.uk-news__lightbox-figure {
  position: relative;
  margin: 0;
  min-width: 0;
  height: min(88vh, 920px);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.uk-news__lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  transform-origin: center center;
  transition: transform .18s ease;
}
.uk-news__lightbox-image.is-dragging { transition: none; }
.uk-news__lightbox-zoom-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(4, 8, 14, .6);
  font-size: 13px;
  line-height: 20px;
  pointer-events: none;
  white-space: nowrap;
}
.uk-news__lightbox-counter {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(18, 24, 36, .72);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
}
.uk-news__lightbox-nav,
.uk-news__lightbox-close {
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(18, 24, 36, .72);
  color: #fff;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .24);
  backdrop-filter: blur(10px);
}
.uk-news__lightbox-nav {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .24s ease, background .24s ease, border-color .24s ease;
}
.uk-news__lightbox-nav svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.uk-news__lightbox-nav:hover,
.uk-news__lightbox-nav:focus-visible,
.uk-news__lightbox-close:hover,
.uk-news__lightbox-close:focus-visible {
  background: rgba(31, 111, 255, .82);
  border-color: rgba(255, 255, 255, .24);
}
.uk-news__lightbox-nav:hover,
.uk-news__lightbox-nav:focus-visible { transform: scale(1.03); }
.uk-news__lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  cursor: pointer;
}
.uk-news__lightbox-close::before,
.uk-news__lightbox-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
.uk-news__lightbox-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

@media (max-width: 760px) {
  .uk-news .uk-news__gallery { margin-bottom: 28px; }
  .uk-news .uk-news__gallery-viewport { border-radius: 16px; }
  .uk-news__lightbox {
    width: calc(100vw - 20px);
  }
  .uk-news__lightbox-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 68px 0 12px;
    min-height: 0;
  }
  .uk-news__lightbox-figure {
    height: min(78vh, 760px);
  }
  .uk-news__lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
  }
  .uk-news__lightbox-nav--prev { left: 12px; }
  .uk-news__lightbox-nav--next { right: 12px; }
  .uk-news__lightbox-nav:hover,
  .uk-news__lightbox-nav:focus-visible {
    transform: translateY(-50%) scale(1.03);
  }
  .uk-news .uk-news__gallery-thumb { width: 84px; height: 52px; }
}
