/* =============================================================================
   MEBAC Mega Menu - Videos por Seccion
   Fila de tarjetas blancas con video 9:16, titulo y descripcion.
   Tokens heredados de WoodMart (--wd-*) con fallback a los valores del sitio.
   Estados del player en CSS sobre data-state; JS solo cambia atributos/clases.

   Nota de especificidad: WoodMart estiliza todos los <button> con
   :is(.btn, .button, button, ...) => (0,1,0), igual que una clase, y su CSS
   carga despues. Por eso todos los botones de este componente se declaran
   con dos clases (.mebac-vid-media .mebac-vid-play, etc.) => (0,2,0).
   ============================================================================= */

/* ===== Tokens ===== */
.mebac-vid-section {
    --mebac-vid-n: 4;
    --mebac-vid-gap: 20px;
    --mebac-vid-radius: var(--wd-brd-radius, 10px);
    --mebac-vid-radius-sm: var(--wd-form-brd-radius, 5px);
    --mebac-vid-pad: 8px;
    --mebac-vid-radius-in: 6px;
    --mebac-vid-primary: var(--wd-primary-color, #1c61e7);
    --mebac-vid-primary-dk: #1a4db3;
    --mebac-vid-soft: #e1ebff;
    --mebac-vid-title: var(--wd-title-color, #242424);
    --mebac-vid-text: var(--wd-text-color, #767676);
    --mebac-vid-font-title: var(--wd-title-font, "Lexend Deca", Arial, Helvetica, sans-serif);
    --mebac-vid-font-text: var(--wd-text-font, "Open Sans", Arial, Helvetica, sans-serif);
    --mebac-vid-ph: #e9e9e9;
    --mebac-vid-hair: rgba(0, 0, 0, 0.06);
    --mebac-vid-glass: rgba(0, 0, 0, 0.45);
    --mebac-vid-glass-hi: rgba(0, 0, 0, 0.62);
    --mebac-vid-blur: 8px;
    --mebac-vid-ctl: 32px;
    --mebac-vid-ico: 16px;
    --mebac-vid-play: 64px;
    --mebac-vid-inset: 12px;
    --mebac-vid-text-h: 78px;
    --mebac-vid-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --mebac-vid-t: 0.25s;
    --mebac-vid-tf: 0.18s;
    margin: 20px 0 0;
    contain: layout;
    font-family: var(--mebac-vid-font-text);
}
.mebac-vid-section--standalone {
    margin: 0 0 40px;
}

/* ===== Sprite e iconos ===== */
.mebac-vid-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}
.mebac-vid-ico {
    width: var(--mebac-vid-ico);
    height: var(--mebac-vid-ico);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
    flex: none;
}

/* ===== Reset de botones (gana a :is(.btn,button) de WoodMart) ===== */
.mebac-vid-media .mebac-vid-play,
.mebac-vid-media .mebac-vid-ctl,
.mebac-vid-media .mebac-vid-retry,
.mebac-vid-media .mebac-vid-menu button,
.mebac-vid-section .mebac-vid-arrow {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    margin: 0;
    padding: 0;
    min-height: 0;
    min-width: 0;
    border: 0;
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0;
    gap: 0;
    line-height: 0;
    cursor: pointer;
}

/* ===== Encabezado ===== */
.mebac-vid-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
}
.mebac-vid-heading {
    margin: 0;
    font-family: var(--mebac-vid-font-title);
    font-size: 26px;
    font-weight: var(--wd-title-font-weight, 500);
    line-height: 1.2;
    color: var(--mebac-vid-title);
    text-transform: uppercase;
    letter-spacing: 0;
}
.mebac-vid-count {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--mebac-vid-soft);
    color: var(--mebac-vid-primary);
    font: 600 12px/1 var(--mebac-vid-font-text);
    white-space: nowrap;
}

/* ===== Viewport / track ===== */
.mebac-vid-viewport {
    position: relative;
}
.mebac-vid-track {
    display: flex;
    gap: var(--mebac-vid-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
    margin: -4px 0;
    list-style: none;
}
.mebac-vid-track::-webkit-scrollbar {
    display: none;
}
.mebac-vid-item {
    flex: 0 0 calc((100% - (var(--mebac-vid-n) - 1) * var(--mebac-vid-gap)) / var(--mebac-vid-n));
    scroll-snap-align: start;
    min-width: 0;
}

/* ===== Flechas (solo desktop con overflow) ===== */
.mebac-vid-section .mebac-vid-arrow {
    display: none;
    z-index: 3;
    top: calc((100% - var(--mebac-vid-text-h)) / 2);
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--mebac-vid-hair);
    background: #fff;
    color: var(--mebac-vid-title);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, color 0.2s;
}
.mebac-vid-section .mebac-vid-arrow .mebac-vid-ico {
    width: 18px;
    height: 18px;
}
.mebac-vid-section .mebac-vid-arrow--prev {
    left: -15px;
}
.mebac-vid-section .mebac-vid-arrow--next {
    right: -15px;
}
.mebac-vid-section.has-overflow .mebac-vid-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mebac-vid-viewport:hover .mebac-vid-arrow,
.mebac-vid-viewport:focus-within .mebac-vid-arrow {
    opacity: 1;
    visibility: visible;
}
.mebac-vid-section .mebac-vid-arrow:hover {
    color: var(--mebac-vid-primary);
    background: #fff;
}
.mebac-vid-section .mebac-vid-arrow[disabled] {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ===== Tarjeta blanca / media ===== */
/* Misma receta que las tarjetas de categoria del sitio: blanco, radio 10,
   sin sombra. El video va dentro, con el radio interno mas chico. */
.mebac-vid-card {
    background: #fff;
    border-radius: var(--mebac-vid-radius);
    padding: var(--mebac-vid-pad);
    contain: layout;
    transition: box-shadow var(--mebac-vid-t);
}
@media (hover: hover) {
    .mebac-vid-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }
}
.mebac-vid-media {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: var(--mebac-vid-radius-in);
    overflow: hidden;
    background: var(--mebac-vid-ph);
    isolation: isolate;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.mebac-vid-media::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px var(--mebac-vid-hair);
    pointer-events: none;
    z-index: 4;
}
.mebac-vid-poster {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    z-index: 2;
    transition: opacity var(--mebac-vid-t);
}
.mebac-vid-video {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    background: #000;
    z-index: 1;
}
.mebac-vid-fade .mebac-vid-poster {
    opacity: 0;
}
.mebac-vid-fade .mebac-vid-poster.is-loaded {
    opacity: 1;
}

