/* VIDEO DEL HERO (loop sin sonido) Y VENTANA DEL PROMO */

.hero-video {
    position: relative;
    align-self: center;
    padding-right: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-loop-caja {
    position: relative;
    width: 100%;
}

.hero-video .hero-loop {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
    /* las orillas se desvanecen para fundirse con el fondo del hero (que no es negro liso: trae brillos amarillos) */
    -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 48%, #000 62%, transparent 100%);
    mask-image: radial-gradient(ellipse 72% 70% at 50% 48%, #000 62%, transparent 100%);
}

/* pausa del loop (WCAG 2.2.2): esquina de arriba, sobre el cielo, lejos de las unidades */
.hero-loop-pausa {
    position: absolute;
    top: 10%;
    right: 12%;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.hero-loop-pausa:hover {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

.hero-loop-pausa:focus-visible {
    outline: 3px solid #ffcc00;
    outline-offset: 2px;
}

.hero-loop-pausa[hidden] {
    display: none;
}

/* botón "Ver video": va debajo del loop, no encima: encima tapaba las unidades */
.hero-play {
    position: relative;
    margin-top: -6px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 10px 10px;
    border: 1px solid rgba(255, 204, 0, 0.45);
    border-radius: 50px;
    background: rgba(255, 204, 0, 0.06);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.hero-play:hover {
    background: rgba(255, 204, 0, 0.12);
    transform: scale(1.04);
}

.hero-play:focus-visible {
    outline: 3px solid #ffcc00;
    outline-offset: 3px;
}

.hero-play-disco {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #ffcc00;
    color: #000;
    font-size: 0.95rem;
    padding-left: 3px;
    box-sizing: border-box;
}

/* ventana del promo */
/* navegadores sin <dialog> (Safari de iOS anterior a 15.4): el JS pone y quita [open] */
.video-modal:not([open]) {
    display: none;
}

.video-modal {
    /* base.css pone margin:0 a todo; sin margin:auto el <dialog> se pega a la esquina */
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(1100px, 94vw, calc((100dvh - 140px) * 16 / 9));
    height: fit-content;
    max-width: none;
    padding: 0;
    border: 0;
    background: #000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    overflow: visible;
}

.video-modal::backdrop {
    background: rgba(0, 0, 0, 0.82);
}

.video-modal video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-modal-cerrar {
    position: absolute;
    top: -52px;
    right: 0;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

.video-modal-cerrar:hover {
    background: rgba(255, 255, 255, 0.22);
}

.video-modal-cerrar:focus-visible {
    outline: 3px solid #ffcc00;
    outline-offset: 2px;
}

@media screen and (max-width: 1024px) {
    .hero-video {
        padding: 0 20px;
        box-sizing: border-box;
    }
}

@media screen and (max-width: 480px) {
    .hero-play {
        font-size: 0.85rem;
        padding: 8px 16px 8px 8px;
    }

    .hero-play-disco {
        width: 34px;
        height: 34px;
    }

    .video-modal-cerrar {
        top: -50px;
    }
}
