/* Home redesign — mobile first
   Figma: Главная 360 / 768 / 1024 / 1280 / 1440 / 1920
   Blocks: hero + benefits
*/

.bz-home-hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  background-color: var(--bz-bg-prim, #f7f6f1);
  overflow: hidden;
}

.bz-home-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  order: 1;
  /* Figma 360: блок 340px с inset 10, без внутреннего горизонтального padding */
  width: calc(100% - 20px);
  max-width: 340px;
  margin: 0 auto;
  padding: 65px 0 0;
  box-sizing: border-box;
}

.bz-home-hero__title {
  margin: 0;
  width: 100%;
  color: var(--bz-b-100, #2d2c2c);
  font-family: Inter, sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-align: center;
  text-transform: uppercase;
}

.bz-home-hero__subtitle {
  margin: 0;
  max-width: 295px;
  color: #7e7d7b;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-align: center;
}

.bz-home-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.bz-home-hero__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  padding: 10px 20px;
  border-radius: 40px;
  box-sizing: border-box;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.bz-home-hero__btn--primary {
  order: 1;
  background-color: var(--bz-prim, #f27e00);
  border: 1px solid var(--bz-prim, #f27e00);
  color: var(--bz-w-100, #ffffff);
}

.bz-home-hero__btn--primary:hover,
.bz-home-hero__btn--primary:focus {
  background-color: var(--bz-prim-hov, #ff9521);
  border-color: var(--bz-prim-hov, #ff9521);
  color: var(--bz-w-100, #ffffff);
  text-decoration: none;
}

.bz-home-hero__btn--secondary {
  order: 2;
  background-color: var(--bz-w-100, #ffffff);
  border: 1px solid var(--bz-divider, #cecece);
  color: var(--bz-b-100, #2d2c2c);
}

.bz-home-hero__btn--secondary:hover,
.bz-home-hero__btn--secondary:focus {
  border-color: var(--bz-prim, #f27e00);
  color: var(--bz-b-100, #2d2c2c);
  text-decoration: none;
}

.bz-home-hero__media {
  order: 2;
  width: 100%;
  margin-top: 40px;
}

.bz-home-hero__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 360 / 275;
  object-fit: cover;
}

/* Benefits — mobile: после фото, вертикальный список */
.bz-home-benefits {
  order: 3;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  background-color: var(--bz-bg-prim, #f7f6f1);
}

.bz-home-benefits__item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--bz-divider, #cecece);
  box-sizing: border-box;
}

.bz-home-benefits__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background-color: #ffffff;
  border: 1px solid #edeae7;
  border-radius: 40px;
  box-sizing: border-box;
}

.bz-home-benefits__icon--plain {
  background: transparent;
  border: 0;
  padding: 0;
}

.bz-home-benefits__icon img {
  display: block;
  max-width: 100%;
  height: auto;
}

.bz-home-benefits__icon--plain img {
  width: 40px;
  height: 40px;
}

.bz-home-benefits__text {
  color: var(--bz-b-100, #2d2c2c);
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.bz-home-benefits__br {
  display: none;
}

/* Tablet — Figma: Главная 768
   порядок: контент → преимущества → фото */
@media (min-width: 768px) {
  .bz-home-hero__content {
    width: 100%;
    max-width: 529px;
    padding: 91px 20px 0;
  }

  .bz-home-hero__title {
    max-width: 499px;
    font-size: 32px;
    line-height: 1.3;
    letter-spacing: 0;
  }

  .bz-home-hero__subtitle {
    letter-spacing: 0;
  }

  .bz-home-hero__actions {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: auto;
  }
  .bz-home-hero__btn:not(.bz-home-hero__btn--secondary){
    border: 0;
  }
  .bz-home-hero__btn {
    /*height: 68px;*/
    width: auto;
    flex: 0 0 auto;
  }

  .bz-home-hero__btn--secondary {
    order: 1;
    width: 260px;
    
    white-space:nowrap;
  }

  .bz-home-hero__btn--primary {
    order: 2;
    width: 260px;
  }

  .bz-home-hero__media {
    order: 3;
    margin-top: 0;
  }

  .bz-home-hero__image {
    aspect-ratio: 768 / 432;
  }

  .bz-home-benefits {
    order: 2;
    flex-direction: row;
    align-items: stretch;
    margin-top: 90px;
    border-top: 1px solid var(--bz-divider, #cecece);
    border-bottom: 1px solid var(--bz-divider, #cecece);
  }

  .bz-home-benefits__item {
    flex: 1 1 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    height: 160px;
    padding: 20px;
    border-bottom: 0;
  }

  .bz-home-benefits__item + .bz-home-benefits__item {
    border-left: 1px solid var(--bz-divider, #cecece);
  }

  .bz-home-benefits__text {
    white-space: normal;
  }

  /* Figma 1440: ширины 190 / 172 / 137 — средний иначе в 1 строку и «проседает» */
  .bz-home-benefits__item:nth-child(1) .bz-home-benefits__text {
    max-width: 190px;
  }

  .bz-home-benefits__item:nth-child(2) .bz-home-benefits__text {
    max-width: 172px;
  }

  .bz-home-benefits__item:nth-child(3) .bz-home-benefits__text {
    max-width: 137px;
  }

  .bz-home-benefits__br {
    display: inline;
  }

  /* Иконки-кружки крупнее (Figma 768: круг ~44px, паддинг-топ 21) */
  .bz-home-benefits__item {
    padding-top: 21px;
    padding-bottom: 20px;
  }

  .bz-home-benefits__icon {
    width: 44px;
    height: 44px;
  }
}

/* Figma: Главная 1024 */
@media (min-width: 1024px) {
  .bz-home-hero__content {
    max-width: 528px;
    padding: 106px 20px 0;
  }

  .bz-home-hero__title {
    max-width: 528px;
    font-size: 42px;
    line-height: 1;
    letter-spacing: -0.04em;
  }

  .bz-home-benefits {
    margin-top: 111px;
  }

  .bz-home-hero__image {
    aspect-ratio: 1024 / 576;
  }
}

/* Figma: Главная 1280 — две колонки: left = content+benefits, right = media */
@media (min-width: 1280px) {
  .bz-home-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    min-height: 588px;
    border-bottom: 1px solid var(--bz-divider, #cecece);
  }

  .bz-home-hero__content {
    grid-column: 1;
    grid-row: 1;
    order: unset;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 109px 48px 40px;
    box-sizing: border-box;
    border-right: 1px solid var(--bz-divider, #cecece);
  }

  .bz-home-hero__title {
    max-width: 544px;
    font-size: 42px;
    line-height: 1;
  }

  .bz-home-benefits {
    grid-column: 1;
    grid-row: 2;
    order: unset;
    margin-top: 0;
    border-top: 1px solid var(--bz-divider, #cecece);
    border-bottom: 0;
    border-right: 1px solid var(--bz-divider, #cecece);
  }

  .bz-home-hero__media {
    grid-column: 2;
    grid-row: 1 / -1;
    order: unset;
    width: auto;
    margin-top: 0;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    position: relative;
  }

  /* Высота медиа-колонки задаётся растяжением grid-строки — Safari < 15 не
     резолвит от неё height: 100%, поэтому <picture> позиционируем абсолютно
     внутри padding 15px. */
  .bz-home-hero__media picture {
    position: absolute;
    top: 15px;
    right: 15px;
    bottom: 15px;
    left: 15px;
    display: flex;
  }

  .bz-home-hero__image {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }
}

/* Figma: Главная 1440 */
@media (min-width: 1440px) {
  .bz-home-hero {
    min-height: 698px;
  }

  .bz-home-hero__content {
    padding: 152px 30px 40px;
  }

  .bz-home-hero__title {
    max-width: 660px;
    font-size: 54px;
    line-height: 1;
    letter-spacing: -0.04em;
  }
}

/* Figma: Главная 1920 */
@media (min-width: 1920px) {
  .bz-home-hero {
    min-height: 828px;
  }

  .bz-home-hero__content {
    padding: 216px 87px 40px;
  }

  .bz-home-hero__title {
    max-width: 786px;
  }
}

/* Safari < 15: нет aspect-ratio — пропорции через padding-хак на <picture> */
@supports not (aspect-ratio: 1 / 1) {
  .bz-home-hero__media picture {
    position: relative;
    display: block;
  }

  .bz-home-hero__media picture::before {
    content: '';
    display: block;
    padding-top: 76.3889%; /* 275 / 360 */
  }

  .bz-home-hero__image {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
  }

  @media (min-width: 768px) {
    .bz-home-hero__media picture::before {
      padding-top: 56.25%; /* 432 / 768, 576 / 1024 */
    }
  }

  /* с 1280 картинка тянется на высоту колонки — хак не нужен */
  @media (min-width: 1280px) {
    .bz-home-hero__media picture {
      position: absolute;
      display: flex;
    }

    .bz-home-hero__media picture::before {
      content: none;
    }

    .bz-home-hero__image {
      position: static;
    }
  }
}