/* ===== Badge numerico ===== */
.mebac-vid-num {
    position: absolute;
    top: var(--mebac-vid-inset);
    left: var(--mebac-vid-inset);
    z-index: 6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 7px;
    border-radius: 6px;
    background: #fff;
    color: var(--mebac-vid-title);
    font: 600 12px/1 var(--mebac-vid-font-title);
    letter-spacing: 0.02em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* ===== Boton play central ===== */
.mebac-vid-media .mebac-vid-play {
    left: 50%;
    top: 50%;
    z-index: 6;
    width: var(--mebac-vid-play);
    height: var(--mebac-vid-play);
    margin: calc(var(--mebac-vid-play) / -2) 0 0 calc(var(--mebac-vid-play) / -2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--mebac-vid-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--mebac-vid-tf) var(--mebac-vid-ease), box-shadow var(--mebac-vid-tf), opacity var(--mebac-vid-tf), visibility var(--mebac-vid-tf);
}
.mebac-vid-media .mebac-vid-play .mebac-vid-ico {
    width: 26px;
    height: 26px;
}
.mebac-vid-media .mebac-vid-play .mebac-vid-ico--play {
    margin-left: 3px; /* centro optico del triangulo */
}
.mebac-vid-media .mebac-vid-play .mebac-vid-ico--replay {
    display: none;
}
.mebac-vid-spinner {
    display: none;
    width: 26px;
    height: 26px;
    border: 2.5px solid rgba(28, 97, 231, 0.25);
    border-top-color: var(--mebac-vid-primary);
    border-radius: 50%;
    animation: mebac-vid-spin 0.9s linear infinite;
}
@keyframes mebac-vid-spin {
    to { transform: rotate(360deg); }
}
@media (hover: hover) {
    .mebac-vid-media:hover .mebac-vid-play {
        transform: scale(1.06);
        background: #fff;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    }
}

/* ===== Hint "Ver con sonido" ===== */
.mebac-vid-hint {
    position: absolute;
    right: var(--mebac-vid-inset);
    bottom: var(--mebac-vid-inset);
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--mebac-vid-glass);
    -webkit-backdrop-filter: blur(var(--mebac-vid-blur));
    backdrop-filter: blur(var(--mebac-vid-blur));
    color: #fff;
    font: 600 12px/1 var(--mebac-vid-font-text);
    white-space: nowrap;
    transition: opacity var(--mebac-vid-tf), visibility var(--mebac-vid-tf);
}
.mebac-vid-hint .mebac-vid-ico {
    width: 12px;
    height: 12px;
}

/* ===== Sombra inferior (mientras hay controles) ===== */
.mebac-vid-shade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 38%;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.3) 40%, rgba(0, 0, 0, 0.08) 75%, transparent 100%);
}

/* ===== Controles glass ===== */
.mebac-vid-media .mebac-vid-ctl {
    position: static;
    background: var(--mebac-vid-glass);
    -webkit-backdrop-filter: blur(var(--mebac-vid-blur));
    backdrop-filter: blur(var(--mebac-vid-blur));
    color: #fff;
    width: var(--mebac-vid-ctl);
    height: var(--mebac-vid-ctl);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font: inherit;
    transition: background var(--mebac-vid-tf);
}
@media (hover: hover) {
    .mebac-vid-media .mebac-vid-ctl:hover {
        background: var(--mebac-vid-glass-hi);
        color: #fff;
    }
}
.mebac-vid-media .mebac-vid-mute {
    position: absolute;
    top: var(--mebac-vid-inset);
    right: var(--mebac-vid-inset);
    z-index: 6;
}
.mebac-vid-bar {
    position: absolute;
    left: var(--mebac-vid-inset);
    right: var(--mebac-vid-inset);
    bottom: var(--mebac-vid-inset);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 6px;
}
.mebac-vid-spacer {
    flex: 1;
}
.mebac-vid-time {
    display: inline-flex;
    align-items: center;
    height: var(--mebac-vid-ctl);
    padding: 0 10px;
    border-radius: 999px;
    background: var(--mebac-vid-glass);
    -webkit-backdrop-filter: blur(var(--mebac-vid-blur));
    backdrop-filter: blur(var(--mebac-vid-blur));
    color: #fff;
    font: 600 12px/1 var(--mebac-vid-font-text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.mebac-vid-time-cur {
    margin-right: 4px;
}
.mebac-vid-time-dur {
    margin-left: 4px;
}

/* ===== Progreso ===== */
.mebac-vid-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    touch-action: none;
    transition: height 0.15s;
}
.mebac-vid-progress::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 16px; /* area de toque */
}
.mebac-vid-progress-fill {
    position: absolute;
    inset: 0;
    background: var(--mebac-vid-primary);
    transform-origin: left center;
    transform: scaleX(0);
}
@media (hover: hover) {
    .mebac-vid-media:hover .mebac-vid-progress {
        height: 5px;
    }
}
.mebac-vid-media[data-state="playing"] .mebac-vid-progress-fill {
    will-change: transform;
}

