/* rooms-list-container */
.rooms-list-container {
    margin-top: 40px;
    margin-bottom: 40px;
}

.rooms-list-container .main-h2 {
    font-family: "Jost", Arial, sans-serif;
    font-size: 36px;
    font-weight: 500;
    color: #2e2e30;
    margin-bottom: 50px;
    text-align: center;
}

/* Основной контейнер для списка комнат */
.rooms-list {
    position: relative;
    width: 100%;
}

/* Элемент комнаты */
.room-item {
    margin-bottom: 100px;
    position: relative;
    min-height: 500px;
}

.room-item:last-child {
    margin-bottom: 60px;
}

/* Контейнер строки - ограничиваем ширину */
.room-item .container {
    position: relative;
    height: 500px;
    max-width: 1400px; /* Ограничиваем максимальную ширину */
    margin: 0 auto;
    padding: 0 15px;
}

.room-item .row {
    display: flex;
    align-items: flex-start;
    height: 100%;
    position: relative;
    margin: 0 -15px;
}

/* Текстовый блок */
.room-text {
    background-color: #f5f5f5;
    color: #2e2e30;
    width: calc(50% + 80px); /* Учитываем смещение */
    max-width: 763px; /* 683px + 80px */
    padding: 72px 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 500px;
    box-sizing: border-box;
    z-index: 2;
    position: absolute;
    top: 0;
    flex-direction: column;
}

/* Для четных элементов (текст слева) */
.room-item:nth-child(odd) .room-text {
    left: 15px; /* Отступ от контейнера */
    text-align: left;
    padding-right: 180px; /* Компенсируем смещение */
}

/* Для нечетных элементов (текст справа) */
.room-item:nth-child(even) .room-text {
    right: 15px; /* Отступ от контейнера */
    text-align: right;
    padding-left: 180px; /* Компенсируем смещение */
}

/* Заголовок комнаты */
.room-title {
    font-family: "Jost", Arial, sans-serif;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 500;
    color: #2e2e30;
    width: 100%;
    margin-bottom: 20px;
}

.room-title a {
    color: #2e2e30;
    text-decoration: none;
    transition: color 0.3s ease;
}

.room-title a:hover {
    color: #666;
}

/* Текст превью */
.room-preview {
    font-family: "Jost", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    width: 100%;
    margin-bottom: 30px;
}

/* Цена */
.price-from {
    font-family: "Jost", Arial, sans-serif;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 600;
    color: #2e2e30;
    width: 100%;
    margin-bottom: 30px;
}

/* Кнопки действий */
.room-actions {
    width: 100%;
    margin-top: 20px;
}

.room-actions .d-flex {
    display: flex;
    gap: 15px;
}

.room-item:nth-child(even) .room-actions .d-flex {
    justify-content: flex-end;
}

.room-actions .btn {
    font-family: "Jost", Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 25px;
    border: 1px solid #2e2e30;
    background: #2e2e30;
    color: #fff;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.room-actions .btn:hover {
    background: #fff;
    color: #2e2e30;
    border-color: #2e2e30;
}

/* Блок с изображением - исправлено позиционирование */
.room-image {
    position: absolute;
    top: 0;
    height: 500px;
    width: calc(50% + 80px); /* 50% + смещение 80px */
    max-width: 800px;
    z-index: 3;
    overflow: hidden;
}

/* Для четных элементов (картинка справа) */
.room-item:nth-child(odd) .room-image {
    left: calc(50% - 80px); /* Смещение влево на 80px от центра */
    right: auto;
    padding: 0;
}

/* Для нечетных элементов (картинка слева) */
.room-item:nth-child(even) .room-image {
    left: auto;
    right: calc(50% - 80px); /* Смещение вправо на 80px от центра */
    padding: 0;
}

.room-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.room-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Заглушка для отсутствующего изображения */
.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Jost", Arial, sans-serif;
    font-size: 16px;
    color: #fff;
    background: #666;
}

