.image-reveal {
    position: relative;
    width: 100%;
    height: 200vh;
    background: rgb(15,18,25);
    /*background: linear-gradient(0deg, rgba(15,18,25,1) 31%, rgba(15,18,25,0) 100%);*/
}

.image-reveal__sticky-container {
    height: 100vh;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
}

.image-reveal__sticky-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1440px;
    margin: 0 auto;
    aspect-ratio: 16/9;
    top: 50%; 
    transform: translateY(-50%);
}

/* Maska */
.bg-section, .bg-image-under {
    will-change: transform, opacity;
}

.bg-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    scale: 1.03 !important;
}

.mask-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video z overlayem */
.bg-image-under {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 40px;
}

.video-overlay {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.overlay-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay-border{
    height: 1px;
    background-color: #A7B6BD;
    margin: 40px 0;
}

/* Przycisk play */
.video-play-button-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

/* Video Popup */
.video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.video-popup.active {
    display: flex;
}

.video-popup__content {
    position: relative;
    width: 90vw; 
    max-width: 1600px; 
    height: 80vh;
    margin: auto;
}

.video-popup__player {
    width: 100%;
    height: 100%;
}

.video-popup__close {
    position: absolute;
    top: -40px;
    right: -40px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.video-popup__close:hover {
    color: #7855DA;
}

.video-popup iframe,
.video-popup video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* RWD */
@media (min-width: 1920px) {
    .image-reveal {
        height: 50vh;
    }
    .mask-image{
        scale: 1.1;
    }
    .image-reveal__sticky-container{
        top:140px;
    }
    .video-overlay {
        height: auto;
    }
}



@media (max-width: 1080px) {
    .image-reveal{
        height: 110vh;
        padding: 25px;
    }
    .video-wrapper {
        padding: 0;
    }
    .image-reveal__sticky-container{
        height: auto;
    }
    .image-reveal__sticky-content{
        top:0;
        transform: none;
    }
    .video-popup {
        padding: 20px;
    }

    .video-popup__content {
        width: 100%;
        height: 50vh;
    }

    .video-popup__close {
        right: 0;
        top: -40px;
    }
    .video-overlay{
        height: auto;
    }

    .video-overlay-border{
        margin: 20px 0;
    }
}

@media (max-width: 768px) {
    .image-reveal{
        height: 80vh;
        padding: 20px;
    }
}

@media (max-width: 390px) {
    .mask-image{
        scale: 1.35;
    }

    .image-reveal{
        height: 60vh;
        padding: 10px;
    }

    .video-overlay-border{
        margin: 4px 0;
    }
 
}
