
.hb {
    --hb-accent: #e10600;
    --hb-top: 0px;              /* alto del menú fijo; lo calcula hero-banner.js */
    position: relative;
    width: 100%;
    height: calc(min(82vh, 760px) + var(--hb-top));
    height: calc(min(82svh, 760px) + var(--hb-top));
    min-height: calc(460px + var(--hb-top));
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    touch-action: pan-y;
    outline: none;
}

.hb:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

/* ---------- Slides (fundido cruzado) ---------- */
.hb-slides { position: absolute; inset: var(--hb-top) 0 0 0; }   /* empieza debajo del menú fijo */

.hb-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .8s ease, visibility 0s linear .8s;
}

.hb-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    transition: opacity .8s ease;
}

.hb-media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* El video se alinea ARRIBA: si hay que recortar, se pierde la parte de abajo
   y no el logo o los títulos que suelen ir en la parte alta del video.
   Cambia 0% por 50% para centrarlo, o por 100% para alinearlo abajo. */
video.hb-media { object-position: 50% 25%; }

/* Las imágenes se acercan despacio mientras están activas (los videos ya tienen movimiento) */
img.hb-media {
    transform: scale(1.06);
    transition: transform 8s ease-out;
}
.hb-slide.is-active img.hb-media { transform: scale(1); }

.hb-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(10, 10, 10, .92) 0%, rgba(10, 10, 10, 0) 38%),
        linear-gradient(90deg, rgba(0, 0, 0, .75) 0%, rgba(0, 0, 0, .3) 45%, rgba(0, 0, 0, 0) 72%);
    pointer-events: none;
}

/* ---------- Texto (estilo tienda gamer) ---------- */
.hb-copy {
    position: absolute;
    left: max(24px, 6vw);
    bottom: clamp(92px, 16vh, 150px);
    max-width: min(660px, 88vw);
    opacity: 0;
    translate: 0 18px;
    transition: opacity .6s ease, translate .6s ease;
}

.hb-slide.is-active .hb-copy {
    opacity: 1;
    translate: 0 0;
    transition-delay: .3s;
}

/* Barra inclinada roja → naranja sobre el título */
.hb-copy::before {
    content: '';
    display: block;
    width: 84px;
    height: 6px;
    margin-bottom: 18px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--hb-accent), #ff7a18);
    box-shadow: 0 0 20px rgba(225, 6, 0, .85);
    transform: skewX(-30deg);
}

.hb-title {
    margin: 0 0 16px;
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-weight: 400;
    font-size: clamp(3.2rem, 8vw, 6.8rem);
    line-height: .92;
    letter-spacing: .03em;
    text-transform: uppercase;
    text-wrap: balance;
    color: #fff;
    text-shadow:
        0 2px 0 rgba(0, 0, 0, .4),
        0 0 30px rgba(225, 6, 0, .55),
        0 10px 36px rgba(0, 0, 0, .85);
}

.hb-sub {
    margin: 0;
    max-width: 48ch;
    padding-left: 14px;
    border-left: 3px solid var(--hb-accent);
    font-size: clamp(1.05rem, 1.7vw, 1.35rem);
    font-weight: 500;
    line-height: 1.45;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .9);
}

/* Botón: forma inclinada, degradado rojo→naranja y brillo */
.hb-cta {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    padding: 16px 38px;
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
    transition: transform .2s ease;
}

.hb-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 6px;
    transform: skewX(-14deg);
    background: linear-gradient(135deg, #ff2a20 0%, var(--hb-accent) 55%, #ff7a18 140%);
    box-shadow:
        0 8px 28px rgba(225, 6, 0, .55),
        inset 0 1px 0 rgba(255, 255, 255, .4);
    transition: box-shadow .25s ease, filter .25s ease;
}

.hb-cta::after {
    content: '\203A';
    font-size: 1.7em;
    line-height: .8;
    transition: transform .2s ease;
}

