.smooth_carousel {
  width: 100%;
  height: 500px;
  display: flex;
  max-height: 550px;
  overflow: hidden;
  position: relative;
}

.carousel-item {
  visibility: visible;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: flex-end;
  -webkit-align-items: center;
  -webkit-justify-content: flex-end;
  position: relative;
  flex-shrink: 0;
  gap: 5%;
  -webkit-flex-shrink: 0;
  position: absolute;
  z-index: 0;
  transition: 0.6s all linear;
}

.carousel-item__container {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.carousel_bttn_div {
  display: flex;
  flex-direction: column;
}

.carousel-item__info {
  height: 100%;
  display: flex;
  justify-content: center;
  flex-direction: column;

  display: -webkit-flex;
  -webkit-justify-content: center;
  -webkit-flex-direction: column;

  order: 1;
  left: 0;
}

.carousel-item__image {
  min-width: 45%;
  height: 100%;
  order: 2;
  align-self: flex-end;

  border-radius: 2rem;

  -webkit-order: 2;
  -webkit-align-self: flex-end;

  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  transform: translateX(100%);
  transition: 0.6s all ease-in-out;
}

.carousel-item__description,
.carousel-item__title,
.carousel-item__subtitle,
.carousel-item__btn {
  transform: translateY(25%);
  opacity: 0;
  visibility: hidden;
  transition: 0.6s all ease-in-out;
}

.carousel-item--1 .carousel-item__image {
  background-image: url("/assets/images/home/mak_cards.webp");
}

.carousel-item--2 .carousel-item__image {
  background-image: url("/assets/images/home/art_therapy.webp");
}

.carousel-item--3 .carousel-item__image {
  background-image: url("/assets/images/home/therapy_creative.webp");
}

.carousel-item--4 .carousel-item__image {
  background-image: url("/assets/images/home/therapy_fairytale.webp");
}

.carousel-item--5 .carousel-item__image {
  background-image: url("/assets/images/home/therapy_energy.webp");
}

.carousel-item--6 .carousel-item__image {
  background-image: url("/assets/images/home/therapy_dreammap.webp");
}

.carousel__nav {
  position: fixed;
  top: 40px;
  z-index: 2;
  left: 0;
  width: 55%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24rem;
}

.carousel__nav img {
  filter: brightness(0.8);
}

.carousel__icon {
  display: inline-block;
  vertical-align: middle;
  width: 16px;
  fill: #5d5d5d;
}

.carousel__arrow {
  cursor: pointer;
  display: inline-block;
  padding: 11px 15px;
  position: relative;
}

.carousel__arrow:nth-child(1):after {
  content: "";
  right: -3px;
  position: absolute;
  width: 1px;
  background-color: #b0b0b0;
  height: 14px;
  top: 50%;
  margin-top: -7px;
}

.active {
  z-index: 1;
  display: flex;
  visibility: visible;
}

.active .carousel-item__title,
.active .carousel-item__description,
.active .carousel-item__subtitle,
.active .carousel-item__btn {
  transform: translateY(0);
  opacity: 1;
  transition: 0.6s all ease-in-out;
  visibility: visible;
}

.active .carousel-item__image {
  transition: 0.6s all ease-in-out;
  transform: translateX(0);
}

@media (max-width: 1024px) {
  .active .carousel-item__image {
    transition: 0.6s all ease-in-out;
    transform: translateX(0);
  }

  .smooth_carousel {
    flex-direction: column;
    height: auto;
    max-height: none;
    gap: 1.5rem;
  }

  .carousel-item {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1.5rem;
    height: auto;
  }

  .carousel-item:not(.active) {
    display: none;
  }

  .carousel__nav {
    position: absolute;
    margin: 0 auto;
    width: 100%;
    top: 8px;
  }

  .carousel-item__info {
    width: 100%;
    padding: 0 0.5rem;
  }

  .carousel-item__container {
    gap: 1rem;
  }

  .carousel-item__image {
    width: 100%;
    min-width: 0;
    height: 400px;
    align-self: stretch;
    transform: translateY(40px);
    border-radius: 1.5rem;
  }

  .active .carousel-item__image {
    transform: translateY(0);
  }

  .carousel_bttn_div {
    order: 3;
  }
}

@media (max-width: 640px) {
  .carousel-item__image {
    height: 250px;
  }

  .smooth_carousel {
    margin-top: 1rem;
  }

  .carousel__nav {
    gap: 13rem;
    top: 0;
  }

  .carousel-item__container {
    gap: 0.5rem;
  }

  .smooth_carousel {
    overflow-y: scroll;
  }

  .service-block .service-modal dialog .carousel-item h3 {
    font-size: 2.5rem;
  }
}
