.news-section {
  padding-top: 72px;
  padding-bottom: 72px;
}

.news-section[hidden] {
  display: none;
}

.news-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.news-heading h2 {
  margin: 12px 0 0;
  font: 600 clamp(30px, 4vw, 48px)/1.15 "Inter", sans-serif;
  letter-spacing: -1.5px;
}

.news-profile-link, .news-read-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #c8b7fa;
  font: 500 13px/1.5 "Inter", sans-serif;
  transition: color 180ms ease;
}

.news-profile-link img, .news-read-link img {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.news-profile-link img {
  width: 20px;
  height: 20px;
}

.news-read-link img {
  width: 18px;
  height: 18px;
  transition: transform 180ms ease;
}

.news-grid {
  gap: 22px;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #332a43;
  border-radius: 18px;
  background: #12101c;
  transition: border-color 180ms ease;
}

.news-image-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0b0912;
}

.news-image-link > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-video-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 5px 10px;
  border: 1px solid #ffffff30;
  border-radius: 999px;
  background: #0b0912dc;
  color: #eee9f7;
  font-size: 11px;
}

.news-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
}

.news-card-date {
  margin: 0 0 14px;
  color: #aaa2b8;
  font: 500 12px/1.5 "Inter", sans-serif;
}

.news-card-text {
  display: -webkit-box;
  overflow: hidden;
  max-width: 100%;
  margin: 0 0 24px;
  color: #ded8eb;
  font: 400 14px/1.8 "Inter", sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
}

.news-inline-link {
  color: #c8b7fa;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-read-link {
  margin-top: auto;
  padding: 4px 0;
}

@media (hover: hover) {
  .news-card:hover {
    border-color: #76608e;
  }

  .news-profile-link:hover, .news-read-link:hover, .news-inline-link:hover {
    color: #f1e8ff;
  }

  .news-read-link:hover img {
    transform: translate(2px, -2px);
  }
}

@media (max-width: 900px) {
  .news-grid {
  }
}

@media (max-width: 600px) {
  .news-section {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .news-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
  }

  .news-grid {
    gap: 16px;
  }

  .news-card-body {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-card, .news-profile-link, .news-read-link, .news-read-link img {
    transition: none;
  }

  .news-read-link:hover img {
    transform: none;
  }
}


.news-video {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #08070d;
}

.news-video [hidden] {
  display: none !important;
}

.news-video-player, .news-video-start {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.news-video-player {
  object-fit: contain;
}

.news-video-start {
  padding: 0;
  border: 0;
  background: #08070d;
  cursor: pointer;
}

.news-video-start > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.news-play-symbol {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid #c8b7fa70;
  border-radius: 50%;
  background: #171220df;
  color: #eee9f7;
  transform: translate(-50%, -50%);
  transition: background-color 180ms ease;
}

.news-play-symbol svg {
  width: 26px;
  height: 26px;
}

.news-video-start:hover .news-play-symbol {
  background: #59446f;
}

.news-video-fallback {
  position: relative;
  padding: 20px;
  color: #c8b7fa;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .news-play-symbol {
    transition: none;
  }
}


.news-heading, .news-grid, .news-card,
.news-card-body, .news-video, .news-image-link {
  min-width: 0;
  max-width: 100%;
}

.news-grid {
  width: 100%;
}

.news-profile-link, .news-read-link {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.news-video-player {
  min-width: 0;
  max-width: 100%;
}

.news-video-start {
  z-index: 1;
}

.news-video-fallback {
  z-index: 2;
}

@media (max-width: 600px) {
  .news-section {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .news-heading h2 {
    font-size: 30px;
  }

  .news-grid {
    gap: 14px;
  }

  .news-card {
    border-radius: 14px;
  }

  .news-video, .news-image-link {
    height: clamp(130px, 38vw, 180px);
    aspect-ratio: auto;
  }

  .news-card-body {
    padding: 15px 16px;
  }

  .news-card-date {
    margin-bottom: 10px;
    font-size: 11px;
  }

  .news-card-text {
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.65;
    -webkit-line-clamp: 4;
  }

  .news-read-link {
    font-size: 12px;
  }
}

.news-section {
  min-width: 0;
}

.news-grid {
  --news-gap: 22px;
  display: flex;
  align-items: stretch;
  gap: var(--news-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  scrollbar-width: none;
}

.news-grid::-webkit-scrollbar {
  display: none;
}

.news-grid > .news-card {
  flex: 0 0 calc((100% - 2 * var(--news-gap)) / 3);
  scroll-snap-align: start;
}

.news-grid:focus-visible {
  outline: 2px solid #c8b7fa;
  outline-offset: 5px;
  border-radius: 18px;
}

.news-carousel-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.news-carousel-controls[hidden] {
  display: none;
}

.news-carousel-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid #514160;
  border-radius: 50%;
  background: #171220;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.news-carousel-arrow img {
  display: block;
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.news-carousel-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.news-carousel-counter {
  min-width: 74px;
  color: #aaa2b8;
  text-align: center;
  font: 500 12px/1.5 "Inter", sans-serif;
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) {
  .news-carousel-arrow:not(:disabled):hover {
    border-color: #af8bd0;
    background: #2b2038;
  }
}

@media (max-width: 900px) {
  .news-grid > .news-card {
    flex-basis: calc((100% - var(--news-gap)) / 2);
  }
}

@media (max-width: 600px) {
  .news-grid {
    --news-gap: 14px;
  }

  .news-grid > .news-card {
    flex-basis: 100%;
  }

  .news-carousel-controls {
    justify-content: center;
    margin-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-carousel-arrow {
    transition: none;
  }
}
