/* === VIDEO BLOCK === */
.vpb-video-block {
    max-width: 100%;
    margin-bottom: 20px;
}

.vpb-video-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.vpb-video-wrapper { 
    position: relative; 
    display: inline-block; 
    cursor: pointer; 
    max-width: 100%; 
}

.vpb-poster { 
    display: block; 
    max-width:100%;
}

.vpb-video {
    display: none;
    width: 100%;
    height: auto;
}

.vpb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #00000026;
}

.vpb-play-button {
    background: rgba(0,0,0,0.5);
    border: none; 
    padding: 0; 
    cursor: pointer;    
    border-radius: 50%;
}

.vpb-play-button svg { 
    display: block; 
}

/* === IFRAME BLOCK === */
.vpb-iframe-wrapper { 
    max-width: 100%; 
    margin-bottom: 20px; 
}

.vpb-iframe-title { 
    font-size: 18px; 
    margin-bottom: 10px; 
}

.vpb-iframe-container {
    position: relative;
    width: 100%;
    min-height: 45vh;
    padding-bottom: 56.25%; /* aspect ratio 16:9 */
    height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.vpb-iframe-container iframe {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    border: 0;
    pointer-events: auto;
}

/* Link invisibile per iOS - solo tap singolo */
.vpb-ios-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: transparent;
    /* Nascosto visivamente ma attivo per tap singolo */
    opacity: 0;
    /* Permette il passaggio degli eventi di scroll all'iframe */
    pointer-events: none;
}

/* Su iOS, attiviamo il link solo per tap singoli */
@supports (-webkit-touch-callout: none) {
    .vpb-ios-link {
        pointer-events: auto;
    }
    
    /* L'iframe rimane sotto ma riceve gli eventi di scroll */
    .vpb-iframe-container iframe {
        z-index: 1;
    }
}