/* === Residences rebrand: single premium facility (Этап 3, 2026-08-09) ===
   Переработка блока residences под один пансионат (Спасский):
   - 2-колоночная сетка: карточка слева, форма справа
   - hover zoom 1.5x на картинках карусели
   - премиальное оформление карточки (воздух, тени, скругления)
   Overrides styles.css (.residences__inner{display:flex}, .residences__item{flex:0 0 540px})
*/

/* ------------------------------------------------------------------ *
 * 3.4 — Layout: карточка слева, форма справа (grid 2 колонки)
 * ------------------------------------------------------------------ */
.residences__inner {
    display: grid !important;
    grid-template-columns: 1.4fr 1fr !important;   /* карточка шире формы */
    gap: 32px !important;
    align-items: stretch !important;
    /* сбрасываем старые flex-свойства из styles.css */
    align-items: stretch !important;
    justify-content: initial !important;
    flex-wrap: nowrap !important;
}
@media only screen and (max-width: 900px) {
    .residences__inner {
        grid-template-columns: 1fr !important;     /* вертикально на узких */
        gap: 24px !important;
    }
}

/* Карточка Спасского занимает левую колонку полностью */
.residences__inner > .residences__item:not(.residences__item--form) {
    grid-column: 1 !important;
    /* сбрасываем фикс. ширину и margin из styles.css (flex:0 0 540px; margin:50px 0) */
    flex: initial !important;
    margin: 0 !important;
}
/* Форма — правая колонка, центрирование по вертикали */
.residences__item--form {
    grid-column: 2 !important;
    align-self: center !important;
    margin: 0 !important;
}
@media only screen and (max-width: 900px) {
    .residences__item--form {
        grid-column: 1 !important;
    }
}

/* ------------------------------------------------------------------ *
 * 3.5 — Hover zoom 0.5s на картинках карусели (scale 1.5x)
 * ------------------------------------------------------------------ */
.residences__slider {
    overflow: hidden !important;
    border-radius: 8px !important;
}
.residences__sliderImage {
    transition: transform 0.5s ease !important;
    will-change: transform !important;
}
.residences__sliderImage:hover {
    transform: scale(1.5) !important;
}
/* На touch-устройствах hover не срабатывает — базовый вид остаётся */

/* ------------------------------------------------------------------ *
 * 3.7 — Премиальное оформление карточки Спасского
 * ------------------------------------------------------------------ */
.residences__item:not(.residences__item--form) {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(70, 62, 82, 0.08) !important;
    padding: 0 0 24px !important;
    overflow: hidden !important;
    transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}
.residences__item:not(.residences__item--form):hover {
    box-shadow: 0 12px 40px rgba(70, 62, 82, 0.14) !important;
    transform: translateY(-4px) !important;
}
.residences__itemTop {
    border-radius: 12px 12px 0 0 !important;
    overflow: hidden !important;
}
.residences__icons {
    padding: 16px 24px !important;
}
.residences__itemBottom {
    padding: 0 24px !important;
}
.residences__name span {
    font-size: 26px !important;
    color: #463e52 !important;
    font-weight: 600 !important;
}
.residences__text {
    color: #555 !important;
    line-height: 1.6 !important;
}
.residences__icon_price {
    background: transparent !important; border: 2px solid #cb1d71 !important; color: #cb1d71 !important;
    
    font-weight: 600 !important;
}

/* Price button hover cb1d71 */
.residences__icon_price:hover {
    background-color: #cb1d71 !important;
    color: #fff !important;
    border-color: #cb1d71 !important;
}
