.news {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: -48px;
  padding: 147px 88px;
  background: var(--color-dark-1000);
}

.news__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 56px;
  max-width: 1264px;
  margin-inline: auto;
}

.news__header-text {
  position: relative;
  display: flex;
  align-items: center;
}

.news__title {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 600;
  line-height: 56px;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--color-light-1000);
  white-space: nowrap;
}

.news__title-underline {
  position: absolute;
  left: -5.79px;
  top: 37.43px;
  width: 338.255px;
  height: 19.135px;
  background: var(--color-light-200);
  z-index: -1;
}

.news__cta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 16px 0 32px;
  border-radius: 0;
  background: var(--color-primary);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--color-light-1000);
  white-space: nowrap;
  transition: border-radius 0.45s cubic-bezier(0.33, 1, 0.68, 1),
    transform 0.45s cubic-bezier(0.33, 1, 0.68, 1);
}

.news__cta:hover,
.news__cta:focus-visible {
  border-radius: 16px;
  transform: scale(1.04);
}

.news__cta-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.news__cta-icon img {
  width: 32px;
  height: 32px;
  display: block;
  transform: rotate(90deg);
}

/* Рывок в правый верхний угол и возврат на исходную — один раз за ховер */
@keyframes news-cta-arrow-dart {
  0%, 100% { transform: rotate(90deg) translate(0, 0); }
  50% { transform: rotate(90deg) translate(-4px, -4px); }
}

.news__cta:hover .news__cta-icon img,
.news__cta:focus-visible .news__cta-icon img {
  animation: news-cta-arrow-dart 0.6s ease-in-out 1;
}

/* Карусель — как в блоке 4: блид на всю ширину секции, чтобы уехавшие
   карточки не обрезались на границе внутреннего паддинга */
.news__carousel {
  position: relative;
  margin: 56px -88px 0;
}

.news__cards {
  display: flex;
  gap: 32px;
  width: 100%;
  padding: 0 88px;
  scroll-padding: 0 88px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

.news__cards::-webkit-scrollbar {
  display: none;
}

/* Кнопки скролла — тот же стиль и логика, что в блоке 4 (Figma 276:633) */
.news__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  width: 80px;
  height: 133px;
  border: none;
  border-radius: 32px;
  background: linear-gradient(var(--color-dark-50), var(--color-dark-50)), var(--color-light-1000);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  outline: none;
  pointer-events: none;
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
}

.news__nav--prev {
  left: 50px;
}

.news__nav--next {
  right: 50px;
}

.news__nav img {
  width: 32px;
  height: 32px;
  display: block;
}

.news__nav--next img {
  transform: rotate(180deg);
}

.news__carousel:hover .news__nav:not(:disabled) {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  pointer-events: auto;
}

.news__nav:not(:disabled):hover {
  background: linear-gradient(var(--color-dark-100), var(--color-dark-100)), var(--color-light-1000);
  transform: translateY(-50%) scale(1.06);
}

.news__nav:not(:disabled):active {
  transform: translateY(-50%) scale(0.94);
}

.news__nav:disabled {
  opacity: 0 !important;
}

.news__card {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 400px;
  height: 512px;
  display: flex;
  flex-direction: column;
  /* НОВОЕ: карточка теперь целиком <a> (была <article> + вложенная
     ссылка "CZYTAJ WIĘCEJ") — сбрасываем дефолтные стили ссылки. */
  text-decoration: none;
  color: inherit;
}

.news__card-image {
  flex-shrink: 0;
  width: 100%;
  height: 206px;
  border-radius: 32px;
  overflow: hidden;
  background: var(--color-light-1000);
}

.news__card-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news__card-body {
  flex: 1 0 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 32px;
  border-radius: 32px;
  background: var(--color-light-50);
  transition: background-color 0.2s ease;
}

.news__card:hover .news__card-image img {
  transform: scale(1.04);
}

.news__card:hover .news__card-body {
  background: var(--color-light-100);
}

.news__card-tag {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--color-light-700);
}

.news__card-title {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -0.04em;
  color: var(--color-light-1000);
}

.news__card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.news__card-meta img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

.news__card-date {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.04em;
  color: var(--color-light-700);
}

.news__card-link {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--color-light-1000);
}

.news__card-link img {
  width: 24px;
  height: 24px;
  display: block;
  transform: rotate(180deg) scaleY(-1);
}

@keyframes news-card-arrow-dart {
  0%, 100% { transform: rotate(180deg) scaleY(-1) translate(0, 0); }
  50% { transform: rotate(180deg) scaleY(-1) translate(-4px, -4px); }
}

.news__card:hover .news__card-link img {
  animation: news-card-arrow-dart 0.6s ease-in-out 1;
}

/* Светлый модификатор — тот же .news__card на светлой секции вместо тёмной
   (используется на O Firmie и в каталоге Aktualności) */
.news--light {
  background: var(--color-light-1000);
  border-radius: 56px;
  padding: 136px 88px;
}

.news--light .news__title,
.news--light .news__card-title,
.news--light .news__card-link {
  color: var(--color-dark-1000);
}

.news--light .news__card-tag,
.news--light .news__card-date {
  color: var(--color-dark-700);
}

.news--light .news__title-underline {
  background: var(--color-dark-100);
}

.news--light .news__card-body {
  background: var(--color-dark-50);
}

.news--light .news__card:hover .news__card-body {
  background: var(--color-dark-100);
}

/* Кнопки скролла карусели — dark/1000 с светлой (light/1000) стрелкой
   вместо светлой кнопки с тёмной стрелкой, как на тёмной секции главной */
.news--light .news__nav {
  background: var(--color-dark-1000);
}

.news--light .news__nav:not(:disabled):hover {
  background: var(--color-dark-800);
}

.news--light .news__nav img {
  filter: brightness(0) invert(1);
}

/* ============ Mobile ≤767px — Figma 286:3531 ============ */
@media (max-width: 767px) {
  /* Порядок «заголовок → карусель → кнопка» без правки разметки:
     header раскрывается через display: contents, порядок — через order */
  .news {
    display: flex;
    flex-direction: column;
    padding: 96px 0;
  }

  .news__header {
    display: contents;
  }

  .news__header-text {
    order: 1;
    justify-content: center;
    margin: 0 16px;
  }

  .news__title {
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -2.24px;
  }

  .news__title-underline {
    left: 50%;
    top: 24.01px;
    width: 215.212px;
    height: 13.973px;
    transform: translateX(-50%);
  }

  .news__carousel {
    order: 2;
    margin: 32px 0 0;
  }

  .news__cards {
    padding: 0 16px;
    scroll-padding: 0 16px;
    gap: 16px;
    margin-top: 0;
  }

  .news__card {
    width: 308px;
    height: 556px;
  }

  .news__card-image {
    height: 216px;
    border-radius: 24px;
  }

  .news__card-body {
    border-radius: 24px;
  }

  .news__cta {
    order: 3;
    margin: 32px 16px 0;
  }
}