/* ===== Menu de calidad ===== */
.mebac-vid-more {
    position: relative;
}
.mebac-vid-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 7;
    min-width: 168px;
    padding: 6px;
    border-radius: 10px;
    background: rgba(20, 20, 20, 0.86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s var(--mebac-vid-ease);
}
.mebac-vid-menu[hidden] {
    display: none;
}
.mebac-vid-menu.is-open {
    opacity: 1;
    transform: none;
}
.mebac-vid-menu-title {
    display: block;
    padding: 6px 10px 4px;
    font: 600 11px/1 var(--mebac-vid-font-text);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.mebac-vid-media .mebac-vid-menu button {
    position: static;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    background: none;
    color: #fff;
    font: 600 13px/1 var(--mebac-vid-font-text);
    line-height: 1;
    text-align: left;
}
.mebac-vid-media .mebac-vid-menu button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.mebac-vid-menu-sub {
    margin-left: auto;
    font-weight: 400;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}
.mebac-vid-menu button .mebac-vid-ico {
    display: none;
    width: 14px;
    height: 14px;
}
.mebac-vid-menu button[aria-checked="true"] .mebac-vid-ico {
    display: block;
}
.mebac-vid-menu button[aria-disabled="true"] {
    opacity: 0.45;
    cursor: default;
}

/* ===== Error ===== */
.mebac-vid-error {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font: 400 13px/1.5 var(--mebac-vid-font-text);
}
.mebac-vid-error[hidden] {
    display: none;
}
.mebac-vid-error .mebac-vid-ico {
    width: 22px;
    height: 22px;
}
.mebac-vid-media .mebac-vid-retry {
    position: static;
    border-radius: var(--mebac-vid-radius-sm);
    background: #fff;
    color: var(--mebac-vid-primary);
    font: 600 13px/1 var(--mebac-vid-font-text);
    line-height: 1;
    padding: 9px 16px;
}

/* ===== Texto dentro de la tarjeta ===== */
.mebac-vid-text {
    height: var(--mebac-vid-text-h);
    padding: 12px 4px 2px;
    overflow: hidden;
}
.mebac-vid-title {
    margin: 0 0 4px;
    font-family: var(--mebac-vid-font-title);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--mebac-vid-title);
    text-transform: none;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.mebac-vid-meta {
    margin: 0;
    font: 400 13px/1.5 var(--mebac-vid-font-text);
    color: var(--mebac-vid-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mebac-vid-dur {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--mebac-vid-title);
}

/* ===== Maquina de estados (data-state + clases) ===== */
.mebac-vid-shade,
.mebac-vid-media .mebac-vid-mute,
.mebac-vid-bar {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0s 0.2s;
}
.mebac-vid-media[data-state="idle"] .mebac-vid-progress,
.mebac-vid-media[data-state="idle"] .mebac-vid-shade {
    display: none;
}
.mebac-vid-media:not([data-state="idle"]) .mebac-vid-hint {
    opacity: 0;
    visibility: hidden;
}
.mebac-vid-media:not([data-state="idle"]):not([data-state="loading"]):not([data-state="ended"]) .mebac-vid-poster {
    opacity: 0;
}
/* loading / buffering: spinner en lugar del triangulo */
.mebac-vid-media[data-state="loading"] .mebac-vid-play .mebac-vid-ico--play,
.mebac-vid-media.is-buffering .mebac-vid-play .mebac-vid-ico--play {
    display: none;
}
.mebac-vid-media[data-state="loading"] .mebac-vid-spinner,
.mebac-vid-media.is-buffering .mebac-vid-spinner {
    display: block;
}
/* playing: el boton central desaparece; controles solo con is-ctrl-visible */
.mebac-vid-media[data-state="playing"]:not(.is-buffering) .mebac-vid-play {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.mebac-vid-media[data-state="playing"].is-ctrl-visible .mebac-vid-shade,
.mebac-vid-media[data-state="playing"].is-ctrl-visible .mebac-vid-mute,
.mebac-vid-media[data-state="playing"].is-ctrl-visible .mebac-vid-bar,
.mebac-vid-media[data-state="loading"] .mebac-vid-mute,
.mebac-vid-media[data-state="paused"] .mebac-vid-shade,
.mebac-vid-media[data-state="paused"] .mebac-vid-mute,
.mebac-vid-media[data-state="paused"] .mebac-vid-bar,
.mebac-vid-media[data-state="ended"] .mebac-vid-shade,
.mebac-vid-media[data-state="ended"] .mebac-vid-mute,
.mebac-vid-media[data-state="ended"] .mebac-vid-bar,
.mebac-vid-media.is-menu-open .mebac-vid-shade,
.mebac-vid-media.is-menu-open .mebac-vid-mute,
.mebac-vid-media.is-menu-open .mebac-vid-bar {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}
/* swaps de iconos */
.mebac-vid-toggle .mebac-vid-ico--play {
    display: none;
}
.mebac-vid-media[data-state="paused"] .mebac-vid-toggle .mebac-vid-ico--pause,
.mebac-vid-media[data-state="ended"] .mebac-vid-toggle .mebac-vid-ico--pause {
    display: none;
}
.mebac-vid-media[data-state="paused"] .mebac-vid-toggle .mebac-vid-ico--play,
.mebac-vid-media[data-state="ended"] .mebac-vid-toggle .mebac-vid-ico--play {
    display: block;
}
.mebac-vid-media[data-state="ended"] .mebac-vid-play .mebac-vid-ico--play {
    display: none;
}
.mebac-vid-media[data-state="ended"] .mebac-vid-play .mebac-vid-ico--replay {
    display: block;
}
.mebac-vid-ico--voff,
.mebac-vid-ico--compress {
    display: none;
}
.mebac-vid-media.is-muted .mebac-vid-ico--von {
    display: none;
}
.mebac-vid-media.is-muted .mebac-vid-ico--voff {
    display: block;
}
.mebac-vid-media.is-fs .mebac-vid-ico--expand {
    display: none;
}
.mebac-vid-media.is-fs .mebac-vid-ico--compress {
    display: block;
}
.mebac-vid-media[data-state="error"] .mebac-vid-play,
.mebac-vid-media[data-state="error"] .mebac-vid-bar,
.mebac-vid-media[data-state="error"] .mebac-vid-mute {
    display: none;
}

/* ===== Pantalla completa (clase puesta por JS) ===== */
.mebac-vid-media.is-fs {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    background: #000;
    --mebac-vid-ctl: 44px;
    --mebac-vid-ico: 20px;
    --mebac-vid-play: 88px;
    --mebac-vid-inset: 24px;
}
.mebac-vid-media.is-fs .mebac-vid-video {
    object-fit: contain;
}
.mebac-vid-media.is-fs .mebac-vid-num,
.mebac-vid-media.is-fs .mebac-vid-hint,
.mebac-vid-media.is-fs::after {
    display: none;
}
.mebac-vid-media.is-fs .mebac-vid-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(100vw - 48px, calc(100vh * 9 / 16 - 24px));
}
.mebac-vid-media.is-fs .mebac-vid-progress {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(100vw, calc(100vh * 9 / 16));
    height: 4px;
}
.mebac-vid-media.is-fs[data-state="playing"]:not(.is-ctrl-visible) {
    cursor: none;
}

/* ===== Foco (solo teclado) ===== */
.mebac-vid-media .mebac-vid-play:focus-visible,
.mebac-vid-media .mebac-vid-ctl:focus-visible,
.mebac-vid-section .mebac-vid-arrow:focus-visible,
.mebac-vid-media .mebac-vid-menu button:focus-visible,
.mebac-vid-media .mebac-vid-retry:focus-visible {
    outline: var(--wd-otl-width, 2px) var(--wd-otl-style, dotted) currentColor;
    outline-offset: 2px;
}
.mebac-vid-media:focus-visible {
    outline: 2px solid var(--mebac-vid-primary);
    outline-offset: 3px;
}

/* ===== Fallback sin backdrop-filter ===== */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .mebac-vid-media .mebac-vid-ctl,
    .mebac-vid-hint,
    .mebac-vid-time {
        background: rgba(0, 0, 0, 0.62);
    }
    .mebac-vid-menu {
        background: rgba(20, 20, 20, 0.96);
    }
}

/* ===== Tablet ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .mebac-vid-section {
        --mebac-vid-n: 3;
        margin: 16px 0 0;
    }
    .mebac-vid-section--standalone {
        margin: 0 0 32px;
    }
    .mebac-vid-heading {
        font-size: 22px;
    }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .mebac-vid-section {
        --mebac-vid-n: 2.15;
        --mebac-vid-gap: 12px;
        --mebac-vid-ctl: 28px;
        --mebac-vid-ico: 14px;
        --mebac-vid-play: 52px;
        --mebac-vid-inset: 10px;
        --mebac-vid-text-h: 72px;
        --mebac-vid-pad: 6px;
        --mebac-vid-radius-in: 5px;
        margin: 8px 0 0;
    }
    .mebac-vid-section--standalone {
        margin: 0 0 24px;
    }
    .mebac-vid-heading {
        font-size: 20px;
    }
    /* el track sangra hasta los bordes de la pantalla */
    .mebac-vid-track {
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
        scroll-padding-left: 15px;
    }
    .mebac-vid-num {
        min-width: 24px;
        height: 24px;
        padding: 0 6px;
        border-radius: 5px;
        font-size: 11px;
    }
    .mebac-vid-hint {
        height: 24px;
        padding: 0 8px;
        font-size: 11px;
    }
    .mebac-vid-media .mebac-vid-play .mebac-vid-ico {
        width: 22px;
        height: 22px;
    }
    .mebac-vid-time {
        display: none;
    }
    .mebac-vid-text {
        padding: 10px 2px 2px;
    }
    .mebac-vid-title {
        font-size: 14px;
    }
    .mebac-vid-meta {
        font-size: 12px;
    }
}

