/* assets/css/blocks/features-with-screen.css — UPDATED
   Левая колонка растягивается по высоте правой колонки,
   список равномерно распределяется (justify-content: space-between).
*/

.features-with-screen {
  background: #fff;
  color: #111;
  width: 100%;
  box-sizing: border-box;
}

.features-with-screen__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 54px 20px;
  display: grid;
  grid-template-columns: 1fr 420px; /* левая гибкая, правая фикс */
  gap: 48px;
  align-items: stretch; /* <-- важно: колонки будут одинаковой высоты */
  box-sizing: border-box;
  font-family: "MontserratCustom", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Левая колонка занимает всю высоту родителя */
.features-with-screen__left {
  display: flex;
  flex-direction: column;
  /* stretch по высоте через align-items: stretch в grid + display:flex здесь */
}

/* Список: растягиваем по высоте и равномерно распределяем элементы */
.features-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  height: 100%;                 /* заполняет высоту левой колонки */
  justify-content: space-between; /* равномерно распределяет 4 пункта по вертикали */
  gap: 28px;
}

/* Элемент списка — выравниваем иконку и текст */
.features-list__item {
  display: flex;
  gap: 22px;
  align-items: center; /* центрует по общей линии внутри пункта */
}

/* Иконки */
.features-list__icon {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
}

/* Контент */
.features-list__content {
  max-width: 680px;
}
.features-list__title {
  margin: 0 0 8px;
  font-family: "MontserratCustom", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.05;
}
.features-list__text {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.64;
  color: #333;
}

/* Правая колонка — делаем картинку занимать всю высоту колонки */
.features-with-screen__right {
  display: flex;
  align-items: stretch;    /* чтобы картинка могла быть full-height */
  justify-content: center;
}
.features-with-screen__screen {
  width: 100%;
  max-width: 420px;
  height: 100%;            /* <-- картинка растягивается по высоте колонки */
  object-fit: cover;       /* подрезает, если соотношение не совпадает */
  display: block;
  border-radius: 6px;
  box-shadow: 0 18px 46px rgba(0,0,0,0.12);
}

/* Responsive: tablet */
@media (max-width: 1024px) {
  .features-with-screen__inner { grid-template-columns: 1fr 360px; gap: 36px; padding: 42px 18px; }
  .features-with-screen__screen { max-width: 360px; }
}

/* Mobile: stack — убираем растяжение, делаем обычный поток */
@media (max-width: 768px) {
  .features-with-screen__inner { grid-template-columns: 1fr; padding: 28px 14px; gap: 20px; align-items: start; }
  .features-with-screen__left { width: 100%; }
  .features-list { height: auto; justify-content: flex-start; gap: 18px; }
  .features-list__item { align-items: center; }
  .features-list__icon { width: 56px; height: 56px; }
  .features-with-screen__right { order: -1; } /* скрин показываем сверху на мобиле — опционально */
  .features-with-screen__screen { width: 100%; height: auto; max-width: 100%; object-fit: contain; }
}

/* Accessibility focus outline (option) */
.features-list__icon:focus { outline: 3px solid rgba(255,109,61,0.12); outline-offset: 2px; }
