/*
 * Генплан таунхаусов ЖК «Джаз» (страница ЖК, makro). Подключается только из
 * local/components/makro/complex/templates/.default/genplan_dzhaz.php.
 * Источник — вёрстка makrostroi/dist/css/style.css; убраны правила для закомментированного
 * в разметке переключателя «Генплан», .slide-genplan, .btn и перетаскивания мышью.
 */

.genplan {
  padding: 70px 0px;
}

.genplan__content {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 10;
}

.genplan__scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.genplan__scroll::-webkit-scrollbar {
  display: none;
}

.genplan__images {
  width: 1112px;
  height: 626px;
  position: relative;
  -ms-flex-negative: 0;
      flex-shrink: 0;
  margin: 0 auto;
}

.genplan__image {
  width: 1112px;
  height: 626px;
}

.genplan__pic1 {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  width: 1112px;
  height: 100%;
  background: #f0f0f0;
  z-index: 51;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 0.5s;
  -o-transition: opacity 0.5s;
  transition: opacity 0.5s;
}

.genplan__pic1.active {
  opacity: 1;
}

.genplan__pic1 picture {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.genplan__pic1 img {
  width: 90%;
  height: auto;
}

.genplan__pic2 {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  width: 1112px;
  height: 100%;
  background: #f0f0f0;
  z-index: 51;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 0.5s;
  -o-transition: opacity 0.5s;
  transition: opacity 0.5s;
}

.genplan__pic2.active {
  opacity: 1;
}

.genplan__pic2 picture {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.genplan__pic2 img {
  width: 90%;
  height: auto;
}

.genplan__svg {
  left: 0;
  position: absolute;
  top: 0;
  z-index: 4;
}

.genplan__svg.svg-mob {
  display: none;
}

.genplan__path {
  -webkit-transition: fill 0.3s;
  -o-transition: fill 0.3s;
  transition: fill 0.3s;
}

.genplan__path.active {
  fill: rgba(12, 39, 118, 0.65);
}

.genplan__tippy {
  cursor: pointer;
  white-space: nowrap;
  position: absolute;
  top: 34%;
  z-index: 30;
  background-color: #fff;
  color: #0c2776;
  border-radius: 38px;
  padding: 12px 11px;
  font-weight: 700;
  font-size: 17px;
  line-height: 78%;
  letter-spacing: -0.03em;
  -webkit-transition: background-color 0.3s, color 0.3s;
  -o-transition: background-color 0.3s, color 0.3s;
  transition: background-color 0.3s, color 0.3s;
}

.genplan__tippy::before {
  content: "";
  position: absolute;
  bottom: -8px;
  -webkit-transform: translate(-50%);
      -ms-transform: translate(-50%);
          transform: translate(-50%);
  left: 50%;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 10px solid #fff;
}

.genplan__tippy.active {
  color: #fff;
  background: #cd7555;
}

.genplan__tippy.active::before {
  content: "";
  border-top: 10px solid #cd7555;
}

.genplan__tippy.tippy1 {
  right: 10%;
}

.genplan__tippy.tippy2 {
  right: 29%;
}

.genplan__tippy.tippy3 {
  right: 48%;
}

.genplan__tippy.tippy4 {
  left: 25%;
}

.genplan__tippy.tippy5 {
  left: 5%;
}

.genplan__buttons {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  gap: 10px 20px;
}

.genplan__buttons .button-blue {
  width: 100%;
  -webkit-box-flex: 1;
      -ms-flex: 1 1 calc(50% - 10px);
          flex: 1 1 calc(50% - 10px);
}

.genplan__buttons .button-blue.active {
  background-color: #272968;
}

/* ===== BLOCK GENPLAN POPUP ===== */
.genplan .block-genplan-popup {
  position: absolute;
  z-index: 50;
  width: 245px;
  top: 25%;
  opacity: 1;
  pointer-events: auto;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 0.3s;
  -o-transition: opacity 0.3s;
  transition: opacity 0.3s;
}

.genplan .block-genplan-popup.active {
  opacity: 1;
  pointer-events: auto;
}

.genplan .block-genplan-popup.popup1 {
  right: 19%;
}

.genplan .block-genplan-popup.popup2 {
  right: 6%;
}

.genplan .block-genplan-popup.popup3 {
  right: 25%;
}

.genplan .block-genplan-popup.popup4 {
  left: 35%;
}

.genplan .block-genplan-popup.popup5 {
  left: 15%;
}

/* ===== CARD APARTMENTS ===== */
.genplan .card-apartments {
  background: #fff;
  border-radius: 6px;
  padding: 15px 20px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 15px;
  position: relative;
}

.genplan .card-apartments__top {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: start;
  gap: 20px;
}

.genplan .card-apartments__titles {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 2px;
}

.genplan .card-apartments__title {
  font-family: var(--second-family);
  font-weight: 500;
  font-size: 16px;
  line-height: 85%;
  letter-spacing: -0.02em;
  color: #050505;
}

.genplan .card-apartments__price {
  font-family: var(--second-family);
  font-weight: 900;
  font-size: 18px;
  line-height: 123%;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #1b53ff;
}

.genplan .card-apartments__tag {
  -webkit-box-flex: 0;
      -ms-flex: 0 0 auto;
          flex: 0 0 auto;
  background: #cd7555;
  border-radius: 2px;
  padding: 3px 5px;
  font-weight: 500;
  font-size: 12px;
  line-height: 123%;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
}

.genplan .card-apartments__image {
  background: #e1e0e0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 3px 0px;
  width: 100%;
  height: auto;
}

.genplan .card-apartments__image img {
  width: 100%;
  height: auto;
}

.genplan .card-apartments__bottom {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: start;
  gap: 15px;
  -webkit-box-flex: 1;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
}

.genplan .card-apartments__bottom ul {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  width: 100%;
  -webkit-box-flex: 1;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
  gap: 7px 10px;
}

.genplan .card-apartments__bottom ul li {
  -webkit-box-flex: 0;
      -ms-flex: 0 0 auto;
          flex: 0 0 auto;
  font-weight: 500;
  font-size: 12px;
  line-height: 85%;
}

/* Планировка таунхауса вытянута в рост: без ограничения карточка выше генплана
   и низ с кнопкой «Подробнее» обрезается прокручиваемым контейнером */
.genplan .card-apartments__image img {
  width: auto;
  max-width: 100%;
  max-height: 190px;
}

/* ===== MEDIA ===== */
@media (max-width: 1112px) {
  .genplan__container {
    padding: 0px 0px 0px 0px;
  }

  .genplan__buttons {
    margin: 0px 15px;
    width: calc(100% - 30px);
  }
}

@media (max-width: 768px) {
  .genplan {
    padding: 50px 0px;
  }

  .genplan__images {
    width: 800px;
    height: 450px;
  }

  .genplan__image {
    width: 800px;
    height: 450px;
  }

  .genplan__pic1 {
    width: 800px;
  }

  .genplan__pic2 {
    width: 800px;
  }

  .genplan__svg.svg-desc {
    display: none;
  }

  .genplan__svg.svg-mob {
    display: block;
  }

  .genplan__tippy::before {
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
  }

  .genplan__tippy.tippy1 {
    right: 9%;
  }

  .genplan__tippy.tippy2 {
    right: 27%;
  }

  .genplan__tippy.tippy3 {
    right: 46%;
  }

  .genplan__tippy.tippy4 {
    left: 23%;
  }

  .genplan__tippy.tippy5 {
    left: 4%;
  }

  .genplan__buttons {
    gap: 10px;
  }

  .genplan__buttons .button-blue {
    -webkit-box-flex: 1;
        -ms-flex: 1 1 calc(50% - 5px);
            flex: 1 1 calc(50% - 5px);
  }

  .genplan .block-genplan-popup {
    top: 10%;
  }

  .genplan .block-genplan-popup.popup1 {
    right: 21%;
  }

  .genplan .block-genplan-popup.popup2 {
    right: 40%;
  }

  .genplan .block-genplan-popup.popup3 {
    right: 14%;
  }

  .genplan .block-genplan-popup.popup4 {
    left: 36%;
  }

  .genplan .block-genplan-popup.popup5 {
    left: 17%;
  }

  .genplan .card-apartments {
    padding: 15px;
  }

  .genplan .card-apartments__image img {
    max-height: 150px;
  }

}

@media (max-width: 550px) {
  .genplan__buttons {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
  }
}