/**
 * Vorágine 2026 — Embeds Gutenberg
 * ---------------------------------------------------------
 * Estilos comunes para embeds externos, proporciones de video
 * y mensajes fallback cuando un servicio no genera contenido.
 */


.bloque-destacado-gutenberg .grp-contenido-figcaption .wp-block-embed {
    display: -webkit-flexbox;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--gap-base);
    width: var(--width-full);

    overflow: hidden;
    border-radius: var(--border-r-imagen-global);

    margin: 0;
}

.bloque-destacado-gutenberg .grp-contenido-figcaption .wp-block-embed .wp-block-embed__wrapper {
    width: var(--width-full);
}


.bloque-destacado-gutenberg .grp-contenido-figcaption .wp-block-embed .wp-block-embed__wrapper iframe {
    display: block;
    width: var(--width-full);
    height: 100%;
}

/* estructura html diferente */
.bloque-destacado-gutenberg .grp-contenido-figcaption>iframe:not(.instagram-media-rendered) {
    display: block;
    width: var(--width-full);
    height: 100%;
    overflow: hidden;
    border-radius: var(--border-r-imagen-global);
}




/* relación aspecto video embed */

/* Horizontal — 16:9 responsive */
/* por defecto es 16 / 9 */

/* .bloque-destacado-gutenberg .wp-block-embed__wrapper, */
.bloque-destacado-gutenberg.video-horizontal .wp-block-embed__wrapper {
    aspect-ratio: 16 / 9;
}

/* estructura html diferente */
.bloque-destacado-gutenberg .wp-block-embed__wrapper>iframe,
.bloque-destacado-gutenberg .grp-contenido-figcaption>iframe {
    aspect-ratio: 16 / 9;
}


/* Cuadrado — 1:1 responsive */
.bloque-destacado-gutenberg.video-cuadrado .wp-block-embed {
    width: min(100%, 60vh);
    margin-inline: auto;
}

.bloque-destacado-gutenberg.video-cuadrado .wp-block-embed__wrapper {
    aspect-ratio: 1 / 1;
}


/* Vertical — 9:16, máximo 60vh de alto */
.bloque-destacado-gutenberg.video-vertical .wp-block-embed {
    width: min(100%, calc(60vh * 9 / 16));
    margin-inline: auto;
}

.bloque-destacado-gutenberg.video-vertical .wp-block-embed__wrapper {
    aspect-ratio: 9 / 16;
}

/* .bloque-destacado-gutenberg.video-vertical .wp-block-embed__wrapper {
    display: flex;
    justify-content: center;
} */




/* -------------------- */

/* ajustes por tipo de embed */

/* twitter */
.twitter-tweet {
    max-width: 440px !important;
    margin: 0 auto !important;
}

/* soundcloud */
/* .grp-pie-credito .wp-block-embed.wp-block-embed-soundcloud iframe {
    width: var(--width-full);
    height: 250px;
} */


/* spotify */
/* .grp-pie-credito
.wp-block-embed.wp-block-embed-spotify {
    display: block;
    width: var(--width-full);
    height: auto;
} */

/* .grp-pie-credito
.wp-block-embed.wp-block-embed-spotify
.wp-block-embed__wrapper {
    height: 80px;
} */

/* .grp-pie-credito
.wp-block-embed.wp-block-embed-spotify iframe {
    width: var(--width-full);
    height: 80px;
} */






/* Instagram */

.bloque-destacado-gutenberg .instagram-media-rendered {
    display: block !important;

    width: 100% !important;
    max-width: 440px !important;
    min-width: 0 !important;

    /* height: auto !important; */

    margin: 0 auto !important;
}


/* Flourish */
.bloque-destacado-gutenberg .flourish-embed {
    width: var(--width-full);
}

















/* =========================================================
   4. FALLBACK DE EMBEDS
   ========================================================= */

.embed-fallback {
    display: -webkit-flexbox;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--gap-sm);
    width: 100%;
    background-color: var(--color-v-bn-03-100);
    border-radius: var(--border-r-bloque-destacado-gutenberg);
    overflow: hidden;
    border: var(--grosor-linea-05) solid var(--color-linea-global-04);
    padding: var(--padding-sm);
}

.embed-fallback__titulo,
.embed-fallback__texto,
.embed-fallback__enlace {
    font-size: var(--label--B-font-size);
    line-height: var(--label--A-line-height);
    font-weight: var(--peso-fuente-bold);
    color: var(--color-v-bn-07-100);
    opacity: 0.6;
    text-align: center;
}

.embed-fallback__enlace {
    text-decoration-line: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2.5px;
    text-underline-offset: 1.4px;
    transition:
        color var(--duracion-transicion-btn-1) var(--curva-transicion-btn-1),
        text-decoration-color var(--duracion-transicion-btn-1) var(--curva-transicion-btn-1);
}

.embed-fallback__enlace:hover {
    text-decoration-color: var(--color-v-bn-05-100);
}


/* ---- MEDIA QUERIES ---- */

@media screen and (max-width:852px) {
    .bloque-destacado-gutenberg:not(.video-vertical, .video-cuadrado) .wp-block-embed {
        border-radius: 0px;
    }
}

@media screen and (max-width:677px) {
    .bloque-destacado-gutenberg.video-cuadrado .wp-block-embed {
        border-radius: 0px;
    }
}


