/* Общая обёртка карусели */
.itc-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 15px; /* Закругленные углы всей карусели */
}

/* Лента слайдов */
.itc-slider__items {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
  width: 100%;
}

.itc-slider__transition-none {
  transition: none;
}

/* Элемент слайда */
.itc-slider__item {
  flex: 0 0 calc(100% / 5); /* 5 элементов на экране */
  max-width: calc(100% / 5);
  padding: 10px;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 200px; /* Фиксируем ширину для контроля текста */
  user-select: text;
  will-change: transform;
}
.itc-slider.second .itc-slider__item {
  position: relative;
  flex: 0 0 calc(100% / 4); /* 4 элемента на экране */
  max-width: calc(100% / 4);
  padding: 10px;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 200px;
  border-radius: 15px;
}
.custom-block__link {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}
/* Картинка в постере */
.itc-slider__item img {
  width: 100%;
  height: 225px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}
.itc-slider.second .itc-slider__item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Обеспечиваем правильное масштабирование изображения */
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}
.itc-slider.second .itc-slider__text {
  position: absolute;
  top: 13px;
  left: 15px;
  font-size: 10px;
  font-weight: bold;
  color: white;
  background: #7a67f5;
  padding: 5px 10px;
  border-radius: 10px;
}
.itc-slider__item img:hover {
  transform: scale(1.05); /* Увеличение при наведении */
}
/* Названия под постерами */
.itc-slider__item h3 {
  font-size: 14px;
  font-weight: bold;
  margin-top: 8px;
  text-align: center;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Кнопки навигации */
.itc-slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5); /* Полупрозрачный фон */
  color: #fff; /* Белая стрелка */
  border: none; /* Убираем рамку */
  cursor: pointer;
  z-index: 10;
  font-size: 20px; /* Размер стрелки */
  line-height: 1;
  border-radius: 50%; /* Круглая кнопка */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Легкая тень */
  transition: background 0.3s ease;
  appearance: none;
}

.itc-slider__btn_hide {
  display: none;
}

.itc-slider__btn:hover {
  background: rgba(0, 0, 0, 0.8); /* Увеличиваем непрозрачность */
}

.itc-slider__btn_prev {
  left: 10px;
}

.itc-slider__btn_next {
  right: 10px;
}

.itc-slider__btn::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background: transparent no-repeat center center;
  background-size: 100% 100%;
}

.itc-slider__btn_prev::before {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E");
}

.itc-slider__btn_next::before {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E");
}

/* Индикаторы */
.itc-slider__indicators {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 15;
  display: flex;
  justify-content: center;
  margin: 0 15%;
  padding-left: 0;
  list-style: none;
}

.itc-slider__indicator {
  flex: 0 1 auto;
  box-sizing: content-box;
  width: 30px;
  height: 5px;
  margin-right: 3px;
  margin-left: 3px;
  text-indent: -999px;
  background-color: rgb(255 255 255 / 50%);
  background-clip: padding-box;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  cursor: pointer;
}

.itc-slider__indicator_active {
  background-color: rgb(255 255 255 / 90%);
}

/*Блоки*/
.custom-block {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 15px;
}

/* Лента элементов */
.custom-block__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.custom-block__transition-none {
  transition: none;
}

/* Элемент блока */
.custom-block__item {
  flex: 0 0 calc(50% - 10px);
  max-width: calc(50% - 10px);
}

.custom-block.second .custom-block__item {
  position: relative;
  padding: 10px;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 220px;
  border-radius: 15px;
}

/* Картинка в блоке */
.custom-block__item img {
  width: 100%;
  height: 225px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.custom-block.second .custom-block__item img {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

/* Текст внутри блока */
.custom-block.second .custom-block__text {
  position: absolute;
  top: 13px;
  left: 20px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  background: #7a67f5;
  padding: 5px 10px;
  border-radius: 10px;
}

.custom-block__item img:hover {
  transform: scale(1.05);
}

/* Заголовки под картинками */
.custom-block__item h3 {
  font-size: 14px;
  font-weight: bold;
  margin-top: 8px;
  text-align: center;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Адаптивность */
@media (max-width: 1024px) {
  .custom-block.second .custom-block__item {
    flex: 0 0 calc(100% / 2);
    max-width: calc(100% / 2);
    
  }
  .custom-block__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0px;
}
    .custom-block.second .custom-block__item img {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}
}
@media (max-width: 768px) {
  .custom-block.second .custom-block__item {
    flex: 0 0 calc(100% / 2);
      max-width: calc(100% / 2);}
    .custom-block__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0px;
}
    .custom-block.second .custom-block__item img {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}
}
@media (max-width: 530px) {
  .custom-block.second .custom-block__item {
    flex: 0 0 calc(100% / 1);
    max-width: calc(100% / 1);
  }
}


@media (max-width: 480px) {
  .custom-block.second .custom-block__item {
    flex: 0 0 calc(100% / 1);
    max-width: calc(100% / 1);
  }
}
/*---*/
@media (max-width: 1024px) {
  .itc-slider.second .itc-slider__item {
    flex: 0 0 calc(100% / 4); /* 4 элемента на экране */
    max-width: calc(100% / 4);
  }
}

@media (max-width: 768px) {
  .itc-slider.second .itc-slider__item {
    flex: 0 0 calc(100% / 3); /* 3 элемента на экране */
    max-width: calc(100% / 3);
  }

  .itc-slider.second .itc-slider__btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .itc-slider.second .itc-slider__item {
    flex: 0 0 calc(100% / 2); /* 2 элемента на экране */
    max-width: calc(100% / 2);
  }

  .itc-slider.second .itc-slider__btn {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
}
/* Адаптивность */
@media (max-width: 1024px) {
  .itc-slider__item {
    flex: 0 0 calc(100% / 4); /* 4 элемента на экране */
    max-width: calc(100% / 4);
  }
}

@media (max-width: 768px) {
  .itc-slider__item {
    flex: 0 0 calc(100% / 3); /* 3 элемента на экране */
    max-width: calc(100% / 3);
  }

  .itc-slider__btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .itc-slider__item {
    flex: 0 0 calc(100% / 2); /* 2 элемента на экране */
    max-width: calc(100% / 2);
  }

  .itc-slider__btn {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
}
