/* Карточки новостей с видео — мобильная вёрстка (/news, главная) */

.news-card .news-card-video-placeholder,
.news-card .carousel-container .news-card-video-placeholder,
.news-card .news-card-image.news-card-video-placeholder {
  overflow: hidden;
  flex-shrink: 0;
  background: #eef1f7;
  width: 100%;
}

.news-card .news-card-video-placeholder .q-img__image,
.news-card .carousel-container .news-card-video-placeholder .q-img__image,
.news-card .news-card-image.news-card-video-placeholder .q-img__image {
  object-fit: contain !important;
  object-position: center center;
}

@media (max-width: 1023px) {
  /* /news — NewsCard с каруселью или видео-заглушкой */
  .news-card .row.column,
  .news-card .column {
    display: flex;
    flex-direction: column;
  }

  .news-card .carousel-container {
    order: -1;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    max-height: 200px;
    overflow: hidden;
    border-right: none !important;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    position: relative;
    z-index: 0;
  }

  .news-card .carousel-container .news-card-video-placeholder,
  .news-card .carousel-container .news-card-video-placeholder.q-img {
    height: 200px !important;
    max-height: 200px !important;
    min-height: 0 !important;
  }

  .news-card .carousel-container .news-card-video-placeholder > .q-img__container,
  .news-card .carousel-container .q-img__container {
    padding-bottom: 0 !important;
    height: 200px !important;
    max-height: 200px !important;
  }

  .news-card .news-content-section {
    position: relative;
    z-index: 2;
    background: #fff;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  /* Заголовок не наезжает на превью */
  .news-card .news-content-section .news-title,
  .news-card .news-content-section .text-h6 {
    font-size: 1.05rem;
    line-height: 1.35;
    margin-bottom: 8px;
    word-break: break-word;
  }

  /* Текст новости: без дубля заголовка (часто первый <p> = title из VK) */
  .news-card:has(.news-card-video-placeholder) .news-text p:first-child {
    display: none;
  }

  .news-card:has(.news-card-video-placeholder) .news-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #555;
    margin-bottom: 8px;
  }

  .news-card:has(.news-card-video-placeholder) .news-text p {
    margin: 0 0 0.5em;
  }
}

/* Главная: компактный блок «Добрые новости» */
@media (max-width: 767px) {
  .news-card[data-v-7dd46b68] {
    max-height: none;
    max-width: 100%;
    overflow: hidden;
  }

  .news-card[data-v-7dd46b68] .news-card-image,
  .news-card[data-v-7dd46b68] .news-card-video-placeholder {
    max-height: 200px;
    overflow: hidden;
    flex-shrink: 0;
    width: 100%;
  }

  .news-card[data-v-7dd46b68] .news-card-image > .q-img__container,
  .news-card[data-v-7dd46b68] .news-card-video-placeholder > .q-img__container {
    padding-bottom: 0 !important;
    height: 200px !important;
    max-height: 200px !important;
  }

  .news-card[data-v-7dd46b68] p.news-card-summary {
    min-height: 0;
    margin-bottom: 8px;
  }

  .news-card[data-v-7dd46b68]:has(.news-card-video-placeholder) .news-card-summary p:first-child {
    display: none;
  }

  .news-card[data-v-7dd46b68] .news-card-summary.ellipsis-3-lines {
    min-height: 0;
    font-weight: 400;
    font-size: 0.9rem;
    color: #555;
  }
}
