/**
 * Blog Video Styles
 * YouTube video integration for blog post hero
 */

/* Video thumbnail container in hero */
.top-hero__video-div {
    width: 50%;
    position: relative;
    cursor: pointer;
    border-radius: 28px;
    overflow: hidden;
}

.top-hero__video-div img {
    display: block;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    border-radius: 28px;
    -webkit-animation: fadeUp 1s both 0.1s;
    animation: fadeUp 1s both 0.1s;
}

/* Play button overlay */
.blog-video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    background: #D38269;
    border: 2px solid #fff;
    border-radius: 50%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    pointer-events: none;
}

.top-hero__video-div:hover .blog-video-play-overlay {
    background: #b8674f;
    -webkit-transform: translate(-50%, -50%) scale(1.1);
    -ms-transform: translate(-50%, -50%) scale(1.1);
    transform: translate(-50%, -50%) scale(1.1);
}

.blog-video-play-overlay svg {
    width: 28px;
    height: 28px;
    margin-left: 3px;
}

/* Video modal/lightbox */
.blog-video-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    -webkit-animation: blogVideoFadeIn 0.3s ease;
    animation: blogVideoFadeIn 0.3s ease;
}

.blog-video-modal.active {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.blog-video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* 16:9 aspect ratio wrapper */
.blog-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.blog-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Close button */
.blog-video-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    background: #D38269;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    line-height: 1;
    z-index: 100000;
    -webkit-transition: opacity 0.3s ease;
    -o-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

.blog-video-close:hover {
    opacity: 0.8;
}

@-webkit-keyframes blogVideoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes blogVideoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile */
@media (max-width: 1024px) {
    .top-hero__video-div {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .blog-video-play-overlay {
        width: 56px;
        height: 56px;
    }

    .blog-video-play-overlay svg {
        width: 22px;
        height: 22px;
    }

    .blog-video-modal-content {
        width: 95%;
    }

    .blog-video-close {
        top: -35px;
    }
}
