/* Global Block 2 - Video Block Styles con Plyr */
.global-block2-section {
    width: 100%;
    padding: 0;
}

.global-block2-content-wrapper {
    max-width: 1300px !important;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.global-block2-video-container {
    margin: 0 auto;
    background: #f5f5f5;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

/* Estilos para Plyr Integration */
.plyr__video-embed {
    border-radius: 14px;
    overflow: hidden;
    background: #000;
}

.plyr {
    border-radius: 14px;
    overflow: hidden;
}

.plyr__video-wrapper {
    background: #000;
    border-radius: 14px;
}

.plyr__poster {
    background-size: cover;
    background-position: center;
    border-radius: 14px;
}

/* Personalización de controles de Plyr para que coincidan con el diseño */
.plyr--full-ui input[type="range"] {
    color: #0073aa; /* Color principal de WordPress */
}

.plyr__control--overlaid {
    background: rgba(0, 115, 170, 0.8);
    border-radius: 50%;
}

.plyr__control--overlaid:hover {
    background: rgba(0, 115, 170, 1);
}

.plyr__control--overlaid svg {
    transform: scale(0.8);
}

.plyr__progress__buffer {
    color: rgba(0, 115, 170, 0.25);
}

.plyr--video .plyr__control {
    border-radius: 8px;
}

.plyr__menu__container {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.plyr__menu__container .plyr__control {
    border-radius: 4px;
}

.plyr__menu__container .plyr__control:hover {
    background: rgba(0, 115, 170, 0.1);
}

/* Estilos específicos para Vimeo con Plyr */
.vimeo-plyr-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
}

.vimeo-plyr-container iframe {
    border-radius: 14px;
}

/* Clase para cuando Plyr está inicializado */
.plyr-initialized {
    position: relative;
}

.plyr-initialized.plyr__video-embed {
    border-radius: 14px;
}

/* Contenedor de video con Plyr */
.global-block2-video-container .plyr {
    max-width: 100%;
    border-radius: 14px;
}

/* Para asegurar que el iframe de Vimeo mantenga el aspect ratio */
.plyr__video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.global-block2-video {
    width: 100%;
    height: auto;
    border-radius: 14px;
    display: block;
}

.global-block2-video-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.global-block2-video-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.global-block2-play-icon {
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.global-block2-play-icon:hover {
    transform: scale(1.1);
}

.global-block2-play-icon svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Space Classes */
.space-top-1x {
    padding-top: 20px;
}

.space-top-2x {
    padding-top: 40px;
}

.space-top-3x {
    padding-top: 60px;
}

.space-top-4x {
    padding-top: 80px;
}

.space-top-5x {
    padding-top: 100px;
}

.space-bottom-1x {
    padding-bottom: 20px;
}

.space-bottom-2x {
    padding-bottom: 40px;
}

.space-bottom-3x {
    padding-bottom: 60px;
}

.space-bottom-4x {
    padding-bottom: 80px;
}

.space-bottom-5x {
    padding-bottom: 100px;
}
 
 

 
/* Gutenberg Editor Styles */
.wp-block-global-block2 {
    border: 2px dashed #0073aa;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.wp-block-global-block2 .global-block2-section {
    border: none;
    padding: 0;
}

.wp-block-global-block2 .global-block2-video-container {
    background: #f0f0f0;
    min-height: 200px;
}

/* Estilos para Plyr en el editor de Gutenberg */
.wp-block-global-block2 .plyr__video-embed {
    background: #e0e0e0;
    position: relative;
    min-height: 200px;
}

.wp-block-global-block2 .plyr__video-embed::before {
    content: "Plyr Video Player Preview";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 14px;
    font-weight: 500;
    z-index: 1;
    text-align: center;
    pointer-events: none;
}

.wp-block-global-block2 .plyr__video-embed::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: #0073aa;
    border-radius: 50%;
    z-index: 0;
    opacity: 0.8;
}

.wp-block-global-block2 .plyr__video-embed iframe {
    opacity: 0.7;
}

/* Estilos responsivos para Plyr */
@media (max-width: 768px) {
    .global-block2-content-wrapper {
        padding: 0 15px;
    }
    
    .plyr,
    .plyr__video-embed,
    .vimeo-plyr-container,
    .global-block2-video-container {
        border-radius: 10px;
    }
    
    .plyr__video-wrapper {
        border-radius: 10px;
    }
    
    .plyr__poster {
        border-radius: 10px;
    }
    
    /* Ajustar controles en móviles */
    .plyr__controls {
        padding: 10px;
    }
    
    .plyr__control {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .global-block2-content-wrapper {
        padding: 0 10px;
    }
    
    .plyr,
    .plyr__video-embed,
    .vimeo-plyr-container,
    .global-block2-video-container {
        border-radius: 8px;
    }
    
    .plyr__video-wrapper {
        border-radius: 8px;
    }
    
    .plyr__poster {
        border-radius: 8px;
    }
    
    /* Controles más compactos en pantallas pequeñas */
    .plyr__controls {
        padding: 8px;
        font-size: 12px;
    }
    
    .plyr__control {
        padding: 6px;
        min-width: 36px;
        height: 36px;
    }
    
    .plyr__control svg {
        width: 18px;
        height: 18px;
    }
}

/* Estados de carga para Plyr */
.plyr--loading {
    background: #f5f5f5;
}

.plyr--loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #0073aa;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    z-index: 2;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mejoras de accesibilidad */
.plyr:focus,
.plyr__control:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Modo oscuro para Plyr (opcional) */
@media (prefers-color-scheme: dark) {
    .plyr {
        background: #1a1a1a;
    }
    
    .plyr__control {
        color: #fff;
    }
    
    .plyr__control:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .plyr__menu__container {
        background: #2a2a2a;
        border: 1px solid #444;
    }
}