* {
  box-sizing: border-box;
}

:root {
  --news-bg: #03050b;
  --news-surface: rgba(7, 11, 20, 0.88);
  --news-surface-soft: rgba(13, 18, 29, 0.74);
  --news-border: rgba(255, 255, 255, 0.15);
  --news-line: rgba(255, 255, 255, 0.1);
  --news-text: #f7f9ff;
  --news-muted: rgba(239, 244, 255, 0.7);
  --news-dim: rgba(239, 244, 255, 0.46);
  --news-blue: #43a3ff;
}

html {
  min-height: 100%;
  background: var(--news-bg);
}

body {
  min-height: var(--bs-small-viewport-height, 100vh);
  margin: 0;
  overflow-x: hidden;
  color: var(--news-text);
  background: var(--news-bg);
  font-family: var(--bs-site-font, Arial, sans-serif);
}

.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
}

.background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 4, 10, 0.2), rgba(2, 4, 10, 0.42)),
    rgba(5, 9, 17, 0.12);
  backdrop-filter: blur(1px) saturate(122%);
}

.news-page {
  position: relative;
  z-index: 1;
  width: min(1480px, 100%);
  min-height: var(--bs-small-viewport-height, 100vh);
  margin: 0 auto;
  padding: 116px 24px 54px;
}

.news-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 0;
  gap: 18px;
  margin-bottom: 18px;
}

.news-heading .page-heading__main {
  min-width: 0;
}