/* ===== Sin hover (tactil): nunca flechas ===== */
@media (hover: none) {
    .mebac-vid-section .mebac-vid-arrow {
        display: none !important;
    }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    .mebac-vid-section *,
    .mebac-vid-section *::before,
    .mebac-vid-section *::after {
        transition-duration: 0.01ms !important;
    }
    .mebac-vid-media:hover .mebac-vid-play {
        transform: none;
    }
    .mebac-vid-spinner {
        animation-duration: 1.4s;
    }
}

/* =============================================================================
   Hero de seccion [mebac_seccion_hero]
   Banda fotografica (banner de la seccion) con titulo y, encima, el carrusel
   conectado de videos: tarjeta activa (texto + player) y tiras laterales.
   Las posiciones salen de data-pos (c, l1..l4, r1..r4); JS solo cambia el atributo.
   ============================================================================= */
.mebac-vid-section.mebac-vid-hero {
    --hero-band: 400px;
    --hero-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --hero-t: 0.7s;
    position: relative;
    isolation: isolate;
    margin: 0 0 34px;
    padding: 44px 40px 0;
    contain: none;
    overflow-x: clip;
}
.mebac-vid-section.mebac-vid-hero:not(.has-videos) {
    min-height: 340px;
    padding-bottom: 44px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Banda fotografica */
.mebac-hero-photo {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: var(--hero-band);
    z-index: -1;
    border-radius: var(--mebac-vid-radius);
    overflow: hidden;
    background: #1d2a44;
}
.mebac-vid-hero:not(.has-videos) .mebac-hero-photo {
    height: 100%;
}
.mebac-hero-photo picture {
    display: block;
    width: 100%;
    height: 100%;
}
.mebac-hero-photo .mebac-hero-img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center;
}
.mebac-hero-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 22, 44, 0.66) 0%, rgba(12, 22, 44, 0.38) 55%, rgba(12, 22, 44, 0.58) 100%);
}
.mebac-vid-hero:not(.has-videos) .mebac-hero-photo::after {
    background: linear-gradient(180deg, rgba(12, 22, 44, 0.05) 30%, rgba(12, 22, 44, 0.6) 100%);
}

