/* YouTube Popup Video CSS */

/* Video link container */
.youtube-popup-video {
    margin: 20px 0;
    display: inline-block;
    max-width: 100%;
    border-radius: 5px;
    overflow: hidden;
   /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);*/
    transition: all 0.3s ease;
}

.youtube-popup-video:hover {
   /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);*/
    transform: translateY(-2px);
}

/* Video thumbnail */
.ypv-thumbnail-container {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    background-color: #000;
}

.ypv-thumbnail {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

.ypv-thumbnail-container:hover .ypv-thumbnail {
    opacity: 0.7;
}

/* Play button */
.ypv-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background-color: rgba(230, 33, 23, 0.8);
    border-radius: 50%;
   /* box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);*/
    transition: all 0.3s ease;
}

.ypv-play-button:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent #ffffff;
}

.ypv-play-button-hover {
    background-color: rgba(230, 33, 23, 1);
    transform: translate(-50%, -50%) scale(1.1);
    /*box-shadow: 0 0 20px rgba(230, 33, 23, 0.5);*/
}

/* Video title */
.ypv-title {
    display: block;
    padding: 10px 15px;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    text-align: center;
    background-color: #f8f8f8;
    border-top: 1px solid #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ypv-video-link {
    text-decoration: none;
    color: inherit;
}

/* Text-only link style */
.youtube-popup-video-text-only {
    margin: 10px 0;
    display: inline-block;
}

.ypv-text-link {
    color: #e62117;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.ypv-text-link:hover {
    color: #cc1e0d;
}

.ypv-text-link:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #e62117;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.ypv-text-link:hover:after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Custom image link style */
.youtube-popup-video-custom-image {
    margin: 20px auto;
    display: block;
    max-width: 100%;
    border-radius: 5px;
    overflow: hidden;
    /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);*/
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
}

.youtube-popup-video-custom-image:hover {
    /*box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);*/
    transform: translateY(-2px);
}

.ypv-custom-image {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    margin: 0 auto;
}

.ypv-image-link:hover .ypv-custom-image {
    transform: scale(1.05);
}

.youtube-popup-video-custom-image .ypv-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 12px;
    font-size: 14px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.youtube-popup-video-custom-image:hover .ypv-title {
    opacity: 1;
}

/* Remove play button overlay */
.youtube-popup-video-custom-image .ypv-image-link:before,
.youtube-popup-video-custom-image .ypv-image-link:after {
    display: none;
}

/* Magnific Popup customizations */
.mfp-fade.mfp-bg {
    opacity: 0;
    transition: all 0.3s ease-out;
}

.mfp-fade.mfp-bg.mfp-ready {
    opacity: 0.9;
}

.mfp-fade.mfp-bg.mfp-removing {
    opacity: 0;
}

.mfp-fade.mfp-wrap .mfp-content {
    opacity: 0;
    transition: all 0.3s ease-out;
    transform: scale(0.8);
}

.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
    opacity: 1;
    transform: scale(1);
}

.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
    opacity: 0;
    transform: scale(0.8);
}

/* Custom iframe wrapper */
.ypv-iframe-wrapper {
    border-radius: 5px;
    overflow: hidden;
    /*box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);*/
}

/* Close button customization */
.mfp-close {
    font-size: 40px;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.mfp-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}
