/* Стиль для кнопки */
.popup-button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px;
    float: right;

}

.popup-button:hover {
    background-color: #45a049;
}

/* Стиль для pop-up окна (скрыто по умолчанию) */
.popup {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

/* Содержимое pop-up */
.popup-content {
    background-color: #fefefe;
    margin: 5% auto; /* Уменьшил отступ сверху для большего пространства */
    padding: 20px;
    border: 1px solid #888;
    width: 60%;
    max-width: 600px;
    max-height: 80vh; /* Ограничиваем максимальную высоту */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    overflow-y: auto; /* Добавляем вертикальную прокрутку при необходимости */
    position: relative;
}

/* Кнопка закрытия */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: sticky;
    top: 0;
    background: #fefefe;
    z-index: 2;
    padding-left: 10px;
}

.close:hover {
    color: black;
}

/* Стиль для заголовка статьи */
.article-title {
    color: #333;
    margin-top: 0;
    position: sticky;
    top: 0;
    background: #fefefe;
    padding: 10px 0;
    z-index: 1;
    font-size: 24px;
}

/* Стиль для текста статьи */
.article-text {
    line-height: 1.6;
    color: #555;
}


/*
Video and Pictures
*/

/* Добавляем новые стили для изображений и видео */
.images-container {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    flex-wrap: wrap;
}

.article-image {
    width: 48%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
    object-fit: cover;
}

.video-container {
    margin: 20px 0;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 соотношение сторон */
    height: 0;
    overflow: hidden;
}

.article-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 4px;
}

/* Адаптация для мобильных устройств */
@media (max-width: 600px) {
    .article-image {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .images-container {
        flex-direction: column;
        top: 50px;
    }
    
    .popup-content {
        width: 90%;
        margin: 10% auto;
    }
}


/* 
#####Видео на главной странице#####
*/

/* Стили для шапки с видео */
.video-header {
    position: absolute;
    width: 500px;
    height: 300px; /* На всю высоту экрана */
    overflow: hidden;
    z-index: 5;
    top: 150px;
    left: 25px;
    z-index: 10;
}

.video-container2 {
    position: absolute;
    padding: 5px;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.header-video {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Полупрозрачный оверлей */
}


/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2rem;
    }
    
    .header-content p {
        font-size: 1.2rem;
    }
    
    .video-header {
        height: 70vh; /* Меньшая высота на мобильных */
    }
}


/*
картинка
*/

/* Стили для постера видео */
.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    cursor: pointer;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .poster-image {
        width: 100%;
        height: 100%;
        margin: -20%;
        object-fit: cover;
    }
}


.play-button {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 30px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.play-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Для скрытого постера */
.video-poster.hidden {
    display: none;
}

/*
Моб версия
*/



/* Мобильная адаптация */
@media (max-width: 768px) {

    .video-header {
        top: 10px;
        left: 520px;
        bottom: 0px;
        height: 240px; /* Уменьшаем высоту */
        width: 180px;
        margin-left: -20px;
        z-index: 10;
    }

    .play-button {
        position: absolute;
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .video-poster {
        background-size: cover;
        background-position: center;
    }
    
    /* Отключаем эффекты наведения на мобильных */
    .play-button:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: none;
    }

    .poster-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.8;
        top: 100px;
        margin-right: 20px;
    }
}

@media (max-width: 480px) {
    .video-header {
        height: 50vh; /* Ещё меньше для маленьких экранов */
    }
    
    .play-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}