/* Titulos del banner */
.mebac-hero-head {
    position: relative;
    max-width: 720px;
}
.mebac-vid-hero .mebac-hero-title {
    margin: 0;
    font-family: var(--mebac-vid-font-title);
    font-size: 34px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-transform: none;
    color: #fff;
}
.mebac-vid-hero .mebac-hero-sub {
    margin: 8px 0 0;
    font-family: var(--mebac-vid-font-text);
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.84);
}

/* Carrusel */
/* El carrusel ocupa todo el ancho de la banda: las tiras llegan al borde del
   banner (la seccion recorta con overflow-x: clip), sin hueco al costado. */
.mebac-hero-cc {
    position: relative;
    margin: 26px -40px 0;
    outline: none;
}
.mebac-hero-cc:focus-visible {
    outline: var(--wd-otl-width, 2px) var(--wd-otl-style, dotted) rgba(255, 255, 255, 0.6);
    outline-offset: -4px;
}
.mebac-hero-stage {
    padding: 6px 0 10px;
}
.mebac-hero-panel {
    position: relative;
    height: 513px;
    touch-action: pan-y;
}

/* Diapositiva: posicion (--hx, por transform) y tamano por data-pos.
   La posicion viaja por transform (GPU); solo cambian de tamano las que
   pasan de tira a tarjeta. */
.mebac-hero-slide {
    --hx: 860px;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 74px;
    height: 205px;
    transform: translate3d(var(--hx), -50%, 0);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(28, 60, 120, 0.10), 0 4px 12px rgba(28, 60, 120, 0.07);
    opacity: 0;
    z-index: 2;
    cursor: pointer;
    pointer-events: none;
    contain: layout style;
    will-change: transform;
    transition: transform var(--hero-t) var(--hero-ease), width var(--hero-t) var(--hero-ease), height var(--hero-t) var(--hero-ease), opacity 0.35s ease;
}
.mebac-hero-slide.is-jump {
    transition: none !important;
}
/* mientras el dedo arrastra, videos.js ubica cada tira y la sigue sin retraso */
.mebac-hero-panel.is-dragging .mebac-hero-slide,
.mebac-hero-panel.is-dragging .mebac-hero-body,
.mebac-hero-panel.is-dragging .mebac-hero-strip {
    transition: none !important;
}
.mebac-hero-slide[data-pos="c"]  { --hx: -381px; width: 762px; height: 513px; opacity: 1; z-index: 1; cursor: default; pointer-events: auto; }
.mebac-hero-slide[data-pos="l1"] { --hx: -506px; width: 105px; height: 344px; opacity: 1; pointer-events: auto; }
.mebac-hero-slide[data-pos="r1"] { --hx: 401px; width: 105px; height: 344px; opacity: 1; pointer-events: auto; }
.mebac-hero-slide[data-pos="l2"] { --hx: -596px; opacity: 1; pointer-events: auto; }
.mebac-hero-slide[data-pos="r2"] { --hx: 522px; opacity: 1; pointer-events: auto; }
.mebac-hero-slide[data-pos="l3"] { --hx: -686px; opacity: 1; pointer-events: auto; }
.mebac-hero-slide[data-pos="r3"] { --hx: 612px; opacity: 1; pointer-events: auto; }
.mebac-hero-slide[data-pos="l4"] { --hx: -860px; }

.mebac-hero-clip {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
}

/* Tira lateral (portada) */
.mebac-hero-strip {
    position: absolute;
    inset: 0;
    padding: 8px;
    transition: opacity 0.22s ease;
}
.mebac-hero-strip img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    border-radius: 20px;
    background: #e9eef7;
    transition: transform 0.4s ease;
}
@media (hover: hover) {
    .mebac-hero-slide:not([data-pos="c"]):hover .mebac-hero-strip img {
        transform: scale(1.05);
    }
}
.mebac-hero-slide[data-pos="c"] .mebac-hero-strip {
    opacity: 0;
    pointer-events: none;
}

/* Tarjeta activa: texto + player. Queda fija en el centro de la tarjeta y se
   revela con un fundido mientras la tarjeta crece: todo se mueve como una sola
   pieza (antes entraba deslizando por su cuenta y se veia desfasado). */