/* Иконочный шрифт */
@font-face {
    font-family: 'iconfont';
    src: url('/bitrix/fonts/iconfont.eot');
    src: url('/bitrix/fonts/iconfont.eot?#iefix') format('embedded-opentype'),
         url('/bitrix/fonts/iconfont.woff2') format('woff2'),
         url('/bitrix/fonts/iconfont.woff') format('woff'),
         url('/bitrix/fonts/iconfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Определение иконок */
.icon-square_32:before {
    content: "\EBD0";
    font-family: 'iconfont' !important;
}

.icon-person-14_24:before {
    content: "\EBBC";
    font-family: 'iconfont' !important;
}

.icon-bed_32:before {
    content: "\EBA4";
    font-family: 'iconfont' !important;
}

.icon:before {
    font-family: "iconfont";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-style: normal;
    font-variant: normal;
    font-weight: 400;
    text-decoration: none;
    text-transform: none;
    line-height: 1;
    letter-spacing: 0;
    text-rendering: auto;
}

/* Свойства поверх изображения с иконками - ДЕСКТОП - ИКОНКИ И ЗНАЧЕНИЯ В ОДНУ ЛИНИЮ */
.image-properties {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Для четных элементов (картинка справа) */
.room-item:nth-child(odd) .image-properties {
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: 0;
}

/* Для нечетных элементов (картинка слева) */
.room-item:nth-child(even) .image-properties {
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: auto;
}

.properties-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 30px;
}

.image-property-item {
    flex: 1;
    text-align: center;
    padding: 0 15px;
    display: flex;
    flex-direction: row; /* Изменено с column на row */
    align-items: center; /* Выравнивание по центру по вертикали */
    justify-content: center; /* Центрирование по горизонтали */
    gap: 15px; /* Расстояние между иконкой и текстом */
    position: relative;
}

/* Иконки свойств через псевдоэлементы - в одну линию с текстом */
.image-property-item:before {
    font-family: 'iconfont';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-style: normal;
    font-variant: normal;
    font-weight: 400;
    text-decoration: none;
    text-transform: none;
    line-height: 1;
    letter-spacing: 0;
    text-rendering: auto;
    margin-bottom: 0; /* Убрано, так как теперь горизонтально */
    padding: 8px;
    font-size: 31px;
    border: 1px solid #fff;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0; /* Запрещаем сжатие иконки */
}

/* Специфичные стили для разных иконок */
.image-property-item.card__feature-person:before {
    padding: 11px;
    font-size: 25px;
}

.image-property-item.card__feature--square:before,
.image-property-item.card__feature--bed:before {
    padding: 8px;
    font-size: 31px;
}

.property-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Выравнивание текста по левому краю */
    text-align: left;
    flex-grow: 1;
}

.image-property-item .property-value {
    font-family: "Jost", Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    display: block;
    margin: 0 0 3px 0; /* Убраны верхние/нижние отступы */
    color: #fff;
    line-height: 1.2;
}

.image-property-item small {
    font-family: "Jost", Arial, sans-serif;
    font-size: 12px;
    opacity: 0.8;
    display: block;
    color: rgba(255, 255, 255, 0.9);
    max-width: 120px;
    line-height: 1.3;
}

/* Пагинация */
.rooms-list-container .navigation {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

/* Ссылка "Все номера" */
.link-all-rooms {
    display: inline-block;
    font-family: "Jost", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 400;
    text-decoration: none;
    letter-spacing: 0.03em;
    color: #666;
    margin-top: 40px;
    float: right;
    transition: color 0.4s ease;
    position: relative;
    overflow: hidden;
}

.link-all-rooms::after {
    display: block;
    width: 55%;
    height: 1px;
    margin-top: 10px;
    background-color: currentColor;
    border-bottom: 1px solid currentColor;
    transition: width 0.4s ease;
    content: "";
}

.link-all-rooms:hover::after {
    width: 100%;
}

.link-all-rooms:hover {
    color: #2e2e30;
}

/* Адаптивность - большие экраны */
@media (max-width: 1400px) {
    .room-item .container {
        max-width: 1200px;
    }
    
    .room-text {
        width: calc(50% + 60px);
        max-width: 723px; /* 663px + 60px */
        padding: 60px 80px;
    }
    
    .room-item:nth-child(odd) .room-text {
        padding-right: 140px;
    }
    
    .room-item:nth-child(even) .room-text {
        padding-left: 140px;
    }
    
    .room-image {
        width: calc(50% + 60px);
        max-width: 760px;
    }
    
    .room-item:nth-child(odd) .room-image {
        left: calc(50% - 60px);
    }
    
    .room-item:nth-child(even) .room-image {
        right: calc(50% - 60px);
    }
    
    .image-properties {
        max-width: 760px;
        padding: 15px 25px;
    }
    
    .image-property-item {
        gap: 12px;
    }
    
    .image-property-item:before {
        font-size: 28px;
        padding: 7px;
    }
    
    .image-property-item.card__feature-person:before {
        font-size: 23px;
        padding: 10px;
    }
    
    .image-property-item .property-value {
        font-size: 16px;
    }
    
    .image-property-item small {
        font-size: 11px;
    }
}

@media (max-width: 1200px) {
    .room-item .container {
        max-width: 100%;
    }
    
    .room-text {
        padding: 50px 60px;
        max-width: 683px;
    }
    
    .room-item:nth-child(odd) .room-text {
        padding-right: 120px;
    }
    
    .room-item:nth-child(even) .room-text {
        padding-left: 120px;
    }
    
    .room-image {
        width: calc(50% + 50px);
        max-width: 700px;
        height: 450px;
    }
    
    .room-item:nth-child(odd) .room-image {
        left: calc(50% - 50px);
    }
    
    .room-item:nth-child(even) .room-image {
        right: calc(50% - 50px);
    }
    
    .room-item .container,
    .room-text {
        height: 450px;
    }
    
    .room-item {
        min-height: 450px;
    }
    
    .image-properties {
        max-width: 700px;
        padding: 15px 20px;
    }
    
    .properties-container {
        gap: 15px;
    }
    
    .image-property-item {
        padding: 0 10px;
        gap: 10px;
    }
    
    .image-property-item:before {
        font-size: 26px;
        padding: 6px;
    }
    
    .image-property-item.card__feature-person:before {
        font-size: 22px;
        padding: 9px;
    }
    
    .image-property-item .property-value {
        font-size: 15px;
    }
    
    .image-property-item small {
        font-size: 11px;
        max-width: 100px;
    }
}

/* ПЛАНШЕТНАЯ ВЕРСИЯ (991px и меньше) */
@media (max-width: 991px) {
    .room-item .container {
        height: auto;
        min-height: auto;
        padding: 0;
    }
    
    .room-item .row {
        flex-direction: column;
        height: auto;
        margin: 0;
    }
    
    .room-text {
        position: static;
        width: 100%;
        max-width: 100%;
        height: auto;
        padding: 40px 30px !important;
        margin: 0 0 0 0;
        order: 2;
        text-align: center !important;
    }
    
    .room-item:nth-child(odd) .room-text,
    .room-item:nth-child(even) .room-text {
        left: auto;
        right: auto;
        padding: 40px 30px !important;
    }
    
    .room-image {
        position: static;
        width: 100%;
        max-width: 100%;
        height: 400px;
        order: 1;
        margin-bottom: 0;
    }
    
    .room-item:nth-child(odd) .room-image,
    .room-item:nth-child(even) .room-image {
        left: auto;
        right: auto;
    }
    
    .room-title,
    .room-preview,
    .price-from {
        text-align: center !important;
    }
    
    .room-actions .d-flex {
        justify-content: center !important;
    }
    
    /* Адаптивность для свойств с иконками на планшетах - ГОРИЗОНТАЛЬНО */
    .image-properties {
        position: static;
        width: 100%;
        max-width: 100%;
        margin: 0;
        background: rgba(0, 0, 0, 0.75);
        color: white;
        padding: 15px 20px;
        border-radius: 0;
    }
    
    .room-item:nth-child(odd) .image-properties,
    .room-item:nth-child(even) .image-properties {
        left: auto;
        right: auto;
        margin: 0;
    }
    
    .properties-container {
        gap: 15px;
    }
    
    .image-property-item {
        padding: 0 10px;
        gap: 10px;
        flex-direction: row; /* Сохраняем горизонтальное расположение */
    }
    
    .image-property-item:before {
        margin-bottom: 0;
        font-size: 24px;
        padding: 6px;
        flex-shrink: 0;
    }
    
    .image-property-item.card__feature-person:before {
        font-size: 20px;
        padding: 8px;
    }
    
    .property-content {
        align-items: flex-start;
        text-align: left;
    }
    
    .image-property-item .property-value {
        font-size: 15px;
        margin: 0 0 2px 0;
    }
    
    .image-property-item small {
        font-size: 11px;
        max-width: 100px;
    }
}

/* МОБИЛЬНАЯ ВЕРСИЯ (767px и меньше) */
@media (max-width: 767px) {
    .rooms-list-container .main-h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .room-text {
        padding: 30px 20px !important;
    }
    
    .room-title {
        font-size: 24px;
    }
    
    .room-preview {
        font-size: 15px;
    }
    
    .price-from {
        font-size: 18px;
    }
    
    .room-image {
        height: 350px;
    }
    
    .room-actions .btn {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .link-all-rooms {
        float: none;
        text-align: center;
        display: block;
        margin: 40px auto 0;
    }
    
    /* Адаптивность для свойств на мобильных - ГОРИЗОНТАЛЬНО В ОДНУ СТРОКУ */
    .image-properties {
        padding: 12px 15px;
    }
    
    .properties-container {
        flex-direction: row; /* Сохраняем горизонтальное расположение */
        gap: 10px;
    }
    
    .image-property-item {
        flex-direction: row;
        text-align: left;
        padding: 0 5px;
        gap: 8px;
    }
    
    .image-property-item:before {
        margin-right: 0;
        margin-bottom: 0;
        font-size: 20px;
        padding: 4px;
        flex-shrink: 0;
    }
    
    .image-property-item.card__feature-person:before {
        font-size: 18px;
        padding: 6px;
    }
    
    .property-content {
        align-items: flex-start;
        text-align: left;
    }
    
    .image-property-item .property-value {
        font-size: 14px;
        margin: 0;
        white-space: nowrap; /* Запрещаем перенос текста */
    }
    
    .image-property-item small {
        display: none; /* Скрываем описание на мобильных для экономии места */
    }
}

/* МАЛЕНЬКИЕ МОБИЛЬНЫЕ (575px и меньше) */
@media (max-width: 575px) {
    .room-item {
        margin-bottom: 60px;
    }
    
    .room-image {
        height: 300px;
    }
    
    .room-actions .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .room-actions .btn {
        width: 200px;
    }
    
    /* Адаптивность для свойств на маленьких мобильных - ВЕРТИКАЛЬНО */
    .image-properties {
        padding: 10px 12px;
    }
    
    .properties-container {
        flex-direction: column; /* На очень маленьких экранах переходим на вертикаль */
        gap: 8px;
    }
    
    .image-property-item {
        flex-direction: row;
        text-align: left;
        padding: 5px 0;
        gap: 10px;
        width: 100%;
        justify-content: flex-start;
    }
    
    .image-property-item:before {
        margin-right: 0;
        font-size: 18px;
        padding: 3px;
    }
    
    .image-property-item.card__feature-person:before {
        font-size: 16px;
        padding: 5px;
    }
    
    .image-property-item .property-value {
        font-size: 14px;
    }
    
    .image-property-item small {
        display: none;
    }
}

/* ОЧЕНЬ МАЛЕНЬКИЕ МОБИЛЬНЫЕ (375px и меньше) */
@media (max-width: 375px) {
    .room-image {
        height: 250px;
    }
    
    .image-properties {
        padding: 8px 10px;
    }
    
    .image-property-item {
        padding: 4px 0;
        gap: 8px;
    }
    
    .image-property-item:before {
        font-size: 16px;
        padding: 2px;
    }
    
    .image-property-item.card__feature-person:before {
        font-size: 14px;
        padding: 4px;
    }
    
    .image-property-item .property-value {
        font-size: 13px;
    }
}