/* Базовые стили: по умолчанию сетка 2x2 (десктоп и планшет) */
.rooms {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    padding: 0 1rem;
max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.room-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* Ссылка на всю карточку */
.room-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.room-card-link:visited .room-title {
    color: inherit;
}

/* Убираем синий цвет при клике на мобильных */
.room-card-link:active,
.room-card-link:focus {
    outline: none;
}

.room-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.room-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.room-content .room-button {
    pointer-events: auto;
}

.room-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

.room-placeholder {
    width: 100%;
    height: 200px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.rooms-no-results {
    text-align: center;
    margin: 2rem 0;
    padding: 0 1rem;
}

/* Стили для десктопа - сетка 2x2 */
@media (min-width: 769px) {
    .rooms {
        grid-template-columns: repeat(2, 1fr);
max-width: 1400px;
    }
    
    .room-card {
        flex-direction: row;
        align-items: stretch;
        min-height: 260px;
    }
    
    /* Картинка занимает левую половину карточки и масштабируется под неё */
    .room-card img {
        flex: 0 0 50%;
        width: 50%;
        height: 100%;
        min-height: 260px;
        object-fit: cover;
    }

    .room-content {
        flex: 1 1 50%;
    }
}

/* Стили для мобильных - 1 колонка, вертикальная карточка */
@media (max-width: 768px) {
    .rooms {
        grid-template-columns: 1fr;
    }

    .room-card {
        flex-direction: column;
        align-items: stretch;
    }

    .room-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }
}

