/* =========================================================
   lu-photo-split — фотокарточка с горизонтальной галереей.
   Слева — главное изображение, справа — миниатюры столбиком.
   Правая колонка всегда совпадает по высоте с главным,
   низ галереи ровный. Если миниатюр нет — главное держит
   свою высоту, правое место не схлопывается.

   Самостоятельный блок: подключать ОДНИМ файлом, отдельно
   от lu-photo-cards.css. Базовый вид карточки (серая плашка,
   светлый inner, заголовок, текст, кнопка) повторяет
   lu-photo-cards, чтобы блоки выглядели одинаково.
   ========================================================= */

/* Раскладка карточек в ряд (как в базовом блоке) */
.lu-photo-split-cards{
  margin-bottom: 0;
}

@media (min-width: 768px){
  .lu-photo-split-cards{
    display: flex;
    flex-wrap: wrap;
  }

  .lu-photo-split-cards:before,
  .lu-photo-split-cards:after{
    display: none;
  }

  .lu-photo-split-cards > [class*="col-"]{
    float: none;
    display: flex;
  }
}

/* Внешняя серая плашка */
.lu-photo-split{
  position: relative;
  box-sizing: border-box;
  width: 100%;
  margin-bottom: var(--lu-card-margin, 20px);
  padding: 18px;
  background: var(--lu-card-bg, #f5f5f5);
  border-radius: var(--lu-card-radius, 28px);
  box-shadow: 0 10px 24px rgba(0,0,0,.04);
  overflow: hidden;
}

.lu-photo-split::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.24) 0%, rgba(255,255,255,0) 42%);
  z-index: 0;
}

.lu-photo-split > *{
  position: relative;
  z-index: 1;
}

@media (min-width: 768px){
  .lu-photo-split{
    height: calc(100% - var(--lu-card-margin, 20px));
    display: flex;
    flex-direction: column;
  }
}

