/* если оставляем логотип картинкой */
.header__logo.logo::before,
.footer__logo.logo::before { display:none !important; }

.header__logo.logo img{ height:40px; display:block; }
.footer__logo.logo img{ height:28px; display:block; }

/* каркас карточки на всю высоту элемента-колонки */
.movie-item,
.movie-item__inner{
  display:flex;
  flex-direction:column;
  height:100%;
}

/* --- Сетка карточек каталога (перебиваем common.css) --- */

/* Сбрасываем насильно заданную ширину */
#dle-content > * { width: auto !important; }

/* Контейнер-лента */
#dle-content {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 24px;
}

/* 4 карточки в ряд (если у тебя прямой ребёнок #dle-content — .movie-item) */
#dle-content > .movie-item {
  flex: 0 0 calc(25% - 24px) !important;
  max-width: calc(25% - 24px) !important;
  box-sizing: border-box;
}

/* Если карточка завернута, например, в .shortstory (посмотри в DevTools),
   добавь и для неё размеры. Оставь только тот вариант, который есть у тебя. */
#dle-content > .shortstory {
  flex: 0 0 calc(25% - 24px) !important;
  max-width: calc(25% - 24px) !important;
  box-sizing: border-box;
}
#dle-content > .shortstory .movie-item { width: 100%; }

/* Адаптив: 3 / 2 / 1 в ряд */
@media (max-width: 1200px) {
  #dle-content > .movie-item,
  #dle-content > .shortstory {
    flex-basis: calc(33.333% - 24px) !important;
    max-width: calc(33.333% - 24px) !important;
  }
}
@media (max-width: 900px) {
  #dle-content > .movie-item,
  #dle-content > .shortstory {
    flex-basis: calc(50% - 24px) !important;
    max-width: calc(50% - 24px) !important;
  }
}
@media (max-width: 560px) {
  #dle-content > .movie-item,
  #dle-content > .shortstory {
    flex-basis: 100% !important;
    max-width: 100% !important;
  }
}

/* Чтобы внутренности карточки не распирали ширину */
#dle-content .movie-item__inner,
#dle-content .movie-item__img { width: 100%; }


/* если хочешь оставить фон вместо <img> — просто подменяем файл */
/* .header__logo.logo::before{ background-image:url('../images/logo.svg') !important; } */

.section__items {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.section__items .movie-item {
  flex: 0 0 calc(25% - 24px);
  max-width: calc(25% - 24px);
}
@media (max-width: 1200px) {
  .section__items .movie-item { flex-basis: calc(33.333% - 24px); max-width: calc(33.333% - 24px); }
}
@media (max-width: 900px) {
  .section__items .movie-item { flex-basis: calc(50% - 24px); max-width: calc(50% - 24px); }
}
@media (max-width: 560px) {
  .section__items .movie-item { flex-basis: 100%; max-width: 100%; }
}

#dle-content > .shortstory {        /* имя класса смотри в DevTools у прямых детей #dle-content */
  flex: 0 0 calc(25% - 24px);
  max-width: calc(25% - 24px);
  box-sizing: border-box;
}
#dle-content > .shortstory .movie-item { width: 100%; }

/* Сетка карточек в списках (контейнер section__content section__items) */
.section__content.section__items {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 24px;
}

/* 4 карточки в ряд на десктопе */
.section__content.section__items .movie-item {
  flex: 0 0 calc(25% - 24px);
  max-width: calc(25% - 24px);
  box-sizing: border-box;
}

/* адаптив 3 в ряд */
@media (max-width: 1200px) {
  .section__content.section__items .movie-item {
    flex-basis: calc(33.333% - 24px);
    max-width: calc(33.333% - 24px);
  }
}

/* адаптив 2 в ряд */
@media (max-width: 900px) {
  .section__content.section__items .movie-item {
    flex-basis: calc(50% - 24px);
    max-width: calc(50% - 24px);
  }
}

/* адаптив 1 в ряд */
@media (max-width: 560px) {
  .section__content.section__items .movie-item {
    flex-basis: 100%;
    max-width: 100%;
  }
}

/* На всякий случай убираем возможную принудительную ширину у детей */
.section__content.section__items > * { width: auto !important; }

/* позволяем заголовку правильно сжиматься в flex */
.sidebar .mini-item, .sidebar .mini-item__content { min-width: 0; }

/* обрезка на 2 строки с троеточием (можно 1 строку — см. ниже) */
.sidebar .mini-item__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;      /* поставь 1, если нужна одна строка */
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  max-height: calc(1.25em * 2);
  word-break: break-word;
}
.sidebar .mini-item__title { white-space: nowrap; overflow:hidden; text-overflow:ellipsis; }

