/* =========================================================
   HÖFER — news.css
   ========================================================= */

.news__slider {
  position: relative;
}

.news__viewport {
  overflow: hidden;
  padding: 4px 0;
}

.news__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 72px) / 4); /* 4 карточки в ряд */
  gap: 24px;
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}

/* ---------- Карточка новости ---------- */
.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--c-white);
  border: 1px solid var(--c-gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--tr-base), box-shadow var(--tr-base),
              border-color var(--tr-base);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-gray-400);
}

.news-card__media {
  position: relative;
  aspect-ratio: 287 / 250;
  overflow: hidden;
  background: var(--c-gray-100);
}

.news-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .6s ease;
}

.news-card:hover .news-card__img {
  transform: scale(1.06);
}

.news-card__img--empty {
  background: repeating-linear-gradient(
    45deg,
    var(--c-gray-100) 0 10px,
    var(--c-gray-50) 10px 20px
  );
}

.news-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 24px;
  flex: 1;
}

.news-card__date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-red);
}

.news-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
  color: var(--c-text);
  margin: 0;
  transition: color var(--tr-fast);
}

.news-card:hover .news-card__title {
  color: var(--c-red);
}

.news-card__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-text-muted);
  margin: 0;
  flex: 1;
}

.news-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* ---------- Стрелки ---------- */
.news__arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-white);
  color: var(--c-black);
  border: 1px solid var(--c-gray-200);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--tr-fast), color var(--tr-fast),
              border-color var(--tr-fast), transform var(--tr-fast);
}

.news__arrow:hover {
  background: var(--c-red);
  border-color: var(--c-red);
  color: var(--c-white);
}

.news__arrow:disabled {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}

.news__arrow--prev { left: -22px; }
.news__arrow--next { right: -22px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1280px) {
  .news__track {
    grid-auto-columns: calc((100% - 48px) / 3);
  }
}

@media (max-width: 1024px) {
  .news__track {
    grid-auto-columns: calc((100% - 24px) / 2);
  }
  .news__arrow--prev { left: -12px; }
  .news__arrow--next { right: -12px; }
}

@media (max-width: 768px) {
  .news__track {
    grid-auto-columns: 68%;
    gap: 12px;
  }
  .news__arrow {
    display: none;
  }
  .news-card__body {
    padding: 14px 16px 16px;
    gap: 8px;
  }
  .news-card__title {
    font-size: 15px;
  }
  .news-card__text {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .news__track {
    grid-auto-columns: 72%;
    gap: 10px;
  }
  .news-card__body {
    padding: 12px 14px 14px;
  }
  .news-card__title {
    font-size: 14px;
  }
  .news-card__date {
    font-size: 11px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .news__track { transition: none; }
  .news-card__img { transition: none; }
  .news-card:hover { transform: none; }
}