/* ===== Elementor Video widget — custom YouTube player ===== */

.section-video {
    height: auto
}

.miv-ytvideo {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

.miv-ytvideo__thumbnail {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.miv-ytvideo__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    z-index: 2;
    cursor: pointer;
    padding: 0;
}

.miv-ytvideo__play svg {
    width: 32%;
    height: 32%;
}

.miv-ytvideo__play:hover,
.miv-ytvideo__play:focus,
.miv-ytvideo__play:focus-visible {
    background: rgba(255, 185, 81, 0.3);
    border-color: var(--color-accent);
    outline: none;
}

.miv-ytvideo__play.is-hidden {
    opacity: 0;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .miv-ytvideo.is-playing:hover .miv-ytvideo__play.is-hidden {
        opacity: 1;
        pointer-events: auto;
    }
}

.miv-ytvideo.is-playing {
    cursor: pointer;
}

/* Crop YouTube's top/bottom branding by overscaling the iframe,
   and block pointer events so clicks never reach the YT logo. */
.miv-ytvideo.is-playing iframe {
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    height: calc(100% + 120px);
    border: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .miv-ytvideo__play {
        width: 64px;
        height: 64px;
    }

    .miv-ytvideo.is-playing iframe {
        top: -40px;
        height: calc(100% + 80px);
    }
}
