/* Hero Header — frontend */

.cgms-hero-header {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: #000;
}

.cgms-hero-header__video-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    background: #000;
}

/* Cover geometry applied straight to the iframe. FitVids is not used and
   must not wrap this element — see fitvidsignore on the markup + unwrap in JS.
   Slight scale kills the 1px white seam from subpixel rounding on some GPUs. */
.cgms-hero-header__video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-height: 100%;
    min-width: 177.77vh;
    transform: translate(-50%, -50%) scale(1.02);
    pointer-events: none;
    border: 0;
}

.cgms-hero-header__video-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.cgms-hero-header__eyebrow {
    color: white;
    padding-bottom: 0;
    text-align: center;
}

.cgms-hero-header__title {
    font-weight: 200;
    font-size: 60px;
    padding-bottom: 5px;
}

.cgms-hero-header__content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.50);
}

.cgms-hero-header__button-wrap {
    display: inline-block;
    margin: 0 6px;
}

.cgms-hero-header__poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--cgms-hero-poster-desktop);
    background-size: cover;
    background-position: center;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.8s ease;
}

.cgms-hero-header__poster.is-hidden {
    opacity: 0;
    pointer-events: none;
}

@media only screen and (max-width: 998px) {
    .cgms-hero-header {
        height: auto;
        flex-direction: column;
        align-items: stretch;
    }

    .section_main_embed_video,
    .section_main_embed_video .et_pb_row_0 {
        padding: 0;
    }

    .cgms-hero-header__title {
        font-size: 24px;
        margin-bottom: 10px;
        font-weight: 400;
    }

    .cgms-hero-header::before {
        content: "";
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 70%, rgba(0, 0, 0, 0.9) 100%);
        z-index: 1;
    }

    .cgms-hero-header__content {
        padding: 14px 8px 16px;
        background: var(
            --cgms-hero-mobile-background,
            rgba(0, 0, 0, 0.50)
        );
    }

    .cgms-hero-header__eyebrow {
        margin: 0;
        font-size: 14px;
    }

    .cgms-hero-header__video-bg {
        position: relative;
        width: 100%;
        height: clamp(210px, 50vw, 340px);
        padding-bottom: 0;
    }

    .cgms-hero-header__video {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        width: 100vw !important;
        height: 56.25vw !important;
        min-height: 100% !important;
        min-width: 100% !important;
        transform: translate(-50%, -50%) scale(1.02) !important;
    }

    .cgms-hero-header__poster {
        background-image: var(--cgms-hero-poster-mobile, var(--cgms-hero-poster-desktop));
    }
}

@media screen and (max-width: 767px) {
    .cgms-hero-header__video-bg {
        height: clamp(190px, 52vw, 300px);
    }
}

@media screen and (max-width: 980px) {
    .cgms-hero-header__buttons {
        display: flex;
        align-items: stretch;
        justify-content: center;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0 12px 10px;
        box-sizing: border-box;
    }

    .cgms-hero-header__buttons .cgms-hero-header__button-wrap {
        display: flex;
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        margin: 0;
    }

    .cgms-hero-header__buttons .cgms-hero-header__button {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 10px 8px !important;
        font-size: 12px !important;
        line-height: 1.15 !important;
        white-space: normal !important;
        box-sizing: border-box;
    }
}

@media only screen and (max-width: 345px) {
    .cgms-hero-header__button-wrap {
        display: block !important;
        margin: 0;
    }
}
