/* ============ Banner slider (Swiper) ============ */
.banner{
    margin-top:20px;
}
/* ============ Banner slider (Swiper) ============ */
.banner__wrap { position: relative; }

.banner__slider .swiper-wrapper { height: auto; }

/* ---------- Слайд ---------- */
/* Фон — картинка на весь слайд: data-bg-desktop / data-bg-mobile,
   подмена — initBgImages() в main.js */
.banner-slide {
  position: relative;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 500px;
  padding: 56px 48px 44px 56px;
  border-radius: 30px;
  overflow: hidden;
  background-color: var(--color-white); /* пока картинка грузится */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.banner-slide__content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin-block: auto;
}

.banner-slide__title {
  font-size: 48px;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.banner-slide__text {
  max-width: 380px;
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--color-gray);
}

.banner-slide__bottom {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  align-items: end;
  padding-right: 140px; /* место под стрелки */
}

/* ---------- Стрелки ---------- */
.banner__arrows {
  position: absolute;
  right: 48px;
  bottom: 44px;
  z-index: 3;
  display: flex;
  gap: 12px;
}

.banner__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: #F0F5F9;
  color: #000;
  transition: color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.banner__arrow:hover {
  color: var(--color-dark);
  box-shadow: 0 6px 20px rgba(31, 41, 51, 0.16);
}
.banner__arrow.is-disabled { opacity: 0.35; pointer-events: none; }
.banner__arrow svg { width: 20px; height: 20px; }

/* ---------- Пагинация: карточки преимуществ ---------- */
.banner__advantages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.banner-advantage { min-width: 0; }

.banner-advantage__card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 10px 24px 24px;
  text-align: left;
  background-color: #FFFFFF66;
  border-radius: 30px;
  overflow: hidden;
  transition: box-shadow 0.2s;
  height: 100%;
}
.banner-advantage.is-active .banner-advantage__card {
    background-color: var(--color-white);
}
.banner-advantage__card:hover {
  box-shadow: 0 6px 20px rgba(31, 41, 51, 0.08);
}

.banner-advantage__title {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.banner-advantage__text {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--color-gray);
}

/* индикатор активного слайда */
.banner-advantage__card::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background-color: var(--color-accent);
  opacity: 0;
  transition: opacity 0.25s;
}
.banner-advantage.is-active .banner-advantage__card::after { opacity: 1; }

/* ---------- Точки (только мобильные) ---------- */
.banner__dots.swiper-pagination {
  --dot-w: 20px;               /* длина неактивной точки */
  --dot-h: 2px;
  --dot-second: var(--color-dark); /* цвет 2-й половины активной точки (на тёмном фоне — white) */

  position: static;
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.banner__dot {
  width: var(--dot-w);
  height: var(--dot-h);
  padding: 0;
  border-radius: 2px;
  background-color: #d6dbdf;
  cursor: pointer;
  transition: background-color 0.25s, width 0.25s;
}

/* активная: в 3 раза длиннее, две половины —
   первая основная (оранжевая), вторая --dot-second */
.banner__dot.is-active {
  width: calc(var(--dot-w) * 4);
  background-color: transparent;
  background-image: linear-gradient(
    90deg,
    var(--color-accent) 0 50%,
    var(--dot-second) 50% 100%
  );
}

/* ---------- Адаптив ---------- */
@media (max-width: 1440px) {
  .banner__advantages { gap: 16px; }
  .banner-advantage__card { padding: 18px 20px 20px; }
  .banner-advantage__title { font-size: 16px; }
  .banner-advantage__text { font-size: 14px; }
}

@media (max-width: 1024px) {
  .banner-slide {
    min-height: 500px; /* уточнить по факту мобильного ассета */
    padding: 24px 20px 28px;
    border-radius: 20px;
    background-position: center bottom;
    background-size: auto;
  }

  .banner-slide__content { margin-block: 0; }
  .banner-slide__title { font-size: 28px; }
  .banner-slide__text { margin-top: 12px; font-size: 15px; }

  .banner-slide__bottom {
    justify-content: flex-start;
    padding: 0;
    gap:30px;
    flex-direction: column;
    align-items: start;
    margin-top: 0;
  }

  /* в мобильном макете карточек нет — остаются точки */
  .banner__advantages { display: none; }

  .banner__arrows { display: none; }
  .banner__dots.swiper-pagination { display: flex; }
}