.hb-cta:hover { transform: translateY(-2px); }
.hb-cta:hover::before {
    filter: brightness(1.12);
    box-shadow:
        0 12px 38px rgba(225, 6, 0, .8),
        inset 0 1px 0 rgba(255, 255, 255, .5);
}
.hb-cta:hover::after { transform: translateX(5px); }
.hb-cta:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* ---------- Flechas ---------- */
.hb-arrow {
    position: absolute;
    top: calc(50% + var(--hb-top) / 2);
    z-index: 5;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1.5px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    background: rgba(15, 15, 20, .55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity .25s ease, background .25s ease, border-color .25s ease;
}

.hb-arrow svg { width: 26px; height: 26px; }
.hb-arrow.prev { left: 20px; }
.hb-arrow.next { right: 20px; }

.hb:hover .hb-arrow,
.hb:focus-within .hb-arrow { opacity: 1; }

.hb-arrow:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .7); }
.hb-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- Barras de progreso (una por slide) ---------- */
.hb-bars {
    position: absolute;
    left: max(24px, 6vw);
    bottom: 26px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

.hb-bar {
    position: relative;
    width: 56px;
    height: 20px;           /* zona de clic más grande que la barra */
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.hb-bar::before,
.hb-bar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 8px;
    height: 4px;
    border-radius: 2px;
}

.hb-bar::before { background: rgba(255, 255, 255, .3); }

.hb-bar::after {
    background: #fff;
    transform: scaleX(var(--p, 0));
    transform-origin: left center;
}

.hb-bar:hover::before { background: rgba(255, 255, 255, .5); }
.hb-bar:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

/* ---------- Audio (solo visible cuando el slide activo es video) ---------- */
.hb-audio {
    position: absolute;
    right: 24px;
    bottom: 20px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: opacity .3s ease;
}

.hb[data-media="imagen"] .hb-audio { opacity: 0; pointer-events: none; }

.hb-sound {
    position: relative;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1.5px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    background: rgba(15, 15, 20, .75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.hb-sound svg { grid-area: 1 / 1; width: 22px; height: 22px; transition: opacity .2s ease; }
.hb-ico-on { opacity: 0; }
.hb-sound.sound-on .hb-ico-on { opacity: 1; }
.hb-sound.sound-on .hb-ico-off { opacity: 0; }

.hb-sound:hover { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .7); }
.hb-sound.sound-on { border-color: rgba(80, 200, 140, .7); box-shadow: 0 0 16px rgba(80, 200, 140, .25); }
.hb-sound:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.hb-volwrap {
    height: 0;
    overflow: hidden;
    opacity: 0;
    display: flex;
    align-items: center;
    transition: height .25s ease, opacity .25s ease;
}

.hb-audio:hover .hb-volwrap,
.hb-audio:focus-within .hb-volwrap { height: 96px; opacity: 1; }

.hb-vol {
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 20px;
    height: 80px;
    cursor: pointer;
    accent-color: #fff;
}

/* ---------- Flecha de scroll ---------- */
.hb-scroll {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 5;
    translate: -50% 0;
    padding: 6px 12px;
    border: 0;
    background: none;
    cursor: pointer;
    opacity: .7;
    transition: opacity .2s ease;
}

.hb-scroll:hover { opacity: 1; }
.hb-scroll:focus-visible { outline: 2px solid #fff; border-radius: 8px; }
.hb-scroll svg { display: block; width: 24px; height: 14px; animation: hb-bounce 1.6s ease-in-out infinite; }

@keyframes hb-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

/* ---------- Móvil ---------- */
@media (max-width: 768px) {
    .hb { height: calc(min(78svh, 640px) + var(--hb-top)); min-height: calc(420px + var(--hb-top)); }

    .hb-shade {
        background:
            linear-gradient(0deg, rgba(10, 10, 10, .92) 0%, rgba(10, 10, 10, .45) 45%, rgba(10, 10, 10, 0) 75%);
    }

    .hb-copy { left: 20px; right: 20px; bottom: 84px; max-width: none; }
    .hb-copy::before { width: 60px; height: 5px; margin-bottom: 14px; }
    .hb-sub { font-size: 1rem; }
    .hb-cta { margin-top: 20px; padding: 14px 30px; font-size: .95rem; }

    .hb-arrow { display: none; }              /* se desliza con el dedo */
    .hb-scroll { display: none; }

    .hb-bars { left: 20px; right: 84px; bottom: 28px; }
    .hb-bar { flex: 1; width: auto; max-width: 56px; }

    .hb-audio { right: 16px; bottom: 22px; }
    .hb-volwrap { display: none; }            /* el volumen lo controla el teléfono */
}

/* ---------- Menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
    .hb-slide, .hb-copy, .hb-arrow { transition: none; }
    .hb-copy { translate: 0 0; }
    img.hb-media { transform: none; transition: none; }
    .hb-scroll svg { animation: none; }
}