.news-kicker {
  margin: 0 0 8px;
  color: var(--news-blue);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.news-heading h1,
.news-index h2,
.news-viewer h2,
.news-empty h2 {
  margin: 0;
  color: #fff;
  letter-spacing: 0;
}

.news-heading h1 {
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 0.92;
  text-shadow: 0 18px 52px rgba(0, 0, 0, 0.56);
}

.news-type-slider {
  --news-type-width: clamp(150px, 20vw, 220px);
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 0;
  border-top: 1px solid var(--news-line);
  border-bottom: 1px solid var(--news-line);
}

.news-type-slider__viewport {
  min-width: 0;
  overflow: hidden;
  outline: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.news-type-slider__viewport::-webkit-scrollbar {
  display: none;
}

.news-type-slider__viewport:focus-visible {
  border-radius: 4px;
  outline: 2px solid rgba(67, 163, 255, 0.65);
  outline-offset: 2px;
}

.news-type-slider__track {
  display: flex;
  width: max-content;
  min-width: 100%;
  padding-inline: max(0px, calc(50% - var(--news-type-width) / 2));
  transform: translate3d(0, 0, 0);
}

.news-type-slider__track.is-animated {
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-type-slider__item {
  display: grid;
  align-items: center;
  justify-items: center;
  flex: 0 0 var(--news-type-width);
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  padding: 6px 12px;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 900;
  text-decoration: none;
  transition: color 0.24s ease, transform 0.24s ease;
}

.news-type-slider__item span {
  max-width: 100%;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-type-slider__item small {
  max-width: 100%;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.34);
  font-size: 11px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-type-slider__item:hover,
.news-type-slider__item:focus-visible {
  color: rgba(255, 255, 255, 0.78);
  outline: none;
}

.news-type-slider__item:focus-visible span {
  text-decoration: underline;
  text-decoration-color: rgba(67, 163, 255, 0.72);
  text-underline-offset: 5px;
}

.news-type-slider__item.is-active {
  color: #fff;
  transform: scale(1.08);
}

.news-type-slider__item.is-active span {
  color: var(--news-blue);
  font-size: 18px;
}

.news-type-slider__item.is-active small {
  color: rgba(255, 255, 255, 0.58);
}

.news-type-slider__arrow {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.news-type-slider__arrow:hover,
.news-type-slider__arrow:focus-visible {
  color: var(--news-blue);
}

.news-type-slider__arrow[data-news-type-previous]:hover {
  transform: translateX(-2px);
}

.news-type-slider__arrow[data-news-type-next]:hover {
  transform: translateX(2px);
}

.news-type-slider__arrow:focus-visible {
  outline: 2px solid rgba(67, 163, 255, 0.65);
  outline-offset: 2px;
}

.news-type-slider__arrow:disabled {
  color: rgba(255, 255, 255, 0.2);
  cursor: default;
  transform: none;
}

.news-workspace {
  display: grid;
  grid-template-columns: minmax(370px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  height: min(760px, max(600px, calc(100svh - 250px)));
  min-height: 600px;
}

.news-index,
.news-viewer {
  overflow: hidden;
  border: 1px solid var(--news-border);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    var(--news-surface);
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(22px) saturate(138%);
}

.news-index {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.008)),
    rgba(3, 7, 14, 0.78);
}

.news-index__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--news-line);
}

.news-index__header p {
  margin: 0 0 5px;
  color: var(--news-blue);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.news-index__header h2 {
  font-size: 1.35rem;
  line-height: 1.1;
}

.news-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(67, 163, 255, 0.68) rgba(255, 255, 255, 0.05);
  scrollbar-width: thin;
}

.news-list-item {
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-width: 0;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--news-line);
  color: inherit;
  background: transparent;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.news-list-item[hidden] {
  display: none;
}

.news-list-item::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.news-list-item:hover,
.news-list-item:focus-visible {
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

.news-list-item.is-active {
  background:
    linear-gradient(90deg, rgba(67, 163, 255, 0.14), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.news-list-item.is-active::before {
  background: var(--news-blue);
  box-shadow: 0 0 18px rgba(67, 163, 255, 0.48);
}

.news-list-item__media {
  display: block;
  align-self: start;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.news-list-item__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.news-list-item:hover .news-list-item__media img,
.news-list-item:focus-visible .news-list-item__media img,
.news-list-item.is-active .news-list-item__media img {
  transform: scale(1.035);
  filter: saturate(112%);
}

.news-list-item__content {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 7px;
}

.news-list-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 9px;
  color: var(--news-dim);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.news-list-item__meta b {
  overflow: hidden;
  color: var(--news-blue);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-list-item__meta time {
  flex: 0 0 auto;
  color: inherit;
}

.news-list-item__content > strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-list-item__summary {
  display: -webkit-box;
  overflow: hidden;
  color: var(--news-muted);
  font-size: 0.8rem;
  line-height: 1.38;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-viewer {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    rgba(12, 17, 28, 0.76);
  overscroll-behavior: contain;
  scrollbar-color: rgba(67, 163, 255, 0.68) rgba(255, 255, 255, 0.05);
  scrollbar-width: thin;
}

.news-viewer__article[hidden],
.news-viewer__empty[hidden] {
  display: none;
}

.news-viewer__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--news-line);
  background: rgba(255, 255, 255, 0.045);
}

.news-viewer__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 24%;
  background: linear-gradient(180deg, transparent, rgba(7, 11, 20, 0.42));
  pointer-events: none;
}

.news-viewer__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-viewer__body {
  padding: 28px 32px 38px;
}

.news-viewer__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  color: var(--news-dim);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.news-viewer__meta > span:first-child {
  color: var(--news-blue);
}

.news-viewer__meta time {
  color: inherit;
}

.news-viewer h2 {
  font-size: clamp(2rem, 3.4vw, 3.5rem);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.news-viewer__lead {
  margin: 18px 0 0;
  color: rgba(247, 249, 255, 0.88);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.news-viewer__lead[hidden] {
  display: none;
}

.news-viewer__text {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--news-line);
  color: var(--news-muted);
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.news-viewer__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--news-line);
}

.news-viewer__gallery[hidden] {
  display: none;
}

.news-viewer__gallery a {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(4, 8, 15, 0.58);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.news-viewer__gallery a:hover {
  border-color: rgba(67, 163, 255, 0.5);
  transform: translateY(-2px);
}

.news-viewer__gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
}

.news-viewer__empty,
.news-empty {
  display: grid;
  min-height: 300px;
  padding: 32px;
  place-items: center;
  align-content: center;
  color: var(--news-muted);
  text-align: center;
}

.news-empty {
  border: 1px solid var(--news-border);
  border-radius: 8px;
  background: var(--news-surface-soft);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px) saturate(140%);
}

.news-viewer__empty p,
.news-empty p {
  margin: 10px 0 0;
}

.news-viewer.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(5, 9, 17, 0.34);
  pointer-events: none;
}

.news-viewer.is-loading::after {
  content: "";
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--news-blue);
  border-radius: 50%;
  animation: news-spinner 0.72s linear infinite;
  pointer-events: none;
}

@keyframes news-spinner {
  to {
    transform: rotate(360deg);
  }
}

.bs-footer {
  position: relative;
  z-index: 2;
}

@media (max-width: 1120px) {
  .news-workspace {
    grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.28fr);
  }

  .news-list-item {
    grid-template-columns: 108px minmax(0, 1fr);
    padding-inline: 14px;
  }

  .news-list-item__summary {
    -webkit-line-clamp: 1;
  }
}

@media (max-width: 900px) {
  .news-page {
    width: min(100%, 760px);
    padding: 96px 14px 40px;
  }

  .news-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .news-workspace {
    grid-template-columns: 1fr;
    gap: 16px;
    height: auto;
    min-height: 0;
  }

  .news-list {
    max-height: 440px;
  }

  .news-viewer {
    min-height: 460px;
    overflow: hidden;
    scroll-margin-top: 88px;
  }
}

@media (max-width: 520px) {
  .news-heading.page-heading h1 {
    max-width: 100%;
    font-size: 3.05rem;
    overflow-wrap: break-word;
  }

  .news-type-slider {
    --news-type-width: 150px;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .news-type-slider__arrow {
    width: 40px;
    height: 40px;
  }

  .news-index__header {
    padding: 18px 16px 14px;
  }

  .news-list {
    max-height: 390px;
  }

  .news-list-item {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 11px;
    padding: 13px 12px;
  }

  .news-list-item__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .news-list-item__meta time {
    white-space: nowrap;
  }

  .news-list-item__content > strong {
    font-size: 0.92rem;
  }

  .news-list-item__summary {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .news-viewer {
    min-height: 400px;
  }

  .news-viewer__body {
    padding: 22px 18px 30px;
  }

  .news-viewer__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .news-viewer h2 {
    font-size: 2rem;
  }

  .news-viewer__lead {
    font-size: 1rem;
  }

  .news-viewer__gallery {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-type-slider__viewport {
    scroll-behavior: auto;
  }

  .news-type-slider__track,
  .news-type-slider__item,
  .news-type-slider__arrow,
  .news-list-item,
  .news-list-item::before,
  .news-list-item__media img {
    transition: none;
  }

  .news-viewer__gallery a {
    transition: none;
  }

  .news-viewer.is-loading::after {
    animation-duration: 1.5s;
  }
}
