/* Слайдер главной страницы */
.home-slider {
  position: relative;
  min-height: 90vh;
  /*overflow: hidden;*/
  display: flex;
  flex-direction: column;
}

/* Фоновое изображение */
.home-slider__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  top: -48px;
}

.home-slider__bg-item {
  position: absolute;
  inset: 0;
}

.home-slider__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-slider__bg-img--mobile {
  display: block;
}

.home-slider__bg-img--desktop {
  display: none;
}

@media (min-width: 768px) {
  .home-slider__bg-img--mobile {
    display: none;
  }
  
  .home-slider__bg-img--desktop {
    display: block;
  }
}

/* Контент */
.home-slider__content {
  position: absolute;
  left: 20px;
  top: 45%;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
  margin-top: -200px;
}

@media (min-width: 768px) {
  .home-slider__content {
    left: 50%;
    top: 45%;
    margin-top: -230px;
  }
}

.home-slider__content > .container {
  padding: 0;
}

.home-slider__text {
  /*padding-top: 180px;
  min-height: 380px;*/
  pointer-events: auto;
}

.home-slider__subtitle {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 13px;
  line-height: 1.3;
  margin-bottom: 60px;
}

/* Анимации появления/скрытия текста */
.home-slider__subtitle-wrapper,
.home-slider__title-wrapper {
  position: relative;
  min-height: 1em;
}

.home-slider__text-item {
  
}

.home-slider__text-item .home-slider__city,
.home-slider__text-item .home-slider__space {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  animation: slideInFade 0.5s ease-out forwards;
}

.home-slider__title.home-slider__text-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s ease-out, transform 0.75s ease-out;
  animation: slideInFade 0.75s ease-out forwards;
}

@keyframes slideInFade {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .home-slider__subtitle {
    font-size: 14px;
  }
}

.home-slider__city {
  text-transform: uppercase;
  display: block;
}

.home-slider__space {
  color: var(--color-dark-grey, #666);
  display: block;
}

.home-slider__title {
  font-size: 48px;
  line-height: 1;
  height: 96px;
  display: inline-block;
  vertical-align: bottom;
  color: var(--color-brand, #d4a574);
  font-weight: normal;
  margin: 0;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}
.home-slider__title::after {
  content: '';
  display: inline-block;
  vertical-align: bottom;
  height: 100%;
  width: 0;
}

@media (min-width: 768px) {
  .home-slider__title {
    font-size: 64px;
    height: 128px;
  }
}

/* Галерея */
.home-slider__gallery {
  position: absolute;
  height: 315px;
  top: 45%;
  z-index: 20;
  overflow-x: visible;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  
  padding: 0;
  padding-right: 20px;
  width: 100%;
}

@media (min-width: 768px) {
  .home-slider__gallery {
    top: 45%;
    height: 315px;
  }
}

.home-slider__gallery::-webkit-scrollbar {
  display: none;
}

.home-slider__gallery-wrapper {
  position: relative;
  left: 20px;
  width: calc(100% - 40px);
  overflow: visible;
  padding-right: 20px;
}
@media (min-width: 768px) {
  .home-slider__gallery-wrapper {
    left: calc(50% + 16px);
    width: 50%;
  }
}

.home-slider__gallery-list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  white-space: nowrap;
  overflow: visible;
  z-index: 1;
  width: 1000px;
  pointer-events: none;
}

.home-slider__gallery-list > * {
  pointer-events: auto;
}

.home-slider__gallery-item {
  position: absolute;
  height: 135px;
  min-height: 135px;
  max-height: 135px;
  top: 0;
  cursor: pointer;
  pointer-events: auto;
  z-index: 1;
  transition: height 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              min-height 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              max-height 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              left 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: height, min-height, max-height, left;
}

@media (min-width: 768px) {
  .home-slider__gallery-item {
    height: 150px;
    min-height: 150px;
    max-height: 150px;
  }
}

.home-slider__gallery-item--active {
  height: 225px !important;
  min-height: 225px !important;
  max-height: 225px !important;
  left: 0 !important;
  z-index: 30;
}

@media (min-width: 768px) {
  .home-slider__gallery-item--active {
    height: 315px !important;
    min-height: 315px !important;
    max-height: 315px !important;
  }
}

.home-slider__gallery-item--active-placed {
  height: 225px !important;
  min-height: 225px !important;
  max-height: 225px !important;
  transition: height 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              min-height 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              max-height 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              left 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: height, min-height, max-height, left;
}

@media (min-width: 768px) {
  .home-slider__gallery-item--active-placed {
    height: 315px !important;
    min-height: 315px !important;
    max-height: 315px !important;

  }
}

.home-slider__gallery-img {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.home-slider__gallery-item:hover .home-slider__gallery-img {
  transform: scale(1.02);
}

.home-slider__gallery-item--active.home-slider__gallery-item--active-placed .home-slider__gallery-img {
  transform: scale(1);
}
.home-slider__gallery-item--active-placed .home-slider__gallery-img {
  
}