/**
 * Блок 4 — карусель фото ЖК: короткий кроссфейд только opacity (~0.3s), интервал в JS.
 */

.complex-promo-banner {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  background-color: #3a3a42;
  line-height: 0;
}

.complex-promo-banner.is-loading-element {
  min-height: clamp(200px, 52vw, 620px);
  background-image: linear-gradient(
    90deg,
    #3a3a3a 25%,
    #4a4a4a 50%,
    #3a3a3a 75%
  );
  background-size: 1000px 100%;
  animation: complex-promo-shimmer 1.5s infinite linear;
}

.complex-promo-banner:not(.is-loading-element) {
  min-height: 0;
  background-image: none;
  animation: none;
}

.complex-promo-banner__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #3a3a42;
  cursor: pointer;
}

/* Единая высота области: широкий кадр, как панорама; картинки cover внутри */
.complex-promo-banner:not(.is-loading-element) .complex-promo-banner__viewport {
  aspect-ratio: 1910 / 1000;
  max-height: min(92vh, 1200px);
}

@supports not (aspect-ratio: 1) {
  .complex-promo-banner:not(.is-loading-element) .complex-promo-banner__viewport {
    height: clamp(220px, 52vw, 620px);
  }
}

.complex-promo-banner__slides {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  isolation: isolate;
}

.complex-promo-banner.is-loading-element .complex-promo-banner__viewport {
  min-height: clamp(200px, 52vw, 620px);
}

.complex-promo-banner__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.3s ease-out;
  pointer-events: none;
}

.complex-promo-banner__slide.is-active {
  opacity: 1;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .complex-promo-banner__slide {
    transition-duration: 0.01ms;
  }
}

.complex-promo-banner__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Индикаторы: точки + «N / M», полупрозрачная плашка */
.complex-promo-banner__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 12px;
  background: linear-gradient(to top, rgba(30, 30, 36, 0.55), transparent);
  pointer-events: none;
  line-height: normal;
  box-sizing: border-box;
}

.complex-promo-banner__dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 6px;
}

.complex-promo-banner__dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.15s ease, transform 0.15s ease;
}

.complex-promo-banner__dot.is-active {
  background: rgba(255, 255, 255, 0.92);
  transform: scale(1.15);
}

.complex-promo-banner__counter {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.78);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@keyframes complex-promo-shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}
