/* =============================================================================
   Video Modal — "formato teatro" do vídeo do Hero
   Autocontido: não depende de Magnific Popup, Bootstrap modal ou jQuery.
   Usado por js/video-modal.js
   ========================================================================== */

.vh-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(0, 12, 26, .9);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .28s ease;
}

.vh-modal.is-open {
    display: flex;
    opacity: 1;
}

/* Palco: vídeo + ação, empilhados e centralizados.
   `position: relative` é a âncora do botão de fechar, que fica FORA da
   moldura — a moldura tem overflow:hidden e é reescrita pelo JS a cada
   abertura, então um botão dentro dela seria cortado e destruído. */
.vh-modal__stage {
    position: relative;
    width: 100%;
    max-width: 980px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform: translateY(14px) scale(.985);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.vh-modal.is-open .vh-modal__stage {
    transform: translateY(0) scale(1);
}

/* Moldura 16:9 responsiva */
.vh-modal__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8);
}

/* Fallback para navegadores sem aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
    .vh-modal__frame {
        height: 0;
        padding-bottom: 56.25%;
    }
}

.vh-modal__frame > iframe,
.vh-modal__frame > video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Estado sem vídeo configurado (antes de definir a hospedagem) */
.vh-modal__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
    color: #cbd5e1;
    font: 500 14px/1.5 'DM Sans', sans-serif;
}

.vh-modal__placeholder strong {
    color: #fff;
    font-size: 16px;
}

/* Ação abaixo do vídeo */
.vh-modal__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.vh-modal__cta {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font: 700 16px/1 'DM Sans', sans-serif;
    color: #002140;
    background: #FFE600;
    padding: 18px 32px;
    border-radius: 999px;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.vh-modal__cta:hover,
.vh-modal__cta:focus-visible {
    color: #002140;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -12px rgba(255, 230, 0, .55);
}

.vh-modal__note {
    margin: 0;
    font: 500 12.5px/1.4 'DM Sans', sans-serif;
    color: rgba(255, 255, 255, .62);
    text-align: center;
}

/* Fechar */
.vh-modal__close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease;
}

.vh-modal__close:hover,
.vh-modal__close:focus-visible {
    background: rgba(255, 255, 255, .28);
}

/* Trava de rolagem do fundo enquanto o modal está aberto */
body.vh-modal-open {
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .vh-modal {
        padding: 16px 12px;
    }

    .vh-modal__stage {
        gap: 16px;
    }

    .vh-modal__frame {
        border-radius: 12px;
    }

    .vh-modal__close {
        top: -42px;
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .vh-modal__cta {
        font-size: 15px;
        padding: 16px 24px;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {

    .vh-modal,
    .vh-modal__stage,
    .vh-modal__cta {
        transition: none;
    }

    .vh-modal__stage {
        transform: none;
    }
}