/* Внутренняя светлая плашка */
.lu-photo-split__inner{
  --lu-program-head-color: var(--lu-sage, #8fa878);

  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;

  padding: 18px 20px;
  background: #f7f7f5;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

/* Заголовок */
.lu-photo-split__head{
  margin-bottom: 18px;
}

/* Собственный жёсткий стиль заголовка карточки — по образцу
   .lu-program__title у родителя. !important перебивает общий
   кракеновский h4 (в т.ч. h4.content-text), чтобы заголовок не
   зависел от инлайновых стилей и не «плыл» по размеру/отступам. */
.lu-photo-split .lu-program__title,
.text-content .lu-photo-split .lu-program__title{
  font-size: 26px !important;
  line-height: 1.12 !important;
  margin: 0 !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  color: #111 !important;
}

/* =========================================================
   Галерея: грид из двух колонок.
   Высоту строки задаёт ЛЕВАЯ колонка (главное по aspect-ratio),
   правая колонка растягивается на эту же высоту (align-items:
   stretch) и делит её поровну между миниатюрами.
   ========================================================= */
.lu-photo-split__gallery{
  display: grid;
  grid-template-columns: 1.32fr 1fr;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 18px;
}

/* Общая рамка-кадр */
.lu-photo-split__frame{
  display: block;
  position: relative;
  overflow: hidden;
  line-height: 0;
  text-decoration: none !important;
  cursor: zoom-in;
  background: #d9ddd4;
  transform: translateZ(0);
}

.lu-photo-split__frame img{
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center center;
  margin: 0 !important;
  margin-bottom: 0 !important;
  border-radius: 0;
  transition: transform .35s ease;
  transform: translateZ(0) scale(1);
}

.lu-photo-split__frame:hover img{
  transform: translateZ(0) scale(1.02);
}

/* Главное — задаёт высоту строки. aspect-ratio для современных
   браузеров; padding-top как запасной вариант для старых. */
.lu-photo-split__main{
  position: relative;
  border-radius: 20px;
  aspect-ratio: 1 / 1;
}

/* Запасной механизм высоты для браузеров без aspect-ratio */
@supports not (aspect-ratio: 1 / 1){
  .lu-photo-split__main{
    padding-top: 100%;
  }
}

/* Правая колонка миниатюр — растягивается на высоту строки
   (= высоте главного) и делится поровну на равные кадры. */
.lu-photo-split__thumbs{
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  min-height: 0;
}

.lu-photo-split__thumb{
  position: relative;
  min-height: 0;
  border-radius: 16px;
}

/* Текстовая часть */
.lu-photo-split__body{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.lu-photo-split__text{
  font-size: 15px;
  line-height: 1.45;
  color: #111;
}

.lu-photo-split__text p{
  margin: 0 0 12px;
}

.lu-photo-split__text p:last-child{
  margin-bottom: 0;
}

/* Кнопка */
.lu-photo-split__actions{
  margin-top: auto;
  padding-top: 18px;
}

.lu-photo-split__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--lu-sage, #8fa878);
  color: #fff !important;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .2s ease, transform .2s ease;
}

.lu-photo-split__btn:hover,
.lu-photo-split__btn:focus{
  color: #fff !important;
  text-decoration: none !important;
  background: #7d9668;
  transform: translateY(-1px);
}

/* =========================================================
   Подвал карточки: цена и/или кнопка.
   Отделён тонкой чертой — по образцу секции «Стоимость»
   у родителя lu-program (.lu-program__section--price).
   Режимы:
     — только цена (модификатор --price-only): ровный
       фиксированный отступ от текста, к низу не прижимается;
     — только кнопка (как раньше, через .lu-photo-split__actions);
     — цена + кнопка (модификатор --row: на ПК в одну строку).
   ========================================================= */
.lu-photo-split__footer{
  margin-top: auto;            /* прижать к низу карточки */
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,.08);

  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Когда в подвале только цена (нет кнопки) — не прижимаем к низу,
   держим ровный фиксированный отступ от текста. */
.lu-photo-split__footer--price-only{
  margin-top: auto;       /* прижимаем к низу карточки */
  padding-top: 18px;
}

/* Гарантированный воздух между текстом и линией, когда места мало */
.lu-photo-split__footer--price-only .lu-photo-split__price{
  margin-top: 0;
}
.lu-photo-split__body > .lu-photo-split__text{
  margin-bottom: 18px;
}

/* Когда в подвале и цена, и кнопка — на ПК ставим в строку */
@media (min-width: 768px){
  .lu-photo-split__footer--row{
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Кнопка внутри подвала не прижимается к низу сама — это делает __footer */
.lu-photo-split__footer .lu-photo-split__actions{
  margin-top: 0;
  padding-top: 0;
}

/* --- Плашка цены (паттерн .lu-program__section--price) --- */
.lu-photo-split__price{
  /* Водный акцент по умолчанию. Переопределить на карточке:
     style="--lu-photo-split-price-color: #7BA77F" */
  --lu-photo-split-price-color: var(--lu-lake, #4A8AA5);
}

.lu-photo-split__price-row{
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Кружок с символом рубля — в размер иконок highlights (40×40) */
.lu-photo-split__price-icon{
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--lu-photo-split-price-color, #355F73);
  color: #fff;

  font-size: 22px;
  line-height: 1;
  font-weight: 700;
}

/* Если вместо текстового знака — SVG из спрайта */
.lu-photo-split__price-icon .lu-icon{
  width: 22px;
  height: 22px;
  color: currentColor;
  fill: currentColor;
}

.lu-photo-split__price-body{
  flex: 1 1 auto;
  min-width: 0;
}

/* Мелкий аптеркейс-заголовок «Стоимость» (span, не заголовок —
   чтобы не плодить лишних h-тегов внутри карточки) */
.lu-photo-split__price-label{
  display: block;
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(17,17,17,.55);
}

/* Крупная сумма */
.lu-photo-split__price-value{
  display: block;
  margin-top: 2px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  color: #111;
}

/* Единицы (/ 60 мин) — мельче и обычным весом */
.lu-photo-split__price-unit{
  font-size: 14px;
  font-weight: 500;
  color: rgba(17,17,17,.65);
  margin-left: 4px;
}

/* Адаптив */
@media (max-width: 767px){
  .lu-photo-split{
    padding: 14px;
    border-radius: 24px;
  }

  .lu-photo-split__inner{
    padding: 14px 16px;
    border-radius: 16px;
  }

  .lu-photo-split__head{
    margin-bottom: 14px;
  }

  .lu-photo-split .lu-program__title,
  .text-content .lu-photo-split .lu-program__title{
    font-size: 22px !important;
    margin: 0 !important;
  }

  .lu-photo-split__gallery{
    gap: 8px;
    margin-bottom: 16px;
  }

  .lu-photo-split__main{
    border-radius: 18px;
  }

  .lu-photo-split__thumbs{
    gap: 8px;
  }

  .lu-photo-split__thumb{
    border-radius: 14px;
  }

  .lu-photo-split__text{
    font-size: 15px;
    line-height: 1.45;
  }

  .lu-photo-split__actions{
    padding-top: 16px;
  }

  /* Кнопка по ширине содержимого, прижата влево (а не на весь экран) */
  .lu-photo-split__btn{
    width: auto;
    align-self: flex-start;
  }

  /* Подвал и плашка цены */
  .lu-photo-split__footer{
    padding-top: 14px;
    gap: 12px;
  }

  .lu-photo-split__footer--price-only{
    margin-top: auto;
    padding-top: 16px;
  }

  .lu-photo-split__price-row{
    gap: 12px;
  }

  .lu-photo-split__price-icon{
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .lu-photo-split__price-icon .lu-icon{
    width: 20px;
    height: 20px;
  }

  .lu-photo-split__price-value{
    font-size: 18px;
  }

  .lu-photo-split__price-unit{
    font-size: 13px;
  }
}