.mebac-hero-body {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 762px;
    height: 513px;
    display: flex;
    gap: 24px;
    padding: 28px;
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}
.mebac-hero-slide[data-pos="c"] .mebac-hero-body {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.28s ease 0.12s, visibility 0s;
}
.mebac-hero-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0 4px 8px;
}
.mebac-hero-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mebac-vid-font-title);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--mebac-vid-primary);
}
.mebac-hero-kicker i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(28, 97, 231, 0.35);
}
.mebac-vid-hero .mebac-hero-vtitle {
    margin: 10px 0 0;
    font-family: var(--mebac-vid-font-title);
    font-size: 36px;
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--mebac-vid-title);
}
.mebac-vid-hero .mebac-hero-vdesc {
    margin: 14px 0 0;
    font-size: 17px;
    line-height: 1.5;
    color: var(--mebac-vid-text);
}
.mebac-vid-hero .mebac-hero-cta {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    margin: 18px 0 0;
    padding: 12px 18px;
    min-height: 0;
    border: 0;
    border-radius: var(--mebac-vid-radius-sm);
    background: var(--mebac-vid-primary);
    color: #fff;
    box-shadow: none;
    font-family: var(--mebac-vid-font-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.mebac-vid-hero .mebac-hero-cta:hover {
    background: var(--mebac-vid-primary-dk);
    color: #fff;
}
.mebac-hero-cta .mebac-vid-ico {
    width: 14px;
    height: 14px;
}
.mebac-hero-pills {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.mebac-hero-pill {
    display: inline-flex;
    max-width: 100%;
    padding: 5px 10px;
    border-radius: 4px;
    background: var(--mebac-vid-soft);
    color: var(--mebac-vid-primary);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Player dentro de la tarjeta activa */
.mebac-hero-frame {
    position: relative;
    flex: 0 0 auto;
    height: 100%;
    aspect-ratio: 9 / 16;
}
.mebac-vid-hero .mebac-vid-item,
.mebac-vid-hero .mebac-vid-card {
    width: 100%;
    height: 100%;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
}
.mebac-vid-hero .mebac-vid-card:hover {
    box-shadow: none;
}
.mebac-vid-hero .mebac-vid-media {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 22px;
}
.mebac-vid-hero .mebac-vid-text,
.mebac-vid-hero .mebac-vid-hint {
    display: none;
}

/* Conectores entre la tarjeta activa y las tiras */
.mebac-hero-conn {
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto 0;
    display: none;
    fill: #fff;
    overflow: visible;
    z-index: 3;
    pointer-events: none;
}
.mebac-hero-conn--big-r, .mebac-hero-conn--big-l { width: 22px; height: 42px; }
.mebac-hero-conn--sm-r, .mebac-hero-conn--sm-l { width: 18px; height: 28px; }
.mebac-hero-slide[data-pos="l1"] .mebac-hero-conn--big-r { display: block; left: calc(100% - 1px); }
.mebac-hero-slide[data-pos="r1"] .mebac-hero-conn--big-l { display: block; right: calc(100% - 1px); }
.mebac-hero-slide[data-pos="l2"] .mebac-hero-conn--sm-r,
.mebac-hero-slide[data-pos="l3"] .mebac-hero-conn--sm-r { display: block; left: calc(100% - 1px); }
.mebac-hero-slide[data-pos="r2"] .mebac-hero-conn--sm-l,
.mebac-hero-slide[data-pos="r3"] .mebac-hero-conn--sm-l { display: block; right: calc(100% - 1px); }

/* Flechas (PC) */
.mebac-vid-hero .mebac-hero-arrow {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    min-height: 0;
    margin: -24px 0 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--mebac-vid-title);
    box-shadow: 0 0 0 1px var(--mebac-vid-hair), 0 6px 18px rgba(28, 60, 120, 0.12);
    line-height: 0;
    cursor: pointer;
    transition: transform 0.25s var(--mebac-vid-ease), color 0.2s ease, box-shadow 0.2s ease;
}
.mebac-vid-hero .mebac-hero-arrow .mebac-vid-ico {
    width: 20px;
    height: 20px;
}
.mebac-vid-hero .mebac-hero-arrow:hover {
    background: #fff;
    color: var(--mebac-vid-primary);
    transform: scale(1.06);
    box-shadow: 0 0 0 1px rgba(28, 97, 231, 0.18), 0 8px 22px rgba(28, 97, 231, 0.18);
}
.mebac-vid-hero .mebac-hero-arrow:active {
    transform: scale(0.96);
}
.mebac-vid-hero .mebac-hero-arrow--prev { left: 10px; }
.mebac-vid-hero .mebac-hero-arrow--next { right: 10px; }

/* Puntos */
.mebac-hero-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 18px 0 0;
}
.mebac-vid-hero .mebac-hero-dot {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    width: 8px;
    height: 8px;
    min-height: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(28, 97, 231, 0.2);
    box-shadow: none;
    cursor: pointer;
    transition: width 0.45s var(--hero-ease), background-color 0.3s ease;
}
.mebac-vid-hero .mebac-hero-dot:hover {
    background: rgba(28, 97, 231, 0.4);
}
.mebac-vid-hero .mebac-hero-dot[aria-current="true"] {
    width: 28px;
    background: var(--mebac-vid-primary);
}

/* ----- Tablet ----- */
@media (min-width: 768px) and (max-width: 1119px) {
    .mebac-vid-section.mebac-vid-hero { --hero-band: 360px; padding: 36px 28px 0; }
    .mebac-hero-cc { margin-left: -28px; margin-right: -28px; }
    .mebac-vid-hero .mebac-hero-title { font-size: 28px; }
    .mebac-hero-panel { height: 440px; }
    .mebac-hero-slide { --hx: 700px; }
    .mebac-hero-slide[data-pos="c"]  { --hx: -280px; width: 560px; height: 440px; }
    .mebac-hero-slide[data-pos="l1"] { --hx: -398px; width: 100px; height: 340px; }
    .mebac-hero-slide[data-pos="r1"] { --hx: 298px; width: 100px; height: 340px; }
    .mebac-hero-slide[data-pos="l2"] { --hx: -490px; }
    .mebac-hero-slide[data-pos="r2"] { --hx: 416px; }
    .mebac-hero-slide[data-pos="l3"] { --hx: -580px; }
    .mebac-hero-slide[data-pos="r3"] { --hx: 506px; }
    .mebac-hero-slide[data-pos="l4"] { --hx: -700px; }
    .mebac-hero-body { width: 560px; height: 440px; padding: 20px; gap: 18px; }
    .mebac-vid-hero .mebac-hero-vtitle { font-size: 26px; }
    .mebac-vid-hero .mebac-hero-vdesc { font-size: 15px; margin-top: 10px; }
    .mebac-vid-hero .mebac-hero-cta { margin-top: 12px; padding: 10px 14px; }
}

/* ----- Celular: la foto se ve mas y el carrusel arranca mas abajo ----- */
@media (max-width: 767px) {
    /* --hero-cw: ancho de la tarjeta activa en px (videos.js lo ajusta midiendo el carrusel) */
    .mebac-vid-section.mebac-vid-hero { --hero-band: 380px; --hero-cw: min(340px, calc(100vw - 130px)); --hw: calc(var(--hero-cw) / 2); padding: 30px 14px 0; margin-bottom: 26px; }
    .mebac-vid-section.mebac-vid-hero:not(.has-videos) { min-height: 260px; }
    .mebac-hero-photo .mebac-hero-img { object-position: center top; }
    .mebac-vid-hero .mebac-hero-title { font-size: 24px; }
    .mebac-vid-hero .mebac-hero-sub { font-size: 13px; }
    /* mas arriba que antes y a todo el ancho: las tiras asoman hasta el borde */
    .mebac-hero-cc { margin: 70px -14px 0; }
    /* en el celular el cambio es mas corto: se siente mas directo */
    .mebac-vid-section.mebac-vid-hero { --hero-t: 0.45s; }
    .mebac-hero-panel { height: 560px; }
    .mebac-hero-slide { --hx: calc(var(--hw) + 120px); width: 60px; height: 480px; border-radius: 24px; }
    .mebac-hero-slide[data-pos="c"]  { --hx: calc(var(--hw) * -1); width: calc(var(--hw) * 2); height: 560px; }
    .mebac-hero-slide[data-pos="l1"] { --hx: calc(var(--hw) * -1 - 76px); width: 60px; height: 480px; }
    .mebac-hero-slide[data-pos="r1"] { --hx: calc(var(--hw) + 16px); width: 60px; height: 480px; }
    /* tiras contiguas fuera de pantalla (en pantallas mas anchas asoman): al
       arrastrar entran desde el borde en vez de dejar un hueco */
    .mebac-hero-slide[data-pos="l2"] { --hx: calc(var(--hw) * -1 - 152px); }
    .mebac-hero-slide[data-pos="r2"] { --hx: calc(var(--hw) + 92px); }
    .mebac-hero-slide[data-pos="l3"] { --hx: calc(var(--hw) * -1 - 228px); }
    .mebac-hero-slide[data-pos="r3"] { --hx: calc(var(--hw) + 168px); }
    .mebac-hero-slide[data-pos="l4"] { --hx: calc(var(--hw) * -1 - 304px); }
    .mebac-hero-slide[data-pos="r4"] { --hx: calc(var(--hw) + 244px); }
    .mebac-hero-body { width: calc(var(--hw) * 2); height: 560px; flex-direction: column-reverse; padding: 14px; gap: 12px; }
    .mebac-hero-frame { flex: 1 1 auto; width: 100%; height: auto; min-height: 0; aspect-ratio: auto; }
    .mebac-vid-hero .mebac-vid-media { border-radius: 16px; }
    .mebac-hero-text { flex: 0 0 auto; align-items: center; gap: 6px; padding: 0 4px 2px; text-align: center; }
    .mebac-hero-kicker { justify-content: center; }
    .mebac-vid-hero .mebac-hero-vtitle { margin-top: 4px; font-size: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .mebac-vid-hero .mebac-hero-vdesc { margin-top: 4px; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .mebac-vid-hero .mebac-hero-cta,
    .mebac-hero-pills,
    .mebac-vid-hero .mebac-hero-arrow { display: none; }
}

@media (hover: none) {
    .mebac-vid-hero .mebac-hero-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .mebac-hero-slide,
    .mebac-hero-body { transition-duration: 0.01ms !important; }
}

/* =============================================================================
   Carrusel como bloque aparte al final de la seccion (MEBAC_Videos_Render::carousel)
   Sin banda ni titulos, sobre el fondo de la pagina: acompaña sin llevarse el
   protagonismo. Va al final del archivo para ganarle a los ajustes por pantalla.
   ============================================================================= */
.mebac-vid-section.mebac-vid-hero--plain {
    margin: 0 0 60px;
    padding: 0;
}
.mebac-vid-hero--plain .mebac-hero-cc {
    margin: 0;
}
.mebac-vid-hero--plain .mebac-hero-cc:focus-visible {
    outline-color: rgba(28, 97, 231, 0.5);
}
/* Dentro de una pagina (Empresa, Preguntas frecuentes) via [mebac_videos videos=""] */
.mebac-vid-section.mebac-vid-hero--inline {
    margin: 40px 0;
}
/* Dos videos: sin tiras a la izquierda, se centra el par (tarjeta + tira) para
   que entre entero en columnas angostas */
.mebac-vid-hero.is-pair .mebac-hero-panel {
    transform: translateX(-62px);
}
@media (min-width: 768px) and (max-width: 1119px) {
    .mebac-vid-hero.is-pair .mebac-hero-panel { transform: translateX(-59px); }
}
@media (max-width: 767px) {
    .mebac-vid-section.mebac-vid-hero--plain { margin: 0 0 40px; padding: 0; }
    .mebac-vid-hero--plain .mebac-hero-cc { margin: 0; }
    .mebac-vid-section.mebac-vid-hero--inline { margin: 28px 0; }
    .mebac-vid-hero.is-pair .mebac-hero-panel { transform: none; }
}

/* =============================================================================
   Diseño "tarjetas" (estilo Alexa): fila de tarjetas con portada, titulo,
   subtitulo y link a la categoria; el video se abre en una ventana.
   Mobile first: scroll nativo con snap (el dedo mueve la fila, asoma la
   siguiente tarjeta). En PC: flechas por pagina.
   ============================================================================= */
.mebac-vid-section.mebac-vcards {
    --vc-w: 280px;
    --vc-gap: 16px;
    --vc-line: #d5d9d9;
    --vc-ink: #0f1111;
    --vc-link: var(--mebac-vid-primary);
    --vc-bleed: 15px;
    margin: 0 0 48px;
    contain: none;
}
.mebac-vid-section.mebac-vcards--inline {
    margin: 32px 0;
}
.mebac-vcards-vp {
    position: relative;
}
.mebac-vcards-track {
    display: flex;
    gap: var(--vc-gap);
    margin: 0 calc(var(--vc-bleed) * -1);
    padding: 2px var(--vc-bleed) 6px;
    list-style: none;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--vc-bleed);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.mebac-vcards-track::-webkit-scrollbar {
    display: none;
}

/* Tarjeta */
.mebac-vcard {
    flex: 0 0 min(var(--vc-w), calc(100vw - 72px));
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--vc-line);
    border-radius: 16px;
    scroll-snap-align: start;
}
/* pocas tarjetas: quedan centradas (con scroll, los margenes auto valen 0) */
.mebac-vcard:first-child { margin-left: auto; }
.mebac-vcard:last-child { margin-right: auto; }

/* Portada + play */
.mebac-vcards .mebac-vcard-media {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 5 / 4;
    margin: 0;
    padding: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: #e9eef7;
    box-shadow: none;
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.mebac-vcard-img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center 35%;
    transition: transform 0.4s ease;
}
.mebac-vcard-play {
    position: absolute;
    right: 20px;
    bottom: 15px;
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 1px 3px rgba(15, 17, 17, 0.25));
    transition: transform 0.2s ease;
}
.mebac-vcard-play svg {
    display: block;
    width: 100%;
    height: 100%;
}
.mebac-vcard-play circle { fill: #fff; }
.mebac-vcard-play path { fill: var(--vc-ink); }
@media (hover: hover) {
    .mebac-vcards .mebac-vcard-media:hover .mebac-vcard-img { transform: scale(1.03); }
    .mebac-vcards .mebac-vcard-media:hover .mebac-vcard-play { transform: scale(1.08); }
}
.mebac-vcards .mebac-vcard-media:focus-visible {
    outline: 2px solid var(--vc-link);
    outline-offset: -2px;
}

/* Texto */
.mebac-vcard-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 20px 17px 22px;
}
.mebac-vcards .mebac-vcard-title {
    margin: 0;
    font-family: var(--mebac-vid-font-title);
    font-size: 20px;
    font-weight: 600;
    line-height: 26px;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--vc-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mebac-vcards .mebac-vcard-desc {
    margin: 10px 0 0;
    font-family: var(--mebac-vid-font-text);
    font-size: 14px;
    line-height: 20px;
    color: var(--vc-ink);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mebac-vcards .mebac-vcard-link {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 22px;
    font-family: var(--mebac-vid-font-text);
    font-size: 14px;
    line-height: 20px;
    color: var(--vc-link);
    text-decoration: none;
}
.mebac-vcards .mebac-vcard-link:hover,
.mebac-vcards .mebac-vcard-link:focus-visible {
    color: var(--mebac-vid-primary-dk);
    text-decoration: underline;
}

/* Flechas (solo PC con mouse) */
.mebac-vcards .mebac-vcards-arrow {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    top: calc(var(--vc-w) * 0.4);
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1px solid var(--vc-line);
    border-radius: 50%;
    background: #fff;
    color: var(--vc-ink);
    box-shadow: 0 2px 6px rgba(15, 17, 17, 0.15);
    transform: translateY(-50%);
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}
.mebac-vcards .mebac-vcards-arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.mebac-vcards .mebac-vcards-arrow:hover {
    background: #fff;
    color: var(--vc-ink);
    box-shadow: 0 3px 10px rgba(15, 17, 17, 0.22);
}
.mebac-vcards .mebac-vcards-arrow--prev { left: 8px; }
.mebac-vcards .mebac-vcards-arrow--next { right: 8px; }
.mebac-vcards .mebac-vcards-arrow[hidden] { display: none !important; }
@media (hover: hover) and (min-width: 768px) {
    .mebac-vcards .mebac-vcards-arrow { display: inline-flex; }
}
@media (min-width: 768px) {
    .mebac-vid-section.mebac-vcards { --vc-bleed: 0px; }
    .mebac-vcard { flex-basis: var(--vc-w); }
}

/* Ventana del video */
html.mebac-vmodal-open { overflow: hidden; }
.mebac-vmodal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}
.mebac-vmodal[hidden] { display: none; }
.mebac-vmodal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 17, 17, 0.55);
    animation: mebac-vmodal-fade 0.2s ease;
}
.mebac-vmodal-box {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(15, 17, 17, 0.3);
    animation: mebac-vmodal-in 0.22s ease;
}
.mebac-vmodal-head {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 57px;
    padding: 0 12px 0 20px;
    background: #f0f2f2;
}
.mebac-vmodal .mebac-vmodal-title {
    margin: 0;
    font-family: "Lexend Deca", Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: none;
    color: #0f1111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mebac-vmodal .mebac-vmodal-close {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #0f1111;
    box-shadow: none;
    cursor: pointer;
}
.mebac-vmodal .mebac-vmodal-close:hover { background: rgba(15, 17, 17, 0.08); color: #0f1111; }
.mebac-vmodal-close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
}
.mebac-vmodal-body {
    padding: 12px 12px 16px;
}
/* video vertical 9:16: entra entero en la pantalla, a lo ancho en el celular */
.mebac-vmodal-video {
    display: block;
    width: min(calc(100vw - 48px), calc((100dvh - 120px) * 9 / 16));
    height: auto;
    aspect-ratio: 9 / 16;
    border-radius: 8px;
    background: #000;
    object-fit: contain;
}
@media (min-width: 768px) {
    .mebac-vmodal { padding: 24px; }
    .mebac-vmodal-head { padding: 0 16px 0 24px; }
    .mebac-vmodal-body { padding: 24px 24px 32px; }
    .mebac-vmodal-video { width: min(420px, calc((100vh - 170px) * 9 / 16)); }
}
@keyframes mebac-vmodal-fade { from { opacity: 0; } }
@keyframes mebac-vmodal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) {
    .mebac-vmodal-backdrop, .mebac-vmodal-box { animation: none; }
    .mebac-vcard-img, .mebac-vcard-play { transition: none; }
}
