/**
 * Visual integration of the La Xarxa+ embed (widget #vneo-app).
 *
 * The widget injects its own stylesheet at runtime, so every rule is scoped
 * under `body .vneo-app` to win on specificity. Colors and fonts come from the
 * --pb- tokens in variables-redesign.css.
 *
 * Widget layout: the info column (.vneo-info-container) floats left and sets
 * the container height; the image column (.vneo-background-img) is absolutely
 * positioned on the remaining width. Keep that mechanism, do not switch the
 * container to flex.
 *
 * Enqueued only on singular pages whose content contains the widget
 * (see child_enqueue_styles in functions.php).
 */

body .vneo-app {
    max-width: var(--genium--maxwidth--wide, 1800px);
    margin: var(--pb-spacing-lg) auto;
    padding-inline: var(--genium--padding--sides, 3%);
    box-sizing: border-box;
    container-type: inline-size;
}

body .vneo-app .vneo-main-container {
    margin: 0;
    overflow: hidden;
    background: var(--pb-color-secundari) !important; /* widget forces #222 via .black */
    border-bottom: 6px solid var(--pb-color-terciari);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

body .vneo-app .vneo-background-img {
    background-size: cover;
    background-position: center;
}

body .vneo-app .vneo-info-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: clamp(280px, 26vw, 420px);
    padding: var(--pb-spacing-lg) var(--pb-spacing-md);
    background: var(--pb-color-secundari) !important; /* widget forces #222 via .black */
}

/* Soft fade from the text panel into the image. */
body .vneo-app .vneo-info-container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 100%;
    width: clamp(40px, 8vw, 140px);
    background: linear-gradient(to right, var(--pb-color-secundari), transparent);
    pointer-events: none;
}

body .vneo-app .vneo-info {
    width: 100%;
    text-align: left;
}

body .vneo-app .vneo-info .vneo-valign-wrapper span {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-family: var(--pb-font-secundaria);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pb-color-negre);
    background: var(--pb-color-terciari);
}

body .vneo-app .vneo-title {
    margin: var(--pb-spacing-sm) 0;
    padding: 0;
    font-family: var(--pb-font-principal);
    font-size: clamp(2.25rem, 3.4vw, 3.5rem);
    font-weight: normal;
    line-height: 1;
    text-align: left;
    text-transform: uppercase;
    color: var(--pb-color-blanc);
}

body .vneo-app .vneo-description {
    margin: 0 0 var(--pb-spacing-md);
    font-family: var(--pb-font-secundaria);
    font-size: 1.125rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* The widget clamps title and description to fixed-height, ellipsized lines;
   let them wrap and grow so nothing is cut or overlaps on narrow screens. */
body .vneo-app .vneo-title,
body .vneo-app .vneo-description {
    display: block !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
}

body .vneo-app .vneo-info > .vneo-row {
    height: auto !important;
}

/* Stack the poster above the text when the embed itself is narrow (e.g. inside
   the 900px .max-width group, or on mobile). The poster is 16:9; side by side
   in a ~420px column it would lose more than half of its width. Uses the
   container width, not the viewport width. */
@container (max-width: 1000px) {
    body .vneo-app .vneo-background-img {
        position: relative !important;
        left: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 16 / 9;
    }

    body .vneo-app .vneo-info-container {
        float: none !important;
        width: 100% !important;
        min-height: 0 !important;
        padding: var(--pb-spacing-md);
    }

    body .vneo-app .vneo-info-container::after {
        display: none;
    }
}
