/* ===== КАРУСЕЛЬ НОВОСТЕЙ ===== */

.news-carousel-wrapper {
  position: relative;
  width: 100%;
  margin: 40px 0 70px;
  overflow: hidden; /
}

.my-news-carousel {
  display: flex;
  gap: 30px;
padding: 10px 0 40px 0; 
  cursor: grab;
  will-change: transform; 
}

.my-news-carousel.dragging {
  cursor: grabbing;
}

/* Карточка новости */
.news-card {
  flex: 0 0 auto;
  width: 470px;
  border-radius: 20px;
  background: white;
  overflow: hidden;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
  box-shadow: -9px 11px 38px rgba(0, 0, 0, 0.05);
}

.news-card:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

.news-card img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
  pointer-events: none; /* Чтобы не мешала drag */
}

.news-card__noimg {
  width: 100%;
  height: 350px;
  background: linear-gradient(145deg, #f5f5f5, #e8e8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818181;
  font-size: 16px;
}

.news-card__content {
  padding: 30px 24px;
}

.news-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 25px;
}

.news-card__caption {
  color: #3959eb;
  font-weight: 400;
  font-size: 20px;
  margin: 0;
}

.news-card__date {
  color: #818181;
  font-size: 20px;
}

.news-card__title {
  color: #05131d;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.3;
}

.news-card__text {
  color: rgba(5, 19, 29, 0.7);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 25px;
}

a.news-card__link {
  display: inline-block;
  color: #3959eb;
  text-decoration: none!important;
  font-size: 16px;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.news-card__link:after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #3959eb;
  transition: width 0.3s ease;
}

.news-card__link:hover:after {
  width: 100%;
}

/* Кнопки навигации */
button.news-carousel__prev,
button.news-carousel__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: white!important;
  border: 1px solid #e0e0e0!important;
  color: #3959eb!important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

button.news-carousel__prev {
  left: 20px;
}

button.news-carousel__next {
  right: 20px;
}

button.news-carousel__prev:hover,
button.news-carousel__next:hover {
  background: #3959eb!important;
  color: white!important;
  border-color: #3959eb!important;
  box-shadow: 0 6px 16px rgba(57, 89, 235, 0.25);
}


button.news-carousel__prev svg,
button.news-carousel__next svg {
  width: 24px;
  height: 24px;
}

/* Неактивные кнопки */
button.news-carousel__prev[style*="opacity: 0.5"],
button.news-carousel__next[style*="opacity: 0.5"] {
  opacity: 0.5 !important;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== АДАПТИВ ===== */

@media (max-width: 1366px) {
  .news-card {
    width: 400px;
  }

  .news-card img,
  .news-card__noimg {
    height: 300px;
  }

  .news-card__content {
    padding: 25px 20px;
  }

  .news-card__row {
    gap: 20px;
    margin-bottom: 20px;
  }

  .news-card__caption,
  .news-card__date {
    font-size: 18px;
  }

  .news-card__title {
    font-size: 22px;
  }

  button.news-carousel__prev,
  button.news-carousel__next {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 1024px) {
  .my-news-carousel {
    gap: 25px;
  }

  .news-card {
    width: 350px;
  }

  .news-card img,
  .news-card__noimg {
    height: 260px;
  }

  .news-card__content {
    padding: 20px 18px;
  }

  .news-card__row {
    gap: 15px;
    margin-bottom: 18px;
  }

  .news-card__caption,
  .news-card__date {
    font-size: 16px;
  }

  .news-card__title {
    font-size: 20px;
  }

  .news-card__text {
    font-size: 15px;
    margin-bottom: 20px;
  }

  button.news-carousel__prev,
  button.news-carousel__next {
    /* width: 44px;
    height: 44px; */
    display: none;
  }
}

@media (max-width: 768px) {
  .my-news-carousel {
    gap: 20px;
  }

  .news-card {
    width: 280px;
  }

  .news-card img,
  .news-card__noimg {
    height: 200px;
  }

  .news-card__content {
    padding: 18px 16px;
  }

  .news-card__row {
    gap: 12px;
    margin-bottom: 15px;
  }

  .news-card__caption,
  .news-card__date {
    font-size: 15px;
  }

  .news-card__title {
    font-size: 18px;
  }

  .news-card__text {
    font-size: 14px;
  }

  /* .news-carousel__prev,
  .news-carousel__next {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
  } */

  button.news-carousel__prev {
    left: 10px;
  }

  button.news-carousel__next {
    right: 10px;
  }
}

@media (max-width: 480px) {
  .news-card {
    width: 260px;
  }

  .news-card img,
  .news-card__noimg {
    height: 180px;
  }

  .news-card__content {
    padding: 16px 14px;
  }

  .news-card__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .news-card__title {
    font-size: 17px;
  }

  .news-card__text {
    font-size: 13px;
  }

  /* .news-carousel__prev,
  .news-carousel__next {
    width: 36px;
    height: 36px;
  } */

  /* .news-carousel__prev svg,
  .news-carousel__next svg {
    width: 18px;
    height: 18px;
  } */
}

/* Для touch-устройств */
@media (hover: none) and (pointer: coarse) {
  .my-news-carousel {
    padding-bottom: 20px;
  }

  .news-card:hover {
    transform: none;
    box-shadow: -9px 11px 38px rgba(0, 0, 0, 0.05);
  }
}
