/* --- Стили для карточек с видео --- */

.video-card {
    cursor: pointer; /* Показываем, что на карточку можно нажать */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Делаем так, чтобы видео заполняло контейнер, как и картинки */
.realestate_img video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Самое важное свойство! */
}


/* --- Стили для модального окна плеера --- */

.video-player-modal {
    display: none; /* По умолчанию скрыто */
    position: fixed; /* Поверх всего контента */
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Полупрозрачный фон */
    
    /* Центрируем содержимое по вертикали и горизонтали */
    align-items: center;
    justify-content: center;
}

.video-player-modal .modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px; /* Ограничиваем максимальную ширину плеера */
    height: auto;
    max-height: 90vh; /* И максимальную высоту */
}

/* Кнопка закрытия */
.video-player-modal .close-button {
    position: absolute;
    top: -40px; /* Располагаем над плеером */
    right: 0;
    font-size: 3rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.video-player-modal .close-button:hover {
    opacity: 1;
}

/* Адаптивность для мобильных */
@media screen and (max-width: 767px) {
    .video-player-modal .close-button {
        top: 15px; /* На мобильных размещаем внутри окна */
        right: 15px;
        font-size: 2rem;
        z-index: 1001; /* Поверх видео */
        color: #000;
        background-color: rgba(255, 255, 255, 0.7);
        border-radius: 50%;
        width: 30px;
        height: 30px;
        text-align: center;
    }
}