/**
 * Lemon Hover Media List
 * Módulo: lemon-hover-media-list
 */

.elementor-widget-lemon-hover-media-list,
.elementor-widget-lemon-hover-media-list > .elementor-widget-container {
    height: 100%;
}

.lt-hover-media-list {
    --lt-hml-min-height: 100vh;
    --lt-hml-columns: 2;
    --lt-hml-column-gap: 80px;
    --lt-hml-row-gap: 10px;
    --lt-hml-normal-color: #ffffff;
    --lt-hml-active-color: #ffffff;
    --lt-hml-inactive-color: #ffffff;
    --lt-hml-inactive-opacity: 0.28;
    --lt-hml-title-transition: 250ms;
    --lt-hml-media-transition: 500ms;
    --lt-hml-media-scale: 1.02;
    --lt-hml-media-opacity: 1;
    --lt-hml-embed-cover-scale: 1;
    --lt-hml-embed-ready-delay-opacity: 0;

    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    min-height: var(--lt-hml-min-height);
    overflow: hidden;
    isolation: isolate;
    color: var(--lt-hml-normal-color);
    background: #000000;
}

.lt-hml-background,
.lt-hml-base-bg,
.lt-hml-media-stage,
.lt-hml-media-item,
.lt-hml-overlay {
    position: absolute;
    inset: 0;
}

.lt-hml-background {
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.lt-hml-base-bg {
    z-index: 0;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

.lt-hml-media-stage {
    z-index: 1;
    overflow: hidden;
}

.lt-hml-media-item {
    opacity: 0;
    transform: scale(1);
    transition:
        opacity var(--lt-hml-media-transition) ease,
        transform calc(var(--lt-hml-media-transition) * 1.4) ease;
    will-change: opacity, transform;
    overflow: hidden;
    background: transparent;
    pointer-events: none;
    z-index: 1;
}

.lt-hml-media-item.is-active {
    opacity: var(--lt-hml-media-opacity);
    transform: scale(var(--lt-hml-media-scale));
    z-index: 3;
}


/* YouTube/Vimeo usan el mismo patrón que Lemon Media Reveal.
 * No se fuerza opacidad casi invisible ni ventanas artificiales de carga:
 * se deja al player funcionar como embed limpio, y la visibilidad la controla
 * únicamente el estado activo del medio.
 */
.lt-hml-media-item--youtube,
.lt-hml-media-item--vimeo {
    visibility: visible;
}

.lt-hml-media-item--youtube.is-active,
.lt-hml-media-item--vimeo.is-active {
    z-index: 4;
}


.lt-hml-media-item--youtube.is-active,
.lt-hml-media-item--vimeo.is-active,
.lt-hml-media-item--youtube,
.lt-hml-media-item--vimeo {
    transform: none;
}

.lt-hml-media-item--youtube.is-active,
.lt-hml-media-item--vimeo.is-active {
    opacity: var(--lt-hml-media-opacity);
}

.lt-hml-media-el,
.lt-hml-media-item video,
.lt-hml-media-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.lt-hml-media-item > .lt-hml-embed {
    display: block;
}

.lt-hml-embed,
.lt-hml-media-item .lt-mr-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000000;
}

/*
 * YouTube/Vimeo como fondo real.
 * Misma base que Lemon Media Reveal: iframe absoluto, centrado, sobredimensionado
 * y recortado por el contenedor. El zoom extra evita que se vean barras negras
 * o controles del reproductor dentro del área visible del widget.
 */
.lt-hml-embed-frame,
.lt-hml-embed iframe,
.lt-hml-media-item .lt-mr-embed iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    /* Mismo encaje que Lemon Media Reveal para embeds 16:9. */
    width: 177.78vh;
    height: 56.25vw;
    min-width: 100%;
    min-height: 100%;
    border: 0;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    pointer-events: none !important;
    background: #000000;
}

.lt-hml-embed iframe::-webkit-media-controls,
.lt-hml-embed-frame::-webkit-media-controls {
    display: none !important;
}

.lt-hml-embed-youtube iframe,
.lt-hml-embed-vimeo iframe {
    max-width: none !important;
    max-height: none !important;
}


.lt-hml-overlay {
    z-index: 2;
    background: rgba(0, 0, 0, 0.25);
    opacity: 1;
    pointer-events: none;
}

.lt-hml-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: var(--lt-hml-min-height);
    padding: 80px;
}

.lt-hml-content-inner {
    width: 100%;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
}

.lt-hml-list {
    display: grid;
    grid-template-columns: repeat(var(--lt-hml-columns), minmax(0, 1fr));
    column-gap: var(--lt-hml-column-gap);
    row-gap: var(--lt-hml-row-gap);
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: center;
}

.lt-hml-item {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.lt-hml-item-link,
.lt-hml-item-static {
    display: inline-flex;
    max-width: 100%;
    color: var(--lt-hml-normal-color);
    text-decoration: none;
    cursor: pointer;
    opacity: 1;
    transition:
        color var(--lt-hml-title-transition) ease,
        opacity var(--lt-hml-title-transition) ease,
        transform var(--lt-hml-title-transition) ease;
}

.lt-hml-item-static {
    cursor: default;
}

.lt-hml-item-link:hover,
.lt-hml-item-link:focus,
.lt-hml-item-link:focus-visible,
.lt-hml-item-static:focus,
.lt-hml-item-static:focus-visible {
    color: var(--lt-hml-active-color);
    outline: none;
}

.lt-hml-item-link:focus-visible,
.lt-hml-item-static:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 0.18em;
}

.lt-hml-item-text {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.lt-hover-media-list.has-active .lt-hml-item:not(.is-active) .lt-hml-item-link,
.lt-hover-media-list.has-active .lt-hml-item:not(.is-active) .lt-hml-item-static {
    color: var(--lt-hml-inactive-color);
    opacity: var(--lt-hml-inactive-opacity);
}

.lt-hover-media-list.has-active .lt-hml-item.is-active .lt-hml-item-link,
.lt-hover-media-list.has-active .lt-hml-item.is-active .lt-hml-item-static {
    color: var(--lt-hml-active-color);
    opacity: 1;
}

.lt-hover-media-list.is-effect-disabled .lt-hml-media-item,
.lt-hover-media-list.is-effect-disabled .lt-hml-media-item.is-active {
    opacity: 0;
    visibility: hidden;
    transform: scale(1);
}

.lt-hover-media-list.is-effect-disabled.has-active .lt-hml-item .lt-hml-item-link,
.lt-hover-media-list.is-effect-disabled.has-active .lt-hml-item .lt-hml-item-static {
    color: var(--lt-hml-normal-color);
    opacity: 1;
}

.lt-hml-empty {
    padding: 24px;
    border: 1px dashed rgba(0, 0, 0, 0.25);
    color: #333333;
    background: #ffffff;
}

@media (max-width: 1024px) {
    .lt-hover-media-list {
        --lt-hml-column-gap: 48px;
    }

    .lt-hml-content {
        padding: 56px 40px;
    }
}

@media (max-width: 767px) {
    .lt-hover-media-list {
        --lt-hml-columns: 1;
        --lt-hml-column-gap: 0px;
        --lt-hml-row-gap: 12px;
    }

    .lt-hml-content {
        padding: 40px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lt-hml-media-item,
    .lt-hml-item-link,
    .lt-hml-item-static {
        transition: none !important;
    }
}
