/* Service and How We Work video slots.
   Desktop: 16:9. Tablet and mobile: 1:1.
   Title sits below the video, so nothing covers it. */

.wmc-svc-hero{
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.wmc-video{
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 25px;
    overflow: hidden;
    background-color: var(--accent-color-4);
    border: 1px solid var(--accent-color-3);
}

.wmc-video-poster{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.wmc-video::before{
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--secondary);
    opacity: 0.35;
    transition: opacity 0.3s;
    z-index: 1;
}

.wmc-video.has-video{
    cursor: pointer;
}

.wmc-video.has-video:hover::before{
    opacity: 0.55;
}

.wmc-video-play{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 1px solid var(--accent-color);
    background-color: var(--accent-color-5);
    color: var(--primary);
    font-size: 22px;
    transition: all 0.3s;
}

.wmc-video.has-video .wmc-video-play{
    display: flex;
}

.wmc-video.has-video:hover .wmc-video-play{
    background-color: var(--accent-color);
    color: var(--accent-color-2);
}

/* Top-left, because Swetha's circle sits bottom-left in every video */
.wmc-video-label{
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 2;
    padding: 8px 14px;
    border-radius: 999px;
    background-color: var(--accent-color-5);
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
}

.wmc-video.is-playing::before,
.wmc-video.is-playing .wmc-video-play,
.wmc-video.is-playing .wmc-video-label{
    display: none;
}

.wmc-video iframe{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 3;
}

.wmc-svc-title{
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 820px;
}

/* How We Work: the existing placeholder goes square on smaller screens */
@media (max-width: 1199.98px){
    .wmc-video,
    .video-placeholder-container{
        aspect-ratio: 1 / 1;
    }
    .wmc-svc-hero{
        gap: 24px;
    }
}

@media (max-width: 767.98px){
    .wmc-video{
        border-radius: 20px;
    }
    .wmc-video-play{
        width: 64px;
        height: 64px;
        font-size: 18px;
    }
    .wmc-video-label{
        left: 14px;
        top: 14px;
        font-size: 13px;
    }
}

/* No video id yet: show the poster only, without the "Watch" label */
.wmc-video:not(.has-video) .wmc-video-label{
    display: none;
}

/* The poster <picture> fills the slot like the old <img> */
.wmc-video picture, .video-placeholder-container picture{
    position: absolute;
    inset: 0;
}
.video-placeholder-container picture img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Posters show at full brightness; only a light darken on hover so the play button stands out */
.wmc-video::before,
.video-placeholder-container::before{
    opacity: 0;
}
.wmc-video.has-video:hover::before,
.video-placeholder-container:hover::before{
    opacity: 0.15;
}
